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,
( '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
--- /dev/null
+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;
}
- 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();
]]></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>