From 7a667b5ce4d4cc6290a0d1a52765d25ad72ab22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Wed, 2 Dec 2015 15:34:44 +0100 Subject: [PATCH] Bug 15301: branchtransfers.tt: Remove ambiguous "To" and fix splitted sentence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file intranet-tmpl/prog/en/modules/circ/branchtransfers.tt contains two ambiguous words 'to' and a sentence splitted up by html tags, leading to weird translations. Example in German: "Sie können keine Exemplare aus itemtype transferieren BK für: Airfield" To test: - Apply patch - Set up transfer policies for item types and collection codes in Home > Administration > Set library checkin and transfer policy Make sure that you have rules that deny and others that allow transfers - Verify that syspref 'UseBranchTransferLimits' is set to 'Enforce' - Set 'BranchTransferLimitTypes' to 'item type' - Go to Home > Circulation > Transfers - Transfer an item that is allowed for item type - Verify that the table of transferred items displays information about Item type, Collection code and Destination - Transfer an item that is not allowed for the item type - Verify that the information about not allowing the transfer displays properly and is meaningfull - Set 'BranchTransferLimitTypes' to 'collection code' - Repeat the transfer steps above for allowed / not allowed collection code (Amended to add ids to table and 8 columns, see comment #2) (Amended for comment #5) Followup for comment #8 Signed-off-by: Frédéric Demians Signed-off-by: Jonathan Druart Signed-off-by: Brendan A Gallagher Signed-off-by: Brendan A Gallagher http://bugs.koha-community.org/show_bug.cgi?id=15231 --- circ/branchtransfers.pl | 10 ----- .../prog/en/modules/circ/branchtransfers.tt | 44 ++++++++++++++-------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 4caca05..22c9a07 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -188,15 +188,6 @@ if ($found) { } } -##################### - -# Used for branch transfer limits error messages. -my $codeTypeDescription = 'Collection Code'; -my $codeType = C4::Context->preference("BranchTransferLimitsType"); -if ( $codeType eq 'itemtype' ) { - $codeTypeDescription = 'Item Type'; -} - my @errmsgloop; foreach my $code ( keys %$messages ) { if ( $code ne 'WasTransfered' ) { @@ -212,7 +203,6 @@ foreach my $code ( keys %$messages ) { my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); $err{tbr} = $branches->{ $tbr }->{'branchname'}; $err{code} = $typecode; - $err{codeType} = $codeTypeDescription; } elsif ( $code eq 'IsPermanent' ) { $err{errispermanent} = 1; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index 1d47060..e2916d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -1,3 +1,6 @@ +[% USE Koha %] +[% USE ItemTypes %] +[% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Transfers [% INCLUDE 'doc-head-close.inc' %] @@ -110,7 +113,16 @@
  • Please return item to home library: [% errmsgloo.msg %]
  • [% END %] [% IF ( errmsgloo.errnotallowed ) %] -
  • You cannot transfer items of [% errmsgloo.codeType %] [% errmsgloo.code %] to [% errmsgloo.tbr %]
  • +
  • Transfer is not allowed for: +
      + [% IF ( Koha.Preference('BranchTransferLimitsType') == 'itemtype' ) %] +
    1. Item type: [% ItemTypes.GetDescription( errmsgloo.code ) %]
    2. + [% ELSE %] +
    3. Collection code: [% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) %]
    4. + [% END %] +
    5. Destination library: [% errmsgloo.tbr %]
    6. +
    +
  • [% END %] [% IF ( errmsgloo.errdesteqholding ) %]
  • Item is already at destination library.
  • @@ -164,23 +176,25 @@ - - - - - - - + + + + + + + + [% FOREACH trsfitemloo IN trsfitemloop %] - - - - - - - + + + + + + + + [% END %]
    Transferred items
    TitleAuthorBarcodeShelving locationCall numberTypeToTitleAuthorBarcodeShelving locationCall numberItem typeCollection codeDestination
    [% trsfitemloo.title |html %][% trsfitemloo.author %][% trsfitemloo.barcode %][% trsfitemloo.location %][% trsfitemloo.itemcallnumber %][% trsfitemloo.ccode %][% trsfitemloo.tobrname %][% trsfitemloo.title |html %][% trsfitemloo.author %][% trsfitemloo.barcode %][% trsfitemloo.location %][% trsfitemloo.itemcallnumber %][% ItemTypes.GetDescription( trsfitemloo.itemtype ) %][% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) %][% trsfitemloo.tobrname %]
    -- 2.1.4