@@ -, +, @@
URL
- Go to Administration -> Authority types
- Select "MARC structure" from the actions menu for the authority type
you want to modify.
- Select "Subfields" from the actions menu for the tag containing
the subfield you want to modify (for instance 856).
- Edit the subfield you want to display as a link (e.g. subfield u).
- In the subfield configuration form under "Advanced constraints" check
the "Is a URL" checkbox and save your changes.
- Apply the patch and go to Authorities in the staff interface.
- Search for or create an authority record which contains URL
information in the right subfield (for instance 856$u).
- View the details for the record. Using the 856 example, the "8" tab
should contain an active link pointing to the correct URL.
---
authorities/detail.pl | 3 ++-
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
--- a/authorities/detail.pl
+++ a/authorities/detail.pl
@@ -120,7 +120,8 @@ sub build_tabs {
my %subfield_data;
$subfield_data{marc_lib}=$tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{isurl}) {
- $subfield_data{marc_value}="$subf[$i][1]";
+ $subfield_data{marc_value} = $subf[$i][1];
+ $subfield_data{is_url} = 1;
} else {
$subfield_data{marc_value}=$subf[$i][1];
}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
@@ -79,7 +79,11 @@
- [% subfiel.marc_value | html %]
+ [% IF ( subfiel.is_url ) %]
+ [% subfiel.marc_value | html %]
+ [% ELSE %]
+ [% subfiel.marc_value | html %]
+ [% END %]
[% IF ( subfiel.link ) %]
--