From 21fd1c76307776abc621d5e7d67c6969dc40bbaa Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 5 May 2014 00:23:19 +0000 Subject: [PATCH] Bug 9468: [COUNTER-PATCH] use new SUGGEST_FORMAT list This patch uses the new SUGGEST_FORMAT authorized value list for populating the list of suggestion item types/document types. It also improves the display by using the staff or OPAC description of the authorised value rather than the code. To test: [1] Enter a suggestion via the OPAC and select an item type (which I will call "desired format" for the rest of this test plan). [2] Verify that the saved suggestion displays the desired format description in both staff and OPAC. [3] Verify that organizing the list of suggestions by item type now works in the staff interface, rather than displaying "Unknown" in each tab header. [4] Verify that existing suggestions' desired formats are displayed correctly. [5] Verify that suggestions can have their desired format edited in the staff inteface. Signed-off-by: Galen Charlton --- .../prog/en/modules/suggestion/suggestion.tt | 13 +++-------- .../bootstrap/en/modules/opac-suggestions.tt | 16 +++---------- .../opac-tmpl/prog/en/modules/opac-suggestions.tt | 11 ++++----- opac/opac-suggestions.pl | 10 -------- suggestion/suggestion.pl | 24 +++++--------------- 5 files changed, 16 insertions(+), 58 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index a0d9468..ecccc33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -190,9 +190,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
  • Publication place:[% place |html %]
  • Collection title:[% collectiontitle |html %]
  • Document type: - [% FOREACH itemtypeloo IN itemtypeloop %] - [% IF ( itemtypeloo.selected ) %][% itemtypeloo.description %][% END %] - [% END %] + [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) %]
  • [% IF ( patron_reason_loop ) %]
  • Reason for suggestion: @@ -313,12 +311,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
  • - + [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
  • [% IF ( patron_reason_loop ) %]
  • - + [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %]
  • [% IF ( branchloop ) %]
  • @@ -169,7 +159,7 @@ [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode |html %][% END %] [% IF ( suggestions_loo.place ) %]([% suggestions_loo.place |html %])[% END %] [% IF ( suggestions_loo.collectiontitle ) %] , [% suggestions_loo.collectiontitle |html %][% END %] - [% IF ( suggestions_loo.itemtype ) %] - [% suggestions_loo.itemtype %][% END %] + [% IF ( suggestions_loo.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 1 ) %][% END %]

    diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt index 3cbb97f..615fb44 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt @@ -101,12 +101,9 @@
  • -
  • +
  • + [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20 %] +
  • [% IF ( branchloop ) %]