[open-ils-commits] r17662 - in branches/rel_2_0/Open-ILS: src/sql/Pg src/sql/Pg/upgrade web/opac/skin/default/js web/opac/skin/default/xml/rdetail (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 14 17:45:26 EDT 2010
Author: senator
Date: 2010-09-14 17:45:20 -0400 (Tue, 14 Sep 2010)
New Revision: 17662
Added:
branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0397.data.coust.opac_fully_compresssed.sql
Modified:
branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql
branches/rel_2_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql
branches/rel_2_0/Open-ILS/web/opac/skin/default/js/rdetail.js
branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Log:
Backport r17661 from trunk, serials opac holding display
Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-14 21:44:39 UTC (rev 17661)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-14 21:45:20 UTC (rev 17662)
@@ -68,7 +68,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0396'); -- senator
+INSERT INTO config.upgrade_log (version) VALUES ('0397'); -- senator
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-14 21:44:39 UTC (rev 17661)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-14 21:45:20 UTC (rev 17662)
@@ -2038,7 +2038,13 @@
( 'circ.password_reset_request_throttle',
oils_i18n_gettext('circ.password_reset_request_throttle', 'Circulation: Maximum concurrently active self-serve password reset requests', 'coust', 'label'),
oils_i18n_gettext('circ.password_reset_request_throttle', 'Prevent the creation of new self-serve password reset requests until the number of active requests drops back below this number.', 'coust', 'description'),
- 'string')
+ 'string'),
+
+( 'opac.fully_compressed_serial_holdings',
+ 'OPAC: Use fully compressed serial holdings',
+ 'Show fully compressed serial holdings for all libraries at and below
+ the current context unit',
+ 'bool')
;
UPDATE config.org_unit_setting_type
Copied: branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0397.data.coust.opac_fully_compresssed.sql (from rev 17661, trunk/Open-ILS/src/sql/Pg/upgrade/0397.data.coust.opac_fully_compresssed.sql)
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0397.data.coust.opac_fully_compresssed.sql (rev 0)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0397.data.coust.opac_fully_compresssed.sql 2010-09-14 21:45:20 UTC (rev 17662)
@@ -0,0 +1,14 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0397');
+
+INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
+ VALUES (
+ 'opac.fully_compressed_serial_holdings',
+ 'OPAC: Use fully compressed serial holdings',
+ 'Show fully compressed serial holdings for all libraries at and below
+ the current context unit',
+ 'bool'
+ );
+
+COMMIT;
Modified: branches/rel_2_0/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-09-14 21:44:39 UTC (rev 17661)
+++ branches/rel_2_0/Open-ILS/web/opac/skin/default/js/rdetail.js 2010-09-14 21:45:20 UTC (rev 17662)
@@ -155,7 +155,11 @@
}
- if (rdetailDisplaySerialHoldings) {
+ if (rdetailDisplaySerialHoldings && (
+ isXUL() || !fetchOrgSettingDefault(
+ getLocation(), "opac.fully_compressed_serial_holdings")
+ )
+ ) {
var req = new Request(FETCH_MFHD_SUMMARY, getRid());
req.callback(_holdingsDraw);
req.send();
Modified: branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2010-09-14 21:44:39 UTC (rev 17661)
+++ branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml 2010-09-14 21:45:20 UTC (rev 17662)
@@ -131,7 +131,36 @@
]]></script>
</td>
</tr>
+ <tr templated="true"
+ name="serial_holdings_label"
+ class="result_table_title_cell hide_me"
+ type="opac/slot-data"
+ query="datafield[tag=901] subfield[code=c]">
+ <td colspan="2">Issues Held: ${holdingsStatement}
+ <span class="hide_me" name="holdingsStatement" type="opac/template-value"><![CDATA[
+ if (fetchOrgSettingDefault(
+ getLocation(), "opac.fully_compressed_serial_holdings"
+ )) {
+ var blob = fieldmapper.standardRequest(
+ ['open-ils.serial','open-ils.serial.bib.summary_statements'],
+ [BT.textContent(item_list[0]), { orgid : getLocation(), depth : getDepth() }]
+ );
+ var ret = dojo.create('div');
+ for (var i in blob) {
+ var br = dojo.create('br', null, ret);
+ var span = dojo.create('span',{class : 'holding_type_'+ i, innerHTML : blob[i].join(', ') }, ret);
+ }
+
+ dojo.removeClass(slot,'hide_me');
+ return ret.innerHTML;
+ } else {
+ return "";
+ }
+ ]]></span>
+ </td>
+ </tr>
+
</tbody>
</table>
More information about the open-ils-commits
mailing list