Bug 24837: Rename selectbranchprinter.pl to set-library.pl
authorKatrin Fischer <katrin.fischer.83@web.de>
Fri, 13 Mar 2020 18:03:12 +0000 (18:03 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 24 Mar 2020 11:07:22 +0000 (11:07 +0000)
This renames the selectbranchprinter.pl file to the more
fitting set-library.pl.

To test:
- Change the library with "Set library" from
  - The menu in the top navigation bar
  - The circulation start page
- Verify the help link on page leads to the correct
  section in the manual
- Read the code... and verify all occurences have been caught

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Manual.pm
circ/branchtransfers.pl
circ/set-library.pl [moved from circ/selectbranchprinter.pl with 95% similarity]
koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt [moved from koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt with 94% similarity]

index 966a723..3c1e45f 100644 (file)
@@ -123,7 +123,7 @@ our $mapping = {
     'circ/renew'                               => '/circulation.html#renewing',
     'circ/reserveratios'                       => '/circulation.html#hold-ratios',
     'circ/returns'                             => '/circulation.html#check-in-returning',
-    'circ/selectbranchprinter'                 => '/circulation.html#set-library',
+    'circ/set-library'                         => '/circulation.html#set-library',
     'circ/transferstoreceive'                  => '/circulation.html#transfers-to-receive',
     'circ/view_holdsqueue'                     => '/circulation.html#holds-queue',
     'circ/waitingreserves'                     => '/circulation.html#holds-awaiting-pickup',
index ea9b289..4ed1fb3 100755 (executable)
@@ -47,7 +47,7 @@ if (!C4::Context->userenv){
        $session = get_session($sessionID) if $sessionID;
     if (!$session){
                # no branch set we can't transfer
-               print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
+        print $query->redirect("/cgi-bin/koha/circ/set-library.pl");
                exit;
        }
 }
similarity index 95%
rename from circ/selectbranchprinter.pl
rename to circ/set-library.pl
index c762876..375a7f7 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Libraries;
 my $query = CGI->new();
 
 my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user({
-    template_name   => "circ/selectbranchprinter.tt",
+    template_name   => "circ/set-library.tt",
     query           => $query,
     type            => "intranet",
     debug           => 1,
@@ -77,7 +77,7 @@ foreach ($query->param()) {
 }
 
 my $referer =  $query->param('oldreferer') || $ENV{HTTP_REFERER};
-$referer =~ /selectbranchprinter\.pl/ and undef $referer;   # avoid sending them back to this same page.
+$referer =~ /set-library\.pl/ and undef $referer;   # avoid sending them back to this same page.
 
 if (scalar @updated and not scalar @recycle_loop) {
     # we updated something, and there were no extra params to POST: quick redirect
index 708ff33..979871a 100644 (file)
@@ -15,7 +15,7 @@
                 <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
             [% END %]
             [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]
-                <li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>
+                <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library</a></li>
             [% END %][% END %]
             [% IF ( fast_cataloging ) %][% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
                 <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>
index 6b44526..868b22a 100644 (file)
                     [% IF ( IndependentBranches ) %]
                         [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
                     <li>
-                        <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
+                        <a class="toplinks" href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
                     </li>
                         [% END %]
                     [% ELSE %]
                     <li>
-                        <a class="toplinks" href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
+                        <a class="toplinks" href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
                     </li>
                     [% END %]
                     [% IF EnableSearchHistory %]
index 84e4adc..3c987d7 100644 (file)
@@ -32,7 +32,7 @@
         [% ELSIF ( error == 202 ) %]
             <span>An error has occurred. </span>[% INCLUDE asksysadmin %]
         [% ELSIF ( error == 203 ) %]
-            <span>A non-existent or invalid library code was supplied. Please verify that you have a library set. </span><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
+            <span>A non-existent or invalid library code was supplied. Please verify that you have a library set. </span><a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
         [% ELSIF ( error == 301 ) %]
             <span>An error has occurred while attempting to upload the image file. </span>[% INCLUDE asksysadmin %]
         [% ELSIF ( error == 302 ) %]
@@ -44,7 +44,7 @@
         [% ELSIF ( error == 401 ) %]
             <span>An error has occurred and no items have been added to batch [% batch_id | html %]. </span>[% INCLUDE asksysadmin %]
         [% ELSIF ( error == 402 ) %]
-            <span>No items added because the library is not set. Please set your library before adding items to a batch. </span><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
+            <span>No items added because the library is not set. Please set your library before adding items to a batch. </span><a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
         [% ELSIF ( error == 403 ) %]
             <span>An error has occurred and the item(s) was not removed from batch [% batch_id | html %]. </span>[% INCLUDE asksysadmin %]
         [% ELSIF ( error == 404 ) %]
index b1bac4a..fbabec6 100644 (file)
@@ -30,7 +30,7 @@
                     </li>
                     [% UNLESS IndependentBranches %]
                         <li>
-                            <a class="circ-button" href="/cgi-bin/koha/circ/selectbranchprinter.pl"><i class="fa fa-home"></i> Set library</a>
+                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
                         </li>
                     [% END %]
                     [% IF ( fast_cataloging ) %]
@@ -7,14 +7,14 @@
     .noshow {display: none;}
 </style>
 </head>
-<body id="circ_selectbranchprinter" class="circ">
+<body id="circ_set-library" class="circ">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'circ-search.inc' %]
 
 <div id="breadcrumbs">
          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
-&rsaquo; <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
+&rsaquo; <a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
 </div>
 
 <div class="main container-fluid">
@@ -53,7 +53,7 @@ Updated:<ul>
 
 [% ELSE %]
 
-<form method="post" action="selectbranchprinter.pl">
+<form method="post" action="set-library.pl">
 <fieldset class="rows">
     <legend>Set library</legend>
     <ol>