<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"/>
'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'},
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;
--- /dev/null
+BEGIN;
+
+ALTER TABLE asset.copy_location
+ ADD COLUMN url TEXT;
+
+COMMIT;
--- /dev/null
+[%-
+ 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;
+-%]
+
'<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 ?
<!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">
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);
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 ); };
}
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 ); }
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);
<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>
<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>
<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>
--- /dev/null
+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.