Changeset 137


Ignore:
Timestamp:
10/07/11 15:59:35 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix record list filtering - standardize variable/form input name(s)
Use $filter global (since we so kindly define it while setting up
other session globals)
Note the filter behaviour in pgcount.tmpl; this makes it (somewhat)
more obvious that filtering has been applied to the record list.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r128 r137  
    319319  $page->param(curpage => $webvar{page});
    320320
    321   my $count = getRecCount($dbh, $webvar{defrec}, $webvar{id});
     321  my $count = getRecCount($dbh, $webvar{defrec}, $webvar{id}, $filter);
    322322
    323323  $sortby = 'host';
     
    13971397  $page->param(ttl      => $soa{ttl});
    13981398
    1399   $startwith = $session->param($webvar{page}.'startwith');
    1400   $filter = $session->param($webvar{page}.'filter');
    1401 
    1402   my $foo2 = getDomRecs($dbh,$def,$id,$perpage,$webvar{offset},$sortby,$sortorder);
     1399#  $startwith = $session->param($webvar{page}.'startwith');
     1400#  $filter = $session->param($webvar{page}.'filter');
     1401
     1402  my $foo2 = getDomRecs($dbh,$def,$id,$perpage,$webvar{offset},$sortby,$sortorder,$filter);
    14031403
    14041404  my $row = 0;
     
    15441544  $page->param(pgtype => $pgtype);
    15451545  $page->param(parent => $parent);
     1546  $page->param(filter => $filter);
    15461547} # end fill_pgcount()
    15471548
    15481549sub listdomains {
    15491550
    1550   $startwith = $session->param($webvar{page}.'startwith');
    1551   $filter = $session->param($webvar{page}.'filter');
     1551#  $startwith = $session->param($webvar{page}.'startwith');
     1552#  $filter = $session->param($webvar{page}.'filter');
    15521553  $searchsubs = $session->param($webvar{page}.'searchsubs');
    15531554
  • trunk/templates/pgcount.tmpl

    r39 r137  
    1 <TMPL_IF ntot>Listing <TMPL_VAR NAME=nfirst> - <TMPL_VAR NAME=npglast> of <TMPL_VAR NAME=ntot><TMPL_ELSE>No <TMPL_VAR NAME=pgtype></TMPL_IF><TMPL_IF NAME=parent> in <TMPL_VAR NAME=parent></TMPL_IF>
     1<TMPL_IF ntot>Listing <TMPL_VAR NAME=nfirst> - <TMPL_VAR NAME=npglast> of <TMPL_VAR NAME=ntot><TMPL_ELSE>No <TMPL_VAR NAME=pgtype></TMPL_IF><TMPL_IF NAME=parent> in <TMPL_VAR NAME=parent></TMPL_IF><TMPL_IF filter> matching "<TMPL_VAR NAME=filter>"</TMPL_IF>
  • trunk/templates/reclist.tmpl

    r100 r137  
    3333                <input type="hidden" name="id" value="<TMPL_VAR NAME=id>" />
    3434                <input type="hidden" name="defrec" value="<TMPL_VAR NAME=defrec>" />
    35                 <input name="search" />
     35                <input name="filter"<TMPL_IF filter> value="<TMPL_VAR NAME=filter>"</TMPL_IF> />
    3636                <input type="submit" value="Filter" />
    3737                </fieldset>
Note: See TracChangeset for help on using the changeset viewer.