[Koha-patches] [PATCH] Fix for Bug 3905 (Serial routing list add patron popup pagination broken)

Owen Leonard oleonard at myacpl.org
Fri Dec 11 16:11:52 CET 2009


This patch also includes formatting fixes and style updates. The patron search filter form is incorporated now within serials/member-search.tmpl in order to have a markup structure more suited to the pop-up. Corrected patch removes changes to members/search.tmpl
---
 .../intranet-tmpl/prog/en/css/staff-global.css     |   20 ++++-
 .../prog/en/modules/serials/member-search.tmpl     |  106 +++++++++++---------
 .../prog/en/modules/serials/routing.tmpl           |    2 +-
 serials/member-search.pl                           |    2 +-
 4 files changed, 77 insertions(+), 53 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
index 313e36b..0953c98 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
@@ -1423,19 +1423,35 @@ div.pages a {
 	text-decoration: none;
 }
 
-div.pages a:link {
+div.pages a:link,
+div.pages a:visited {
 	background-color : #eeeeee;
 	color : #3366CC;
 }
 
 div.pages a:hover {
-	background-color : #e8f0f6;
+	background-color : #FFC;
 }
 
 div.pages a:active {
 	background-color : #ffc;
 }
 
+div.pages .current,
+div.pages .currentPage {
+	background-color : #e6fcb7;
+	color : #666;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+}
+
+div.pages .inactive {
+	background-color : #f3f3f3;
+	color : #BCBCBC;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+}
+
 div.browse {
 	margin : .5em 0;
 }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tmpl
index cf6b4b3..f6e2f0e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/member-search.tmpl
@@ -12,64 +12,72 @@ function add_member(subscriptionid,borrowernumber){
 //-->
 </script>
 <style type="text/css">
-   #custom-doc { width:37.46em;*width:36.53em;min-width:430px; margin:auto; text-align:left; }
+   #custom-doc { width:36.46em;*width:35.53em;min-width:430px; margin:auto; text-align:left; padding: 1em; }
    </style>
 </head>
 <body>
-<div id="doc3" class="yui-t7">
+<div id="custom-doc" class="yui-t7">
    
-   <div id="bd">
-		<div id="yui-main">
-		    <div class="yui-b">
-   <div role="search" class="yui-g">
-				<!-- TMPL_INCLUDE NAME="../members/search.tmpl" -->
-   </div> 
-				<div role="main" class="yui-g"> 
-	
-						<!-- TMPL_IF NAME="resultsloop" -->
-						<div id="searchheader"> <h3>Results <!-- TMPL_VAR Name ="from" --> to <!-- TMPL_VAR Name ="to" --> of <!-- TMPL_VAR Name ="numresults" --> found for <!--TMPL_IF Name="member"-->'<span class="ex"><!-- TMPL_VAR NAME="member" --></span>'<!--/TMPL_IF--><!--TMPL_IF Name="surname"-->'<span class="ex"><!-- TMPL_VAR NAME="surname" --></span>'<!--/TMPL_IF--></h3></div>
-						<div class="searchresults">
+<div id="bd">
+<div id="yui-main">
+<div id="search" class="yui-g">
+	<form action="<!--TMPL_VAR Name="actionname"-->" method="get">
+		<fieldset class="rows">
+			<legend> Filter :</legend>
+			<ol>
+			<li><label for="member">Name:</label> <input type="hidden" name="surname" value="<!-- TMPL_VAR name="surname"-->" />
+			<input type="text" name="member" id="member" value="<!-- TMPL_VAR name="member"-->" /></li>
+			<li><label for="branchcode"> Library :</label><select name="branchcode" id="branchcode">
+			<option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
+			<!-- TMPL_IF NAME="selected" -->
+			<option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE -->
+			<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP --></select></li>
+			<li><label for="categorycode">Category:</label><select name="categorycode" id="categorycode">
+			<option value="">Any</option><!-- TMPL_LOOP name="categoryloop" -->
+			<!-- TMPL_IF NAME="selected" -->
+			<option value="<!-- TMPL_VAR name="categorycode" -->" selected="selected"><!-- TMPL_VAR name="description" --></option><!-- TMPL_ELSE -->
+			<option value="<!-- TMPL_VAR name="categorycode" -->"><!-- TMPL_VAR name="description" --></option><!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP --></select></li>
+			</ol>
+			<fieldset class="action"><input type="submit" value="Search" /></fieldset>
+	      </fieldset>
+	  </form>
+</div> 
+<!-- TMPL_IF NAME="resultsloop" -->
+<div id="searchheader" style="margin-top:.7em;"> <h3>Results <!-- TMPL_VAR Name ="from" --> to <!-- TMPL_VAR Name ="to" --> of <!-- TMPL_VAR Name ="numresults" --> found for <!--TMPL_IF Name="member"-->'<span class="ex"><!-- TMPL_VAR NAME="member" --></span>'<!--/TMPL_IF--><!--TMPL_IF Name="surname"-->'<span class="ex"><!-- TMPL_VAR NAME="surname" --></span>'<!--/TMPL_IF--></h3></div>
+<div class="searchresults">
 
-							<table id="memberresultst">
-							<thead>
-<tr>
-	<th>Card</th>
-	<th>Name</th>
-	<th>Library</th>
-    <th>Add</th>
-</tr>
-</thead>
-<tbody>
-<!-- TMPL_LOOP NAME="resultsloop" -->
-<!--TMPL_IF Name="__odd__"--><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF -->
-<td><!-- TMPL_VAR NAME="cardnumber" --> </td>
-<td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td>
-<td><!-- TMPL_VAR NAME="branchcode" --> </td>
-    <td><a onclick="add_member(<!-- TMPL_VAR
-NAME="subscriptionid" -->,<!-- TMPL_VAR NAME="borrowernumber" -->); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;op=add">Add</a></td></tr>
-<!-- /TMPL_LOOP -->
-							</tbody>
-        </table>
-							<div class="pages"><!--TMPL_IF Name="multipage"--><!--TMPL_VAR Name="paginationbar" --><!--/TMPL_IF--></div>
-						</div>
+<table id="memberresultst">
+	<thead>
+		<tr>
+		<th>Card</th>
+		<th>Name</th>
+		<th>Library</th>
+		<th>Add</th>
+		</tr>
+	</thead>
+	<tbody>
+		<!-- TMPL_LOOP NAME="resultsloop" -->
+		<!--TMPL_IF Name="__odd__"--><tr class="highlight"><!--TMPL_ELSE--><tr><!-- /TMPL_IF -->
+		<td><!-- TMPL_VAR NAME="cardnumber" --> </td>
+		<td><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --> </td>
+		<td><!-- TMPL_VAR NAME="branchcode" --> </td>
+		<td><a onclick="add_member(<!-- TMPL_VAR
+		NAME="subscriptionid" -->,<!-- TMPL_VAR NAME="borrowernumber" -->); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;op=add">Add</a></td></tr>
+		<!-- /TMPL_LOOP -->
+	</tbody>
+</table>
+<div class="pages"><!--TMPL_IF Name="multipage"--><!--TMPL_VAR Name="paginationbar" --><!--/TMPL_IF--></div>
 </div>
 <!-- TMPL_ELSE -->
-    <!-- TMPL_IF NAME="searching" -->
-        <p>No results found</p>
-    <!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="searching" -->
+<p>No results found</p>
 <!-- /TMPL_IF -->
-					</div>
-				</div>
-
-			</div> 
-		     
-    </div> 
+<!-- /TMPL_IF -->
+<fieldset class="action"><a href="#" class="button close">Close</a></fieldset>
 </div>
-<!-- TMPL_IF NAME="memberloop" -->
-<div class="searchresults">
-<table>
-<p><a href="#" class="button close">Close</a></p>
 
-</div>
+</div> 
 
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl
index 199828f..94c99be 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl
@@ -10,7 +10,7 @@ function reorder_item(sid,rid,rank){
 }
 
 function search_member(subscriptionid){
-    var myurl = 'member-search.pl?subscriptionid='+subscriptionid; window.open(myurl,'FindAMember','width=500,height=400,toolbar=no,scrollbars=yes');
+    var myurl = 'member-search.pl?subscriptionid='+subscriptionid; window.open(myurl,'FindAMember','width=550,height=480,toolbar=no,scrollbars=yes');
 }
 
 //-->
diff --git a/serials/member-search.pl b/serials/member-search.pl
index 6f517da..6e26a07 100755
--- a/serials/member-search.pl
+++ b/serials/member-search.pl
@@ -126,7 +126,7 @@ my %parameters=
 		, 'resultsperpage'	=> $resultsperpage 
         , 'type'=> 'intranet'); 
 my $base_url =
-    'member.pl?&amp;'
+    'member-search.pl?&amp;'
   . join(
     '&amp;',
     map { "$_=$parameters{$_}" } (keys %parameters)
-- 
1.6.3.3




More information about the Koha-patches mailing list