Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes
Jonathan Druart be35039b55 Bug 4137: Fix the OPACViewOthersSuggestions behavior
This pref does not work at all, the interface let the user choose to
list all suggestions, but whatever he chooses the suggestion list is the
same.

This patch cleans a bit the suggestedby management.

There are a lot of cases to test, because linked to 2 prefs:
 AnonSuggestions and OPACViewOthersSuggestions.
1/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 0
  - A non logged in user is not able to make a suggestion.
  - A logged in user is not able to see suggestions made by someone else.
2/ AnonSuggestions = 0 and OPACViewOthersSuggestions = 1
  - A non logged in user is not able to make a suggestion.
  - A logged in user is able to see suggestions made by someone else.
3/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 0
  - A non logged in user is able to make a suggestion.
  The suggestedby field will be filled with the AnonymousPatron pref value.
  He is not able to see suggestions, even the ones made by AnonymousPatron.
  - A logged in user is not able to see suggestions made by someone else.
4/ AnonSuggestions = 1 and OPACViewOthersSuggestions = 1
  - A non logged in user is able to make a suggestion.
  He is able to see all suggestions.
  - A logged in user is able to see suggestions made by someone else.

In all cases a logged in user should be able to search for suggestions
(except if he is not able to see them).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All use cases tested, work as expected
No errors

Only comment is perhaps (in the future) a gracefull failure
when AnonymousPatron is not set, or has '0' value

Message is DBIx::Class::ResultSet::create(): Column 'suggestedby' cannot be null at ...

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-06-19 11:34:27 -03:00
..
search Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
authorities-search-results.inc Bug 10985: [UNIMARC] Fix authority summary 2015-04-22 11:54:36 -03:00
bodytag.inc Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch 2014-09-23 15:39:31 -03:00
calendar.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
datatables.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
date-format.inc Bug 11694: Improve handling of individual hold suspension in Bootstrap OPAC 2014-03-26 16:07:44 +00:00
doc-head-close.inc Bug 10328 - Rename opaccolorstylesheet to OpacAdditionalStylesheet 2015-03-31 11:30:54 -03:00
doc-head-open.inc Bug 13112 - Add name of template file in html comment for each '.tt' file. 2014-10-28 10:45:32 -03:00
greybox.inc Bug 8992: Add the greybox include file for the bootstrap theme 2015-04-28 15:47:39 -03:00
item-status-schema-org.inc Bug 10626: (follow-up) replace use of KohaAuthorisedValues in the Bootstrap theme 2013-12-20 04:22:20 +00:00
item-status.inc Bug 9214 - Show damaged status in the OPAC for items which are not for loan 2014-11-11 15:13:03 -03:00
masthead-sco.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
masthead.inc Bug 11900 - OPAC cart can confuse patrons 2015-03-30 12:58:37 -03:00
navigation.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
opac-authorities.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
opac-bottom.inc Bug 12160: Rename opacuserjs with OPACUserJS 2015-05-26 10:42:07 -03:00
opac-detail-sidebar.inc Bug 13695: Add ISBD export option to OPAC (detail) 2015-03-31 10:34:30 -03:00
opac-facets.inc Bug 13789 - facets with accented utf-8 characters generate double encoded links 2015-03-07 21:05:04 +01:00
opac-topissues.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
page-numbers.inc Bug 12399: Small change to remove the whole paging 2015-03-15 09:09:51 -03:00
patron-title.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
resort_form.inc Bug 10309 - New OPAC theme based on Bootstrap 2013-10-14 23:13:05 +00:00
shelfbrowser.inc Bug 9580: (QA followup) add a Coce syspref and fix options for Providers 2015-04-01 09:31:59 -03:00
subtypes_unimarc.inc Bug 11189: Rename "Print" label in UNIMARC advanced search 2013-11-08 16:48:42 +00:00
usermenu.inc Bug 4137: Fix the OPACViewOthersSuggestions behavior 2015-06-19 11:34:27 -03:00