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 373-378 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
373
('StaffAuthorisedValueImages','1',NULL,'','YesNo'),
373
('StaffAuthorisedValueImages','1',NULL,'','YesNo'),
374
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
374
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
375
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
375
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
376
('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'),
376
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'),
377
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','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'),
378
('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'),
378
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
379
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 8570-8575 if ( CheckVersion($DBversion) ) { Link Here
8570
    SetVersion($DBversion);
8570
    SetVersion($DBversion);
8571
}
8571
}
8572
8572
8573
$DBversion = "3.17.00.XXX";
8574
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
8575
    my $pref = C4::Context->preference('HomeOrHoldingBranch');
8576
    $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type)
8577
       VALUES ('StaffSearchResultsDisplayBranch', ?,'homebranch|holdingbranch','Controls the display of the home or holding branch for staff search results','choice')", undef, $pref);
8578
    print "Upgrade to $DBversion done (Bug 12582 - Control of branch displayed in search results linked to HomeOrHoldingBranch)\n";
8579
    SetVersion ($DBversion);
8580
}
8581
8573
=head1 FUNCTIONS
8582
=head1 FUNCTIONS
8574
8583
8575
=head2 TableExists($table)
8584
=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