]> git.koha-community.org Git - koha.git/commit
Bug 16157: Move the selected flag from GetAuthorisedValues to the templates
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 29 Mar 2016 13:58:01 +0000 (14:58 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 7 Apr 2016 00:16:09 +0000 (00:16 +0000)
commitb64e6be1c4f3dbdcde41ac8f4766b4d1f962610d
tree62646f6cc85bac49bc6894d9e392c8c7eb1752be
parentefff8e5143c1aa3bc560faba7b03e5f2a6fbaec7
Bug 16157: Move the selected flag from GetAuthorisedValues to the templates

From C4::Koha::GetAuthorisedValues

    # TODO: the "selected" feature should be replaced by a utility function
    # somewhere else, it doesn't belong in here. For starters it makes
    # caching much more complicated. Or just let the UI logic handle it, it's
    # what it's for.

Indeed, it's not a job for a subroutine, the template should take care of that.
Note that a perf gain could be won with this patch \o/

Test plan:
- Edit an itemtype and check the value of the "Search category" dropdown list
- Edit a patron attribute type and check the value of the "Class" dropdown list
- Detail for a catalogue record, the Status column should be correctly
  populated if items are damaged and/or lost
- Item details for a catalogue record, the lost, damaged and withdrawn
  value should be correctly displayed
- Edit a patron, the "street type" should be correctly selected
- Create a patron attribute type linked to an authorised value list.
- Edit a patron, set a value for this attribute, edit it again. The
  correct value should be selected.
- Search for subscriptions. The 'Location' dropdown list should behave
  correctly (select the entry you have choosen before, etc.)
- Edit a subscription, the location dropdown list should select the
  correct value.
- Edit and view a suggestion with a 'reason for suggestion' set (you
  should have at least 1 OPAC_SUG AV defined)

Followed test plan, works as expected
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
28 files changed:
C4/Koha.pm
Koha/Template/Plugin/AuthorisedValues.pm
admin/itemtypes.pl
admin/patron-attr-types.pl
catalogue/detail.pl
catalogue/moredetail.pl
koha-tmpl/intranet-tmpl/prog/en/includes/av-build-dropbox.inc
koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc
koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc
members/memberentry.pl
opac/opac-search.pl
serials/serials-collection.pl
serials/serials-edit.pl
serials/serials-search.pl
serials/subscription-add.pl
suggestion/suggestion.pl
t/db_dependent/Koha.t