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

(-)a/admin/smart-rules.pl (-1 / +9 lines)
Lines 43-50 my ($template, $loggedinuser, $cookie) Link Here
43
                            });
43
                            });
44
44
45
my $type=$input->param('type');
45
my $type=$input->param('type');
46
my $branch = $input->param('branch') || GetBranchesCount() == 1 ? undef : C4::Branch::mybranch();
46
47
my $branch;
48
if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) {
49
    $branch = $input->param('branch') || GetBranchesCount() == 1 ? undef : C4::Branch::mybranch();
50
}
51
else {
52
    $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' );
53
}
47
$branch = '*' if $branch eq 'NO_LIBRARY_SET';
54
$branch = '*' if $branch eq 'NO_LIBRARY_SET';
55
48
my $op = $input->param('op') || q{};
56
my $op = $input->param('op') || q{};
49
57
50
if ($op eq 'delete') {
58
if ($op eq 'delete') {
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 102-107 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
102
('DefaultLongOverdueLostValue', NULL, NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'),
102
('DefaultLongOverdueLostValue', NULL, NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'),
103
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
103
('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
104
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
104
('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
105
('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
106
('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
105
('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
107
('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
106
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'),
108
('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'),
107
('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
109
('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
(-)a/installer/data/mysql/updatedatabase.pl (+15 lines)
Lines 9669-9674 if ( CheckVersion($DBversion) ) { Link Here
9669
    SetVersion ($DBversion);
9669
    SetVersion ($DBversion);
9670
}
9670
}
9671
9671
9672
$DBversion = "3.19.00.XXX";
9673
if(CheckVersion($DBversion)) {
9674
    $dbh->do(q{
9675
        INSERT INTO systempreferences ( variable, value, options, explanation, type )
9676
        VALUES (
9677
            'DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'
9678
        ), (
9679
            'DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'
9680
        )
9681
    });
9682
9683
    print "Upgrade to $DBversion done (Bug 13379 - Modify authorised_values.category to varchar(32))\n";
9684
    SetVersion($DBversion);
9685
}
9686
9672
=head1 FUNCTIONS
9687
=head1 FUNCTIONS
9673
9688
9674
=head2 TableExists($table)
9689
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (+14 lines)
Lines 50-55 Administration: Link Here
50
                  yes: Allow
50
                  yes: Allow
51
                  no: "Don't allow"
51
                  no: "Don't allow"
52
            - staff and patrons to create and view saved lists of books.
52
            - staff and patrons to create and view saved lists of books.
53
        -
54
            - When editing circulation rules show the
55
            - pref: DefaultToLoggedInLibraryCircRules
56
              choices:
57
                  yes: "logged in library's"
58
                  no: "all libraries"
59
            - rules by default.
60
        -
61
            - When editing notices and slips show the 
62
            - pref: DefaultToLoggedInLibraryNoticesSlips
63
              choices:
64
                  yes: "logged in library's"
65
                  no: "all libraries"
66
            - notices and slips by default.
53
    Login options:
67
    Login options:
54
        -
68
        -
55
            - Automatically log out users after
69
            - Automatically log out users after
(-)a/tools/letter.pl (-7 / +7 lines)
Lines 78-90 my $module = $input->param('module'); Link Here
78
my $content     = $input->param('content');
78
my $content     = $input->param('content');
79
my $op          = $input->param('op') || '';
79
my $op          = $input->param('op') || '';
80
80
81
# Default to logged in branch for notice list only
81
# Default to logged in branch for notice list only, if DefaultToLoggedInLibraryNoticesSlips is enabled
82
our $branchcode =
82
our $branchcode =
83
    $input->param('branchcode') eq '*' ? undef
83
    !C4::Context->preference('DefaultToLoggedInLibraryNoticesSlips') ? $input->param('branchcode')
84
  : $input->param('branchcode') ? $input->param('branchcode')
84
  : $input->param('branchcode') eq '*'                               ? undef
85
  : $op                         ? $input->param('branchcode')
85
  : $input->param('branchcode')                                      ? $input->param('branchcode')
86
  : GetBranchesCount() == 1     ? undef
86
  : $op                                                              ? $input->param('branchcode')
87
  :                               C4::Branch::mybranch();
87
  : GetBranchesCount() == 1                                          ? undef
88
  :                                                                    C4::Branch::mybranch();
88
89
89
my $dbh = C4::Context->dbh;
90
my $dbh = C4::Context->dbh;
90
91
91
- 

Return to bug 11625