Website/lib/publication.erb

39 lines
1.3 KiB
Plaintext

<%
bibtexdiv = "bibtex-#{LabMetadata.shortname_for(pub).gsub(/:/,"")}"
links = [
"<a onclick=\"$('##{bibtexdiv}').toggle();\">bibtex</a>"
];
links = (
pub.fetch("urls", []).
to_a.
map {|r,url| "<a href=\"#{url}\">#{r}</a>"}
) + links
%>
<dt style="margin-top: 10px"><%= pub["title"] %></dt>
<dd style="padding-left: 10px">
<div class="authors"><%= pub["authors"].map { |author| LabMetadata::link_for author }.join(", ") %></div>
<% if pub.has_key? "notes" %>
<div class="paper_notes">
<% pub["notes"].each do |note| %>
<div class="paper_note"><%= note %></div>
<% end %>
</div>
<% end %>
<div class="metadata" style="font-weight: bold;"><span class="venue"><%= pub["venue"] %> <%= pub["year"] %></span>
<%
type = LabMetadata.complete_venue(pub)["type"]
case type
when nil, "conference", "journal" then "ignore"
when "techreport" then %>(Tech Report)<%
else %>(<%= type.capitalize %>)<%
end
%> <span class="paper_links">[ <%= links.join(" | ") %> ]</span>
</div>
<div id="<%=bibtexdiv%>" style="display: none" class="select-on-click">
<pre class="well" style="margin-left: auto; margin-right: auto; margin-top: 10px; font-size: 8pt;"><%= LabMetadata.bibtex_for pub %></pre>
</div>
</dd>