Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/svc/suggestion.tt
Owen Leonard c38cf38c97 Bug 11951: fix OPAC search suggestions template error
If you have search suggestions enabled in the OPAC and click the "Check
for suggestions" link before it is replaced with the JS-rendered output
you will get a template error. This patch corrects it.

To test you must have the bootstrap theme enabled and at least one
OPAC plugin enabled in Administration -> Did you mean?

- Perform a search in the OPAC.
- Look for a box which says "Not what you expected? Check for
  suggestions"
- Click the "Check for suggestions" link before it disappears. If
  necessary disable JavaScript in your browser so that the link doesn't
  disappear.
- The search suggestions page should render without errors.

Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The non-Javascript fallback link now works correctly.
Passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-09 22:50:53 +00:00

51 lines
1.8 KiB
Text

[% IF (render=='standalone') %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]Search suggestions
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-suggestion">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Search suggestions</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
<div class="span10">
[% ELSE %]
<div class="span12">
[% END %]
<div id="searchsuggestions">
<h1 class="title">Suggestions</h1>
[% END %]
[% IF suggestions && suggestions.size %]
<div>
<span class="suggestionlabel">Did you mean:</span>
[% FOREACH suggestion IN suggestions %]
<span class="searchsuggestion"><a href="/cgi-bin/koha/opac-search.pl?q=[% suggestion.search |uri %]">[% suggestion.label |html %]</a></span>
[% END %]
</div>
[% ELSE %]
<span class="nosuggestions">Sorry, no suggestions.</span>
[% END %]
[% IF (render=='standalone') %]
</div> <!-- / #searchsuggestions -->
</div> <!-- / .span10/12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]
[% END %]