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

Evergreen Git git at git.evergreen-ils.org
Thu May 25 09:22:27 EDT 2017


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  b985c79a170c2ea06feffd87444d0a441b1f270d (commit)
       via  6886dc463ab97db49c2ad23a712c26ff98613969 (commit)
       via  d1fc46a0d731524846987c480b06d535f8d6c8b6 (commit)
      from  6d94067f076785499a1ffaf60dce193aa57f0a41 (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 b985c79a170c2ea06feffd87444d0a441b1f270d
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Thu May 25 09:31:27 2017 -0400

    LP#1687971: 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 f8091f0..da3a39d 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -90,7 +90,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 ('1041', :eg_version); -- stompro/csharp/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1042', :eg_version); -- mmorgan/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1042.schema.asset.copy_location.url.sql b/Open-ILS/src/sql/Pg/upgrade/1042.schema.asset.copy_location.url.sql
new file mode 100644
index 0000000..7224ecc
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/1042.schema.asset.copy_location.url.sql
@@ -0,0 +1,8 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1042', :eg_version); -- mmorgan/gmcharlt
+
+ALTER TABLE asset.copy_location
+          ADD COLUMN url TEXT;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql
deleted file mode 100644
index 6851669..0000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-BEGIN;
-
-ALTER TABLE asset.copy_location
-          ADD COLUMN url TEXT;
-
-COMMIT;

commit 6886dc463ab97db49c2ad23a712c26ff98613969
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Thu May 18 21:11:20 2017 -0400

    LP#1687971: follow-up fix to copy location editor
    
    This fixes an issue where URLs of existing copy locations
    could not be edited.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
index 412279b..750904e 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
@@ -237,6 +237,7 @@
                         </td>
                         <td><input name='cl_edit_label_prefix' type='text'> </input></td>
                         <td><input name='cl_edit_label_suffix' type='text'> </input></td>
+                        <td><input name='cl_edit_url' type='text'> </input></td>
                         <td><input type='submit' name='cl_edit_commit' value='&staff.server.admin.copy_locations.submit;'/></td>
                         <td><input type='submit' name='cl_edit_cancel' value='&staff.server.admin.copy_locations.cancel;'/></td>
                     </tr>

commit d1fc46a0d731524846987c480b06d535f8d6c8b6
Author: Michele Morgan <mmorgan at noblenet.org>
Date:   Mon May 8 15:08:11 2017 -0400

    LP#1687971 - Make copy locations in the OPAC clickable.
    
    Adds a url field to asset.copy_location. The presence of a url in the
    field will cause the copy location to display as a link in the OPAC. Urls
    can be edited in the Copy Locations Editor.
    
    Additional contributors: Martha Driscoll, Christine Morgan, Suzanne
    Paterno.
    
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 02ffe75..86a9f3b 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -4760,6 +4760,7 @@ SELECT  usr,
 			<field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
 			<field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
 			<field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
+			<field reporter:label="URL" name="url" reporter:datatype="text" />
 		</fields>
 		<links>
 			<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
index a8c6c9f..b24a0db 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
@@ -2049,7 +2049,8 @@ sub basic_opac_copy_query {
                     'age_protect', 'holdable', 'copy_number'],
             acpl => [
                 {column => 'name', alias => 'copy_location'},
-                {column => 'holdable', alias => 'location_holdable'}
+                {column => 'holdable', alias => 'location_holdable'},
+                {column => 'url', alias => 'location_url'}
             ],
             ccs => [
                 {column => 'id', alias => 'status_code'},
diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql
index 4375013..283b476 100644
--- a/Open-ILS/src/sql/Pg/040.schema.asset.sql
+++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql
@@ -32,7 +32,8 @@ CREATE TABLE asset.copy_location (
 	label_prefix	TEXT,
 	label_suffix	TEXT,
 	checkin_alert	BOOL	NOT NULL DEFAULT FALSE,
-	deleted		BOOL	NOT NULL DEFAULT FALSE
+	deleted		BOOL	NOT NULL DEFAULT FALSE,
+	url		TEXT
 );
 CREATE UNIQUE INDEX acl_name_once_per_lib ON asset.copy_location (name, owning_lib) WHERE deleted = FALSE OR deleted IS FALSE;
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql
new file mode 100644
index 0000000..6851669
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.asset.copy_location.url.sql
@@ -0,0 +1,6 @@
+BEGIN;
+
+ALTER TABLE asset.copy_location
+          ADD COLUMN url TEXT;
+
+COMMIT;
diff --git a/Open-ILS/src/templates/opac/parts/location_name_link.tt2 b/Open-ILS/src/templates/opac/parts/location_name_link.tt2
new file mode 100644
index 0000000..06df235
--- /dev/null
+++ b/Open-ILS/src/templates/opac/parts/location_name_link.tt2
@@ -0,0 +1,14 @@
+[%-
+    opac_root = ctx.opac_root;
+    IF ctx.kpac_root;
+        opac_root = ctx.kpac_root;
+    END;
+
+    loc_name = copy_info.copy_location;
+    loc_url = copy_info.location_url;
+
+    IF loc_url; '<a property="offeredBy" typeof="Library" href="'; loc_url | html; '">'; END;
+    '<span property="name">'; loc_name | html; '</span>';
+    IF loc_url; '</a>'; END;
+-%]
+
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 3d4dae4..ec8dda4 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_table.tt2
@@ -136,7 +136,7 @@ END; # FOREACH bib
                     '<meta property="gtin13" content="' _ attrs.gtin13 _ '" />';
                 END; -%]
             </td>
-            <td property="availableAtOrFrom">[% copy_info.copy_location | html %]</td>
+            <td property="availableAtOrFrom">[%- INCLUDE "opac/parts/location_name_link.tt2"; -%]</td>
             [%- IF ctx.is_staff %]
             <td>
                 [% copy_info.age_protect ?
diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 4e39205..fdbec28 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -2204,6 +2204,8 @@
 <!ENTITY staff.server.admin.copy_locations.editor.suffix "Label suffix">
 <!ENTITY staff.server.admin.copy_locations.editor.prefix.label "Label prefix: ">
 <!ENTITY staff.server.admin.copy_locations.editor.suffix.label "Label suffix: ">
+<!ENTITY staff.server.admin.copy_locations.editor.url "URL">
+<!ENTITY staff.server.admin.copy_locations.editor.url.label "URL: ">
 <!ENTITY staff.server.admin.copy_locations.editor.welcome "Welcome">
 <!ENTITY staff.server.admin.copy_locations.editor.checkin_alert.label "Checkin Alert: ">
 <!ENTITY staff.server.admin.copy_locations.editor.checkin_alert "Checkin Alert">
diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
index da25abc..6adc1c9 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
@@ -125,6 +125,7 @@ function clCreateNew() {
     cl.checkin_alert( $('cl_new_checkin_alert_yes').checked ? 1 : 0 );
     cl.label_prefix( $('cl_new_label_prefix').value );
     cl.label_suffix( $('cl_new_label_suffix').value );
+    cl.url( $('cl_new_url').value );
 
     var req = new Request(CREATE_CL, SESSION, cl);
     req.send(true);
@@ -174,6 +175,7 @@ function clBuildRow( tbody, row, cl ) {
     appendClear($n( row, 'cl_checkin_alert'), (isTrue(cl.checkin_alert())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
     $n( row, 'cl_label_prefix').appendChild(text(cl.label_prefix() || ''));
     $n( row, 'cl_label_suffix').appendChild(text(cl.label_suffix() || ''));
+    $n( row, 'cl_url').appendChild(text(cl.url() || ''));
 
     var edit = $n( row, 'cl_edit');
     edit.onclick = function() { clEdit( cl, tbody, row ); };
@@ -233,6 +235,14 @@ function clEdit( cl, tbody, row ) {
     }
     label_suffix.value = cl.label_suffix();
 
+    var url = $n(r, 'cl_edit_url');
+    if (cl.url()) {
+        url.setAttribute('size', cl.url().length + 3);
+    } else {
+        url.setAttribute('size', 20);
+    }
+    url.value = cl.url();
+
     $n(r, 'cl_edit_cancel').onclick = function(){cleanTbody(tbody,'edit');}
     $n(r, 'cl_edit_commit').onclick = function(){clEditCommit( tbody, r, cl ); }
 
@@ -272,6 +282,7 @@ function clEditCommit( tbody, r, cl ) {
     cl.name($n(r, 'cl_edit_name').value);
     cl.label_prefix($n(r, 'cl_edit_label_prefix').value);
     cl.label_suffix($n(r, 'cl_edit_label_suffix').value);
+    cl.url($n(r, 'cl_edit_url').value);
 
     var req = new Request( UPDATE_CL, SESSION, cl );
     req.send(true);
diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
index 0d4fb94..412279b 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
@@ -103,8 +103,10 @@
                             <input type='radio' name='cl_new_checkin_alert'  
                                 id='cl_new_checkin_alert_no' checked='checked'> </input>
                         </td>
-                        <td> </td>
-                        <td> </td>
+                        <td>&staff.server.admin.copy_locations.editor.url.label;</td>
+                        <td>
+                            <input id='cl_new_url' type='text' size='20'/>
+			</td>
                     </tr>
                     <tr>
                         <td>&staff.server.admin.copy_locations.editor.prefix.label;</td>
@@ -140,6 +142,7 @@
                         <td width=''>&staff.server.admin.copy_locations.editor.checkin_alert;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.prefix;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.suffix;</td>
+                        <td width=''>&staff.server.admin.copy_locations.editor.url;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.edit;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.delete;</td>
                     </tr>
@@ -158,6 +161,7 @@
                         <td name='cl_checkin_alert'> </td>
                         <td name='cl_label_prefix'> </td>
                         <td name='cl_label_suffix'> </td>
+                        <td name='cl_url'> </td>
                         <td><input type='submit' value='&staff.server.admin.copy_locations.editor.edit;' name='cl_edit' disabled='disabled'> </input></td>
                         <td><input type='submit' value='&staff.server.admin.copy_locations.editor.delete;' name='cl_delete' disabled='disabled'> </input></td>
                     </tr>
diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/clickable_copy_locations.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/clickable_copy_locations.adoc
new file mode 100644
index 0000000..ee7c48a
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/clickable_copy_locations.adoc
@@ -0,0 +1,4 @@
+Clickable Copy Locations
+^^^^^^^^^^^^^^^^^^^^^^^^
+Adds a url field to the copy locations editor. When a url is entered in this field, 
+the associated copy location will display as a link in the opac summary display.

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

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |    1 +
 .../perlmods/lib/OpenILS/Application/AppUtils.pm   |    3 ++-
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/040.schema.asset.sql           |    3 ++-
 .../1042.schema.asset.copy_location.url.sql        |    8 ++++++++
 .../templates/opac/parts/location_name_link.tt2    |   14 ++++++++++++++
 .../src/templates/opac/parts/record/copy_table.tt2 |    2 +-
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    2 ++
 .../staff_client/server/admin/copy_locations.js    |   11 +++++++++++
 .../staff_client/server/admin/copy_locations.xhtml |    9 +++++++--
 .../OPAC/clickable_copy_locations.adoc             |    4 ++++
 11 files changed, 53 insertions(+), 6 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1042.schema.asset.copy_location.url.sql
 create mode 100644 Open-ILS/src/templates/opac/parts/location_name_link.tt2
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/clickable_copy_locations.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list