X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ex%2Ffancy_example%2Ftemplates%2Fdrinker%2Fview;fp=ex%2Ffancy_example%2Ftemplates%2Fdrinker%2Fview;h=50a51cab3da7cc22c1360311d16667dec3bc28ae;hb=7bb021648c28d2f70ec2853f0d01dd49c6437460;hp=0000000000000000000000000000000000000000;hpb=c3973978e1373a262d13da63c9e9ecfde4b72cc7;p=maypole.git diff --git a/ex/fancy_example/templates/drinker/view b/ex/fancy_example/templates/drinker/view new file mode 100644 index 0000000..50a51ca --- /dev/null +++ b/ex/fancy_example/templates/drinker/view @@ -0,0 +1,53 @@ +[%# + +=for doc + +Drinker C template displays drinker and from to drink beer. + +=cut + +#%] +[% PROCESS macros %] +[% INCLUDE header %] +[% view_item(object); %] + +[%# Form to drink a pint. We made sure to only make inputs for pint. could do it + # here like so. + USE this = Class(classmetadata.name); + classmetadata.cgi = this.to_field(pints); + +%] + + +[%# + +=for doc + +The C template also displays a list of other objects related to the first +one via C style relationships; this is done by calling the +C method - see L - to return +a list of has-many accessors. Next it calls each of those accessors, and +displays the results in a table. + +#%] +
Back to listing +[% view_related(object); %] + +[% + button(object, "edit"); + button(object, "delete"); +%] +[% INCLUDE footer %]