Website/lib/publication.erb

31 lines
1001 B
Plaintext
Raw Normal View History

<%
bibtexdiv = "bibtex-#{LabMetadata.shortname_for(pub).gsub(/:/,"")}"
links = [
"<a onclick=\"$('##{bibtexdiv}').toggle();\">bibtex</a>"
];
2016-11-10 10:06:10 -05:00
links = (
pub.fetch("urls", []).
to_a.
map {|r,url| "<a href=\"#{url}\">#{r}</a>"}
) + links
%>
<li>
<div class="title"><%= pub["title"] %>
<span class="paper_links">[ <%= links.join(" | ") %> ]</span>
</div>
<div class="authors"><%= pub["authors"].map { |author| LabMetadata::link_for author }.join(", ") %></div>
<div class="metadata"><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
%></div>
<pre class-"well" id="<%=bibtexdiv%>" style="display:none; margin-left: auto; margin-right: auto; max-width: 600px; font-size: 8pt;"><%= LabMetadata.bibtex_for pub %></pre>
</li>