flesh => 3,
flesh_fields => {
circ => ['target_copy'],
- acp => ['call_number','location','circ_lib'],
- acn => ['record']
+ acp => ['call_number'],
+ acn => ['record','owning_lib']
}
};
<th>[% sort_head("due", l("Due Date")) %]</th>
<th>[% sort_head("barcode", l("Barcode")) %]</th>
<th>[% sort_head("callnum", l("Call Number")) %]</th>
- <th>[% sort_head("lib", l("Lending Library")) %]</th>
+ <th>[% sort_head("lib", l("Owning Library")) %]</th>
</tr>
</thead>
<tbody>
CASE "callnum";
circ.SORTING = circ.circ.target_copy.call_number.label;
CASE "lib";
- circ.SORTING = circ.circ.target_copy.circ_lib.name;
+ circ.SORTING = circ.circ.target_copy.call_number.owning_lib.name;
CASE;
sort_field = "";
[% circ.circ.target_copy.call_number.label | html %]
</td>
<td name="lib">
- [%- copy_info = circ.circ.target_copy;
- INCLUDE "opac/parts/library_name_link.tt2";
+ [%- fleshed_ou = circ.circ.target_copy.call_number.owning_lib;
+ INCLUDE "opac/parts/library_name_link_from_ou.tt2";
%]
</td>
</tr>
--- /dev/null
+[%-
+ opac_root = ctx.opac_root;
+ IF ctx.kpac_root;
+ opac_root = ctx.kpac_root;
+ END;
+
+ # Requires a "fleshed_ou" (aou) object defined.
+ # Allow fleshed circ_libs
+ org_id = fleshed_ou.id;
+ org_name = fleshed_ou.name;
+ org_sname = fleshed_ou.shortname;
+
+ lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
+ prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
+ UNLESS lib_url && prefer_external_url;
+ lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
+ END;
+ IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
+ '<span property="name">'; org_name | html; '</span>';
+ IF lib_url; '</a>'; END;
+-%]
+
New Column in Items Out Display
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-A new column, Lending Library, has been added to the Items Out display which
+A new column, Owning Library, has been added to the Items Out display which
shows the owning library of the item (not necessarily the library at which
the item was picked up at). When a patron has run out of renewals, the owning
library is the one with whom the patron will negotiate additional renewals, and