[open-ils-commits] [GIT] Evergreen ILS branch master updated. 47472b2468519769d0d0c7d9c34ef4b551d6fa6d

Evergreen Git git at git.evergreen-ils.org
Fri Sep 6 12:33:38 EDT 2019


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  47472b2468519769d0d0c7d9c34ef4b551d6fa6d (commit)
       via  06cbee35f98ac2885677e627d6484407b7a91f2d (commit)
       via  d8abc5a1bebaf44d0d014fab3ad807f2d1f568ba (commit)
      from  e6e32698cfd606b5e762620cbdd2c68004162a37 (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 47472b2468519769d0d0c7d9c34ef4b551d6fa6d
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Sep 6 12:33:24 2019 -0400

    LP#1753536: stamp DB update
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index cc7aa22ea6..2f61d63c1d 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1178', :eg_version); -- terran/rhamby/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1179', :eg_version); -- dpearl/Dycrona/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql b/Open-ILS/src/sql/Pg/upgrade/1179.data.yaous_show_owning_lib_column.sql
similarity index 89%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql
rename to Open-ILS/src/sql/Pg/upgrade/1179.data.yaous_show_owning_lib_column.sql
index 7ee775b232..9814ef8626 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1179.data.yaous_show_owning_lib_column.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1179', :eg_version);
 
 INSERT INTO config.org_unit_setting_type 
     (grp, name, datatype, label, description)

commit 06cbee35f98ac2885677e627d6484407b7a91f2d
Author: Jason Stephenson <jason at sigio.com>
Date:   Mon May 13 14:14:12 2019 -0400

    Lp 1753536: Clarify release notes
    
    It is not universally true that the patron needs to negotiate with the
    owning library for more renewals, so we try to make it clear that this
    is not always the case in the release notes.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc
index fcb9a995f7..caa0520037 100644
--- a/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc
@@ -1,11 +1,14 @@
 New Column in Items Out Display
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A new column, Owning Library, is now optionally available for the Items 
-Out display which shows the owning library of the item (not necessarily 
-the library at which the item was picked up).  When a patron has run
- out of renewals, the owning library is the one with whom the patron 
-will negotiate additional renewals, and clicking on the library 
-name will provide contact information for that library.
+A new column, Owning Library, is now optionally available for the OPAC
+Items Out display which shows the owning library of the item (not
+necessarily the library at which the item was picked up).  Clicking on
+the library name will provide contact information for that library.
+This is useful for When a patron has run out of renewals and the
+owning library, not the patron's home library, is the one with whom
+the patron will negotiate additional renewals.  If the patron will
+negotiate additional renewals with their home library or the checkout
+library, then display of this field is superfluous.
 
-The column is controlled by the organization setting 
-"opac.show_owning_library_column".
+The display of this column is controlled by the organization setting
+"opac.show_owning_library_column."

commit d8abc5a1bebaf44d0d014fab3ad807f2d1f568ba
Author: Dan Pearl <dpearl at cwmars.org>
Date:   Mon Mar 19 15:09:43 2018 -0400

    LP1753536 - Add a new Owning Library column to the OPAC Items Out
    
    This new column indicates which library owns the materials, and is
    intended to help the patron contact the owning library should they be
    out of renewals and would like an exception made.
    
    Also adds some utility code for generating an org unit URL.
    
    Make the presence of the column controlled by an organizational unit
    setting.
    
    Signed-off-by: Dan Pearl <dpearl at cwmars.org>
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 3ec7900939..5bc2f8b98c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -1578,7 +1578,7 @@ sub fetch_user_circs {
         flesh_fields => {
             circ => ['target_copy'],
             acp => ['call_number'],
-            acn => ['record']
+            acn => ['record','owning_lib']
         }
     };
 
@@ -1793,7 +1793,7 @@ sub handle_circ_update {
     my $action   = shift;
     my $circ_ids = shift;
 
-    my $circ_ids //= [$self->cgi->param('circ_id')];
+    $circ_ids //= [$self->cgi->param('circ_id')];
 
     if ($action =~ /delete/) {
         my $options = {
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 4e8984b558..9637a212ff 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -4345,6 +4345,15 @@ INSERT into config.org_unit_setting_type
         'coust', 'description'),
     'bool', null)
 
+,( 'opac.show_owning_lib_column', 'opac',
+    oils_i18n_gettext('opac.show_owning_lib_column',
+        'Show "Owning Lib" column in Items Out',
+        'coust', 'label'),
+    oils_i18n_gettext('opac.show_owning_lib_column',
+        'If enabled, an addition column, Owning Lib, will be shown in the Items Out display. This may assist in requesting additional renewals',
+        'coust', 'description'),
+    'bool', null)
+
 ,( 'opac.barcode_regex', 'glob',
     oils_i18n_gettext('opac.barcode_regex',
         'Patron barcode format',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql
new file mode 100644
index 0000000000..7ee775b232
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous_show_owning_lib_column.sql
@@ -0,0 +1,25 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type 
+    (grp, name, datatype, label, description)
+VALUES (
+    'opac',
+    'opac.show_owning_lib_column', 'bool',
+    oils_i18n_gettext(
+        'opac.show_owning_lib_column',
+        'Show Owning Lib in Items Out',
+        'coust',
+        'label'
+    ),
+    oils_i18n_gettext(
+        'opac.show_owning_lib_column',
+'If enabled, the Owning Lib will be shown in the Items Out display.' ||
+' This may assist in requesting additional renewals',
+        'coust',
+        'description'
+    )
+);
+
+COMMIT;
diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index 1b0683cd91..1c068befc7 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -76,7 +76,13 @@
                 <th>[% sort_head("renews", l("Renewals Left")) %]</th>
                 <th>[% sort_head("due", l("Due Date")) %]</th>
                 <th>[% sort_head("barcode", l("Barcode")) %]</th>
-                <th>[% sort_head("callnum", l("Call number")) %]</th>
+                <th>[% sort_head("callnum", l("Call Number")) %]</th>
+                [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
+                   <th>[% sort_head("lib", l("Owning Library")) %]</th>
+                   [% column_count = 8;
+                ELSE ;
+                   column_count = 7;
+                END; %]
             </tr>
             </thead>
             <tbody>
@@ -112,6 +118,8 @@
 
                        CASE "callnum";
                           circ.SORTING = circ.circ.target_copy.call_number.label;
+                       CASE "lib";
+                          circ.SORTING = circ.circ.target_copy.call_number.owning_lib.name;
                        
                        CASE;
                           sort_field = "";
@@ -179,11 +187,19 @@
                         <td name="call_number">
                             [% circ.circ.target_copy.call_number.label | html %]
                         </td>
+                        [% IF ctx.get_org_setting(ctx.user.home_ou, 'opac.show_owning_lib_column'); %]
+                          <td name="lib">
+			  [%- fleshed_ou = circ.circ.target_copy.call_number.owning_lib;
+                            INCLUDE "opac/parts/library_name_link_from_ou.tt2";
+			  %]
+                          </td>
+                        [% END; %]
                     </tr>
+
                     [%  IF circ.renewal_response AND
                             circ.renewal_response.textcode != 'SUCCESS' %]
                     <tr>
-                        <td colspan="6">[%# XXX colspan="0" does not work in IE %]
+                        <td colspan="[% column_count %]">[%# XXX colspan="0" does not work in IE %]
                             <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.fail_part | html %]">
                                 [%
                                     renew_fail_msg = '';
@@ -201,9 +217,9 @@
                             </span>
                         </td>
                     </tr>
-                    [%  END; # FOR
+                    [% END; %]
 
-                    END %]
+                [% END; %]
                 </tbody>
             </table>
         </form>
diff --git a/Open-ILS/src/templates/opac/parts/library_name_link.tt2 b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
index 1ad030c25a..8b8275e634 100644
--- a/Open-ILS/src/templates/opac/parts/library_name_link.tt2
+++ b/Open-ILS/src/templates/opac/parts/library_name_link.tt2
@@ -4,12 +4,21 @@
         opac_root = ctx.kpac_root;
     END;
 
-    org_name = ctx.get_aou(copy_info.circ_lib).name;
-    org_sname = ctx.get_aou(copy_info.circ_lib).shortname;
-    lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
-    prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url');
+    # Allow fleshed circ_libs
+    IF copy_info.circ_lib.name; 
+       org_id = copy_info.circ_lib.id;
+       org_name = copy_info.circ_lib.name; 
+       org_sname = copy_info.circ_lib.shortname; 
+    ELSE;
+       org_id = copy_info.circ_lib;
+       org_name = ctx.get_aou(org_id).name;
+       org_sname = ctx.get_aou(org_id).shortname;
+    END;
+
+    lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
+    prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
     UNLESS lib_url && prefer_external_url;
-        lib_url = mkurl(opac_root _ '/library/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1);
+        lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
     END; 
     IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
     '<span property="name">'; org_name | html; '</span>';
diff --git a/Open-ILS/src/templates/opac/parts/library_name_link_from_ou.tt2 b/Open-ILS/src/templates/opac/parts/library_name_link_from_ou.tt2
new file mode 100644
index 0000000000..54e085b535
--- /dev/null
+++ b/Open-ILS/src/templates/opac/parts/library_name_link_from_ou.tt2
@@ -0,0 +1,22 @@
+[%-
+    opac_root = ctx.opac_root;
+    IF ctx.kpac_root;
+        opac_root = ctx.kpac_root;
+    END;
+
+    # Requires a "fleshed_ou" (aou) object defined.
+    # Allow fleshed circ_libs
+    org_id = fleshed_ou.id;
+    org_name = fleshed_ou.name; 
+    org_sname = fleshed_ou.shortname;
+
+    lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
+    prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
+    UNLESS lib_url && prefer_external_url;
+        lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
+    END; 
+    IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
+    '<span property="name">'; org_name | html; '</span>';
+    IF lib_url; '</a>'; END;
+-%]
+
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc
new file mode 100644
index 0000000000..fcb9a995f7
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc
@@ -0,0 +1,11 @@
+New Column in Items Out Display
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+A new column, Owning Library, is now optionally available for the Items 
+Out display which shows the owning library of the item (not necessarily 
+the library at which the item was picked up).  When a patron has run
+ out of renewals, the owning library is the one with whom the patron 
+will negotiate additional renewals, and clicking on the library 
+name will provide contact information for that library.
+
+The column is controlled by the organization setting 
+"opac.show_owning_library_column".

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

Summary of changes:
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         |  4 ++--
 Open-ILS/src/sql/Pg/002.schema.config.sql          |  2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |  9 ++++++++
 .../1179.data.yaous_show_owning_lib_column.sql     | 25 ++++++++++++++++++++++
 Open-ILS/src/templates/opac/myopac/circs.tt2       | 24 +++++++++++++++++----
 .../src/templates/opac/parts/library_name_link.tt2 | 19 +++++++++++-----
 .../opac/parts/library_name_link_from_ou.tt2       | 22 +++++++++++++++++++
 .../OPAC/LP1753536_items_out_lib.adoc              | 14 ++++++++++++
 8 files changed, 107 insertions(+), 12 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1179.data.yaous_show_owning_lib_column.sql
 create mode 100644 Open-ILS/src/templates/opac/parts/library_name_link_from_ou.tt2
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list