will claimed paper
This commit is contained in:
parent
e4ae40095e
commit
9b990c0c3c
|
@ -72,6 +72,9 @@ schedule:
|
|||
- date: Feb 6
|
||||
event: Class Canceled due to Snow
|
||||
- date: Feb 13
|
||||
speakers:
|
||||
- name: William Spoth
|
||||
title: Fusing data with correlations
|
||||
- date: Feb 20
|
||||
- date: Feb 27
|
||||
- date: Mar 6
|
||||
|
@ -111,6 +114,11 @@ The course is graded Sat/Unsat. For a satisfactory grade:
|
|||
<h2>Schedule</h2>
|
||||
|
||||
<table style="padding-left: 30px;">
|
||||
<%
|
||||
papers_by_title = papers.map { |paper| [paper["title"], paper] }.to_h
|
||||
claimed_papers = schedule.map { |event| event.fetch("speakers", []).map { |speaker| [speaker["title"], speaker["name"]] } }.flatten(2).to_h
|
||||
%>
|
||||
|
||||
<% schedule.each do |event| %>
|
||||
<tr>
|
||||
<th style="text-align: right; padding-right: 30px;"><%= event["date"] %></th>
|
||||
|
@ -118,7 +126,7 @@ The course is graded Sat/Unsat. For a satisfactory grade:
|
|||
<b><%= event["event"] %></b>
|
||||
<% elsif event.has_key? "speakers" %>
|
||||
<ul><% event["speakers"].each do |speaker| %>
|
||||
<li><%= speaker["name"] %> presents <a href="<%= speaker["url"]%>"><%= speaker["title"] %></a><br/></li>
|
||||
<li><%= speaker["name"] %> presents '<a href="<%= speaker.fetch("url") { papers_by_title[speaker["title"]] } %>"><%= speaker["paper"] %></a>'</li>
|
||||
<% end %></ul>
|
||||
<% else %>
|
||||
No One Signed Up (yet)
|
||||
|
@ -133,7 +141,13 @@ The course is graded Sat/Unsat. For a satisfactory grade:
|
|||
<% papers.sort_by { |paper| paper["title"] }
|
||||
.map { |paper| paper.merge({ "url" => paper["url"].gsub(/:\/\/dl\.acm\.org/, "://dl-acm-org.gate.lib.buffalo.edu") }) }
|
||||
.each.with_index do |paper, idx| %>
|
||||
<dt style="margin-top: 30px;"><b><%= idx+1 %>.</b> <a href="<%= paper["url"]%>"><%= paper["title"] %></a></dt>
|
||||
<dt style="margin-top: 30px;"><b><%= idx+1 %>.</b>
|
||||
<% if claimed_papers.has_key? paper["title"] %>
|
||||
<span style="text-decoration: line-through; "><a href="<%= paper["url"]%>"><%= paper["title"] %></a></span> (claimed by <%=claimed_papers[paper["title"]] %>
|
||||
<% else %>
|
||||
<a href="<%= paper["url"]%>"><%= paper["title"] %></a>
|
||||
<% end %>
|
||||
</dt>
|
||||
<dd style="max-width: 600px; padding-left: 30px;"><p><%= paper.fetch("abstract", "[Abstract Missing]").gsub(/\n+/, "</p><p>") %></p></dd>
|
||||
<% end %>
|
||||
</dl>
|
Loading…
Reference in a new issue