[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha koha-tmpl/opac-tmpl/npl/en/includes/doc-he... [dev_week]
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha koha-tmpl/opac-tmpl/npl/en/includes/doc-he... [dev_week] |
Date: |
Mon, 24 Jul 2006 13:05:33 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Joshua Ferraro <kados> 06/07/24 13:05:33
Modified files:
koha-tmpl/opac-tmpl/npl/en/includes: doc-head-close.inc
navigation.inc
opac-facets.inc
koha-tmpl/opac-tmpl/npl/en/includes/tigra: tree_tpl.js
opac : opac-zoomsearch.pl
Log message:
more code cleanup, validation on templates
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/npl/en/includes/doc-head-close.inc?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.11.2.3&r2=1.1.2.11.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/npl/en/includes/navigation.inc?cvsroot=koha&only_with_tag=dev_week&r1=1.2.2.4.2.6&r2=1.2.2.4.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/npl/en/includes/opac-facets.inc?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.2&r2=1.1.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/npl/en/includes/tigra/tree_tpl.js?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.4&r2=1.1.2.5
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-zoomsearch.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.16&r2=1.1.2.17
Patches:
Index: koha-tmpl/opac-tmpl/npl/en/includes/doc-head-close.inc
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/opac-tmpl/npl/en/includes/doc-head-close.inc,v
retrieving revision 1.1.2.11.2.3
retrieving revision 1.1.2.11.2.4
diff -u -b -r1.1.2.11.2.3 -r1.1.2.11.2.4
--- koha-tmpl/opac-tmpl/npl/en/includes/doc-head-close.inc 24 Jul 2006
05:44:30 -0000 1.1.2.11.2.3
+++ koha-tmpl/opac-tmpl/npl/en/includes/doc-head-close.inc 24 Jul 2006
13:05:33 -0000 1.1.2.11.2.4
@@ -70,13 +70,13 @@
</script>
<script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/catsearch.js"></script>
-<script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/main.js"></script>
-<!-- TMPL_IF NAME="AmazonContent" -->
-<script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/amazonimages.js"></script>
-<!-- /TMPL_IF -->
-<script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/script.js"></script>
-<script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/basket.js"></script>
-<script type="text/javascript" language="javascript">
+ <script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/main.js"></script>
+ <!-- TMPL_IF NAME="AmazonContent" -->
+ <script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/amazonimages.js"></script>
+ <!-- /TMPL_IF -->
+ <script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/script.js"></script>
+ <script type="text/javascript" language="javascript" src="<TMPL_VAR
NAME="themelang">/includes/basket.js"></script>
+ <script type="text/javascript" language="javascript">
var MSG_BASKET_EMPTY = "You book bag is currently empty";
var MSG_RECORD_IN_BASKET = "This item is already in your book bag";
var MSG_RECORD_ADDED = "This item has been added to your book bag";
Index: koha-tmpl/opac-tmpl/npl/en/includes/navigation.inc
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/opac-tmpl/npl/en/includes/navigation.inc,v
retrieving revision 1.2.2.4.2.6
retrieving revision 1.2.2.4.2.7
diff -u -b -r1.2.2.4.2.6 -r1.2.2.4.2.7
--- koha-tmpl/opac-tmpl/npl/en/includes/navigation.inc 24 Jul 2006 05:26:19
-0000 1.2.2.4.2.6
+++ koha-tmpl/opac-tmpl/npl/en/includes/navigation.inc 24 Jul 2006 13:05:33
-0000 1.2.2.4.2.7
@@ -4,14 +4,13 @@
<!-- TMPL_IF NAME="searchdesc" -->
<!-- TMPL_IF name=total -->
-<a style="border:0; text-decoration:none;"
href="http://a9.com/-/opensearch/search/B0007WF826/<!-- TMPL_VAR
NAME='searchdesc' -->?count=10&startPage=1"><img style="border:0;" title="RSS
Feed for search <!-- TMPL_VAR NAME='searchdesc' -->" alt="RSS Feed for search
<!-- TMPL_VAR NAME='searchdesc' -->" src="<!-- TMPL_VAR
NAME=themelang>/images/feed-icon-16x16.png"/></a>
+<a style="border:0; text-decoration:none;"
href="http://a9.com/-/opensearch/search/B0007WF826/<!-- TMPL_VAR
NAME='searchdesc' -->?count=10&startPage=1"><img style="border:0;"
title="RSS Feed for search <!-- TMPL_VAR NAME='searchdesc' -->" alt="RSS Feed
for search <!-- TMPL_VAR NAME='searchdesc' -->" src="<!-- TMPL_VAR
NAME=themelang>/images/feed-icon-16x16.png"/></a>
<span style="color:#FEEDDB; font-weight: bold;">“<!-- TMPL_VAR
NAME="searchdesc" -->”</span> returned <span><!-- TMPL_VAR NAME="total"
--></span> results<!-- TMPL_IF NAME="related" --> (related searches: <!--
TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!--
/TMPL_LOOP -->)<!-- /TMPL_IF -->.</li>
<!-- TMPL_ELSE -->
<span style="color:#FEEDDB; font-weight: bold;">“<!-- TMPL_VAR
NAME="searchdesc" -->”</span>
<!-- TMPL_VAR NAME="search_error" -->
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
-</li>
</ul>
</div>
@@ -24,7 +23,8 @@
<script type="text/javascript" language="javascript">
<!--
new tree (DEFAULT_TREE, default_tpl);
- new tree (LIMITS_TREE, subject_tpl);
+ new tree (EXPANDS_TREE, expands_tpl);
+ new tree (LIMITS_TREE, limits_tpl);
new tree (SUBJECT_TREE, subject_tpl);
new tree (SERIES_TREE, series_tpl);
new tree (AUTHOR_TREE, author_tpl);
Index: koha-tmpl/opac-tmpl/npl/en/includes/opac-facets.inc
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/opac-tmpl/npl/en/includes/Attic/opac-facets.inc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -b -r1.1.2.2 -r1.1.2.3
--- koha-tmpl/opac-tmpl/npl/en/includes/opac-facets.inc 24 Jul 2006 07:30:26
-0000 1.1.2.2
+++ koha-tmpl/opac-tmpl/npl/en/includes/opac-facets.inc 24 Jul 2006 13:05:33
-0000 1.1.2.3
@@ -23,20 +23,26 @@
<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR
NAME="themelang" -->/includes/tigra/tree_tpl.js"></script>
<script type="text/javascript" language="javascript">
+var EXPANDS_TREE = <!-- TMPL_IF NAME=searchdesc -->[
+ ['Remove search',null,
+ ['<!-- TMPL_VAR NAME=searchdesc
-->','/cgi-bin/koha/opac-zoomsearch.pl'],
+ ]
+];<!-- TMPL_ELSE -->'';<!-- /TMPL_IF -->
+
<!-- TMPL_IF NAME="total" -->
var LIMITS_TREE = [
['Further limit search to', null,
<!-- TMPL_IF NAME=branchloop -->
- ['Branch', 'null',
+ ['Branch', null,
<!-- TMPL_LOOP NAME=branchloop -->
['<!-- TMPL_VAR NAME=branchname
-->','/cgi-bin/koha/opac-zoomsearch.pl?op=get_results&ccl_query=<!--
TMPL_VAR NAME=searchdesc --> and branch=<!-- TMPL_VAR NAME=value -->'],
<!-- /TMPL_LOOP -->
],
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME=itemtypeloop -->
- ['Collection Code', 'null',
+ ['Collection Code', null,
<!-- TMPL_LOOP NAME=itemtypeloop -->
['<!-- TMPL_VAR NAME=description
-->','/cgi-bin/koha/opac-zoomsearch.pl?op=get_results&ccl_query=<!--
TMPL_VAR NAME=searchdesc --> and collection=<!-- TMPL_VAR NAME=value -->'],
<!-- /TMPL_LOOP -->
Index: koha-tmpl/opac-tmpl/npl/en/includes/tigra/tree_tpl.js
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/opac-tmpl/npl/en/includes/tigra/Attic/tree_tpl.js,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -b -r1.1.2.4 -r1.1.2.5
--- koha-tmpl/opac-tmpl/npl/en/includes/tigra/tree_tpl.js 24 Jul 2006
07:30:26 -0000 1.1.2.4
+++ koha-tmpl/opac-tmpl/npl/en/includes/tigra/tree_tpl.js 24 Jul 2006
13:05:33 -0000 1.1.2.5
@@ -2,7 +2,6 @@
Feel free to use your custom icons for the tree. Make sure they are all
of the same size.
User icons collections are welcome, we'll publish them giving all
regards.
*/
-
var default_tpl = {
'target' : '_self', // name of the frame links will be opened in
// other possible values are: _blank, _parent,
_search, _self and _top
@@ -34,6 +33,68 @@
'icon_27' : '/opac-tmpl/npl/en/includes/tigra/icons/minus.gif' //
junctioin for last opended node
};
+var expands_tpl = {
+ 'target' : '_self', // name of the frame links will be opened in
+ // other possible values are: _blank, _parent,
_search, _self and _top
+
+ 'icon_e' : '/opac-tmpl/npl/en/includes/tigra/icons/empty.gif', // empty
image
+ 'icon_l' : '/opac-tmpl/npl/en/includes/tigra/icons/line.gif', //
vertical line
+
+ 'icon_32' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root leaf icon normal
+ 'icon_36' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root leaf icon selected
+
+ 'icon_48' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root icon normal
+ 'icon_52' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root icon selected
+ 'icon_56' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root icon opened
+ 'icon_60' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_out.png', //
root icon selected
+
+// 'icon_16' : '/opac-tmpl/npl/en/includes/tigra/icons/application_go.png',
// node icon normal
+// 'icon_20' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon selected
+// 'icon_24' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon opened
+// 'icon_28' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon selected opened
+
+// 'icon_0' : '/opac-tmpl/npl/en/includes/tigra/icons/application_go.png',
// leaf icon normal
+// 'icon_4' : '/opac-tmpl/npl/en/includes/tigra/icons/page.gif', // leaf
icon selected
+
+ 'icon_2' : '/opac-tmpl/npl/en/includes/tigra/icons/joinbottom.gif', //
junction for leaf
+ 'icon_3' : '/opac-tmpl/npl/en/includes/tigra/icons/join.gif', //
junction for last leaf
+ 'icon_18' : '/opac-tmpl/npl/en/includes/tigra/icons/plusbottom.gif', //
junction for closed node
+ 'icon_19' : '/opac-tmpl/npl/en/includes/tigra/icons/plus.gif', //
junctioin for last closed node
+ 'icon_26' : '/opac-tmpl/npl/en/includes/tigra/icons/minusbottom.gif',//
junction for opened node
+ 'icon_27' : '/opac-tmpl/npl/en/includes/tigra/icons/minus.gif' //
junctioin for last opended node
+};
+
+var limits_tpl = {
+ 'target' : '_self', // name of the frame links will be opened in
+ // other possible values are: _blank, _parent,
_search, _self and _top
+
+ 'icon_e' : '/opac-tmpl/npl/en/includes/tigra/icons/empty.gif', // empty
image
+ 'icon_l' : '/opac-tmpl/npl/en/includes/tigra/icons/line.gif', //
vertical line
+
+ 'icon_32' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root leaf icon normal
+ 'icon_36' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root leaf icon selected
+
+ 'icon_48' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root icon normal
+ 'icon_52' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root icon selected
+ 'icon_56' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root icon opened
+ 'icon_60' : '/opac-tmpl/npl/en/includes/tigra/icons/arrow_in.png', //
root icon selected
+
+// 'icon_16' : '/opac-tmpl/npl/en/includes/tigra/icons/application_go.png',
// node icon normal
+// 'icon_20' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon selected
+// 'icon_24' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon opened
+// 'icon_28' :
'/opac-tmpl/npl/en/includes/tigra/icons/application_side_expand.png', // node
icon selected opened
+
+// 'icon_0' : '/opac-tmpl/npl/en/includes/tigra/icons/application_go.png',
// leaf icon normal
+// 'icon_4' : '/opac-tmpl/npl/en/includes/tigra/icons/page.gif', // leaf
icon selected
+
+ 'icon_2' : '/opac-tmpl/npl/en/includes/tigra/icons/joinbottom.gif', //
junction for leaf
+ 'icon_3' : '/opac-tmpl/npl/en/includes/tigra/icons/join.gif', //
junction for last leaf
+ 'icon_18' : '/opac-tmpl/npl/en/includes/tigra/icons/plusbottom.gif', //
junction for closed node
+ 'icon_19' : '/opac-tmpl/npl/en/includes/tigra/icons/plus.gif', //
junctioin for last closed node
+ 'icon_26' : '/opac-tmpl/npl/en/includes/tigra/icons/minusbottom.gif',//
junction for opened node
+ 'icon_27' : '/opac-tmpl/npl/en/includes/tigra/icons/minus.gif' //
junctioin for last opended node
+};
+
var subject_tpl = {
'target' : '_self', // name of the frame links will be opened in
Index: opac/opac-zoomsearch.pl
===================================================================
RCS file: /sources/koha/koha/opac/Attic/opac-zoomsearch.pl,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -b -r1.1.2.16 -r1.1.2.17
--- opac/opac-zoomsearch.pl 24 Jul 2006 07:30:27 -0000 1.1.2.16
+++ opac/opac-zoomsearch.pl 24 Jul 2006 13:05:33 -0000 1.1.2.17
@@ -23,7 +23,7 @@
use C4::Auth;
use C4::Search;
use C4::Biblio;
-
+use C4::Koha;
use POSIX qw(ceil floor);
# load other modules
@@ -37,26 +37,26 @@
### Gather up all our search queries
## CQL
my $cql_query = $query->param('cql_query');
+
## CCL
my @previous_ccl_queries; # array of hashes
my @previous_ccl_queries_array = $query->param('previous_ccl_queries');
+
my @ccl_query = $query->param('ccl_query');
my $ccl_query;
foreach my $ccl (@ccl_query) {
- $ccl_query.="$ccl " if $ccl;;
-}
-my $flush_search_history = $query->param('flush_search_history');
-if ($flush_search_history) {
- @previous_ccl_queries_array = 0;
-}
-else {
- push @previous_ccl_queries_array, $ccl_query;
+ $ccl_query.="$ccl " if $ccl;
}
+push @previous_ccl_queries_array, $ccl_query;
# put the queries in a form the template can use
my $previous_ccl_queries_hash;
foreach my $ccl (@previous_ccl_queries_array) {
- $previous_ccl_queries_hash->{'ccl'} = $ccl if $ccl;
- push @previous_ccl_queries, $previous_ccl_queries_hash->{'ccl'};
+ if ($ccl) {
+ my %row =(
+ value => $ccl
+ );
+ push @previous_ccl_queries, %row;
+ }
}
## PQF
my $pqf_query = $query->param('pqf_query');
@@ -67,10 +67,10 @@
my $searchdesc;
my $search_type = $query->param('search_type');
-use C4::Koha;
my $dbh = C4::Context->dbh;
-##Itemtypes (Collection Codes)
-my $itemtypequery="Select itemtype,description from itemtypes order by
description"; my $sth=$dbh->prepare($itemtypequery);
+## Get Itemtypes (Collection Codes)
+my $itemtypequery="Select itemtype,description from itemtypes order by
description";
+my $sth=$dbh->prepare($itemtypequery);
$sth->execute;
my @itemtypeloop;
my %itemtypes;
@@ -84,14 +84,15 @@
}
$sth->finish;
-##Branches
+## Get Branches
my @branches;
my @select_branch;
my %select_branches;
my $branches = getallbranches();
my @branchloop;
foreach my $thisbranch (keys %$branches) {
- my $selected = 1 if (C4::Context->userenv && ($thisbranch eq
C4::Context->userenv->{branch})); my %row =(
+ my $selected = 1 if (C4::Context->userenv && ($thisbranch eq
C4::Context->userenv->{branch}));
+ my %row =(
value => $thisbranch,
selected => $selected,
branchname => $branches->{$thisbranch}->{'branchname'},
@@ -112,13 +113,14 @@
my $startfrom = $query->param('startfrom');
($startfrom) || ($startfrom=0);
- ## OK, We're searching
+ ## OK, WE'RE SEARCHING
# STEP 1. We're a CGI script,so first thing to do is get the
# query into PQF format so we can use the Koha API properly
my ($error,$pqf_sort_by, $pqf_prox_ops, $pqf_bool_ops, $nice_query);
+ if ($pqf_query) {
($error,$pqf_sort_by, $pqf_prox_ops, $pqf_bool_ops, $pqf_query,
$nice_query)= cgi2pqf($query);
+ }
my $then_sort_by = $query->param('then_sort_by');
- #warn "AFTER CGI: $pqf_sort_by $pqf_prox_ops $pqf_bool_ops $pqf_query";
# implement a query history
# lets store the query details in an array for later
@@ -133,7 +135,7 @@
# STEP 2. OK, now we have PQF, so we can pass off the query to
# the API
- my ($count, @results,$facets);
+ my ($count,@results,$facets);
# queries are handled differently, so alert our API and pass in the
variables
if ($ccl_query) { # CCL
@@ -169,7 +171,7 @@
$template->param(ending => $startfrom+$number_of_results);
# the result number to end to show
($startfrom+$num<=$count) ? ($template->param(endat =>
$startfrom+$num)) : ($template->param(endat => $count));
- # the total results searched
+ # the total results found
$template->param(total => $count);
$template->param(FORMINPUTS => address@hidden);
#$template->param(pqf_query => $pqf_query);
@@ -253,7 +255,8 @@
pg => $total_pages};
}
- $template->param( pqf_sort_by => $pqf_sort_by,
+ $template->param(
+ pqf_sort_by => $pqf_sort_by,
pqf_query => "$pqf_prox_ops
$pqf_bool_ops $pqf_query",
numbers => $numbers);
@@ -361,7 +364,7 @@
=head2 cgi2pdf
=cut
-# build a valid PQF query from the CGI form
+# build a valid PQF query from a CGI form
sub cgi2pqf {
my ($query) = @_;
my $nice_query; # just a string storing a nicely formatted query
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha koha-tmpl/opac-tmpl/npl/en/includes/doc-he... [dev_week],
Joshua Ferraro <=