Bug 5910: [SIGNED-OFF] only add "All authority types" for UNIMARC
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 10 Jun 2012 14:16:16 +0000 (10:16 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 20 Jun 2012 20:22:25 +0000 (22:22 +0200)
UNIMARC is the only marcflavour that does not already have an option
for searching all authority types, so check that the marcflavour is
UNIMARC before displaying the additional "All authority types" option.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
authorities/authorities-home.pl
authorities/detail.pl
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc

index e4eae84..d687c78 100755 (executable)
@@ -177,5 +177,7 @@ $template->param(
     authtypesloop => \@authtypesloop,
 );
 
+$template->{VARS}->{marcflavour} = C4::Context->preference("marcflavour");
+
 # Print the page
 output_html_with_http_headers $query, $cookie, $template->output;
index a7d7d8f..458746c 100755 (executable)
@@ -241,5 +241,7 @@ $template->param(authid => $authid,
                authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
                authtypesloop => \@authtypesloop,
                );
+
+$template->{VARS}->{marcflavour} = C4::Context->preference("marcflavour");
 output_html_with_http_headers $query, $cookie, $template->output;
 
index 895b6cd..ca6f4af 100644 (file)
@@ -8,7 +8,7 @@
         <input type="hidden" name="op" value="do_search" />
         <input type="hidden" name="type" value="intranet" />
         <select name="authtypecode">
-        <option value="">All Authority Types</option>
+        [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %]
         [% FOREACH authtypesloo IN authtypesloop %]
             [% IF ( authtypesloo.selected ) %]
             <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option>
@@ -38,7 +38,7 @@
         <input type="hidden" name="op" value="do_search" />
         <input type="hidden" name="type" value="intranet" />
         <select  name="authtypecode">
-        <option value="">All Authority Types</option>
+        [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %]
         [% FOREACH authtypesloo IN authtypesloop %]
             [% IF ( authtypesloo.selected ) %]
             <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option>
@@ -70,7 +70,7 @@
         <input type="hidden" name="op" value="do_search" />
         <input type="hidden" name="type" value="intranet" />
         <select name="authtypecode">
-        <option value="">All Authority Types</option>
+        [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %]
         [% FOREACH authtypesloo IN authtypesloop %]
             [% IF ( authtypesloo.selected ) %]
             <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option>