[open-ils-commits] [GIT] Evergreen ILS branch master updated. 22ecbbdb62926cb110f5a23526d889f7f2ffa776

Evergreen Git git at git.evergreen-ils.org
Wed Feb 20 22:31:33 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  22ecbbdb62926cb110f5a23526d889f7f2ffa776 (commit)
      from  7a08ca1430d29db1c6b542c06fc1bd368cb18078 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 22ecbbdb62926cb110f5a23526d889f7f2ffa776
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Jan 29 12:55:10 2013 +0200

    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 <dan at coffeecode.net>
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>

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 b806f5c..d75cb20 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 %]
             <td header='copy_header_holdable'>[%  # 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;
-                    %]
-                <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
-                    {hold_target => copy_info.id, hold_type => 'C', hold_source_page => mkurl()}) %]">[% l("copy") %]</a>
-                [%-      IF copy_info.call_number != last_cn;
-                            last_cn = copy_info.call_number;
-                            l(" / "); %]
-                <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
-                    {hold_target => copy_info.call_number, hold_type => 'V', hold_source_page => mkurl()}) %]">[% l("volume") %]</a>
-                [%-      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 = '<a href="' _
+                            mkurl(ctx.opac_root _ '/place_hold', {
+                                hold_target => copy_info.id,
+                                hold_type => 'C',
+                                hold_source_page => mkurl()
+                            }) _ '">' _ l('Copy hold') _ '</a>';
+                        IF copy_info.call_number != last_cn;
+                            last_cn = copy_info.call_number; 
+                            hold_link = hold_link _ param_sep;
+                            hold_link = hold_link _ '<a href="' _
+                                mkurl(ctx.opac_root _ '/place_hold', {
+                                    hold_target => copy_info.call_number,
+                                    hold_type => 'V',
+                                    hold_source_page => mkurl()
+                                }) _ '">' _ l('Volume hold') _ '</a>';
                         END;
                         IF serial_holdings;
-                %]
-                <a class="rdetail-issue-place-hold"
-                    href="[% mkurl(ctx.opac_root _ '/place_hold', {
-                    hold_target => copy_info.issuance, hold_type => 'I',
-                    hold_source_page => mkurl()
-                }) %]">[% l("issue") %]</a>[%-
+                            hold_link = hold_link _ param_sep;
                         END;
-                    ELSE;
-                        l("No");
-                    END %]</td>
+                    END; 
+                    IF serial_holdings; 
+                        hold_link = hold_link _
+                            '<a class="rdetail-issue-place-hold" href="' _
+                            mkurl(ctx.opac_root _ '/place_hold', {
+                                hold_target => copy_info.issuance,
+                                hold_type => 'I',
+                                hold_source_page => mkurl()
+                            }) _ '">' _ l('Issue hold') _ '</a>';
+                    END; 
+
+                    hold_link;
+                ELSE; 
+                    l("Not holdable");
+                END %]</td>
             [%- END %]
             <td header='copy_header_status'>[% copy_info.copy_status | html %]</td>
             <td header='due_date'>[%

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/opac/parts/record/copy_table.tt2 |   72 ++++++++++++--------
 1 files changed, 43 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list