From 22ecbbdb62926cb110f5a23526d889f7f2ffa776 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 29 Jan 2013 12:55:10 +0200 Subject: [PATCH] LP1108867: i18n support for holds in record details Rather than constructing a string of "Place hold on " + "copy", etc, just display more complete "Copy hold" / "Volume hold" / "Issue hold" strings that have a chance of being translatable. Signed-off-by: Dan Scott Signed-off-by: Pasi Kallinen --- .../src/templates/opac/parts/record/copy_table.tt2 | 72 +++++++++++++--------- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 index b806f5cead..d75cb20325 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2 @@ -99,38 +99,52 @@ END; [% END # is_staff %] [% IF ctx.is_staff OR serial_holdings %] [% # Show copy/volume hold links to staff (without - # checking whether they have permissions to do those). - overall_holdable = ( - copy_info.holdable == 't' AND - copy_info.location_holdable == 't' AND - copy_info.status_holdable == 't'); - IF overall_holdable; - l("Place on"); - IF ctx.is_staff; - %] - [% l("copy") %] - [%- IF copy_info.call_number != last_cn; - last_cn = copy_info.call_number; - l(" / "); %] - [% l("volume") %] - [%- END; - IF serial_holdings; - l(" / "); - END; + # checking whether they have permissions to do those). + overall_holdable = ( + copy_info.holdable == 't' AND + copy_info.location_holdable == 't' AND + copy_info.status_holdable == 't' + ); + IF overall_holdable; + hold_link = ''; + param_sep = l(" / "); + + # Only staff get to place copy or volume holds + IF ctx.is_staff; + hold_link = '' _ l('Copy hold') _ ''; + IF copy_info.call_number != last_cn; + last_cn = copy_info.call_number; + hold_link = hold_link _ param_sep; + hold_link = hold_link _ '' _ l('Volume hold') _ ''; END; IF serial_holdings; - %] - [% l("issue") %][%- + hold_link = hold_link _ param_sep; END; - ELSE; - l("No"); - END %] + END; + IF serial_holdings; + hold_link = hold_link _ + '' _ l('Issue hold') _ ''; + END; + + hold_link; + ELSE; + l("Not holdable"); + END %] [%- END %] [% copy_info.copy_status | html %] [% -- 2.11.0