Bugzilla – Attachment 20583 Details for
Bug 8004
Items on hold lose transfer after being scanned twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8004 - Followup [follow-up] Rename KohaBranchName filter to BranchName
Bug-8004---Followup-follow-up-Rename-KohaBranchNam.patch (text/plain), 13.94 KB, created by
Owen Leonard
on 2013-08-23 14:58:46 UTC
(
hide
)
Description:
Bug 8004 - Followup [follow-up] Rename KohaBranchName filter to BranchName
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-08-23 14:58:46 UTC
Size:
13.94 KB
patch
obsolete
>From f6f884e8b0aa172c62f02039c1762adf5775f9cb Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 23 Aug 2013 10:42:54 -0400 >Subject: [PATCH] Bug 8004 - Followup [follow-up] Rename KohaBranchName filter > to BranchName >Content-Type: text/plain; charset="utf-8" > >Since the original follow-up to 8004 was submitted the KohaBranchName >filter was put to use in several other templates and a test was added. >This patch corrects the filter name in the templates and changes the >name of, and in, the test. > >To test: > >- Enable IndependentBranches and log in to Koha as a non-superlibrarian. > Try to check out an item which belongs to another library. The library > name should appear correctly in the warning message. > >- In Acquisitions, view the list of basket groups for any vendor. The > "billing place" and "delivery place" columns should show library names > correctly. > >- View the detail page for a subscription > (serials/subscription-detail.pl?subscriptionid=X). The library name > should appear correctly. > >- In suggestions management, view the details for a suggestion > (/suggestion/suggestion.pl?suggestionid=X&op=show). Library names > should appear correctly in the "suggestions management" table and in > the "acquisition information" block. > >- Test the Koha_template_plugin_BranchName.t test: In a test database >that has the sample branchesloaded, run > > prove -v t/db_dependent/Koha_template_plugin_BranchName.t >--- > .../prog/en/modules/acqui/basketgroup.tt | 10 +++++----- > .../prog/en/modules/circ/circulation.tt | 4 ++-- > .../prog/en/modules/serials/subscription-detail.tt | 4 ++-- > .../prog/en/modules/suggestion/suggestion.tt | 16 ++++++++-------- > ...nchName.t => Koha_template_plugin_BranchName.t} | 6 +++--- > 5 files changed, 20 insertions(+), 20 deletions(-) > rename t/db_dependent/{Koha_template_plugin_KohaBranchName.t => Koha_template_plugin_BranchName.t} (86%) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index 0dfd1c0..b5ecfc0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -1,4 +1,4 @@ >-[% USE KohaBranchName %] >+[% USE BranchName %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Basket grouping for [% booksellername |html %]</title> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >@@ -275,8 +275,8 @@ function submitForm(form) { > [% END %] > </td> > <td>[% basketgroup.id %]</td> >- <td>[% basketgroup.billingplace | $KohaBranchName %]</td> >- <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td> >+ <td>[% basketgroup.billingplace | $BranchName %]</td> >+ <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $BranchName %][% END %]</td> > <td>[% basketgroup.basketsqty %]</td> > <td> > <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" /> >@@ -313,8 +313,8 @@ function submitForm(form) { > [% END %] > </td> > <td>[% basketgroup.id %]</td> >- <td>[% basketgroup.billingplace | $KohaBranchName %]</td> >- <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td> >+ <td>[% basketgroup.billingplace | $BranchName %]</td> >+ <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $BranchName %][% END %]</td> > <td>[% basketgroup.basketsqty %]</td> > <td> > <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form> >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 f19a8af..5d75a55 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1,4 +1,4 @@ >-[% USE KohaBranchName %] >+[% USE BranchName %] > [% USE KohaDates %] > [% IF ( export_remove_fields OR export_with_csv_profile ) %] > [% SET exports_enabled = 1 %] >@@ -547,7 +547,7 @@ function validate1(date) { > [% END %] > > [% IF ( ITEMNOTSAMEBRANCH ) %] >- <li>This item belongs to [% itemhomebranch | $KohaBranchName %] and cannot be checked out from this location.</li> >+ <li>This item belongs to [% itemhomebranch | $BranchName %] and cannot be checked out from this location.</li> > [% END %] > > [% IF ( USERBLOCKEDREMAINING ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 959f14f..1f0f95d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -1,4 +1,4 @@ >-[% USE KohaBranchName %] >+[% USE BranchName %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › Details for subscription #[% subscriptionid %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -102,7 +102,7 @@ $(document).ready(function() { > <li><span class="label">Librarian identity:</span> [% librarian %]</li> > <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid %]">[% aqbooksellername %]</a></li> > <li><span class="label">Biblio:</span> <a href="/cgi-bin/koha/catalogue/[% default_bib_view %].pl?biblionumber=[% bibnum %]">[% bibliotitle %]</a> <i>([% bibnum %])</i></li> >-[% IF ( branchcode ) %]<li><span class="label">Library:</span> [% branchcode | $KohaBranchName %]</li>[% END %] >+[% IF ( branchcode ) %]<li><span class="label">Library:</span> [% branchcode | $BranchName %]</li>[% END %] > [% IF ( serialsadditems ) %] > <li><span class="label">Items:</span> Serial receipt creates an item record.</li> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 0b4a4ab..a6b21e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1,5 +1,5 @@ > [% USE KohaAuthorisedValues %] >-[% USE KohaBranchName %] >+[% USE BranchName %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › > [% IF ( op_save ) %] >@@ -226,18 +226,18 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <tr> > <th><span class="label">Suggestion creation</span> </th> > <td>[% suggesteddate %]</td> >- <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %] >+ <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $BranchName %] ([% suggestedby_description %])[% END %] > </td> > </tr> > <tr> > <th><span class="label">Suggestion management</span> </th> > <td>[% manageddate %]</td> >- <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td> >+ <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $BranchName %] ([% managedby_description %])[% END %]</td> > </tr> > <tr> > <th><span class="label">Suggestion accepted</span> </th> > <td>[% accepteddate %]</td> >- <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td> >+ <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $BranchName %] ([% acceptedby_description %])[% END %]</td> > </tr> > </tbody> > </table></li></ol> >@@ -354,18 +354,18 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <tr> > <th><label for="suggesteddate">Suggestion creation</label> </th> > <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td> >- <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %] >+ <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $BranchName %] ([% suggestedby_description %])[% END %] > </td> > </tr> > <tr> > <th><label for="managedon">Suggestion management</label> </th> > <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td> >- <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td> >+ <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $BranchName %] ([% managedby_description %])[% END %]</td> > </tr> > <tr> > <th><label for="accepteddate">Suggestion accepted</label> </th> > <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td> >- <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td> >+ <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $BranchName %] ([% acceptedby_description %])[% END %]</td> > </tr> > </tbody> > </table></li></ol> >@@ -482,7 +482,7 @@ $(document).ready(function() { calcNewsuggTotal(); }); > [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %] > </td> > <td> >- [% suggestions_loo.branchcode | $KohaBranchName %] >+ [% suggestions_loo.branchcode | $BranchName %] > </td> > <td> > [% suggestions_loo.budget_name %] >diff --git a/t/db_dependent/Koha_template_plugin_KohaBranchName.t b/t/db_dependent/Koha_template_plugin_BranchName.t >similarity index 86% >rename from t/db_dependent/Koha_template_plugin_KohaBranchName.t >rename to t/db_dependent/Koha_template_plugin_BranchName.t >index dbba6da..93e50c1 100644 >--- a/t/db_dependent/Koha_template_plugin_KohaBranchName.t >+++ b/t/db_dependent/Koha_template_plugin_BranchName.t >@@ -21,11 +21,11 @@ use Modern::Perl; > use Test::More tests => 5; > > BEGIN { >- use_ok('Koha::Template::Plugin::KohaBranchName'); >+ use_ok('Koha::Template::Plugin::BranchName'); > } > >-my $filter = Koha::Template::Plugin::KohaBranchName->new(); >-ok($filter, "initialized KohaBranchName plugin"); >+my $filter = Koha::Template::Plugin::BranchName->new(); >+ok($filter, "initialized BranchName plugin"); > > my $name = $filter->filter('CPL'); > is($name, 'Centerville', 'retrieved expected name for CPL'); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8004
:
9289
|
13536
|
13537
|
17911
|
20582
|
20583
|
20682