Bug 14612 - Overdue notice triggers should show branchname instead of branchcode
authorOwen Leonard <oleonard@myacpl.org>
Thu, 18 Aug 2016 17:08:33 +0000 (13:08 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 2 Sep 2016 15:50:01 +0000 (15:50 +0000)
This patch adds the Branches template plugin to the overdue notice
triggers template so that the library name can be shown instead of the
branchcode.

Also changed: Updated page title to match the name used in tools menus.

To test, apply the patch and go to Tools -> Overdue notice/status
triggers.

- Select a library.
- When the page reloads, the 'Defining overdue actions for...' and
  'Rules for overdue actions: ' headings should show the library name
  instead of the branchcode.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt

index 4c06846..350b5bc 100644 (file)
@@ -1,6 +1,7 @@
 [% USE Koha %]
+[% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Tools &rsaquo; Notice triggers</title>
+<title>Koha &rsaquo; Tools &rsaquo; Overdue notice/status triggers</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
 <script type="text/javascript">
@@ -25,7 +26,7 @@ $(document).ready(function() {
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Notice triggers</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Overdue notice/status triggers</div>
 
 <div id="doc3" class="yui-t2">
    
@@ -33,7 +34,7 @@ $(document).ready(function() {
     <div id="yui-main">
     <div class="yui-b">
 
-        <h1>Defining [% IF ( branch ) %]overdue actions for [% branch %][% ELSE %]default overdue actions[% END %]</h1>
+        <h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) %][% ELSE %]default overdue actions[% END %]</h1>
         <div class="help">
             <p>Delay is the number of days after a checkout is due before an action is triggered. </p>
             <p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
@@ -74,7 +75,7 @@ $(document).ready(function() {
             <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
                 <input type="hidden" name="op" value="save" />
                 <input type="hidden" name="branch" value="[% branch %]" />
-                               <h3>Rules for overdue actions: [% IF ( branch ) %][% branch %][% ELSE %] default library [% END %]</h3>
+                <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) %][% ELSE %] default library [% END %]</h3>
                     [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
 
   <div id="rulestabs" class="toptabs">