[Catalyst-commits] r14430 - in trunk/examples/CatalystAdvent: lib/CatalystAdvent/Controller root root/static/css

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Wed Jan 16 01:23:15 GMT 2013


Author: caelum
Date: 2013-01-16 01:23:15 +0000 (Wed, 16 Jan 2013)
New Revision: 14430

Modified:
   trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm
   trunk/examples/CatalystAdvent/root/static/css/screen.css
   trunk/examples/CatalystAdvent/root/year.tt
Log:
all years links for year page


Modified: trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm
===================================================================
--- trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm	2013-01-09 15:03:53 UTC (rev 14429)
+++ trunk/examples/CatalystAdvent/lib/CatalystAdvent/Controller/Calendar.pm	2013-01-16 01:23:15 UTC (rev 14430)
@@ -125,6 +125,9 @@
     }
 
     $c->stash->{links} = \@links;
+
+    # for years links
+    $c->stash(years => [ $self->_years($c) ]);
 }
 
 =head2 year

Modified: trunk/examples/CatalystAdvent/root/static/css/screen.css
===================================================================
--- trunk/examples/CatalystAdvent/root/static/css/screen.css	2013-01-09 15:03:53 UTC (rev 14429)
+++ trunk/examples/CatalystAdvent/root/static/css/screen.css	2013-01-16 01:23:15 UTC (rev 14430)
@@ -75,6 +75,11 @@
     color: #b00;
 }
 
+h4 {
+    text-align: center;
+    color: #b00;
+}
+
 #content .calendar {
     margin-left: auto;
     margin-right: auto;

Modified: trunk/examples/CatalystAdvent/root/year.tt
===================================================================
--- trunk/examples/CatalystAdvent/root/year.tt	2013-01-09 15:03:53 UTC (rev 14429)
+++ trunk/examples/CatalystAdvent/root/year.tt	2013-01-16 01:23:15 UTC (rev 14430)
@@ -50,4 +50,10 @@
 </div>
 [% CATCH %]
 [% END %]
+<h4>All Years</h4>
+<div class='center'>
+    [% FOREACH year IN years %]
+        <span>[ <a href='[% c.uri_for('/', year) %]'>[% year %]</a> ]</span>
+    [% END %]
+</div>
 <p class="rss">[<a href="[% c.uri_for('/feed', year) %]">XML Feed</a>]</p>




More information about the Catalyst-commits mailing list