From 12ab7b257baf447e69d8d96241b2462a38bac384 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 31 Dec 2008 14:28:38 -0600 Subject: [PATCH] Providing options for adding to order when existing record search has failed. I've duplicated the "Add to Order" block on the search results page to display after a user has searched for an existing record to add to an order. This block is displayed whether or not results were found on the assumption that a non-empty result set may not contain the desired result. Changes to neworderbiblio.pl allow supplier name to appear in breadcrumb nav. Signed-off-by: Galen Charlton --- acqui/neworderbiblio.pl | 20 +++++++++---------- .../prog/en/css/staff-global.css | 5 +++++ .../prog/en/modules/acqui/basket.tmpl | 8 ++++---- .../prog/en/modules/acqui/neworderbiblio.tmpl | 16 +++++++++++++-- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index 9682e7507f..824b664b2d 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -76,6 +76,7 @@ my $results_per_page = $params->{'num'} || 20; my $booksellerid = $params->{'booksellerid'}; my $basketno = $params->{'basketno'}; my $sub = $params->{'sub'}; +my $bookseller = GetBookSellerFromId($booksellerid); # getting the template my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -92,8 +93,13 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ($error, $marcresults, $total_hits) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page); if (defined $error) { - $template->param(query_error => $error); warn "error: ".$error; + $template->param( + query_error => $error, + basketno => $basketno, + booksellerid => $bookseller->{'id'}, + name => $bookseller->{'name'}, + ); output_html_with_http_headers $input, $cookie, $template->output; exit; } @@ -114,19 +120,11 @@ foreach my $i ( 0 .. scalar @$marcresults ) { $template->param( basketno => $basketno, - booksellerid => $booksellerid, + booksellerid => $bookseller->{'id'}, + name => $bookseller->{'name'}, resultsloop => \@results, total => $total_hits, query => $query, - virtualshelves => C4::Context->preference("virtualshelves"), - LibraryName => C4::Context->preference("LibraryName"), - OpacNav => C4::Context->preference("OpacNav"), - opaccredits => C4::Context->preference("opaccredits"), - AmazonContent => C4::Context->preference("AmazonContent"), - opacsmallimage => C4::Context->preference("opacsmallimage"), - opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"), - opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"), - "BiblioDefaultView".C4::Context->preference("IntranetBiblioDefaultView") => 1, pagination_bar => pagination_bar( "$ENV{'SCRIPT_NAME'}?q=$query&booksellerid=$booksellerid&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ), ); 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 8c3dcad61d..afecfbaf9e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1407,6 +1407,11 @@ input[type=reset]:active, input[type=button]:active, input.submit:active { border : 1px inset #999999; } +ul li input.submit { + font-size : 87%; + padding : 2px; +} + .searchhighlightblob { font-size:75%; font-style : italic; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 8c3216f971..1451e21dbd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -157,18 +157,18 @@
-
-

Add To Order

+
+ Add To Order
" /> " />
-
+ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl index 1e6133a0fb..ff7d24c491 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl @@ -7,7 +7,7 @@ - +
@@ -26,7 +26,6 @@

No results match your search for in

-Perform a new search @@ -78,6 +77,19 @@
+
+ Add To Order +
+ " /> + " /> + +
+
+
-- 2.39.5