From f1e96f4590b7e91e172d21d488a7ec26de1cc94e Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sun, 10 Apr 2011 16:12:29 -0400 Subject: [PATCH] Bug 5917 follow-up: Fix staff client results display The change to Template::Toolkit broke a number of things on the Staff Client results display. This patch: * Fixes the formatting of the results table, which had an unnecessary colspan=2 * Enables the display of the "Edit record" and "Edit items" links * Corrects the display of item counts, so that labels for "Available," "On loan," and "Unavailable" only appear when appropriate * Corrects facet links, which were starting new searches rather than limiting due to a variable scoping error * Changes the resort dropdown so that it will show the currently-selected sorting Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- .../intranet-tmpl/prog/en/includes/facets.inc | 4 ++-- .../prog/en/includes/resort_form.inc | 24 +++++++++---------- .../prog/en/modules/catalogue/results.tt | 22 ++++++++--------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 292339e1f0..bdeaddea3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -17,8 +17,8 @@ [% IF ( facets_loo.type_label_Series ) %]Series[% END %] [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %]
    - [% FOREACH facet IN facets_loo.facets %]
  • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
  • [% END %][% IF ( facets_loo.expandable ) %] -
  • Show More
  • + [% FOREACH facet IN facets_loo.facets %]
  • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
  • [% END %][% IF ( facets_loo.expandable ) %] +
  • Show More
  • [% END %]
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/resort_form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/resort_form.inc index 87b763a01e..9f52aca139 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/resort_form.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/resort_form.inc @@ -2,12 +2,12 @@ - [% IF ( popularity_dsc ) %] + [% IF ( sort_by == "popularity_dsc" ) %] [% ELSE %] [% END %] -[% IF ( popularity_asc ) %] +[% IF ( sort_by == "popularity_asc" ) %] [% ELSE %] @@ -17,12 +17,12 @@ - [% IF ( author_az ) %] + [% IF ( sort_by == "author_az" || sort_by == "author_asc" ) %] [% ELSE %] [% END %] -[% IF ( author_za ) %] +[% IF ( sort_by == "author_za" || sort_by == "author_dsc" ) %] [% ELSE %] @@ -32,13 +32,13 @@ - [% IF ( call_number_asc ) %] + [% IF ( sort_by == "call_number_asc" ) %] [% ELSE %] [% END %] -[% IF ( call_number_dsc ) %] +[% IF ( sort_by == "call_number_dsc" ) %] [% ELSE %] @@ -47,25 +47,25 @@ - [% IF ( pubdate_dsc ) %] + [% IF ( sort_by == "pubdate_dsc" ) %] [% ELSE %] [% END %] -[% IF ( pubdate_asc ) %] +[% IF ( sort_by == "pubdate_asc" ) %] [% ELSE %] [% END %] -[% IF ( acqdate_dsc ) %] +[% IF ( sort_by == "acqdate_dsc" ) %] [% ELSE %] [% END %] - [% IF ( acqdate_asc ) %] + [% IF ( sort_by == "acqdate_asc" ) %] [% ELSE %] @@ -73,12 +73,12 @@ - [% IF ( title_az ) %] + [% IF ( sort_by == "title_az" || sort_by == "title_asc" ) %] [% ELSE %] [% END %] - [% IF ( title_za ) %] + [% IF ( sort_by == "title_za" || sort_by == "title_dsc" ) %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 8031470900..b9e269d4d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -412,7 +412,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %][% END %][% END %] - + @@ -491,20 +491,20 @@ YAHOO.util.Event.onContentReady("searchheader", function () { Holds [% IF ( SEARCH_RESULT.holdfor ) %] | Hold for [% SEARCH_RESULT.holdfor_firstname %] [% SEARCH_RESULT.holdfor_surname %] ([% SEARCH_RESULT.holdfor_cardnumber %])[% END %] [% END %] - [% IF ( SEARCH_RESULT.CAN_user_editcatalogue_edit_catalogue ) %] + [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] | Edit record [% END %] - [% IF ( SEARCH_RESULT.CAN_user_editcatalogue_edit_items ) %] + [% IF ( CAN_user_editcatalogue_edit_items ) %] | Edit items [% END %]

 ResultsResults Location
[% IF ( SEARCH_RESULT.items_count ) %][% SEARCH_RESULT.items_count %] - [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.available_items_loop ) %], [% IF ( SEARCH_RESULT.availablecount ) %][% SEARCH_RESULT.availablecount %] available:[% END %][% ELSE %], None available[% END %] + [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %] - [% IF ( SEARCH_RESULT.available_items_loop ) %] - [% IF ( SEARCH_RESULT.availablecount ) %][% SEARCH_RESULT.availablecount %][% END %] available: + [% IF ( SEARCH_RESULT.availablecount ) %] + [% SEARCH_RESULT.availablecount %] available:
    [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %] @@ -516,8 +516,8 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% END %]
[% END %] - [% IF ( SEARCH_RESULT.onloan_items_loop ) %] - [% IF ( SEARCH_RESULT.onloancount ) %][% SEARCH_RESULT.onloancount %][% END %] on loan: + [% IF ( SEARCH_RESULT.onloancount ) %] + [% SEARCH_RESULT.onloancount %] on loan:
    [% FOREACH onloan_items_loo IN SEARCH_RESULT.onloan_items_loop %] [% IF ( noItemTypeImages ) %]
  • [% ELSE %][% IF ( item_level_itypes ) %] @@ -533,8 +533,8 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% END %]
[% END %] - [% IF ( SEARCH_RESULT.other_items_loop ) %] - [% IF ( SEARCH_RESULT.othercount ) %][% SEARCH_RESULT.othercount %][% END %] unavailable: + [% IF ( SEARCH_RESULT.othercount ) %] + [% SEARCH_RESULT.othercount %] unavailable:
    [% FOREACH other_items_loo IN SEARCH_RESULT.other_items_loop %] [% IF ( noItemTypeImages ) %]
  • [% ELSE %][% IF ( item_level_itypes ) %] @@ -556,7 +556,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () { [% END %]
[% END %] [% ELSE %] - [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %] + [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS.count ) %] Other holdings:
    [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %] -- 2.39.5