1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-11-27 22:59:08 +02:00
Files
explain.depesz.com/templates/controller/history.html.ep
2017-06-13 20:33:27 +02:00

60 lines
1.5 KiB
Plaintext
Executable File

% layout 'default';
% my $title = 'History';
% title $title;
<h1><%= $title %> <small>(<%= $rs->{ since } %> - <%= $rs->{ to } %>)</small></h1>
% if ( $rs->{ error } ) {
<p class="msg msg-error">
%= $rs->{ error }
</p>
% } else {
% my @plans = @{ $rs->{ rows } };
% if ( scalar @plans ) {
<div class="history">
% my $date = '';
% my $open = 0;
% for my $plan ( @plans ) {
% if ( $plan->{ date } ne $date ) {
% if ( $open ) {
</ul>
% $open = 0;
% }
<h3><%= $plan->{ date } =%></h3>
<ul class="clearfix date date-<%= $plan->{ date } =%>">
% $open = 1;
% }
<li><a href="<%= url_for( 'show', id => $plan->{ id } ) =%>"><%= $plan->{ id } =%></a></li>
% $date = $plan->{ date };
% }
% if ( $open ) {
</ul>
% }
</div>
% } else {
<p class="msg msg-no-results">
Sorry, but no results were found in the database for this page.
</p>
% }
<div class="paginator">
% if ( $rs->{ next_date } ) {
<a class="newer" href="<%= url_for 'current', date => $rs->{ next_date } %>" title="newer" rel="next">newer</a>
% }
% if ( $rs->{ prev_date } ) {
<a class="older" href="<%= url_for 'current', date => $rs->{ prev_date } %>" title="older" rel="prev">older</a>
% }
</div>
% }