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 <galen.charlton@liblime.com>
This commit is contained in:
parent
db59418c2c
commit
ef612e5667
|
|
@ -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' ),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1407,6 +1407,11 @@ input[type=reset]:active, input[type=button]:active, input.submit:active, button
|
|||
border : 1px inset #999999;
|
||||
}
|
||||
|
||||
ul li input.submit {
|
||||
font-size : 87%;
|
||||
padding : 2px;
|
||||
}
|
||||
|
||||
.searchhighlightblob {
|
||||
font-size:75%;
|
||||
font-style : italic;
|
||||
|
|
|
|||
|
|
@ -157,18 +157,18 @@
|
|||
</div>
|
||||
<br />
|
||||
<!-- TMPL_UNLESS name="closedate" -->
|
||||
<div id="acqui_basket_add">
|
||||
<h2>Add To Order</h2>
|
||||
<fieldset id="acqui_basket_add">
|
||||
<legend>Add To Order</legend>
|
||||
<form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
|
||||
<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
|
||||
<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
|
||||
<ul><li><label for="q">From an existing record: </label><input id="q" type="text" size="25" name="q" />
|
||||
<input type="submit" value="Search" /></li>
|
||||
<input type="submit" class="submit" value="Search" /></li>
|
||||
<li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">From a Suggestion</a></li>
|
||||
<li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">From a new (empty) record</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
|
||||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Search Existing Records</div>
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a> › <a href="/cgi-bin/koha/acqui/basket.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->">Add to Order</a> › Search Existing Records</div>
|
||||
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
<p>
|
||||
No results match your search for <span style="font-weight: bold;">“<!-- TMPL_VAR NAME="query" -->”</span> in <!-- TMPL_VAR NAME="LibraryName" -->
|
||||
</p>
|
||||
<a href="JavaScript:back();" title="New search">Perform a new search</a>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF NAME="query_error" -->
|
||||
|
|
@ -78,6 +77,19 @@
|
|||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<fieldset id="acqui_basket_add">
|
||||
<legend>Add To Order</legend>
|
||||
<form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
|
||||
<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
|
||||
<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
|
||||
<ul><li><label for="q">From an existing record: </label><input id="q" type="text" size="25" name="q" />
|
||||
<input type="submit" class="submit" value="Search" /></li>
|
||||
<li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">From a Suggestion</a></li>
|
||||
<li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">From a new (empty) record</a></li>
|
||||
</ul>
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
|
|
|
|||
Loading…
Reference in New Issue