- Timestamp:
- 12/07/09 17:33:42 (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r41 r42 656 656 $page->param(grptree => $tmpgrplist); 657 657 658 $page->param(inlogingrp => $curgroup == $logingroup); 659 658 660 # stuff for menu group change. nb: this is icky. 659 661 fill_grouplist("grouplist"); … … 664 666 $tmp_ruri =~ s/\&action=[^&]+//g; 665 667 # and any bits from the "starts with" letter block - (ab)using this widget 666 # to fill the bulk of the URI so the template doesn't grow to insanity668 # to fill the bulk of the URI so various templates don't grow to insanity 667 669 $tmp_ruri =~ s/\&startwith=[a-z09-]+//g; 668 670 # $page->param(whereami => $ENV{REQUEST_URI}); … … 999 1001 fill_fpnla($count); 1000 1002 1003 $sortby = 'group'; 1004 # sort/order 1005 $sortby = $webvar{sortby} if $webvar{sortby}; 1006 $sortorder = $webvar{order} if $webvar{order}; 1007 1008 if (0){ 1009 ##fixme: yick 1010 if ($sortby eq 'group') { 1011 $page->param(grporder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1012 $page->param(parentorder => 'ASC'); 1013 $page->param(nusersorder => 'ASC'); 1014 $page->param(ndomainsorder => 'ASC'); 1015 $page->param(sortgrp => 1); 1016 } elsif ($sortby eq 'parent') { 1017 $page->param(grporder => 'ASC'); 1018 $page->param(parentorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1019 $page->param(nusersorder => 'ASC'); 1020 $page->param(ndomainsorder => 'ASC'); 1021 $page->param(sortparent => 1); 1022 } elsif ($sortby eq 'nusers') { 1023 $page->param(grporder => 'ASC'); 1024 $page->param(parentorder => 'ASC'); 1025 $page->param(nusersorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1026 $page->param(ndomainsorder => 'ASC'); 1027 $page->param(sortnusers => 1); 1028 } elsif ($sortby eq 'ndomains') { 1029 $page->param(grporder => 'ASC'); 1030 $page->param(parentorder => 'ASC'); 1031 $page->param(nusersorder => 'ASC'); 1032 $page->param(ndomainsorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1033 $page->param(sortndomains => 1); 1034 } else { 1035 $page->param(grporder => 'ASC'); 1036 $page->param(parentorder => 'ASC'); 1037 $page->param(nusersorder => 'ASC'); 1038 $page->param(ndomainsorder => 'ASC'); 1039 } 1040 1041 $page->param(sortorder => $sortorder); 1042 } 1043 1044 my @cols = ('group','parent','nusers','ndomains'); 1045 1046 my @headings; 1047 1048 $sortorder = $webvar{sortorder} if $webvar{sortorder}; 1049 foreach my $colhead (@cols) { 1050 my %coldata; 1051 $coldata{firstcol} = 1 if $colhead eq $cols[0]; 1052 $coldata{sid} = $sid; 1053 $coldata{page} = $webvar{page}; 1054 $coldata{offset} = $webvar{offset} if $webvar{offset}; 1055 $coldata{sortby} = $colhead; 1056 if ($colhead eq $sortby) { 1057 push @debugbits, "$colhead $sortby $sortorder<br>\n"; 1058 $coldata{order} = ($sortorder eq 'ASC' ? 'DESC' : 'ASC'); 1059 $coldata{sortorder} = $sortorder; 1060 } else { 1061 $coldata{order} = 'ASC'; 1062 } 1063 push @headings, \%coldata; 1064 } 1065 1066 $page->param(colheads => \@headings); 1067 1001 1068 my @grouplist; 1002 1069 $sth = $dbh->prepare("SELECT g.group_id, g.group_name, g2.group_name, ". -
trunk/templates/dns.css
r41 r42 134 134 margin-left: 10px; 135 135 padding: 0px; 136 list-style: none outside none; 136 137 } 137 138 /* F*** ME BUT THIS LOOKS LIKE CRAP! */ 138 139 /* Need to find a way to vertically centre the plus image on the text. >:( */ 139 li.hassub {140 /*li.hassub { 140 141 list-style: none outside url('../images/plus.gif'); 141 142 } 142 143 li.leaf { 143 144 list-style: none outside none; 144 } 145 } */ 146 145 147 #grptree { 146 margin-left: 15px;148 //margin-left: 15px; 147 149 } 148 150 /* general classes */ -
trunk/templates/grpman.tmpl
r41 r42 24 24 <table width="98%" border="0" cellspacing="4" cellpadding="3"> 25 25 <tr> 26 <td class="datahead_l"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=group&order=<TMPL_VAR NAME=grporder>">Domain</a><TMPL_IF NAME=sortgrp> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 27 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=parent&order=<TMPL_VAR NAME=parentorder>">Parent Group</a><TMPL_IF NAME=sortparent> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 28 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=nusers&order=<TMPL_VAR NAME=nusersorder>">Users</a><TMPL_IF NAME=sortnusers> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 29 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=ndomains&order=<TMPL_VAR NAME=ndomainsorder>">Domains</a><TMPL_IF NAME=sortndomains> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 26 <TMPL_IF foobarbaz> 27 <td class="datahead_l"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF 28 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=group&order=<TMPL_VAR 29 NAME=grporder>">Group</a><TMPL_IF NAME=sortgrp> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR 30 NAME=sortorder>.png" /></TMPL_IF></td> 31 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF 32 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=parent&order=<TMPL_VAR 33 NAME=parentorder>">Parent Group</a><TMPL_IF NAME=sortparent> <img alt="<TMPL_VAR NAME=sortorder>" 34 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 35 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF 36 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=nusers&order=<TMPL_VAR 37 NAME=nusersorder>">Users</a><TMPL_IF NAME=sortnusers> <img alt="<TMPL_VAR NAME=sortorder>" 38 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 39 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF 40 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=ndomains&order=<TMPL_VAR 41 NAME=ndomainsorder>">Domains</a><TMPL_IF NAME=sortndomains> <img alt="<TMPL_VAR NAME=sortorder>" 42 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 43 <TMPL_ELSE> 44 <TMPL_LOOP NAME=colheads> 45 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR 46 NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR 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>" 49 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 50 </TMPL_LOOP> 51 </TMPL_IF> 30 52 <td class="datahead_s">Delete</td> 31 53 </tr> -
trunk/templates/menu.tmpl
r41 r42 22 22 <hr /> 23 23 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman">Manage groups</a><br /> 24 <div id="grptree">< TMPL_VAR NAME=grptree></div>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> 25 25 <!-- hmm: <TMPL_VAR NAME=groupname> --> 26 26 <hr />
Note:
See TracChangeset
for help on using the changeset viewer.