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

Evergreen Git git at git.evergreen-ils.org
Mon Jul 22 10:56:00 EDT 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  d0604dbdddfe41faa8444aac66900edf34f4af32 (commit)
       via  256229c024871954a9e0c082e5e02396c8b4aef1 (commit)
      from  5d19146ef5a37337f5dea5725e9c137ab0d85728 (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 d0604dbdddfe41faa8444aac66900edf34f4af32
Author: Dan Scott <dan at coffeecode.net>
Date:   Mon Jul 22 10:55:14 2013 -0400

    Wrap upgrade script for TPAC library name links
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 68648b1..5d938ab 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('0811', :eg_version); -- fparks/miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0812', :eg_version); -- dbs/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql b/Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
new file mode 100644
index 0000000..e33f38f
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
@@ -0,0 +1,23 @@
+-- Evergreen DB patch 0812.data.add_library_info_url_OUS.sql
+--
+-- Adds YAOUS for enabling information links from the TPAC to a library URL
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0812', :eg_version);
+
+-- FIXME: add/check SQL statements to perform the upgrade
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'lib.info_url', 'lib',
+    oils_i18n_gettext('lib.info_url',
+        'Library information URL (such as "http://example.com/about.html")',
+        'coust', 'label'),
+    oils_i18n_gettext('lib.info_url',
+        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+        'coust', 'description'),
+    'string', null)
+;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
deleted file mode 100644
index 623539b..0000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT into config.org_unit_setting_type
-( name, grp, label, description, datatype, fm_class ) VALUES
-( 'lib.info_url', 'lib',
-    oils_i18n_gettext('lib.info_url',
-        'Library information URL (such as "http://example.com/about.html")',
-        'coust', 'label'),
-    oils_i18n_gettext('lib.info_url',
-        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
-        'coust', 'description'),
-    'string', null)
-;

commit 256229c024871954a9e0c082e5e02396c8b4aef1
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Jul 8 14:06:48 2013 -0400

    Support linking to library info from copy display
    
    If the "Library information URL" library setting has a value, then the
    copy display section of the TPAC and KPAC will turn the library name
    for that branch into a link to the given URL. This supports the patron
    goal of quickly finding branch information such as hours of operation,
    directions, and contact information.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

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 f6a42f4..fb3b637 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -3831,6 +3831,15 @@ INSERT into config.org_unit_setting_type
         'coust', 'description'),
     'string', null)
 
+,( 'lib.info_url', 'lib',
+    oils_i18n_gettext('lib.info_url',
+        'Library information URL (such as "http://example.com/about.html")',
+        'coust', 'label'),
+    oils_i18n_gettext('lib.info_url',
+        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+        'coust', 'description'),
+    'string', null)
+
 ,( 'notice.telephony.callfile_lines', 'lib',
     oils_i18n_gettext('notice.telephony.callfile_lines',
         'Telephony: Arbitrary line(s) to include in each notice callfile',
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
new file mode 100644
index 0000000..623539b
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
@@ -0,0 +1,11 @@
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'lib.info_url', 'lib',
+    oils_i18n_gettext('lib.info_url',
+        'Library information URL (such as "http://example.com/about.html")',
+        'coust', 'label'),
+    oils_i18n_gettext('lib.info_url',
+        'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+        'coust', 'description'),
+    'string', null)
+;
diff --git a/Open-ILS/src/templates/kpac/parts/copy_table.tt2 b/Open-ILS/src/templates/kpac/parts/copy_table.tt2
index 7939987..58fc329 100644
--- a/Open-ILS/src/templates/kpac/parts/copy_table.tt2
+++ b/Open-ILS/src/templates/kpac/parts/copy_table.tt2
@@ -36,7 +36,15 @@ END;
             END;
         -%]
         <tr>
-            <td class="location">[% ctx.get_aou(copy_info.circ_lib).name | html %]</td>
+            <td class="location">
+            [%-
+                org_name = ctx.get_aou(copy_info.circ_lib).name;
+                lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
+                IF lib_url; '<a href="'; lib_url | url; '">'; END;
+                org_name | html;
+                IF lib_url; '</a>'; END;
+            -%]
+            </td>
             [%- IF has_parts == 'true' %]
             <td class="callnumber">[% l('[_1] ([_2])', callnum, copy_info.part_label) | html %]</td>
             [% ELSE %]
diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 63d6b44..5c18d60 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -351,14 +351,16 @@
                     status = copy.findnodes('./*[local-name()="status"]');
                     NEXT IF status.getAttribute('opac_visible') == 'false';
 
+                    # extract the circ_lib id from the circ_lib node
+                    circ_lib = copy.findnodes('./*[local-name()="circ_lib"]');
+                    circ_lib_id = circ_lib.getAttribute('id').replace('.*/', '');
+
                     UNLESS ou_hiding_disabled;
-                        # extract the circ_lib id from the circ_lib node
-                        circ_lib = copy.findnodes('./*[local-name()="circ_lib"]');
-                        circ_lib_id = circ_lib.getAttribute('id').replace('.*/', '');
                         NEXT UNLESS ctx.org_within_hiding_scope(circ_lib_id);
                     END;
 
                     holding = {
+                        circ_lib => circ_lib_id,
                         label => vol.label,
                         part_label => part_label,
                         location => loc.textContent,
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 e82ba2b..9a71bce 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -74,7 +74,10 @@ END;
             [%- ELSE %]<td header='copy_header_library'>
             [%-
                 org_name = ctx.get_aou(copy_info.circ_lib).name;
-                org_name | html
+                lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url');
+                IF lib_url; '<a href="'; lib_url | url; '">'; END;
+                org_name | html;
+                IF lib_url; '</a>'; END;
             -%]
             </td>[% END %]
             <td header='copy_header_callnumber'>[% callnum | html %] [% IF ctx.get_org_setting(CGI.param('loc') OR ctx.aou_tree.id, 'sms.enable') == 1 %](<a href="[% mkurl(ctx.opac_root _ '/sms_cn', {copy_id => copy_info.id}) %]">Text</a>)[% END %]</td>
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 0c0b27c..65b475c 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -233,7 +233,14 @@ END;
                                                                         <tbody>
                                                                 [% FOR copy IN args.holdings %]
                                                                         <tr>
-                                                                            <td>[% copy.library | html %]</td>
+                                                                            <td>
+[%-
+    lib_url = ctx.get_org_setting(copy.circ_lib, 'lib.info_url');
+    IF lib_url; '<a href="'; lib_url | url; '">'; END;
+    copy.library | html;
+    IF lib_url; '</a>'; END;
+-%]
+                                                                            </td>
                                                                             <td>[% copy.location | html %]</td>
                                                                             <td>[% copy.label | html %]</td>
                                                                             [%- IF has_parts == 'true'; %]
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt b/docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
new file mode 100644
index 0000000..7b926ce
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
@@ -0,0 +1,14 @@
+Linked library names in copy details
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A patron may find one or more available copies of an item that they want to
+retrieve, but may not be familiar with the location, hours of operation, or
+contact information for each branch of their local library system. To enable
+the patron to quickly access information about a given library branch, the TPAC
+and KPAC can link the name of the branch in the copy details display to a URL
+associated with that branch.
+
+To set the URL for a given branch, use the *Local Administration -> Library
+Settings Editor* and edit the *Library Information URL* setting for that
+branch. Any branches that do not have a library information URL setting display
+as normal text.

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    9 +++++++
 .../upgrade/0812.data.add_library_info_url_OUS.sql |   23 ++++++++++++++++++++
 Open-ILS/src/templates/kpac/parts/copy_table.tt2   |   10 +++++++-
 Open-ILS/src/templates/opac/parts/misc_util.tt2    |    8 ++++--
 .../src/templates/opac/parts/record/copy_table.tt2 |    5 +++-
 Open-ILS/src/templates/opac/parts/result/table.tt2 |    9 +++++++-
 .../RELEASE_NOTES_NEXT/OPAC/link_library_names.txt |   14 ++++++++++++
 8 files changed, 73 insertions(+), 7 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list