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

(-)a/C4/Search.pm (-2 / +2 lines)
Lines 1900-1907 sub searchResults { Link Here
1900
                }
1900
                }
1901
            }
1901
            }
1902
1902
1903
            my $hbranch     = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch'    : 'holdingbranch';
1903
            my $hbranch     = C4::Context->preference('StaffSearchResultsDisplayBranch');
1904
            my $otherbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'holdingbranch' : 'homebranch';
1904
            my $otherbranch = $hbranch eq 'homebranch' ? 'holdingbranch' : 'homebranch';
1905
1905
1906
            # set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one
1906
            # set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one
1907
            if ($item->{$hbranch}) {
1907
            if ($item->{$hbranch}) {
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 372-377 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
372
('StaffAuthorisedValueImages','1',NULL,'','YesNo'),
372
('StaffAuthorisedValueImages','1',NULL,'','YesNo'),
373
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
373
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
374
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
374
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
375
('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'),
375
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'),
376
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'),
376
('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'),
377
('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'),
377
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
378
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 8613-8618 if ( CheckVersion($DBversion) ) { Link Here
8613
    SetVersion($DBversion);
8613
    SetVersion($DBversion);
8614
}
8614
}
8615
8615
8616
$DBversion = "3.17.00.XXX";
8617
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
8618
    my $pref = C4::Context->preference('HomeOrHoldingBranch');
8619
    $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type)
8620
       VALUES ('StaffSearchResultsDisplayBranch', ?,'homebranch|holdingbranch','Controls the display of the home or holding branch for staff search results','choice')", undef, $pref);
8621
    print "Upgrade to $DBversion done (Bug 12582 - Control of branch displayed in search results linked to HomeOrHoldingBranch)\n";
8622
    SetVersion ($DBversion);
8623
}
8624
8616
=head1 FUNCTIONS
8625
=head1 FUNCTIONS
8617
8626
8618
=head2 TableExists($table)
8627
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +7 lines)
Lines 240-245 Circulation: Link Here
240
                  holdingbranch: only the library the item was checked out from.
240
                  holdingbranch: only the library the item was checked out from.
241
                  homeorholdingbranch: either the library the item is from or the library it was checked out from.
241
                  homeorholdingbranch: either the library the item is from or the library it was checked out from.
242
        -
242
        -
243
            - For search results in the staff client, display the branch of
244
            - pref: StaffSearchResultsDisplayBranch
245
              type: choice
246
              choices:
247
                  homebranch: the library the item is from.
248
                  holdingbranch: the library the item is held by.
249
        -
243
            - Calculate the due date using 
250
            - Calculate the due date using 
244
            - pref: useDaysMode
251
            - pref: useDaysMode
245
              choices:
252
              choices:
246
- 

Return to bug 12582