[Koha-patches] [biblibre-integration 09/19] [3.0.x](bug #3563) This replaces the library name by the branchname attached to the subscription, and hide streetaddesses in serials routing

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Fri Aug 28 23:47:44 CEST 2009


From: Jean-André Santoni <jeanandre.santoni at biblibre.com>

In routing-preview, the title should be the branchname attached to the
subscription instead of the libraryname.
And showing the streetaddress of the members is useless, and harm privacy.
---
 .../prog/en/modules/serials/member-search.tmpl     |    2 --
 .../en/modules/serials/routing-preview-slip.tmpl   |    4 ++--
 .../prog/en/modules/serials/routing-preview.tmpl   |    6 ++----
 .../prog/en/modules/serials/routing.tmpl           |    4 +---
 serials/routing-preview.pl                         |    8 +++++++-
 5 files changed, 12 insertions(+), 12 deletions(-)

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 2e61e02..7f8d0ec 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
@@ -35,12 +35,10 @@ function add_member(subscriptionid,borrowernumber){
 <table>
 <tr>
 	<th>Name</th>
-    <th>Location</th>
     <th>Add</th>
 </tr>
 <!-- TMPL_LOOP NAME="memberloop" -->
 <tr><td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td>
-    <td><!-- TMPL_VAR NAME="streetaddress" --></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 -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl
index 59a9428..d55ec74 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tmpl
@@ -16,10 +16,10 @@
 <tr><td colspan="3"><h3><!-- TMPL_VAR NAME="libraryname" --></h3></td></tr>
 <tr><td colspan="3"><b>Title:</b> <!-- TMPL_VAR NAME="title" escape="html" --><br />
 <!-- TMPL_VAR NAME="issue" --></td></tr>
-<tr><td><b>Name/Location</b></td>
+<tr><td><b>Name</b></td>
     <td><b>Date Due</b></td></tr>
 <!-- TMPL_LOOP NAME="memberloop" -->
-        <tr><td><b><!-- TMPL_VAR NAME="name" --></b> <!-- TMPL_VAR NAME="location" --></td>
+        <tr><td><!-- TMPL_VAR NAME="name" --></td>
             <td>&nbsp;</td></tr>
 <!-- /TMPL_LOOP -->
 </table>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tmpl
index c3a4e4a..999b31b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tmpl
@@ -32,11 +32,9 @@ window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
 <table border="0" cellspacing="0" cellpadding="0">
 <tr><td style="padding-top: 5px;"><b>List Member:</b></td>
     <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
-        <tr><th>Name</th>
-            <th>Location</th></tr>
+        <tr><th>Name</th></tr>
 <!-- TMPL_LOOP NAME="memberloop" -->
-        <tr><td><!-- TMPL_VAR NAME="name" --></td>
-            <td><!-- TMPL_VAR NAME="location" --></td></tr>
+        <tr><td><!-- TMPL_VAR NAME="name" --></td></tr>
 <!-- /TMPL_LOOP -->
         </table></td></tr>
 <tr><td><b>Notes:</b></td>
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 bbdba1f..199828f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tmpl
@@ -54,12 +54,10 @@ function search_member(subscriptionid){
 <tr><td style="padding-top:5px;"><b>List Member:</b></td>
     <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
         <tr><th>Name</th>
-            <th>Location</th>
             <th>Rank</th>
             <th>Delete</th></tr>
 <!-- TMPL_LOOP NAME="memberloop" -->
         <tr><td><!-- TMPL_VAR NAME="name" --></td>
-            <td><!-- TMPL_VAR NAME="location" --></td>
             <td><!-- TMPL_VAR NAME="routingbox" --></td>
             <td><a href="/cgi-bin/koha/serials/routing.pl?routingid=<!-- TMPL_VAR NAME="routingid" -->&amp;subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete">Delete</a></td></tr>
 <!-- /TMPL_LOOP -->
@@ -88,4 +86,4 @@ href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscr
 <!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
 </div>
 </div>
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl
index 6e11d72..22b2d91 100755
--- a/serials/routing-preview.pl
+++ b/serials/routing-preview.pl
@@ -18,6 +18,7 @@ use C4::Biblio;
 use C4::Items;
 use C4::Serials;
 use URI::Escape;
+use C4::Branch;
 
 my $query = new CGI;
 my $subscriptionid = $query->param('subscriptionid');
@@ -59,6 +60,7 @@ if($ok){
     my ($count2, at bibitems) = GetBiblioItemByBiblioNumber($biblio);
     my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra');
     my $branch = $itemresults[0]->{'holdingbranch'};
+    my $branchname = GetBranchName($branch);
     my $const = 'o';
     my $notes;
     my $title = $subs->{'bibliotitle'};
@@ -84,7 +86,7 @@ if($ok){
 				flagsrequired => {serials => 1},
 				debug => 1,
 				});
-    $template->param("libraryname"=>C4::Context->preference("LibraryName"));
+    $template->param("libraryname"=>$branchname);
 } else {
     ($template, $loggedinuser, $cookie)
 = get_template_and_user({template_name => "serials/routing-preview.tmpl",
@@ -100,8 +102,12 @@ if($ok){
 my @results;
 my $data;
 for(my $i=0;$i<$routing;$i++){
+<<<<<<< HEAD:serials/routing-preview.pl
     $data=GetMember('borrowernumber' => $routinglist[$i]->{'borrowernumber'});
     $data->{'location'}=$data->{'branchcode'};
+=======
+    $data=GetMember($routinglist[$i]->{'borrowernumber'},'borrowernumber');
+>>>>>>> 704d6c9... [3.0.x](bug #3563) This replaces the library name by the branchname attached to the subscription, and hide streetaddesses in serials routing:serials/routing-preview.pl
     $data->{'name'}="$data->{'firstname'} $data->{'surname'}";
     $data->{'routingid'}=$routinglist[$i]->{'routingid'};
     $data->{'subscriptionid'}=$subscriptionid;
-- 
1.6.0.4




More information about the Koha-patches mailing list