X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=examples%2Ffancy_example%2Ftemplates%2Ffactory%2Fedit;fp=examples%2Ffancy_example%2Ftemplates%2Ffactory%2Fedit;h=cf883117bdda83a8b01d6eb54232d79ee7822974;hb=ccffaddb7564c652448befe4d67d0ae5276d8975;hp=0000000000000000000000000000000000000000;hpb=ac095b83019b7eff094549fa33f66147170ea35f;p=maypole.git diff --git a/examples/fancy_example/templates/factory/edit b/examples/fancy_example/templates/factory/edit new file mode 100644 index 0000000..cf88311 --- /dev/null +++ b/examples/fancy_example/templates/factory/edit @@ -0,0 +1,70 @@ +[%# + +=head1 edit + +This is the edit page. It edits the passed-in object, by displaying a +form similar to L but with the current values filled in. + +=cut + +#%] +[% PROCESS macros %] +[% INCLUDE header %] +[% INCLUDE title %] + +[% IF request.action == 'edit' %] +[% INCLUDE navbar %] +[% END %] + +[% IF object %] +
Edit a [% classmetadata.moniker %]
+
+
+Edit [% object.name %] + [% FOR col = classmetadata.columns; + NEXT IF col == "id" OR col == classmetadata.table _ "_id"; + '"; + IF errors.$col; + ''; errors.$col;''; + END; + END %] + + +
+ +[% ELSE %] + +
+
+
+Add a new [% classmetadata.moniker %] + [% FOR col = classmetadata.columns %] + [% NEXT IF col == "id" %] + + [% IF errors.$col %] + [% errors.$col | html %] + [% END %] + + [% END; %] + + +
+
+
+ +[% END %] +[% INCLUDE footer %]