[Catalyst-commits] r14153 - in trunk/examples/CatalystAdvent:
lib/CatalystAdvent/Controller root root/static/css
dpetrov at dev.catalyst.perl.org
dpetrov at dev.catalyst.perl.org
Fri Nov 11 08:28:22 GMT 2011
Author: dpetrov
Date: 2011-11-11 08:28:22 +0000 (Fri, 11 Nov 2011)
New Revision: 14153
Modified:
trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm
trunk/examples/CatalystAdvent/root/static/css/screen.css
trunk/examples/CatalystAdvent/root/wrapper.tt
Log:
Add links to the previous years
Modified: trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm 2011-11-10 23:06:40 UTC (rev 14152)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm 2011-11-11 08:28:22 UTC (rev 14153)
@@ -54,6 +54,7 @@
closedir DIR;
my $year = pop @years || $c->stash->{now}->year;
+ $c->stash( previous_years =>\@years );
$c->go( $self->action_for('year'), [$year], []);
# $c->stash->{year} = $year;
# $c->stash->{calendar} = calendar( 12, $year );
Modified: trunk/examples/CatalystAdvent/root/static/css/screen.css
===================================================================
--- trunk/examples/CatalystAdvent/root/static/css/screen.css 2011-11-10 23:06:40 UTC (rev 14152)
+++ trunk/examples/CatalystAdvent/root/static/css/screen.css 2011-11-11 08:28:22 UTC (rev 14153)
@@ -180,6 +180,10 @@
width: 33%;
}
+.center {
+ text-align: center;
+}
+
@media print {
a {
color: black !important;
Modified: trunk/examples/CatalystAdvent/root/wrapper.tt
===================================================================
--- trunk/examples/CatalystAdvent/root/wrapper.tt 2011-11-10 23:06:40 UTC (rev 14152)
+++ trunk/examples/CatalystAdvent/root/wrapper.tt 2011-11-11 08:28:22 UTC (rev 14153)
@@ -18,6 +18,12 @@
<div id="content">
[%- IF days_until > 0 %]
<h1>[% days_until %] days until the calendar starts!</h2>
+<p class="center">In the mean time, you might want to check our archives.</p>
+<p class="center">
+[% FOREACH previous_year IN previous_years %]
+ <a href="[% c.uri_for('/', previous_year) %]">[% previous_year %]</a>[% UNLESS loop.last %] - [% END %]
+[% END %]
+</p>
[% ELSE %]
[% content %]
[% END %]
More information about the Catalyst-commits
mailing list