Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (40 sloc) 1.54 KB
<%- rss = 'recent?f=' _ c.req.params.f || 'l' %>
<div class="search-bar">
<% INCLUDE inc/activity.html query = 'f=' _ c.req.params.f || 'l' %>
<a href ="/favorite/recent">Recent ++</a>
<hr/>
<strong>Filter</strong>
<form action="<% c.uri_for('/recent') %>" method="get" onchange="this.form.submit()">
<%- filter = { l = 'Latest releases', n = 'New distributions', a = 'Including BackPAN' }; c.req.params.f ||= 'l';
FOR item IN ['l', 'n']; %>
<label><input type="radio" name="f" value="<% item %>"<% IF c.req.params.f == item; ' checked'; END %> onchange="this.form.submit()"> <% filter.${item} %></label>
<% END %>
<input type="submit" style="display: none">
</form>
</div>
<div class="content">
<%-
MoY = [undef, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
DoW = [undef, "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
releases = [];
FOREACH release IN recent;
date = release.date.dt;
day = "%d %s %s".sprintf(date.day, MoY.item(date.month), date.year);
IF day != last;
INCLUDE inc/release-table.html releases = releases;
releases = [];
IF !loop.first %><br><% END %>
<big>
<strong class="recent-date">
<%- USE dt = DateTime( year = date.year, month = date.month, day = date.day ); %>
<% DoW.item(dt.day_of_week); ", "; day; last = day %>
</strong>
</big>
<%
END;
releases.push(release);
-%>
<% END %>
<% INCLUDE inc/release-table.html releases = releases %>
<% INCLUDE inc/pager.html size = 100 %>
</div>
Jump to Line
Something went wrong with that request. Please try again.