Changeset 76


Ignore:
Timestamp:
02/17/11 17:28:05 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

Finalize record-list click-the-column-header-to-sort - mostly

a matter of copy-pasting the appropriate bits from the domain,
group, or user list setup, and adding a few tweaks specific
to the record list page

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r72 r76  
    5757  $session->param('grpmansortby','group');
    5858  $session->param('grpmanorder','ASC');
    59   $session->param('reclistsortby','name');
     59  $session->param('reclistsortby','host');
    6060  $session->param('reclistorder','ASC');
    6161#  $session->param('filter','login');
     
    251251    $sth->execute($webvar{id});
    252252    my ($count) = ($sth->fetchrow_array);
     253
     254#  $sortby = 'host';
     255# sort/order
     256  $session->param($webvar{page}.'sortby', $webvar{sortby}) if $webvar{sortby};
     257  $session->param($webvar{page}.'order', $webvar{order}) if $webvar{order};
     258
     259  $sortby = $session->param($webvar{page}.'sortby');
     260  $sortorder = $session->param($webvar{page}.'order');
    253261
    254262##work
     
    11091117  $filter = $session->param($webvar{page}.'filter');
    11101118
    1111 #  my @foo2 = getDomRecs($dbh,'def',1);
    1112   my $foo2 = getDomRecs($dbh,$def,$id,$perpage,$webvar{offset});
     1119  my $foo2 = getDomRecs($dbh,$def,$id,$perpage,$webvar{offset},$sortby,$sortorder);
    11131120
    11141121  my $row = 0;
  • trunk/templates/reclist.tmpl

    r72 r76  
    5050<TMPL_IF reclist>
    5151<tr class="darkrowheader">
    52 <TMPL_LOOP NAME=colheads>
    53         <!-- td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>" -->
    54 <td><a href="dns.cgi?sid=<TMPL_VAR
    55 NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR
    56 NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR NAME=sortby>&amp;order=<TMPL_VAR
    57 NAME=order>&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>"><TMPL_VAR
    58 NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR NAME=sortorder>"
    59 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP>
    60 
    61 <!--    <td>Name</td>
    62         <td>Type</td>
    63         <td>Address</td>
    64         <td>Distance</td><td>Weight</td><td>Port</td><td>TTL</td> -->
    65 
     52<TMPL_LOOP NAME=colheads><TMPL_IF firstcol></TMPL_IF>
     53        <td><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=<TMPL_VAR NAME=page><TMPL_IF
     54 NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;sortby=<TMPL_VAR
     55 NAME=sortby>&amp;order=<TMPL_VAR NAME=order>&amp;id=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR
     56 NAME=defrec>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder>&nbsp;<img alt="<TMPL_VAR
     57 NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP>
    6658        <td>Delete</td>
    6759</tr>
Note: See TracChangeset for help on using the changeset viewer.