- Timestamp:
- 12/09/09 17:08:46 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r42 r43 651 651 $page->param(group => $curgroup); 652 652 $page->param(groupname => groupName($dbh,$curgroup)); 653 $page->param(logingrp => groupName($dbh,$logingroup)); 653 654 654 655 # group tree. should go elsewhere, probably … … 1044 1045 my @cols = ('group','parent','nusers','ndomains'); 1045 1046 1047 my %colnames = (group => 'Group', parent => 'Parent Group', nusers => 'Users', ndomains => 'Domains'); 1048 1049 fill_colheads(\@cols, \%colnames); 1050 1051 if (0) { 1046 1052 my @headings; 1047 1053 1048 1054 $sortorder = $webvar{sortorder} if $webvar{sortorder}; 1049 foreach my $col head(@cols) {1055 foreach my $col (@cols) { 1050 1056 my %coldata; 1051 $coldata{firstcol} = 1 if $col headeq $cols[0];1057 $coldata{firstcol} = 1 if $col eq $cols[0]; 1052 1058 $coldata{sid} = $sid; 1053 1059 $coldata{page} = $webvar{page}; 1054 1060 $coldata{offset} = $webvar{offset} if $webvar{offset}; 1055 $coldata{sortby} = $col head;1056 if ($colhead eq $sortby) {1057 push @debugbits, "$colhead $sortby $sortorder<br>\n"; 1061 $coldata{sortby} = $col; 1062 $coldata{colname} = $colnames{$col}; 1063 if ($col eq $sortby) { 1058 1064 $coldata{order} = ($sortorder eq 'ASC' ? 'DESC' : 'ASC'); 1059 1065 $coldata{sortorder} = $sortorder; … … 1065 1071 1066 1072 $page->param(colheads => \@headings); 1073 1074 } # temp 1067 1075 1068 1076 my @grouplist; … … 1157 1165 $page->param(usertable => \@userlist); 1158 1166 } 1167 1168 # Generate all of the glop necessary to add or not the appropriate marker/flag for 1169 # the sort order and column in domain, user, group, and record lists 1170 # Takes an array ref and hash ref 1171 sub fill_colheads { 1172 my $cols = shift; 1173 my $colnames = shift; 1174 1175 my @headings; 1176 1177 foreach my $col (@$cols) { 1178 my %coldata; 1179 $coldata{firstcol} = 1 if $col eq $cols->[0]; 1180 $coldata{sid} = $sid; 1181 $coldata{page} = $webvar{page}; 1182 $coldata{offset} = $webvar{offset} if $webvar{offset}; 1183 $coldata{sortby} = $col; 1184 $coldata{colname} = $colnames->{$col}; 1185 if ($col eq $sortby) { 1186 $coldata{order} = ($sortorder eq 'ASC' ? 'DESC' : 'ASC'); 1187 $coldata{sortorder} = $sortorder; 1188 } else { 1189 $coldata{order} = 'ASC'; 1190 } 1191 push @headings, \%coldata; 1192 } 1193 1194 $page->param(colheads => \@headings); 1195 1196 } # end gentableheadings -
trunk/templates/grpman.tmpl
r42 r43 46 46 NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR 47 47 NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR 48 NAME=colname>< TMPL_VAR NAME=sortby></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>"48 NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" 49 49 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 50 50 </TMPL_LOOP> -
trunk/templates/menu.tmpl
r42 r43 22 22 <hr /> 23 23 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman">Manage groups</a><br /> 24 <div id="grptree"><ul><TMPL_IF inlogingrp><b><TMPL_VAR NAME=groupname></b><TMPL_ELSE><TMPL_VAR NAME=groupname></TMPL_IF><TMPL_VAR NAME=grptree></ul></div> 24 <div id="grptree"> 25 <ul> 26 <li><TMPL_IF inlogingrp><b><TMPL_VAR NAME=logingrp></b><TMPL_ELSE><TMPL_VAR NAME=logingrp></TMPL_IF> 27 <TMPL_VAR NAME=grptree> 28 </li> 29 </ul> 30 </div> 25 31 <!-- hmm: <TMPL_VAR NAME=groupname> --> 26 32 <hr />
Note:
See TracChangeset
for help on using the changeset viewer.