From 254eb88c9e2680c7d65d462b338ebf1945e66cce Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 15 Nov 2012 15:33:23 -0500 Subject: [PATCH] Bug 6261 - Consolidate patron toolbar include files Content-Type: text/plain; charset="utf-8" The staff client has two almost identical include files which can be consolidated: circ-toolbar.inc and members-toolbar.inc. This patch marges the slight differences between them and eliminates circ-toolbar.inc, that being the one which was used on fewer pages. In order to accommodate the different "destination" variable for operations which redirect back either to circ or patrons, circulation.pl defines "destination" in the template. To test, perform various operations from the toolbar on different patron-related pages. --- .../prog/en/includes/circ-toolbar.inc | 148 ---------------- .../prog/en/includes/members-toolbar.inc | 186 +++++++++++--------- .../prog/en/modules/circ/circulation.tt | 3 +- .../intranet-tmpl/prog/en/modules/members/files.tt | 2 +- .../prog/en/modules/members/notices.tt | 2 +- .../prog/en/modules/members/readingrec.tt | 2 +- .../prog/en/modules/members/routing-lists.tt | 2 +- members/moremember.pl | 4 +- 8 files changed, 108 insertions(+), 241 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc deleted file mode 100644 index 23c7de2..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ /dev/null @@ -1,148 +0,0 @@ -
- -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index 9acdf90..e4de107 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -1,124 +1,136 @@
- -
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index ee3a666..771ecab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1,5 +1,6 @@ [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] +[% SET destination = "circ" %] Koha › Circulation [% IF borrowernumber %] › Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %] @@ -261,7 +262,7 @@ function validate1(date) { [% END %] [% IF ( borrowernumber ) %] -[% INCLUDE 'circ-toolbar.inc' %] +[% INCLUDE 'members-toolbar.inc' %] [% END %] <!-- INITIAL BLOC : PARAMETERS & BORROWER INFO --> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt index a44aaa9..58a3038 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt @@ -13,7 +13,7 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> - [% INCLUDE 'circ-toolbar.inc' %] + [% INCLUDE 'members-toolbar.inc' %] <h1>Files</h1> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index bd345b8..445ed17 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -35,7 +35,7 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> -[% INCLUDE 'circ-toolbar.inc' %] +[% INCLUDE 'members-toolbar.inc' %] <h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index b7c5f53..90e1530 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -25,7 +25,7 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> -[% INCLUDE 'circ-toolbar.inc' %] +[% INCLUDE 'members-toolbar.inc' %] <h1>Circulation history</h1> [% IF loop_reading %] <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt index 04876dc..f6f6f92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt @@ -12,7 +12,7 @@ <div id="bd"> <div id="yui-main"> <div class="yui-b"> -[% INCLUDE 'circ-toolbar.inc' %] +[% INCLUDE 'members-toolbar.inc' %] <!-- Search Bar --> <p class="tip">Search subscriptions:</p> diff --git a/members/moremember.pl b/members/moremember.pl index 0524ecb..3928286 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -85,7 +85,9 @@ my $quickslip = 0; my $flagsrequired; if ($print eq "page") { $template_name = "members/moremember-print.tmpl"; - $flagsrequired = { borrowers => 1 }; + # circ staff who process checkouts but can't edit + # patrons still need to be able to access print view + $flagsrequired = { circulate => "circulate_remaining_permissions" }; } elsif ($print eq "slip") { $template_name = "members/moremember-receipt.tmpl"; # circ staff who process checkouts but can't edit -- 1.7.9.5