View | Details | Raw Unified | Return to bug 26296
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_26296-Replace-comma-with-pipe-in-OPACSuggestion-preferences.perl (+15 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
5
6
    # or perform some test and warn
7
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
8
    #    warn "There is something wrong";
9
    # }
10
11
    $dbh->do("UPDATE systempreferences SET value = REPLACE(value, ',', '|') WHERE variable IN ('OPACSuggestionMandatoryFields','OPACSuggestionUnwantedFields')");
12
13
    # Always end with this (adjust the bug info)
14
    NewVersion( $DBversion, 26296, "Replace comma with pipe in OPACSuggestion field preferences");
15
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-24 / +4 lines)
Lines 607-640 OPAC: Link Here
607
        -
607
        -
608
            - "Fields that should be mandatory for patron purchase suggestions:"
608
            - "Fields that should be mandatory for patron purchase suggestions:"
609
            - pref: OPACSuggestionMandatoryFields
609
            - pref: OPACSuggestionMandatoryFields
610
              multiple:
610
              type: modalselect
611
                title: Title
611
              source: suggestions
612
                author: Author
613
                copyrightdate: Copyright or publication date
614
                isbn: ISBN, ISSN or other standard number
615
                publishercode: Publisher name
616
                collectiontitle: Collection title
617
                place: Publication place
618
                itemtype: Item type
619
                branch: Library or branch
620
                patronreason: Patron reason
621
                note: Note
622
            - "<br />Note: if none of the above options are selected, 'Title' field would be mandatory anyway, by default."
612
            - "<br />Note: if none of the above options are selected, 'Title' field would be mandatory anyway, by default."
623
        -
613
        -
624
            - "Fields that should be hidden for patron purchase suggestions:"
614
            - "Fields that should be hidden for patron purchase suggestions:"
625
            - pref: OPACSuggestionUnwantedFields
615
            - pref: OPACSuggestionUnwantedFields
626
              multiple:
616
              type: modalselect
627
                author: Author
617
              source: suggestions
628
                copyrightdate: Copyright or publication date
629
                isbn: ISBN, ISSN or other standard number
630
                publishercode: Publisher name
631
                collectiontitle: Collection title
632
                place: Publication place
633
                itemtype: Item type
634
                quantity: Quantity
635
                branch: Library or branch
636
                patronreason: Patron reason
637
                note: Note
638
            - '<br />Note: Do not make <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACSuggestionMandatoryFields">OPACSuggestionMandatoryFields</a> unwanted fields '
618
            - '<br />Note: Do not make <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACSuggestionMandatoryFields">OPACSuggestionMandatoryFields</a> unwanted fields '
639
        -
619
        -
640
            - pref: OpacHiddenItems
620
            - pref: OpacHiddenItems
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/suggestions.json (+13 lines)
Line 0 Link Here
1
{
2
    "author": "author",
3
    "copyrightdate": "copyrightdate",
4
    "isbn": "isbn",
5
    "publishercode": "publishercode",
6
    "collectiontitle": "collectiontitle",
7
    "place": "place",
8
    "quantity": "quantity",
9
    "itemtype": "itemtype",
10
    "branchcode": "branchcode",
11
    "patronreason": "patronreason",
12
    "note": "note"
13
}
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-1 / +1 lines)
Lines 183-189 Link Here
183
                                            [% END %]
183
                                            [% END %]
184
                                            </li>
184
                                            </li>
185
                                        [% END %]
185
                                        [% END %]
186
                                        [% UNLESS ( branch_hidden )%]
186
                                        [% UNLESS ( branchcode_hidden )%]
187
                                            <li>
187
                                            <li>
188
                                                [% IF ( branchcode_required ) %]
188
                                                [% IF ( branchcode_required ) %]
189
                                                    <label for="branch" class="required">Library:</label>
189
                                                    <label for="branch" class="required">Library:</label>
(-)a/opac/opac-suggestions.pl (-3 / +2 lines)
Lines 247-253 my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG", "opac"); Link Here
247
my @mandatoryfields;
247
my @mandatoryfields;
248
if ( $op eq 'add' ) {
248
if ( $op eq 'add' ) {
249
    my $fldsreq_sp = C4::Context->preference("OPACSuggestionMandatoryFields") || 'title';
249
    my $fldsreq_sp = C4::Context->preference("OPACSuggestionMandatoryFields") || 'title';
250
    @mandatoryfields = sort split(/\s*\,\s*/, $fldsreq_sp);
250
    @mandatoryfields = sort split(/\s*\|\s*/, $fldsreq_sp);
251
    foreach (@mandatoryfields) {
251
    foreach (@mandatoryfields) {
252
        $template->param( $_."_required" => 1);
252
        $template->param( $_."_required" => 1);
253
    }
253
    }
Lines 270-276 my @unwantedfields; Link Here
270
{
270
{
271
    last unless ($op eq 'add');
271
    last unless ($op eq 'add');
272
    my $fldsreq_sp = C4::Context->preference("OPACSuggestionUnwantedFields");
272
    my $fldsreq_sp = C4::Context->preference("OPACSuggestionUnwantedFields");
273
    @unwantedfields = sort split(/\s*\,\s*/, $fldsreq_sp);
273
    @unwantedfields = sort split(/\s*\|\s*/, $fldsreq_sp);
274
    foreach (@unwantedfields) {
274
    foreach (@unwantedfields) {
275
        $template->param( $_."_hidden" => 1);
275
        $template->param( $_."_hidden" => 1);
276
    }
276
    }
277
- 

Return to bug 26296