Jonathan Druart
9707167a48
The GetBorrowerAttributes subroutine return the attributes for a given patron. Using get_extended_attributes we can acchieve it easily. The problematic here is to restore the method's name (value vs attribute, value_description vs description of the authorised value, as well as display_checkout that should not be a method of Attribute, but Attribute::Type instead) value_description was used when the attribute types were attached to an authorised value category. To avoid the necessary test in template and controller there is now a $attribute->description method that will display either the attribute's value OR the value of the authorised value when needed. We should certainly use this one from few other places. Notes: * This patch rename Koha::Patron->attributes with Koha::Patron->get_extended_attributes. It will be renamed with Koha::Patron->extended_attributes in ones of the next patches when it will become a setter as well. * GetBorrowerAttributes did not care about the library limits, we still do not * The opac_only flag was not used outside of test, we drop it off. * To maintain the existing behavior we add a default order-by clause to the search method [code, attribute] * From C4::Letters::_parseletter we always display the staff description of the AV, There is now a FIXME to warn about it * FIXMEs are not regressions, existing behaviors must be kept * TODO add a new check to bug 21010 to search for inconsistencies in patron's attributes attached to non-existent authorised values * One test has been updated in Modifications.t, order_by is now by default set to ['code', 'attribute'] Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> |
||
---|---|---|
.. | ||
clubs | ||
errors | ||
external/overdrive | ||
rss | ||
sci | ||
sco | ||
svc | ||
ilsdi.pl | ||
maintenance.pl | ||
oai.pl | ||
opac-account-pay-paypal-return.pl | ||
opac-account-pay-return.pl | ||
opac-account-pay.pl | ||
opac-account.pl | ||
opac-addbybiblionumber.pl | ||
opac-alert-subscribe.pl | ||
opac-article-request-cancel.pl | ||
opac-authorities-home.pl | ||
opac-authoritiesdetail.pl | ||
opac-basket.pl | ||
opac-blocked.pl | ||
opac-browse.pl | ||
opac-browser.pl | ||
opac-changelanguage.pl | ||
opac-course-details.pl | ||
opac-course-reserves.pl | ||
opac-detail.pl | ||
opac-discharge.pl | ||
opac-downloadcart.pl | ||
opac-downloadshelf.pl | ||
opac-export.pl | ||
opac-ics.pl | ||
opac-idref.pl | ||
opac-illrequests.pl | ||
opac-image.pl | ||
opac-imageviewer.pl | ||
opac-ISBDdetail.pl | ||
opac-issue-note.pl | ||
opac-main.pl | ||
opac-MARCdetail.pl | ||
opac-memberentry.pl | ||
opac-messaging.pl | ||
opac-modrequest-suspend.pl | ||
opac-modrequest.pl | ||
opac-mymessages.pl | ||
opac-news-rss.pl | ||
opac-overdrive-search.pl | ||
opac-passwd.pl | ||
opac-password-recovery.pl | ||
opac-patron-consent.pl | ||
opac-patron-image.pl | ||
opac-privacy.pl | ||
opac-ratings-ajax.pl | ||
opac-ratings.pl | ||
opac-readingrecord.pl | ||
opac-recordedbooks-search.pl | ||
opac-registration-verify.pl | ||
opac-renew.pl | ||
opac-request-article.pl | ||
opac-reserve.pl | ||
opac-restrictedpage.pl | ||
opac-retrieve-file.pl | ||
opac-review.pl | ||
opac-routing-lists.pl | ||
opac-search-history.pl | ||
opac-search.pl | ||
opac-sendbasket.pl | ||
opac-sendshelf.pl | ||
opac-serial-issues.pl | ||
opac-shareshelf.pl | ||
opac-shelves.pl | ||
opac-showmarc.pl | ||
opac-showreviews.pl | ||
opac-suggestions.pl | ||
opac-tags.pl | ||
opac-tags_subject.pl | ||
opac-topissues.pl | ||
opac-user.pl | ||
tracklinks.pl | ||
unapi |