source: trunk/LATMOS-Accounts-Web/root/html/search/index.tt @ 1145

Last change on this file since 1145 was 1145, checked in by nanardon, 12 years ago

Fix uri in quick search result

File size: 982 bytes
Line 
1[% FOREACH otype = ['user', 'group', 'nethost' ] %]
2
3[% filter = c.model('AttrFilter', otype) %]
4
5[% attrs = c.config.objects.$otype.list %]
6[% IF NOT attrs %][% attrs = [ 'cn' ] %][% END %]
7
8[% IF filter.objectslist.size > 0 %]
9[% IF filter.objectslist.size > 10 %]
10<p>[% filter.objectslist.size %] [% otype %]...</p>
11[% ELSE %]
12
13<h3>[% otype | html %]</h3>
14<table>
15[% FOREACH name = filter.objectslist %]
16[% object = c.model('Accounts').db.get_object(filter.otype, name) %]
17<tr>
18    <td>
19    [% INCLUDE object_flag object = object %]
20    </td>
21    <td><a href="[% c.uri_for('/' _ c.forward('/obj_to_uri', [ filter.otype ]), object.id) %]">
22        <img src="[% c.uri_for('/static', 'icons', 'icon_edit.png') %]"
23            height="16" width="16"
24            alt="[% "edit " _ object.id | html %]"></a>
25    [% object.id | html %]</td>
26
27[% FOREACH attr = attrs %]
28<td>[% object.get_attributes(attr) | html %]</td>
29[% END %]
30</tr>
31[% END %]
32</table>
33
34[% END %]
35[% END %]
36
37[% END %]
Note: See TracBrowser for help on using the repository browser.