Bug 16127 - Add discharge menu item to patron toolbar
authorOwen Leonard <oleonard@myacpl.org>
Tue, 31 May 2016 14:08:03 +0000 (10:08 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Jun 2016 15:21:56 +0000 (15:21 +0000)
This patch changes the "Discharge" menu in the patron sidebar to read
"Discharges," and adds a "Discharge" menu item to the patron toolbar.

This adds some redunancy, but fits with the pattern of including "views"
in the sidebar and "actions" in the menu. The discharge feature can be
thought of either way.

To test you must have the 'useDischarge' system preference enabled.

- View the detail page for any patron.
- Confirm that the sidebar menu reads "Discharges."
- Confirm that the "More" menu contains a "Discharge" link which works
  correctly.

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/includes/circ-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc

index 9e4e704..a423844 100644 (file)
         [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li>
     [% END %]
     [% IF CAN_user_borrowers && useDischarge %]
-        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
+        [% IF dischargeview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharges</a></li>
     [% END %]
 </ul></div>
 [% END %]
index 9ecce10..b7e7178 100644 (file)
@@ -183,6 +183,9 @@ function searchToHold(){
                 [% ELSE %]
                     <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="You are not authorized to set permissions" id="patronflags" href="#">Set permissions</a></li>
                 [% END %]
+                [% IF CAN_user_borrowers && useDischarge %]
+                    <li><a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% borrowernumber %]">Discharge</a></li>
+                [% END %]
                 [% IF ( CAN_user_borrowers ) %]
                     [% IF ( NorwegianPatronDBEnable == 1 ) %]
                         <li><a id="deletepatronlocal" href="#">Delete local</a></li>