improving systempref selector :
authortipaul <tipaul>
Mon, 20 Jun 2005 13:12:11 +0000 (13:12 +0000)
committertipaul <tipaul>
Mon, 20 Jun 2005 13:12:11 +0000 (13:12 +0000)
* showing active tab better
* removing useless filter form
* adding some systemprefs to their correct tab

admin/systempreferences.pl
koha-tmpl/intranet-tmpl/default/en/parameters/systempreferences.tmpl

index 45ea5ff..acc7b61 100755 (executable)
@@ -59,7 +59,7 @@ $tabsysprefs{marcflavour}="Catalogue";
 $tabsysprefs{SubscriptionHistory}="Catalogue";
 $tabsysprefs{maxoutstanding}="Circulation";
 $tabsysprefs{printcirculationslips}="Circulation";
-$tabsysprefs{suggestion}="Circulation";
+$tabsysprefs{suggestion}="Acquisitions";
 $tabsysprefs{automembernum}="Members";
 $tabsysprefs{noissuescharge}="Circulation";
 $tabsysprefs{opacthemes}="OPAC";
@@ -74,6 +74,9 @@ $tabsysprefs{dateformat}="Admin";
 $tabsysprefs{insecure}="Admin";
 $tabsysprefs{ldapinfos}="Admin";
 $tabsysprefs{ldapserver}="Admin";
+$tabsysprefs{itemcallnumber}="Catalogue";
+$tabsysprefs{maxreserves}="Circulation";
+$tabsysprefs{virtualshelves}="OPAC";
 
 sub StringSearch  {
        my ($env,$searchstring,$type)=@_;
@@ -134,10 +137,10 @@ $searchfield=~ s/\,//g;
 
 if ($op) {
 $template->param(script_name => $script_name,
-                                               $op              => 1); # we show only the TMPL_VAR names $op
+                                               $op              => 1,); # we show only the TMPL_VAR names $op
 } else {
 $template->param(script_name => $script_name,
-                                               else              => 1); # we show only the TMPL_VAR names $op
+                                               else              => 1,); # we show only the TMPL_VAR names $op
 }
 
 if ($op eq 'update_and_reedit') {
@@ -351,7 +354,7 @@ if ($op eq 'add_form') {
                $row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results->[$i]{'variable'};
                push(@loop_data, \%row_data);
        }
-       $template->param(loop => \@loop_data);
+       $template->param(loop => \@loop_data, $tab => 1);
        if ($offset>0) {
                my $prevpage = $offset-$pagesize;
                $template->param("<a href=$script_name?offset=".$prevpage.'&lt;&lt; Prev</a>');
index ea4be58..fdd7d16 100644 (file)
        <table>
                <tr>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin
-                               </a>
+                               <!-- TMPL_IF name="Admin" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin" class="button">Admin</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions
-                               </a>
+                               <!-- TMPL_IF name="Acquisitions" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions" class="button">Acquisitions</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities
-                               </a>
+                               <!-- TMPL_IF name="Authorities" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities" class="button">Authorities</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue
-                               </a>
+                               <!-- TMPL_IF name="Catalogue" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue" class="button">Catalogue</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation
-                               </a>
+                               <!-- TMPL_IF name="Circulation" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation" class="button">Circulation</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Members
-                               </a>
+                               <!-- TMPL_IF name="Members" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members" class="button">Members</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Members</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC
-                               </a>
+                               <!-- TMPL_IF name="OPAC" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC" class="button">OPAC</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC</a>
+                               <!-- /TMPL_IF -->
                        </td>
                        <td>
-                               <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=">Others
-                               </a>
+                               <!-- TMPL_IF name="Others" -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=" class="button">Others</a>
+                               <!-- TMPL_ELSE -->
+                                       <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=">Others</a>
+                               <!-- /TMPL_IF -->
                        </td>
                </tr>
        </table>
-       <form action="/cgi-bin/koha/admin/systempreferences.pl" method="post">
-               <input type="text" name="searchfield" value="">
-               <input type="reset" name="reset" value="clr">
-       </form>
        <!-- TMPL_VAR NAME="searchfield" -->
        <table border="0" cellspacing="0" cellpadding="2">
        <tr valign="top" bgcolor="#99cc33">