Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for multiple awards #53

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions _content/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ <h3 class="search-result-person-title">
<% if (item.poster_thumb_tag) { %><%= item.poster_thumb_tag %><% } else { %><i class="ion-ios-person"></i><% } %>
<a href="<%= item.link %>"><%= item.title %></a>
</h3>
<p class="meta"><%= item.graduated %><% if (item.award) { %> <%= item.award %><% } %></p>
<p><%= item.excerpt %></p>
<p class="meta">Graduated: <%= item.graduated %></p>
<% if (item.award) { %><p class="meta">Awards<%= item.award %></p><% }%>
<% if (item.excerpt) { %><p><%= item.excerpt %></p><% }%>
</div>
<% } else { %>
<% if (item.group == "about") { %>
Expand Down
6 changes: 3 additions & 3 deletions _data/defs/person.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
generated: true

- attr: award
type: string
short: Award person recieved on leaving the station
description: "Should be in title case, Fellowship, Commendation. If not applicable line should be omitted."
type: array
short: Award person recieved for work at the station
description: "If not applicable line should be omitted."

- attr: careers
type: array
Expand Down
5 changes: 5 additions & 0 deletions _data/defs/show.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@
short: Date of last performance
description: "In the format YYYY-MM-DD, omit if show only ran one day."

- attr: award
type: array
short: List of awards the show has won.
description: "Specify title, year and organisation who gave the award (eg. SRAs, URN, etc.). Awards given to people as part of a show should be recorded on the person's entry."

- attr: excerpt
type: string
description: "Generated excerpt of synopsis for use in search results and other summaries."
Expand Down
1 change: 1 addition & 0 deletions _includes/award.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<strong>{{ award.org }}, {{ award.year }}: </strong>{{ award.title }} {% if award.show %}(<i>{{ award.show }}</i>){% endif %}
6 changes: 4 additions & 2 deletions _layouts/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ <h2>Then</h2>
{% endfor %}

{% if person.award.size != 0 %}
<dt><i class="fas fa-fw fa-trophy"></i>Award</dt>
<dd>{{ person.award }}</dd>
<dt><i class="fas fa-fw fa-trophy"></i>Awards</dt>
{% for award in person.award %}
<dd>{%include award.html award=award %}</dd>
{% endfor %}
{% endif %}

{% if person.committees.size != 0 %}
Expand Down
10 changes: 10 additions & 0 deletions _layouts/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ <h1 class="show-title">{{ show.title | escape_once }}</h1>
{% endif %}
</p>
</div>
{% if show.award %}
<i class="meta-icon fa fa-trophy"></i>
<div class="meta-col show-awards">
<p>
{% for award in show.award %}
{% include award.html award=award %}{% unless forloop.last %}<br /> {% endunless %}
{% endfor %}
</p>
</div>
{% endif %}
</div>

</header>
Expand Down
17 changes: 17 additions & 0 deletions _people/george_oneill.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ links:
- type: Twitter
username: ofluff

award:
- title: Best Newcomer
year: 2012
org: SRA
- title: Best Journalistic Programming (Bronze) (The Science Show)
year: 2012
org: SRA
- title: Best Journalistic Programming (Silver) (The Science Show)
year: 2013
org: SRA
- title: Best Speech Program (Silver) (The Science Show - A Brief History of You)
year: 2014
org: SRA
- title: Best Technical Achievement (Gold)
year: 2015
org: SRA

submitted: 2018-08-13
---

Expand Down
5 changes: 4 additions & 1 deletion _people/james_perkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ course:
links:
- type: Twitter
username: JamesPkns
award: Lifetime Membership
award:
- title: Lifetime Membership
year: 2017
org: URN
graduated: 2017
---
5 changes: 4 additions & 1 deletion _people/johnathan_graydon.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ course:
graduated: 2018
contact_allowed: true

award: SU Lifetime Membership
award:
- title: SU Lifetime Membership
year: 2018
org: SU
submitted: 2018-08-23
---
5 changes: 4 additions & 1 deletion _people/matt_manley.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ gender: male
links:
- type: Twitter
username: MattManley95
award: Lifetime Membership
award:
- title: Lifetime Membership
year: 2017
org: URN
graduated: 2017
---
5 changes: 4 additions & 1 deletion _people/michael_gaffney.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ contact_allowed: true
links:
- type: Twitter
username: M_W_Gaffney
award: SU Award for Contributing to the Student Experience.
award:
- title: SU Award for Contributing to the Student Experience
year: 2013?
org: SU
submitted: 2018-08-21

---
Expand Down
35 changes: 35 additions & 0 deletions _people/stuart_manton.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,41 @@ links:
- type: LinkedIn
username: stumanton

award:
- title: Best Interview (Nominated)
year: 2011
org: SRA
- title: Best Live Event or OB (Silver)
year: 2011
org: SRA
- title: Best Journalistic Programming (Silver) (The Pulse)
year: 2011
org: SRA
- title: Best Student Radio Station (Gold)
year: 2011
org: SRA
- title: Best Journalistic Programming (Gold) (The Pulse - The Truth about Taxis)
year: 2012
org: SRA
- title: Best Journalistic Programming (Silver) (The Pulse - Who's Lenton Is It?)
year: 2012
org: SRA
- title: Best Journalistic Programming (Bronze) (The Pulse - Who's Protecting Who?)
year: 2012
org: SRA
- title: Best Marketing and Station Sound (Gold)
year: 2012
org: SRA
- title: Best Student Radio Station (Gold)
year: 2012
org: SRA
- title: Best Marketing and Station Sound (Bronze)
year: 2013
org: SRA
- title: Best Student Radio Station (Gold)
year: 2013
org: SRA
submitted: 2018-08-21
---

Obviously being part of the team that won Station of the Year every year for the four years I was at URN - particularly 2011/12 and 2012/13 where I edited the entries. This was special.
Expand Down
10 changes: 5 additions & 5 deletions _plugins/people.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def generate_person(person)
person.data["graduated_estimated"] = false
end

# Student status
# Student status
if not person.data["graduated"] or not person.data["graduated_actual"] or (person.data["graduated"] > Time.now().year)
if (person.data["shows"]) or (person.data["committees"])
person.data["student"] = true
else
person.data["student"] = false
person.data["student"] = true
else
person.data["student"] = false
end
end
end

# Replace headshots with SmugMug Images
if person.data["headshot"]
Expand Down
2 changes: 1 addition & 1 deletion feeds/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ excerpt: ""
"excerpt": {{ person.content | strip_html | truncatewords: 50 | jsonify}},
{% if person.headshot %}"poster_thumb_tag": "<a href='{{person.url}}'><img src='{{person.headshot.person_search}}' class='search-result-poster-thumb' alt='{{person.name}}' /></a>",{% endif %}
"graduated": {{ person.graduated | jsonify }},
"award": {{ person.award | jsonify }},
"award": {% if person.award.first == null %}null{% else %}"{% for award in person.award %} | {{award.title}}, {{award.year}}, {{award.org}}{% endfor %}"{% endif %},
"link": {{ person.url | jsonify }}
}
{% assign first = false %}
Expand Down