[Catalyst-commits] r8215 - in
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp:
lib/MyApp/Controller root
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Aug 12 05:02:27 BST 2008
Author: karpet
Date: 2008-08-12 05:02:26 +0100 (Tue, 12 Aug 2008)
New Revision: 8215
Added:
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/default.tt
Modified:
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/lib/MyApp/Controller/Root.pm
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/edit.tt
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/list.tt
Log:
add default page and fix list.tt
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/lib/MyApp/Controller/Root.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/lib/MyApp/Controller/Root.pm 2008-08-12 03:48:35 UTC (rev 8214)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/lib/MyApp/Controller/Root.pm 2008-08-12 04:02:26 UTC (rev 8215)
@@ -26,11 +26,9 @@
=cut
-sub default : Private {
+sub default : Path {
my ( $self, $c ) = @_;
- # Hello World
- $c->response->body( $c->welcome_message );
}
=head2 end
Added: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/default.tt
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/default.tt (rev 0)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/default.tt 2008-08-12 04:02:26 UTC (rev 8215)
@@ -0,0 +1,9 @@
+<ul>
+
+<li><a href="[% c.uri_for('/song/list') %]">Song list</a></li>
+
+<li><a href="[% c.uri_for('/album/list') %]">Album list</a></li>
+
+</ul>
+
+
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/edit.tt
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/edit.tt 2008-08-12 03:48:35 UTC (rev 8214)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/edit.tt 2008-08-12 04:02:26 UTC (rev 8215)
@@ -22,7 +22,7 @@
<h2>Related records</h2>
[% PROCESS list.tt
fields = ['title', 'artist']
- results = object.$related_method
+ rows = object.$related_method
base_uri = related_uri
%]
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/list.tt
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/list.tt 2008-08-12 03:48:35 UTC (rev 8214)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/t/example/MyApp/root/list.tt 2008-08-12 04:02:26 UTC (rev 8215)
@@ -8,7 +8,7 @@
END;
END;
- DEFAULT results = results.results;
+ DEFAULT rows = results.results;
DEFAULT base_uri = c.uri_for('');
@@ -22,7 +22,7 @@
[% END %]
</tr>
[% SET count = 0;
- FOREACH r = results;
+ FOREACH r = rows;
count = count + 1;
%]
<tr [% IF (count % 2) %]class="alt"[% END %]>
More information about the Catalyst-commits
mailing list