source: trunk/templates/reclist.tmpl@ 148

Last change on this file since 148 was 140, checked in by Kris Deugau, 13 years ago

/trunk

ACL fixups:

  • Default Records are only viewable by an admin
  • Remove links for group operations user is not permitted to access, also rename "Manage groups" to "View groups" if the user does not have any of group add/edit/delete permissions

Lightly tweak error message handling for group operations to
more easily overload it for different errors
TODO note and fixme notes about deleting groups with stuff
still in them

File size: 3.2 KB
Line 
1<!-- <TMPL_VAR NAME=sid> -->
2<table class="wholepage"><tr>
3<TMPL_INCLUDE NAME="menu.tmpl">
4
5<td align="center" valign="top">
6
7 <TMPL_IF errmsg>
8 <div class='errmsg'><TMPL_VAR NAME=errmsg></div>
9 </TMPL_IF>
10
11<TMPL_UNLESS perm_err>
12<!-- FIXME: long data in records causes record list table to overflow one or another container -->
13
14<table><tr><td>
15
16<div class="center maintitle">Records<TMPL_IF NAME=parent> in <TMPL_VAR NAME=parent></TMPL_IF></div>
17
18<TMPL_INCLUDE NAME=soadata.tmpl>
19
20<table border="0" width="100%">
21<tr class="darkrowheader">
22 <td colspan="2" align="left">
23 <TMPL_INCLUDE NAME="pgcount.tmpl">
24 </td>
25 <td colspan="2" align="center">
26 <TMPL_INCLUDE NAME="fpnla.tmpl">
27 </td>
28 <td colspan="2" align="right">
29 <form action="dns.cgi">
30 <fieldset>
31 <input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
32 <input type="hidden" name="page" value="reclist" />
33 <input type="hidden" name="offset" value="0" />
34 <input type="hidden" name="id" value="<TMPL_VAR NAME=id>" />
35 <input type="hidden" name="defrec" value="<TMPL_VAR NAME=defrec>" />
36 <input name="filter"<TMPL_IF filter> value="<TMPL_VAR NAME=filter>"</TMPL_IF> />
37 <input type="submit" value="Filter" />
38 </fieldset>
39 </form>
40 </td>
41</tr>
42<tr class="darkrowheader">
43 <td colspan="4">Records</td>
44<TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=new">Add record</a></td></TMPL_IF>
45 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=log&amp;id=<TMPL_VAR NAME=id><TMPL_IF logdom>&amp;ltype=dom</TMPL_IF>">View log</a></td>
46</tr>
47
48</table>
49
50<table width="100%">
51<TMPL_IF reclist>
52<tr class="darkrowheader">
53<TMPL_LOOP NAME=colheads><TMPL_IF firstcol></TMPL_IF>
54 <td><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
55 NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR
56 NAME=sortby>&amp;order=<TMPL_VAR NAME=order>&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR
57 NAME=defrec>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR
58 NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP>
59<TMPL_IF record_delete> <td>Delete</td></TMPL_IF>
60</tr>
61<TMPL_LOOP NAME=reclist>
62<tr class="row<TMPL_VAR NAME=row>">
63 <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_ELSE><TMPL_VAR NAME=host></TMPL_IF></td>
64 <td><TMPL_VAR NAME=type></td>
65 <td><TMPL_VAR NAME=val></td>
66 <td><TMPL_VAR NAME=distance></td>
67 <td><TMPL_VAR NAME=weight></td>
68 <td><TMPL_VAR NAME=port></td>
69 <td><TMPL_VAR NAME=ttl></td>
70<TMPL_IF record_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=delrec&amp;id=<TMPL_VAR NAME=record_id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;parentid=<TMPL_VAR NAME=id>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
71</tr>
72</TMPL_LOOP>
73<TMPL_ELSE>
74<tr><td colspan="5">No records found</td></tr>
75</TMPL_IF>
76</table>
77
78</td></tr></table>
79<!-- /div -->
80</TMPL_UNLESS>
81
82</td>
83</tr>
84</table>
Note: See TracBrowser for help on using the repository browser.