[Koha-patches] [PATCH] Bug 5445: Nicer breadcrumbs when ordering from different sources

Katrin Fischer Katrin.Fischer.83 at web.de
Mon Apr 25 23:10:06 CEST 2011


Replaces previous patch. Also fixes ordering from existing records.

While it was possible to go back to vendor and basket page when ordering
from a new suggestion the other odering options missed those 'crumbs'.

This patch makes the breadcrumbs for all orderings options consistent and
makes it possible to navigate back to the vendor or basket from all
pages.

- from existing record
- from staged record
- from external source
- from empty record
---
 acqui/z3950_search.pl                              |    8 +++++++-
 .../prog/en/modules/acqui/addorderiso2709.tt       |    2 +-
 .../prog/en/modules/acqui/neworderbiblio.tt        |    2 +-
 .../prog/en/modules/acqui/neworderempty.tt         |    2 +-
 .../prog/en/modules/acqui/z3950_search.tt          |    2 +-
 5 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl
index b0a8b92..47dbe52 100755
--- a/acqui/z3950_search.pl
+++ b/acqui/z3950_search.pl
@@ -30,6 +30,7 @@ use C4::Context;
 use C4::Breeding;
 use C4::Koha;
 use C4::Charset;
+use C4::Bookseller qw/ GetBookSellerFromId /;
 use ZOOM;
 
 my $input        = new CGI;
@@ -44,6 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
+
 my $dbh          = C4::Context->dbh;
 my $error        = $input->param('error');
 my $biblionumber = $input->param('biblionumber');
@@ -102,10 +104,14 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
     push @frameworkcodeloop, \%row;
 }
 
+my $vendor = GetBookSellerFromId($booksellerid);
 $template->param( frameworkcode => $frameworkcode, 
                                     frameworkcodeloop => \@frameworkcodeloop,
                                     booksellerid => $booksellerid,
-                                    basketno => $basketno);
+                                    basketno => $basketno,
+                                    name => $vendor->{'name'}
+                                    );
+                                    
 
 
 if ( $op ne "do_search" ) {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
index e10e297..04d0c58 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
@@ -24,7 +24,7 @@
 <body>
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket #[% basketno %]</a> &rsaquo;  Add orders from iso2709 file</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo;  Add orders from iso2709 file</div>
 <div id="doc3" class="yui-t2">
    <div id="bd">
        <div id="yui-main">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt
index 24728e0..385a9b2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt
@@ -7,7 +7,7 @@
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?supplierid=[% booksellerid %]">Add to Order</a> &rsaquo; Search Existing Records</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Search Existing Records</div>
 
 <div id="doc3" class="yui-t2">
    
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
index 7abe043..d6c8459 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
@@ -110,7 +110,7 @@ $(document).ready(function()
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</div>
 
 <div id="doc3" class="yui-t2">
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
index ca52536..bbcb973 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
@@ -63,7 +63,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Order from Z39.50 search</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Order from Z39.50 search</div>
 <div id="doc3" class="yui-t7">
       <div id="bd">
 	  [% IF ( opsearch ) %]
-- 
1.7.1



More information about the Koha-patches mailing list