koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha C4/Koha.pm koha-tmpl/intranet-tmpl/prog/en... [rel_3_0]


From: paul poulain
Subject: [Koha-cvs] koha C4/Koha.pm koha-tmpl/intranet-tmpl/prog/en... [rel_3_0]
Date: Mon, 23 Oct 2006 16:52:35 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     paul poulain <tipaul>   06/10/23 16:52:35

Modified files:
        C4             : Koha.pm 
        koha-tmpl/intranet-tmpl/prog/en/catalogue: results.tmpl 

Log message:
        - reintroducing facets into rel_3_0
        - adding facets for UNIMARC

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.40.2.16&r2=1.40.2.17
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/results.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.8&r2=1.1.2.9

Patches:
Index: C4/Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.40.2.16
retrieving revision 1.40.2.17
diff -u -b -r1.40.2.16 -r1.40.2.17
--- C4/Koha.pm  20 Oct 2006 10:35:05 -0000      1.40.2.16
+++ C4/Koha.pm  23 Oct 2006 16:52:35 -0000      1.40.2.17
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Koha.pm,v 1.40.2.16 2006/10/20 10:35:05 alaurin Exp $
+# $Id: Koha.pm,v 1.40.2.17 2006/10/23 16:52:35 tipaul Exp $
 
 use strict;
 require Exporter;
@@ -25,7 +25,7 @@
 use C4::Output;
 use vars qw($VERSION @ISA @EXPORT);
 
-$VERSION = do { my @v = '$Revision: 1.40.2.16 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
+$VERSION = do { my @v = '$Revision: 1.40.2.17 $' =~ /\d+/g; shift(@v) . "." . 
join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
 
@@ -829,18 +829,59 @@
 }
 
 sub getFacets {
-    my $facets = [ {
+    my $facets;
+    if (C4::Context->preference("marcflavour") eq "UNIMARC") {
+        $facets = [ {
+            link_value => 'su-to',
+            label_value => 'Topics',
+            tags => ['600','601','602','603','604','605','606','610'],
+            subfield => 'a',
+            },
+            {
+            link_value => 'su-geo',
+            label_value => 'Places',
+            tags => ['651'],
+            subfield => 'a',
+            },
+            {
+            link_value => 'su-ut',
+            label_value => 'Titles',
+            tags => ['500','501','502','503','504',],
+            subfield => 'a',
+            },
+            {
+            link_value => 'au',
+            label_value => 'Authors',
+            tags => ['700','701','702',],
+            subfield => 'a',
+            },
+            {
+            link_value => 'se',
+            label_value => 'Series',
+            tags => ['225'],
+            subfield => 'a',
+            },
+            {
+            link_value => 'branch',
+            label_value => 'Branches',
+            tags => ['995',],
+            subfield => 'b',
+            expanded => '1',
+            },
+        ];
+    } else {
+        $facets = [ {
         link_value => 'su-to',
         label_value => 'Topics',
         tags => ['650'],
         subfield => 'a',
         },
-#        {
-#        link_value => 'su-na',
-#        label_value => 'People and Organizations',
-#        tags => ['600', '610', '611'],
-#        subfield => 'a',
-#        },
+    #        {
+    #        link_value => 'su-na',
+    #        label_value => 'People and Organizations',
+    #        tags => ['600', '610', '611'],
+    #        subfield => 'a',
+    #        },
     {
         link_value => 'su-geo',
         label_value => 'Places',
@@ -873,6 +914,7 @@
         expanded => '1',
         },
     ];
+    }
        return $facets;
 }
 =head2 get_branchinfos_of

Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/results.tmpl
===================================================================
RCS file: 
/sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/Attic/results.tmpl,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -b -r1.1.2.8 -r1.1.2.9
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/results.tmpl      23 Oct 2006 
16:44:54 -0000      1.1.2.8
+++ koha-tmpl/intranet-tmpl/prog/en/catalogue/results.tmpl      23 Oct 2006 
16:52:35 -0000      1.1.2.9
@@ -169,4 +169,22 @@
 </div>
 </div>
 </div>
+<div id="nav">
+
+<!-- TMPL_IF NAME="opacfacets" -->
+<h6>Refine Your Search</h6>
+<ul id="facets">
+<!-- TMPL_LOOP NAME="facets_loop" -->
+<li id="<!-- TMPL_VAR NAME="type_id" -->"><!-- TMPL_VAR NAME="type_label" 
--><ul>
+       <!-- TMPL_LOOP NAME="facets" -->
+               <li><a href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR 
NAME="searchdesc" --> and <!-- TMPL_VAR NAME="type_link_value" -->:<!-- 
TMPL_VAR NAME="facet_link_value" -->" title="<!-- TMPL_VAR 
NAME="facet_title_value" -->"><!-- TMPL_VAR NAME="facet_label_value" --></a> 
(<!-- TMPL_VAR NAME="facet_count" -->)</li>
+       <!-- /TMPL_LOOP -->
+<!-- TMPL_IF NAME="expandable" -->
+       <li class="showmore"><a href="/search?q=<!-- TMPL_VAR NAME="searchdesc" 
-->&amp;expand=<!-- TMPL_VAR NAME="expand" -->#<!-- TMPL_VAR NAME="type_id" 
-->">Show More</a></li>
+<!-- /TMPL_IF -->
+</ul></li>
+<!-- /TMPL_LOOP -->
+</ul>
+<!-- /TMPL_IF -->
+</div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->




reply via email to

[Prev in Thread] Current Thread [Next in Thread]