<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/do_edit/">
<INPUT TYPE="hidden" NAME="action" VALUE="create">
<INPUT TYPE="hidden" NAME="class" VALUE="[%classmetadata.name%]">
+ <TABLE class="view">
[% FOR col = classmetadata.columns;
NEXT IF col == "id";
- "<b>";classmetadata.colnames.$col;"</b> : ";
SET element = classmetadata.cgi.$col;
IF col == "brewery";
SET create_url = base _ "/brewery/edit";
element.attr("onChange", "go()");
SET element = element.unshift_content(new_element);
END;
- element.as_HTML;
%]
- <BR>
+ <TR> <TD class="field"> [% classmetadata.colnames.$col; %]
+ </TD>
+ <TD> [% element.as_HTML; %] </TD> </TR>
[% END; %]
+ </TABLE>
<INPUT TYPE="submit" NAME="create" VALUE="create">
</FORM>
<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/do_edit/">
<INPUT TYPE="hidden" NAME="action" VALUE="create">
<INPUT TYPE="hidden" NAME="class" VALUE="[%classmetadata.name%]">
+ <TABLE class="view">
[% FOR col = classmetadata.columns;
NEXT IF col == "id";
- "<b>";classmetadata.colnames.$col;"</b> : ";
- classmetadata.cgi.$col.as_HTML;
- %]
- <BR>
+ %]
+ <TR> <TD class="field"> [% classmetadata.colnames.$col; %] </TD>
+ <TD> [% classmetadata.cgi.$col.as_HTML; %] </TD> </TR>
[% END; %]
+ </TABLE>
<INPUT TYPE="submit" NAME="create" VALUE="create">
</FORM>
<h2> Listing of all [% classmetadata.plural %]</h2>
[% INCLUDE navbar %]
+<DIV class="search"> [% INCLUDE search_form %] </DIV>
+<DIV class="list">
<TABLE id="matrix" WIDTH="100%">
<TR>
[% FOR col = classmetadata.columns.list;
"</tr>";
END %]
</TABLE>
-
-
[% INCLUDE addnew; %]
+</DIV>
--- /dev/null
+
+<h3>Search</h3>
+<FORM METHOD="post" ACTION="[%base%]/[%classmetadata.moniker%]/search/">
+ <INPUT TYPE="hidden" NAME="action" VALUE="create">
+ <INPUT TYPE="hidden" NAME="class" VALUE="[%classmetadata.name%]">
+ <TABLE class="view">
+ [% FOR col = classmetadata.columns;
+ NEXT IF col == "id";
+ %]
+ <TR> <TD class="field"> [% classmetadata.colnames.$col; %] </TD>
+ <TD> [%
+ SET element = classmetadata.cgi.$col;
+ IF element.tag == "select";
+ USE element_maker = Class("HTML::Element");
+ SET element = element.unshift_content(
+ element_maker.new("option", value," "));
+ END;
+ element.as_HTML;
+ %] </TD> </TR>
+ [% END; %]
+ </TABLE>
+ <INPUT TYPE="submit" NAME="search" VALUE="search">
+</FORM>