Bug 29609: Centralized code to build the link to a biblio detail page
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / includes / html_helpers.inc
index 4f4f461..a991f0c 100644 (file)
     [% END %]
 [% END %]
 
+[% BLOCK biblio_a_href -%]
+    [%- IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' && Koha.Preference('viewMARC') -%]
+        [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=" -%]
+    [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' && Koha.Preference('viewLabeledMARC') -%]
+        [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=" -%]
+    [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' && Koha.Preference('viewISBD') -%]
+        [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=" -%]
+    [%- ELSE -%]
+        [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" -%]
+    [%- END -%]
+    [%- this_biblio_href | url %][% biblionumber | url -%]
+[%- END %]
+
 [% BLOCK subfields_for_item %]
     <ol>
         [% FOREACH subfield IN subfields %]