[% PROCESS macros %]
[% INCLUDE header %]
[% INCLUDE title %]
+
+[% IF request.action == 'edit' %]
+[% INCLUDE navbar %]
+[% END %]
+
[% IF objects.size %]
<div id="title">Edit a [% classmetadata.moniker %]</div>
[% FOR item = objects; %]
<fieldset>
<legend>Edit [% item.name %]</legend>
[% FOR col = classmetadata.columns;
- NEXT IF col == "id";
+ NEXT IF col == "id" OR col == classmetadata.table _ "_id";
'<label><span class="field">';
classmetadata.colnames.$col; ":</span>";
item.to_field(col).as_XML;
<table id="matrix">
<tr>
[% FOR col = classmetadata.list_columns.list;
- NEXT IF col == "id";
+ NEXT IF col == "id" OR col == classmetadata.table _ "_id";
"<th>";
SET additional = "?order=" _ col;
SET additional = additional _ "&page=" _ pager.current_page
#%]
[% MACRO display_line(item) BLOCK;
FOR col = classmetadata.list_columns;
- NEXT IF col == "id";
+ NEXT IF col == "id" OR col == classmetadata.table _ "_id";
"<td>";
IF col == "url" AND item.url;
'<a href="'; item.url; '"> '; item.url; '</a>';
#%]
[% MACRO view_item(item) BLOCK; %]
- [% SET string = classmetadata.stringifycolumn %]
+ [% SET string = classmetadata.stringify_column %]
<div id="title"> [% item.$string %]</div>
[% INCLUDE navbar %]
<table class="view">
<td>[% item.$string %]</td>
</tr>
[% FOR col = classmetadata.columns.list;
- NEXT IF col == "id" OR col == string;
+ NEXT IF col == "id" OR col == string OR col == classmetadata.table _ "_id";;
NEXT UNLESS item.$col;
%]
[%#
<fieldset>
<legend>Search</legend>
[% FOR col = classmetadata.columns;
- NEXT IF col == "id";
+ NEXT IF col == "id" OR col == classmetadata.table _ "_id";
%]
<label>
<span class="field">[% classmetadata.colnames.$col; %]</span>