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

(-)a/C4/UsageStats.pm (-1 lines)
Lines 278-284 sub BuildReport { Link Here
278
        TrackClicks
278
        TrackClicks
279
        PatronSelfRegistration
279
        PatronSelfRegistration
280
        OPACShelfBrowser
280
        OPACShelfBrowser
281
        AddPatronLists
282
        AutoEmailOpacUser
281
        AutoEmailOpacUser
283
        AutoEmailPrimaryAddress
282
        AutoEmailPrimaryAddress
284
        autoMemberNum
283
        autoMemberNum
(-)a/circ/circulation.pl (-7 / +4 lines)
Lines 206-218 my $borrowerslist; Link Here
206
my $message;
206
my $message;
207
if ($findborrower) {
207
if ($findborrower) {
208
    my $borrowers = Search($findborrower, 'cardnumber') || [];
208
    my $borrowers = Search($findborrower, 'cardnumber') || [];
209
    if (C4::Context->preference("AddPatronLists")) {
209
    my $categories = GetBorrowercategoryList;
210
        if (C4::Context->preference("AddPatronLists")=~/code/){
210
    $categories->[0]->{first} = 1;
211
            my $categories = GetBorrowercategoryList;
211
    $template->param( categories => $categories );
212
            $categories->[0]->{'first'} = 1;
212
213
            $template->param(categories=>$categories);
214
        }
215
    }
216
    if ( @$borrowers == 0 ) {
213
    if ( @$borrowers == 0 ) {
217
        $query->param( 'findborrower', '' );
214
        $query->param( 'findborrower', '' );
218
        $message = "'$findborrower'";
215
        $message = "'$findborrower'";
(-)a/installer/data/mysql/sysprefs.sql (-1 lines)
Lines 6-12 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
9
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
10
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
9
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
11
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
10
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
12
('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'),
11
('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 9628-9633 if ( CheckVersion($DBversion) ) { Link Here
9628
    SetVersion($DBversion);
9628
    SetVersion($DBversion);
9629
}
9629
}
9630
9630
9631
$DBversion = "3.19.00.XXX";
9632
if ( CheckVersion($DBversion) ) {
9633
    $dbh->do(q|
9634
        DELETE FROM systempreferences where variable = 'AddPatronLists'
9635
    |);
9636
    print "Upgrade to $DBversion done (Bug XXXXX - Remove the AddPatronLists system preferences)\n";
9637
    SetVersion ($DBversion);
9638
}
9639
9631
=head1 FUNCTIONS
9640
=head1 FUNCTIONS
9632
9641
9633
=head2 TableExists($table)
9642
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc (-10 / +1 lines)
Lines 3-18 Link Here
3
    <div class="btn-group">
3
    <div class="btn-group">
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
4
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
5
            <ul class="dropdown-menu">
5
            <ul class="dropdown-menu">
6
                [% IF Koha.Preference('AddPatronLists') == 'categorycode' %]
6
                [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
7
                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
8
                [% ELSE %]
9
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
10
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
11
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=P">Professional patron</a></li>
12
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=I">Organization</a></li>
13
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=S">Staff patron</a></li>
14
                    <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=X">Statistical patron</a></li>
15
                [% END %]
16
            </ul>
7
            </ul>
17
    </div>
8
    </div>
18
</div>
9
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-7 lines)
Lines 1-13 Link Here
1
Patrons:
1
Patrons:
2
    General:
2
    General:
3
     -
3
     -
4
         - List
5
         - pref: AddPatronLists
6
           choices:
7
               categorycode: specific categories
8
               category_type: general patron types
9
         - under the new patron menu.
10
     -
11
         - pref: AutoEmailOpacUser
4
         - pref: AutoEmailOpacUser
12
           choices:
5
           choices:
13
               yes: Send
6
               yes: Send
(-)a/members/members-home.pl (-7 / +2 lines)
Lines 67-73 if ( C4::Branch::onlymine ) { Link Here
67
}
67
}
68
68
69
my @categories;
69
my @categories;
70
my $no_categories;
71
my $no_add = 0;
70
my $no_add = 0;
72
if(scalar(@branchloop) < 1){
71
if(scalar(@branchloop) < 1){
73
    $no_add = 1;
72
    $no_add = 1;
Lines 78-91 else { Link Here
78
}
77
}
79
78
80
@categories=C4::Category->all;
79
@categories=C4::Category->all;
81
if(scalar(@categories) < 1){ 
80
if(scalar(@categories) < 1){
82
    $no_categories = 1; 
83
}
84
85
if($no_categories && C4::Context->preference("AddPatronLists")=~/code/){
86
    $no_add = 1;
81
    $no_add = 1;
87
    $template->param(no_categories => 1);
82
    $template->param(no_categories => 1);
88
} 
83
}
89
else {
84
else {
90
    $template->param(categories=>\@categories);
85
    $template->param(categories=>\@categories);
91
}
86
}
(-)a/patroncards/members-search.pl (-3 / +1 lines)
Lines 38-44 my $orderby = $cgi->param('orderby') || undef; Link Here
38
38
39
my @categories=C4::Category->all;
39
my @categories=C4::Category->all;
40
my %categories_display;
40
my %categories_display;
41
my $no_categories;
42
41
43
foreach my $category (@categories) {
42
foreach my $category (@categories) {
44
    my $hash={
43
    my $hash={
Lines 57-64 my ($template, $loggedinuser, $cookie) = get_template_and_user({ Link Here
57
                flagsrequired => {borrowers => 1},
56
                flagsrequired => {borrowers => 1},
58
                debug => 1,});
57
                debug => 1,});
59
58
60
if(scalar(@categories) < 1){ $no_categories = 1; }
59
if(scalar(@categories) < 1){
61
if($no_categories && C4::Context->preference("AddPatronLists")=~/code/){
62
    $template->param(no_categories => 1);
60
    $template->param(no_categories => 1);
63
} else {
61
} else {
64
    $template->param(
62
    $template->param(
(-)a/serials/member-search.pl (-7 / +1 lines)
Lines 65-76 foreach my $category (@categories){ Link Here
65
			 };
65
			 };
66
	$categories_dislay{$$category{categorycode}} = $hash;
66
	$categories_dislay{$$category{categorycode}} = $hash;
67
}
67
}
68
$template->param(
68
$categories[0]->{first} = 1;
69
        "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
70
            );
71
if (C4::Context->preference("AddPatronLists")=~/code/){
72
    $categories[0]->{'first'}=1;
73
}
74
69
75
my $member=$cgi->param('member');
70
my $member=$cgi->param('member');
76
my $orderby=$cgi->param('orderby');
71
my $orderby=$cgi->param('orderby');
77
- 

Return to bug 13497