X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=templates%2Ffactory%2Fedit;h=6bdad79347cef088c484d66ec30a546387772fb9;hb=12d8a77a713d5ed4f08414e5f34e96d45f60e2d3;hp=11a25393c11a6644951fb483e7cbf162c93d7100;hpb=0ad4ba7aa71b7dda17f0b07ccc9d8f0ad3424b82;p=maypole.git diff --git a/templates/factory/edit b/templates/factory/edit index 11a2539..6bdad79 100644 --- a/templates/factory/edit +++ b/templates/factory/edit @@ -1,21 +1,38 @@ -[% PROCESS list_macros %] -[% INCLUDE header %] +[%# -[% FOR item = objects; %] -

Edit [% item.name %]

+=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. -
-[% - FOR col = classmetadata.columns; - NEXT IF col == "id"; - "

"; - ""; classmetadata.colnames.$col; ""; - ": "; - item.to_field(col).as_HTML; - "

"; - IF errors.$col; - ""; errors.$col; ""; - END; +=cut + +#%] +[% PROCESS macros %] +[% INCLUDE header %] +[% INCLUDE title %] +[% IF objects.size %] +
Edit a [% classmetadata.moniker %]
+[% FOR item = objects; %] + +
+Edit [% item.name %] +[% FOR col = classmetadata.columns; + NEXT IF col == "id"; + '"; + IF errors.$col; + ''; errors.$col;''; END; - ''; -END %] + END %] + + +
+ + [% END %] +[% ELSE %] +[% INCLUDE addnew %] +[% END %] +[% INCLUDE footer %]