[Koha-cvs] koha koha-tmpl/opac-tmpl/css/en/opac-main.tmpl ... [rel_2_2]

paul poulain paul at koha-fr.org
Mon Apr 3 12:29:23 CEST 2006


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	paul poulain <tipaul at savannah.gnu.org>	06/04/03 10:29:23

Modified files:
	koha-tmpl/opac-tmpl/css/en: opac-main.tmpl opac-search.tmpl 
	opac           : opac-main.pl opac-search.pl 

Log message:
	kados added a "any item type" to the itemtype list. (march 8th). This string was in Perl, thus untranslatable. With this fix, it is now moved to the template.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl.diff?only_with_tag=rel_2_2&tr1=1.16.2.11&tr2=1.16.2.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl.diff?only_with_tag=rel_2_2&tr1=1.11.2.10&tr2=1.11.2.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-main.pl.diff?only_with_tag=rel_2_2&tr1=1.16.2.9&tr2=1.16.2.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-search.pl.diff?only_with_tag=rel_2_2&tr1=1.21.2.16&tr2=1.21.2.17&r1=text&r2=text

Patches:
Index: koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl
diff -u koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl:1.16.2.11 koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl:1.16.2.12
--- koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl:1.16.2.11	Wed Mar  8 13:15:05 2006
+++ koha/koha-tmpl/opac-tmpl/css/en/opac-main.tmpl	Mon Apr  3 10:29:23 2006
@@ -13,99 +13,107 @@
 </head>
 
 <body>
-<div id="leftbloc">
-	<!-- TMPL_IF name="opaclargeimage" -->
-		<img class="relative" src="<!-- TMPL_VAR name="opaclargeimage"-->" title="koha" alt="koha" />
+<div id="title">
+	<!-- TMPL_IF name="opacsmallimage" -->
+		<img src="<!-- TMPL_VAR name="opacsmallimage"-->" title="koha" alt="koha" />
 	<!-- TMPL_ELSE -->
-		<img class="relative" src="<!-- TMPL_VAR NAME='themelang' -->/images/front-background-med.gif" title="koha" alt="koha" />
+		<img src="<!-- TMPL_VAR NAME='themelang' -->/images/front-background-small.gif" title="koha" alt="koha" />
 	<!-- /TMPL_IF -->
+	<div class="SmallLibraryName"><TMPL_VAR name="LibraryName"></div>
 </div>
-
-<div id="homebloc">
-	<h1 class="LibraryName"><TMPL_VAR name="LibraryName"></h1>
-	<h2>Search the catalogue</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			<input type="hidden" name="marclist" value="" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="contains" />
-			Quick search : <input type="text" size="27" name="value" tabindex="1" /> <input type="submit" value="OK" class="button" /><br />
-		</p>
-		<p>
-			<a href="/cgi-bin/koha/opac-search.pl" class="button">Advanced Search, More Options	</a>
-		</p>
-	</form>
-
-	<h2>Recent acquisitions</h2>
-	<form action="/cgi-bin/koha/opac-search.pl">
-		<p>
-			<!-- TMPL_VAR name="CGIitemtype" --> 
-			<input type="hidden" name="marclist" value="biblioitems.itemtype" />
-			<input type="hidden" name="and_or" value="and" />
-			<input type="hidden" name="excluding" value="" />
-			<input type="hidden" name="operator" value="=" />
-			<input type="hidden" name="op" value="do_search" />
-			<input type="hidden" name="type" value="opac" />
-			acquired in the last
-			<input type="text" name="desc_or_asc" size="3" value="30" />
-			days
-			<input type="hidden" name="orderby" value="biblio.timestamp" />
-			<input type="submit" value="OK" class="button" />
-		</p>
-	</form>
-	<p>Search recent <a href="opac-recacquisitions.pl" class="button">acquisitions by branch</a></p>
-	<h2>Other options</h2>
-	<!-- TMPL_IF NAME="loggedinusername" -->
-		<p>
-			<!-- TMPL_IF name="virtualshelves" -->
-				<a href="/cgi-bin/koha/opac-shelves.pl" class="button">Virtual shelves</a>
-			<!-- /TMPL_IF -->
-			<!-- TMPL_IF name="suggestion" -->
-				<a href="opac-suggestions.pl" class="button">Suggestions</a>
-			<!-- /TMPL_IF -->
-			<a href="/cgi-bin/koha/opac-user.pl" class="button">
-				My details
-			</a>
-			<!-- TMPL_IF name="opacreadinghistory" -->
-				<a href="/cgi-bin/koha/opac-readingrecord.pl" class="button">My reading history</a>
-			<!-- /TMPL_IF -->
-			<a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="button">
-				Log Out
-			</a>
-			<!-- TMPL_IF name="textmessaging"-->
-				<h2>Message from the library</h2>
-				<!-- TMPL_VAR name="textmessaging" -->
-			<!-- /TMPL_IF -->
-		</p>
-	<!-- TMPL_ELSE -->
-		<p><a href="/cgi-bin/koha/opac-user.pl">Log in to Koha</a> to have personal options.</p>
-	<!-- /TMPL_IF -->
-	<!-- TMPL_IF name="opaclanguagesdisplay" -->
-		<form action="/cgi-bin/koha/changelanguage.pl" method="post">
+<!-- TMPL_INCLUDE name="menus.inc" -->
+<div id="mainbloc">
+	<div id="bloc60">
+		<h2>Search the catalogue</h2>
+		<form action="/cgi-bin/koha/opac-search.pl">
+			<p>
+				<input type="hidden" name="op" value="do_search" />
+				<input type="hidden" name="type" value="opac" />
+				<input type="hidden" name="marclist" value="" />
+				<input type="hidden" name="and_or" value="and" />
+				<input type="hidden" name="excluding" value="" />
+				<input type="hidden" name="operator" value="contains" />
+				Quick search : <input type="text" size="27" name="value" tabindex="1" /> <input type="submit" value="OK" class="button" /><br />
+			</p>
 			<p>
-				<select name="language">
-					<TMPL_LOOP NAME="languages">
-						<option value="<TMPL_VAR NAME="language">"><TMPL_VAR NAME="language"></option>
-					</TMPL_LOOP>
+				<a href="/cgi-bin/koha/opac-search.pl" class="button">Advanced Search, More Options	</a>
+			</p>
+		</form>
+		<h2>Recent acquisitions</h2>
+		<form action="/cgi-bin/koha/opac-search.pl">
+			<p>
+				<select name="value">
+					<option value="">Any item type</option>
+						<!-- TMPL_LOOP name="itemtypeloop" -->
+								<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="description" -->
+								</option>
+						<!-- /TMPL_LOOP -->
 				</select>
-				<input type="submit" value="Change Language" class="button" />
+				<input type="hidden" name="marclist" value="biblioitems.itemtype" />
+				<input type="hidden" name="and_or" value="and" />
+				<input type="hidden" name="excluding" value="" />
+				<input type="hidden" name="operator" value="=" />
+				<input type="hidden" name="op" value="do_search" />
+				<input type="hidden" name="type" value="opac" />
+				acquired in the last
+				<input type="text" name="desc_or_asc" size="3" value="30" />
+				days
+				<input type="hidden" name="orderby" value="biblio.timestamp" />
+				<input type="submit" value="OK" class="button" />
 			</p>
 		</form>
+		<p>Search recent <a href="opac-recacquisitions.pl" class="button">acquisitions by branch</a></p>
+		<h2>Other options</h2>
+		<!-- TMPL_IF NAME="loggedinusername" -->
+			<p>
+				<!-- TMPL_IF name="virtualshelves" -->
+					<a href="/cgi-bin/koha/opac-shelves.pl" class="button">Virtual shelves</a>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="suggestion" -->
+					<a href="opac-suggestions.pl" class="button">Suggestions</a>
+				<!-- /TMPL_IF -->
+				<a href="/cgi-bin/koha/opac-user.pl" class="button">
+					My details
+				</a>
+				<!-- TMPL_IF name="opacreadinghistory" -->
+					<a href="/cgi-bin/koha/opac-readingrecord.pl" class="button">My reading history</a>
+				<!-- /TMPL_IF -->
+				<a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="button">
+					Log Out
+				</a>
+				<!-- TMPL_IF name="textmessaging"-->
+					<h2>Message from the library</h2>
+					<!-- TMPL_VAR name="textmessaging" -->
+				<!-- /TMPL_IF -->
+			</p>
+		<!-- TMPL_ELSE -->
+			<p><a href="/cgi-bin/koha/opac-user.pl">Log in to Koha</a> to have personal options.</p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="opaclanguagesdisplay" -->
+			<form action="/cgi-bin/koha/changelanguage.pl" method="post">
+				<p>
+					<select name="language">
+						<TMPL_LOOP NAME="languages">
+							<option value="<TMPL_VAR NAME="language">"><TMPL_VAR NAME="language"></option>
+						</TMPL_LOOP>
+					</select>
+					<input type="submit" value="Change Language" class="button" />
+				</p>
+			</form>
+		<!-- /TMPL_IF -->
+	</div>
+</div>
+<div id="bottombloc">
+	<!-- TMPL_IF NAME="opaccredits" -->
+		<p class="copyright"><!-- TMPL_VAR NAME="opaccredits" --></p>
+	<!-- TMPL_ELSE -->
+		<p class="copyright">
+			This Library is powered by <a href="http://www.koha.org">Koha</a> free software ILS, and compliant with web standards
+			<a href="http://validator.w3.org/check/referer">
+				<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="16" width="44" />
+			</a>
+		</p>
 	<!-- /TMPL_IF -->
-<!-- TMPL_IF NAME="opaccredits" -->
-	<p class="copyright"><!-- TMPL_VAR NAME="opaccredits" --></p>
-<!-- TMPL_ELSE -->
-	<p class="copyright">
-		This Library is powered by <a href="http://www.koha.org">Koha</a> free software ILS, and compliant with web standards
-		<a href="http://validator.w3.org/check/referer">
-			<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="16" width="44" />
-		</a>
-	</p>
-<!-- /TMPL_IF -->
 </div>
-
 </body>
 </html>
Index: koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl
diff -u koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl:1.11.2.10 koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl:1.11.2.11
--- koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl:1.11.2.10	Wed Sep 28 15:48:25 2005
+++ koha/koha-tmpl/opac-tmpl/css/en/opac-search.tmpl	Mon Apr  3 10:29:23 2006
@@ -69,7 +69,13 @@
 			<input type="hidden" name="and_or" value="and" />
 			<input type="hidden" name="excluding" value="" />
 			<input type="hidden" name="operator" value="=" />
-			<!-- TMPL_VAR name="CGIitemtype" -->
+			<select name="value">
+				<option value="">Any item type</option>
+					<!-- TMPL_LOOP name="itemtypeloop" -->
+							<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="description" -->
+							</option>
+					<!-- /TMPL_LOOP -->
+			</select>
 		</p>
 		<p>
 				<label class="label20">Branch</label>
Index: koha/opac/opac-main.pl
diff -u koha/opac/opac-main.pl:1.16.2.9 koha/opac/opac-main.pl:1.16.2.10
--- koha/opac/opac-main.pl:1.16.2.9	Tue Mar 14 15:29:15 2006
+++ koha/opac/opac-main.pl	Mon Apr  3 10:29:23 2006
@@ -15,20 +15,14 @@
 my $query="Select itemtype,description from itemtypes order by description";
 my $sth=$dbh->prepare($query);
 $sth->execute;
-my  @itemtype;
+my  @itemtypeloop;
 my %itemtypes;
-push @itemtype, "";
-$itemtypes{''}="Any Document Type";
 while (my ($value,$lib) = $sth->fetchrow_array) {
-	push @itemtype, $value;
-	$itemtypes{$value}=$lib;
+	my %row =(	value => $value,
+				description => $lib,
+			);
+	push @itemtypeloop, \%row;
 }
-
-my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
-			-values   => \@itemtype,
-			-labels   => \%itemtypes,
-			-size     => 1,
-			-multiple => 0 );
 $sth->finish;
 
 my @branches;
@@ -69,7 +63,7 @@
 if($languages_count > 1){
 		$template->param(languages => \@options);
 }
-$template->param(CGIitemtype => $CGIitemtype,
+$template->param(itemtypeloop => \@itemtypeloop,
 				branchloop=>\@branchloop,
 				suggestion => C4::Context->preference("suggestion"),
 				virtualshelves => C4::Context->preference("virtualshelves"),
Index: koha/opac/opac-search.pl
diff -u koha/opac/opac-search.pl:1.21.2.16 koha/opac/opac-search.pl:1.21.2.17
--- koha/opac/opac-search.pl:1.21.2.16	Wed Mar  8 18:49:51 2006
+++ koha/opac/opac-search.pl	Mon Apr  3 10:29:23 2006
@@ -173,22 +173,17 @@
 				});
 	
 	
-	$sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
+	my $query="Select itemtype,description from itemtypes order by description";
+	my $sth=$dbh->prepare($query);
 	$sth->execute;
-	my  @itemtype;
+	my  @itemtypeloop;
 	my %itemtypes;
-	push @itemtype, "";
-	$itemtypes{''} = "Any Document Type";
 	while (my ($value,$lib) = $sth->fetchrow_array) {
-		push @itemtype, $value;
-		$itemtypes{$value}=$lib;
+		my %row =(	value => $value,
+					description => $lib,
+				);
+		push @itemtypeloop, \%row;
 	}
-	
-	my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
-				-values   => \@itemtype,
-				-labels   => \%itemtypes,
-				-size     => 1,
-				-multiple => 0 );
 	$sth->finish;
 
 	my @oldbranches;
@@ -225,7 +220,7 @@
 	$template->param('Disable_Dictionary'=>C4::Context->preference("Disable_Dictionary")) if (C4::Context->preference("Disable_Dictionary"));
 	$template->param(classlist => $classlist,
 					branchloop=>\@branchloop,
-					CGIitemtype => $CGIitemtype,
+					itemtypeloop => \@itemtypeloop,
 					CGIbranch => $CGIbranch,
 					suggestion => C4::Context->preference("suggestion"),
 					virtualshelves => C4::Context->preference("virtualshelves"),





More information about the Koha-cvs mailing list