]> git.decadent.org.uk Git - maypole.git/blob - ex/fancy_example/templates/factory/view
tested and it seems to work
[maypole.git] / ex / fancy_example / templates / factory / view
1 [%#
2
3 =for doc
4
5 The C<view> template takes some objects (usually just one) from
6 C<objects> and displays the object's properties in a table. 
7
8 =cut
9
10 #%]
11 [% PROCESS macros %]
12 [% INCLUDE header %]
13 [% view_item(object); %]
14 [%#
15
16 =for doc
17
18 The C<view> template also displays a list of other objects related to the first
19 one via C<has_many> style relationships; this is done by calling the
20 C<related_accessors> method - see L<Model/related_accessors> - to return
21 a list of has-many accessors. Next it calls each of those accessors, and
22 displays the results in a table.
23
24 #%]
25     <br /><a href="[%base%]/[%object.table%]/list">Back to listing</a>
26 [% view_related(object); %]
27     
28 [%
29     button(object, "edit");
30     button(object, "delete");
31 %]
32 [% INCLUDE footer %]