Website/src/grants/index.erb

44 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

---
title: Funding Sources
---
<h1>Research Funding</h1>
<p><strong>The ODIn lab relies on <u>your</u> support, and the support of countless others to fulfill our goal of making data more accessible.</strong>  We're extremely grateful to the American taxpayer and for the support we've received from <a href="http://oracle.com">Oracle</a> and <a href="http://www.google.com/">Google</a>.  In the interest of openness and data accessibility, we're publishing the scientific content of our accepted proposals -- the same content that the reviewers see.</p>
<div class="grants">
<% $db["cv/okennedy/grants"].
where { |grant| ["accepted", "completed"].include? grant["status"] }.
map { |grant| [grant["start"].split(/\//)[-1].to_i, grant] }.
reduce.
sort_by { |x| -x[0] }.
each do |year, grants| %>
<h2><%=year%></h2>
<ul class="grants">
<% grants.each do |grant| %>
<li>
<div class="title"><%= grant["title"] %></div>
<div class="section">$<%= grant["amount"].to_i.format_number %> from <%=grant["agency"]%>
<% if grant.has_key? "agency_id" %> (Award #<%= grant["agency_id"] %>)<% end %>
</div>
<div class="section"><b>PIs:</b>
<% pis = grant.fetch("copis", []).clone
if grant["role"] == "PI"
pis.unshift("Oliver Kennedy")
else
pis.push("Oliver Kennedy")
end %>
<%= pis.map { |pi| LabMetadata::link_for pi }.join(", ") %></div>
<% if grant.has_key? "supports" %>
<div class="section"><b>Supports:</b>
<%= grant["supports"].map { |student| LabMetadata::link_for student }.join(", ")%></div>
<% end %>
<% if grant.has_key? "urls" %>
<div class="section">
<%= grant["urls"].map { |r, url| "<a href=\"#{url}\">#{r}</a>" }.join(", ") %>
</div>
<% end %>
</li>
<% end %>
</ul>
<% end %>
</div>