source: LATMOS-Accounts-Web/root/html/departments/index.tt @ 151

Last change on this file since 151 was 151, checked in by nanardon, 15 years ago
  • improve add field in forms
  • complete menu
File size: 1.4 KB
Line 
1[% db = c.model('Accounts').db %]
2<!-- $Id -->
3<div style="float: right" id="filter">
4<p>Filtre:</p>
5<form action="[% c.uri_for() %]" method="POST">
6[% FOREACH item = [0, 1, 2 ] %]
7[% IF loop.first %]
8<table border="0">
9<tr><th>Champs</th><th>contient:</th></tr>
10[% END %]
11<tr>
12<td>
13<select name="attr">
14<option value=""></option>
15[% FOREACH f = db.list_canonical_fields('department', 'r') %]
16<option value="[% f | html %]" [% ' selected="1"' IF c.req.params.attr.$item == f %]>
17    [% c.model('AttrForms').attr_label(f) | html %]
18</option>
19[% END %]
20</select>
21</td>
22<td><input type="text" name="attrval" value="[% c.req.params.attrval.$item | html %]"></td></tr>
23[% IF loop.last %]
24</table>
25[% END %]
26[% END %]
27
28<input type="submit">
29</form>
30</div>
31
32<table border="0">
33<table border="0">
34<tr><td colspan="2">[% departmentslist.size %] Départements</td></tr>
35<tr><th>Nom</th><th>Description</th></tr>
36[% FOREACH departmentname = departmentslist %]
37[% department = db.get_object('department', departmentname) %]
38<tr>
39    <td>[% department.get_c_field('name') | html %]</td>
40    <td>
41        [% department.get_c_field('description') | truncate(30) | html %]
42    <a href="[% c.uri_for('/departments', departmentname) %]">
43        <img src="[% c.uri_for('/static', 'icons', 'arrow-right.png') %]"
44            height="16" width="16"
45            alt="[% "edit " _ departmentname | html %]">
46    </a></td>
47</tr>
48[% END %]
49</table>
Note: See TracBrowser for help on using the repository browser.