If enabled bring up a ROUTE TO prompt for the location at reshelving time.
Also, while at it, add Prefix/Suffix to the "new" section of the editor.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
<field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Label Prefix" name="label_prefix" reporter:datatype="text" oils_persist:i18n="true"/>
<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" />
</fields>
<links>
<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
__PACKAGE__->table( 'asset_copy_location' );
__PACKAGE__->columns( Primary => qw/id/ );
-__PACKAGE__->columns( Essential => qw/name owning_lib holdable hold_verify opac_visible circulate label_prefix label_suffix/ );
+__PACKAGE__->columns( Essential => qw/name owning_lib holdable hold_verify opac_visible circulate label_prefix label_suffix checkin_alert/ );
#-------------------------------------------------------------------------------
package asset::copy_location_order;
circulate BOOL NOT NULL DEFAULT TRUE,
label_prefix TEXT,
label_suffix TEXT,
+ checkin_alert BOOL NOT NULL DEFAULT FALSE,
CONSTRAINT acl_name_once_per_lib UNIQUE (name, owning_lib)
);
--- /dev/null
+ALTER TABLE asset.copy_location
+ ADD COLUMN checkin_alert BOOL NOT NULL DEFAULT FALSE;
<!ENTITY staff.server.admin.copy_locations.editor.delete.confirm "Are you sure you wish to delete the selected copy location? Note: If copies are currently attached to this location, the delete operation will fail.">
<!ENTITY staff.server.admin.copy_locations.editor.prefix "Label prefix">
<!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.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">
<!ENTITY staff.server.admin.copy_locations.submit "Submit">
<!ENTITY staff.server.admin.copy_locations.cancel "Cancel">
<!ENTITY staff.server.admin.copy_locations.update_success "Update Succeeded">
cl.hold_verify( ($('cl_new_hold_verify_yes').checked) ? 1 : 0 );
cl.opac_visible( ($('cl_new_vis_yes').checked) ? 1 : 0 );
cl.circulate( ($('cl_new_circulate_yes').checked) ? 1 : 0 );
+ 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 );
var req = new Request(CREATE_CL, SESSION, cl);
req.send(true);
appendClear($n( row, 'cl_hold_verify'), (isTrue(cl.hold_verify())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
appendClear($n( row, 'cl_visible'), (isTrue(cl.opac_visible())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
appendClear($n( row, 'cl_circulate'), (isTrue(cl.circulate())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+ 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() || ''));
else arr[5].checked = true;
if(isTrue(cl.hold_verify())) arr[6].checked = true;
else arr[7].checked = true;
+ if(isTrue(cl.checkin_alert())) arr[8].checked = true;
+ else arr[9].checked = true;
var label_prefix = $n(r, 'cl_edit_label_prefix');
if (cl.label_prefix()) {
arr[5] = $n( $n(r,'cl_edit_circulate_no'), 'cl_edit_circulate');
arr[6] = $n( $n(r,'cl_edit_hold_verify_yes'), 'cl_edit_hold_verify');
arr[7] = $n( $n(r,'cl_edit_hold_verify_no'), 'cl_edit_hold_verify');
+ arr[8] = $n( $n(r,'cl_edit_checkin_alert_yes'), 'cl_edit_checkin_alert');
+ arr[9] = $n( $n(r,'cl_edit_checkin_alert_no'), 'cl_edit_checkin_alert');
return arr;
}
else cl.circulate(0);
if(arr[6].checked) cl.hold_verify(1);
else cl.hold_verify(0);
+ if(arr[8].checked) cl.checkin_alert(1);
+ else cl.checkin_alert(0);
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);
</td>
</tr>
<tr>
+ <td>&staff.server.admin.copy_locations.editor.checkin_alert.label;</td>
+ <td>
+ <span>&staff.server.admin.copy_locations.editor.yes;</span>
+ <input type='radio' name='cl_new_checkin_alert' id='cl_new_checkin_alert_yes'/>
+ <span>&staff.server.admin.copy_locations.editor.no;</span>
+ <input type='radio' name='cl_new_checkin_alert'
+ id='cl_new_checkin_alert_no' checked='checked'> </input>
+ </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>&staff.server.admin.copy_locations.editor.prefix.label;</td>
+ <td>
+ <input id='cl_new_label_prefix' type='text' size='10'/>
+ </td>
+ <td>&staff.server.admin.copy_locations.editor.suffix.label;</td>
+ <td>
+ <input id='cl_new_label_suffix' type='text' size='10'/>
+ </td>
+ </tr>
+ <tr>
<td colspan='4'><input id='sc_new_submit' type='submit' value='&staff.server.admin.copy_locations.editor.create;' disabled='disabled'/></td>
</tr>
</tbody>
<td width=''>&staff.server.admin.copy_locations.editor.hold_verify;</td>
<td width=''>&staff.server.admin.copy_locations.editor.opac_visible;</td>
<td width=''>&staff.server.admin.copy_locations.editor.circulate;</td>
+ <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.edit;</td>
<td name='cl_hold_verify'> </td>
<td name='cl_visible'> </td>
<td name='cl_circulate'> </td>
+ <td name='cl_checkin_alert'> </td>
<td name='cl_label_prefix'> </td>
<td name='cl_label_suffix'> </td>
<td><input type='submit' value='&staff.server.admin.copy_locations.editor.edit;' name='cl_edit' disabled='disabled'> </input></td>
<input type='radio' name='cl_edit_circulate'/>
</span>
</td>
+ <td>
+ <span>&staff.server.admin.copy_locations.editor.yes;</span>
+ <span name='cl_edit_checkin_alert_yes'>
+ <input type='radio' name='cl_edit_checkin_alert'/>
+ </span>
+ <span>&staff.server.admin.copy_locations.editor.no;</span>
+ <span name='cl_edit_checkin_alert_no'>
+ <input type='radio' name='cl_edit_checkin_alert'/>
+ </span>
+ </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 type='submit' name='cl_edit_commit' value='&staff.server.admin.copy_locations.submit;'/></td>
msg += '\n\n';
}
+ var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
+
/* SUCCESS / NO_CHANGE / ITEM_NOT_CATALOGED */
if (check.ilsevent == 0 || check.ilsevent == 3 || check.ilsevent == 1202) {
- try { check.route_to = data.lookup('acpl', check.copy.location() ).name(); }
- catch(E) {
+ try {
+ var acpl = data.lookup('acpl', check.copy.location());
+ check.route_to = acpl.name();
+ check.checkin_alert = isTrue(acpl.checkin_alert()) && !suppress_popups;
+ } catch(E) {
print_data.error_msg = document.getElementById('commonStrings').getString('common.error');
print_data.error_msg += '\nFIXME: ' + E + '\n';
msg += print_data.error_msg;
case 7: /* RESHELVING */
check.what_happened = 'success';
sound.special('checkin.success');
- if (msg) {
+ if (msg || check.checkin_alert) {
print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
print_data.route_to = check.route_to;
msg += print_data.route_to_msg;
msg += '\n';
}
var rv = 0;
- var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
if (suppress_popups) {
rv = auto_print ? 0 : -1; auto_print = true; // skip dialog and PRINT or DO NOT PRINT based on Auto-Print checkbox
}
sound.special('checkin.cataloging');
check.route_to = 'CATALOGING';
print_data.route_to;
- var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
var x = document.getElementById('do_not_alert_on_precat');
var do_not_alert_on_precats = x ? ( x.getAttribute('checked') == 'true' ) : false;
if ( !suppress_popups && !do_not_alert_on_precats ) {
}
}
var rv = 0;
- var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
if (suppress_popups) {
rv = auto_print ? 0 : -1; auto_print = true; // skip dialog and PRINT or DO NOT PRINT based on Auto-Print checkbox
}
sound.special('checkin.not_found');
check.route_to = 'CATALOGING';
var mis_scan_msg = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.status.copy_not_found', [params.barcode]);
- var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
if (!suppress_popups) {
error.yns_alert(
mis_scan_msg,
sound.special('checkin.hold_capture_delayed');
var rv = 0;
msg += document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.description');
- var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popupst'];
if (!suppress_popups) {
rv = error.yns_alert_formatted(
msg,