|
From: Chris W. <la...@us...> - 2001-10-18 12:39:47
|
Update of /cvsroot/openinteract/OpenInteract/pkg/lookup/template
In directory usw-pr-cvs1:/tmp/cvs-serv3900/template
Modified Files:
lookup_classes.tmpl lookup_listing.tmpl
lookup_listing_columns.tmpl lookup_partitions.tmpl
Log Message:
update templates to use template widgets, including the error_message
and status_message items; modified the handler to generate a status message after an edit
Index: lookup_classes.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_classes.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lookup_classes.tmpl 2001/09/17 15:53:50 1.2
--- lookup_classes.tmpl 2001/10/18 12:39:44 1.3
***************
*** 1,3 ****
! [%- theme = OI.theme_properties -%]
[%########################################
--- 1,3 ----
! [%- DEFAULT theme = OI.theme_properties -%]
[%########################################
***************
*** 5,18 ****
########################################-%]
! [% MACRO lookup_row( lookup_info, count ) BLOCK -%]
! [%- SET row_color = theme.odd_color -%]
! [%- SET row_color = theme.even_color IF count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]">
<td>[% lookup_info.title %]</td>
- [% lookup_url = OI.make_url( base = '/Lookups/listing/',
- lookup_type = lookup_info.lookup_type ) -%]
<td><a href="[% lookup_url %]">List items</a></td>
</tr>
! [% END -%]
--- 5,16 ----
########################################-%]
! [%- MACRO lookup_row BLOCK -%]
! [%- lookup_url = OI.make_url( base = '/Lookups/listing/',
! lookup_type = lookup_info.lookup_type ) -%]
! <tr bgcolor="[% PROCESS row_color %]">
<td>[% lookup_info.title %]</td>
<td><a href="[% lookup_url %]">List items</a></td>
</tr>
! [%- END -%]
***************
*** 21,48 ****
########################################-%]
! [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
! <h1 align="center">Lookup Classes</h1>
! <p>Following are all lookup types the system knows about. Click on
! <tt>List items</tt> to view and edit entries.</p>
! <div align="center">
! <table border="0" bgcolor="[% theme.border_color %]"
! cellspacing="0" cellpadding="2">
! <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
[% FOREACH lookup_info = lookup_list -%]
! [% lookup_row( lookup_info, loop.count ) -%]
[% END -%]
! </table>
! </td></tr>
! </table>
</div>
--- 19,47 ----
########################################-%]
! [%- PROCESS error_message -%]
! [%- PROCESS status_message -%]
! <div align="center">
! <h1>Lookup Classes</h1>
! [% IF NOT lookup_list.size -%]
! <p>You have not defined any lookup items in this site.</p>
! [% ELSE -%]
+ <p>Following are all lookup types the system knows about. Click on
+ <tt>List items</tt> to view and edit entries.</p>
+
+ [% INCLUDE table_bordered_begin -%]
+
[% FOREACH lookup_info = lookup_list -%]
! [% lookup_row( count = loop.count ) -%]
[% END -%]
! [% INCLUDE table_bordered_end -%]
! [% END -%]
</div>
Index: lookup_listing.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_listing.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** lookup_listing.tmpl 2001/10/03 13:09:42 1.5
--- lookup_listing.tmpl 2001/10/18 12:39:44 1.6
***************
*** 1,6 ****
! [%- theme = OI.theme_properties -%]
! [%- DEFAULT blank_count = 5;
! DEFAULT title = 'Lookup Entry Editing';
! -%]
[%########################################
--- 1,5 ----
! [%- DEFAULT theme = OI.theme_properties;
! DEFAULT blank_count = 5;
! DEFAULT title = 'Lookup Entry Editing'; -%]
[%########################################
***************
*** 19,23 ****
<td>[% PROCESS lookup::lookup_field( label = label_list.$idx, id = this_id,
size = size_list.$idx, value = o.$field,
! name = field, ) -%]
</td>
</tr>
--- 18,22 ----
<td>[% PROCESS lookup::lookup_field( label = label_list.$idx, id = this_id,
size = size_list.$idx, value = o.$field,
! name = field ) -%]
</td>
</tr>
***************
*** 31,36 ****
########################################-%]
! <h1 align="center">Lookups: [% lookup_type %]</h1>
<p>Following are all entries in the lookup table under
<b>[% lookup_type %]</b>
--- 30,39 ----
########################################-%]
! [%- PROCESS error_message -%]
!
! <div align="center">
+ <h1>Lookups: [% lookup_type %]</h1>
+
<p>Following are all entries in the lookup table under
<b>[% lookup_type %]</b>
***************
*** 40,62 ****
Edit at will.</p>
- <div align="center">
-
<form name="lookup_listing" action="/Lookups/edit/" method="POST">
-
- <table border="0" bgcolor="[% theme.border_color %]"
- cellspacing="0" cellpadding="2">
- <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
[% FOREACH item = lookup_list -%]
! [%- SET row_color = theme.odd_color -%]
! [%- SET row_color = theme.even_color IF loop.count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]" valign="top" align="left">
! <td>
! [% lookup_entry_table( o = item ) -%]
! </td>
! <td><input type="checkbox" value="yes" name="[% remove_key %][% item.id %]"> Remove?</td>
</tr>
[% END -%]
--- 43,54 ----
Edit at will.</p>
<form name="lookup_listing" action="/Lookups/edit/" method="POST">
! [% INCLUDE table_bordered_begin -%]
[% FOREACH item = lookup_list -%]
! <tr bgcolor="[% PROCESS row_color( count = loop.count ) %]" valign="top" align="left">
! <td>[% lookup_entry_table( o = item ) -%]</td>
! <td>[% PROCESS form_checkbox( name = "$remove_key$item.id", value = 'yes' ) %] Remove?</td>
</tr>
[% END -%]
***************
*** 65,86 ****
</tr>
[% FOREACH blank_num = [ 1 .. blank_count ] -%]
! [%- SET row_color = theme.odd_color -%]
! [%- SET row_color = theme.even_color IF loop.count mod 2 == 0 -%]
! <tr bgcolor="[% row_color %]" valign="top" align="left">
<td colspan="2">
! [% lookup_entry_table( id = "${new_key}${blank_num}" ) -%]
</td>
</tr>
[% END -%]
! <tr align="right">
! <td colspan="2"><input type="submit" value="Save"></td>
! </tr>
! </table>
! </td></tr>
! </table>
! <input type="hidden" name="lookup_type" value="[% lookup_type %]">
</form>
--- 57,72 ----
</tr>
[% FOREACH blank_num = [ 1 .. blank_count ] -%]
! <tr bgcolor="[% PROCESS row_color( count = loop.count ) %]" valign="top" align="left">
<td colspan="2">
! [%- lookup_entry_table( id = "${new_key}${blank_num}" ) -%]
</td>
</tr>
[% END -%]
! [%- PROCESS form_submit_row( value = 'Save', color = theme.bgcolor ) -%]
! [%- PROCESS table_bordered_end -%]
! [%- PROCESS form_hidden( name = 'lookup_type', value = lookup_type ) -%]
</form>
Index: lookup_listing_columns.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_listing_columns.tmpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** lookup_listing_columns.tmpl 2001/10/03 13:09:42 1.4
--- lookup_listing_columns.tmpl 2001/10/18 12:39:44 1.5
***************
*** 20,28 ****
[% MACRO lookup_entry_row BLOCK -%]
- [%- SET row_color = theme.odd_color -%]
- [%- SET row_color = theme.even_color IF count mod 2 == 0 -%]
[% display_id = o.id || 'New Entry';
this_id = o.id || id -%]
! <tr valign="middle" align="center" bgcolor="[% row_color %]">
<td>ID: [% display_id %]</td>
[% FOREACH idx = [ 0 .. field_list.max ] -%]
--- 20,26 ----
[% MACRO lookup_entry_row BLOCK -%]
[% display_id = o.id || 'New Entry';
this_id = o.id || id -%]
! <tr valign="middle" align="center" bgcolor="[% PROCESS row_color %]">
<td>ID: [% display_id %]</td>
[% FOREACH idx = [ 0 .. field_list.max ] -%]
***************
*** 35,39 ****
[% END -%]
<td><font size="-1">
! [% IF o %]<input type="checkbox" value="yes" name="[% remove_key %][% this_id %]">
[% ELSE %] [% END -%]
</font></td>
--- 33,37 ----
[% END -%]
<td><font size="-1">
! [% IF o %][% PROCESS form_checkbox( name = "$remove_key$this_id", value = 'yes' ) -%]
[% ELSE %] [% END -%]
</font></td>
***************
*** 45,48 ****
--- 43,48 ----
########################################-%]
+ [%- PROCESS error_message -%]
+
<h1 align="center">[% title %]</h1>
***************
*** 56,66 ****
<form name="lookup_listing" action="/Lookups/edit/" method="POST">
- <table border="0" bgcolor="[% theme.border_color %]"
- cellspacing="0" cellpadding="2">
- <tr><td>
! <table border="0" width="100%" bgcolor="[% theme.bgcolor %]"
! cellpadding="5" cellspacing="0">
! [% lookup_header -%]
[% FOREACH item = lookup_list -%]
[% lookup_entry_row( o = item, count = loop.count ) -%]
--- 56,63 ----
<form name="lookup_listing" action="/Lookups/edit/" method="POST">
! [% INCLUDE table_bordered_begin -%]
!
! [%- lookup_header -%]
[% FOREACH item = lookup_list -%]
[% lookup_entry_row( o = item, count = loop.count ) -%]
***************
*** 73,85 ****
[% END -%]
! <tr align="right">
! <td colspan="[% full_colspan %]"><input type="submit" value="Save"></td>
! </tr>
! </table>
! </td></tr>
! </table>
! <input type="hidden" name="lookup_type" value="[% lookup_type %]">
</form>
--- 70,79 ----
[% END -%]
! [% PROCESS form_submit_row( value = 'Save', colspan = full_colspan,
! color = theme.bgcolor ) -%]
! [% PROCESS table_bordered_end -%]
! [% PROCESS form_hidden( name = "lookup_type", value = lookup_type ) -%]
</form>
Index: lookup_partitions.tmpl
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract/pkg/lookup/template/lookup_partitions.tmpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** lookup_partitions.tmpl 2001/10/01 22:02:37 1.1
--- lookup_partitions.tmpl 2001/10/18 12:39:44 1.2
***************
*** 1,3 ****
! [%- theme = OI.theme_properties -%]
[%########################################
--- 1,3 ----
! [%- DEFAULT theme = OI.theme_properties -%]
[%########################################
***************
*** 10,19 ****
########################################-%]
! [%- OI.comp( 'showerror', error_msg = error_msg ) -%]
<h1 align="center">Lookup Partitions for [% lookup_type %]</h1>
! <p>Following are all values for the field <b>[% partition_field %]</b>.
! Choose one to edit objects that have that field's value.</p>
<div align="center">
--- 10,20 ----
########################################-%]
! [%- PROCESS error_message -%]
<h1 align="center">Lookup Partitions for [% lookup_type %]</h1>
! <p>Following are all values for the field
! <b>[% partition_field %]</b>. Choose one to
! edit objects that have that field's value.</p>
<div align="center">
***************
*** 23,34 ****
<p>Values:
! <select name="partition_value">
! [% FOREACH value = value_list -%]
! <option value="[% value %]">[% value %]</option>
! [% END -%]
! </select>
!
! <input type="submit" value="Go">
! <input type="hidden" name="lookup_type" value="[% lookup_type %]">
</form>
--- 24,31 ----
<p>Values:
! [% PROCESS form_submit( name = 'partition_value', plain = 1,
! value_list = value_list ) -%]
! [% PROCESS form_submit( value = 'Go' ) -%]
! [% PROCESS form_hidden( name = 'lookup_type', value= lookup_type ) -%]
</form>
|