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

(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 49-54 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
49
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
49
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
50
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
50
   ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'),
51
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
51
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
52
   ( 4, 'view_contact_information', 'View patron contact information'),
52
   ( 6, 'place_holds', 'Place holds for patrons'),
53
   ( 6, 'place_holds', 'Place holds for patrons'),
53
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
54
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
54
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
55
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (+1 lines)
Lines 65-70 Link Here
65
            [% IF patron.pronouns %]
65
            [% IF patron.pronouns %]
66
                <li class="patronpronouns">([% patron.pronouns | html %])</li>
66
                <li class="patronpronouns">([% patron.pronouns | html %])</li>
67
            [% END %]
67
            [% END %]
68
    [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) && CAN_user_borrowers_view_contact_information %]
68
69
69
            [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %]
70
            [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %]
70
71
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (+2 lines)
Lines 505-516 Link Here
505
                                    r += $patron_to_html(row, { invert_name: 1 });
505
                                    r += $patron_to_html(row, { invert_name: 1 });
506
                                    [% END %]
506
                                    [% END %]
507
                                    r += '<br/>';
507
                                    r += '<br/>';
508
                                    [% IF CAN_borrowers_view_contact_information %]
508
                                    r += '<div class="address"><ul>';
509
                                    r += '<div class="address"><ul>';
509
                                    r += $format_address(row, { no_line_break: true, include_li: true });
510
                                    r += $format_address(row, { no_line_break: true, include_li: true });
510
511
511
                                    if ( row.email ) {
512
                                    if ( row.email ) {
512
                                        r += "<li class=\"patron_email\">" + _("Email: ") + "<a href='mailto:" + encodeURIComponent(row.email) + "'>" + escape_str(row.email) + "</a></li>";
513
                                        r += "<li class=\"patron_email\">" + _("Email: ") + "<a href='mailto:" + encodeURIComponent(row.email) + "'>" + escape_str(row.email) + "</a></li>";
513
                                    }
514
                                    }
515
                                    [% END %]
514
                                    r += '</ul></div>'
516
                                    r += '</ul></div>'
515
517
516
                                    return r;
518
                                    return r;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 321-326 Link Here
321
        <span class="sub_permission view_borrower_infos_from_any_libraries_subpermission">
321
        <span class="sub_permission view_borrower_infos_from_any_libraries_subpermission">
322
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
322
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
323
        </span>
323
        </span>
324
        <span class="permissioncode">([% name | html %])
325
    [%- CASE 'view_contact_information' -%]
326
        <span class="sub_permission view_contact_information">
327
            View patron contact information.
328
        </span>
324
        <span class="permissioncode">([% name | html %])</span>
329
        <span class="permissioncode">([% name | html %])</span>
325
    [%- CASE 'send_messages_to_borrowers' -%]
330
    [%- CASE 'send_messages_to_borrowers' -%]
326
        <span class="sub_permission send_messages_to_borrowers_subpermission">
331
        <span class="sub_permission send_messages_to_borrowers_subpermission">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc (+1 lines)
Lines 12-17 Link Here
12
12
13
    var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers | html %]";
13
    var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers | html %]";
14
    var CAN_user_borrowers_delete_borrowers = "[% CAN_user_borrowers_delete_borrowers | html %]";
14
    var CAN_user_borrowers_delete_borrowers = "[% CAN_user_borrowers_delete_borrowers | html %]";
15
    var CAN_user_borrowers_view_contact_information = "[% CAN_user_borrowers_view_contact_information | html %]";
15
16
16
    var dateformat = "[% Koha.Preference('dateformat') | html %]";
17
    var dateformat = "[% Koha.Preference('dateformat') | html %]";
17
18
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc (+2 lines)
Lines 53-63 Link Here
53
                        <br />Barcode: [% reserveloo.item.barcode | html %]
53
                        <br />Barcode: [% reserveloo.item.barcode | html %]
54
                </td>
54
                </td>
55
                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrower.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' patron=reserveloo.borrower invert_name=1 no_title=1 %]</a>
55
                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrower.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' patron=reserveloo.borrower invert_name=1 no_title=1 %]</a>
56
                 [% IF CAN_user_borrowers_view_contact_information %]
56
                    [% IF ( reserveloo.borrower.phone ) %]<br /><span class="patron_phone">[% reserveloo.borrower.phone | html %]</span>[% END %]
57
                    [% IF ( reserveloo.borrower.phone ) %]<br /><span class="patron_phone">[% reserveloo.borrower.phone | html %]</span>[% END %]
57
                    [% IF ( reserveloo.borrower.notice_email_address ) %]
58
                    [% IF ( reserveloo.borrower.notice_email_address ) %]
58
                        <span class="patron_email"><br /><a href="mailto:[% reserveloo.borrower.notice_email_address | uri %]?subject=[% "Hold waiting: " | uri %][% reserveloo.biblio.title | uri %]">
59
                        <span class="patron_email"><br /><a href="mailto:[% reserveloo.borrower.notice_email_address | uri %]?subject=[% "Hold waiting: " | uri %][% reserveloo.biblio.title | uri %]">
59
                        [% reserveloo.borrower.notice_email_address | html %]</a></span>
60
                        [% reserveloo.borrower.notice_email_address | html %]</a></span>
60
                    [% END %]
61
                    [% END %]
62
                    [% END %]
61
                </td>
63
                </td>
62
                <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td>
64
                <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td>
63
                <td>[% Branches.GetName( reserveloo.item.holdingbranch ) | html %][% IF (reserveloo.desk_id  ) %], [% reserveloo.desk.desk_name | html %][% END %]</td>
65
                <td>[% Branches.GetName( reserveloo.item.holdingbranch ) | html %][% IF (reserveloo.desk_id  ) %], [% reserveloo.desk.desk_name | html %][% END %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+1 lines)
Lines 1013-1018 Link Here
1013
        var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
1013
        var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
1014
        var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
1014
        var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
1015
        var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %];
1015
        var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %];
1016
        var ViewContactInformation = [% (CAN_user_borrowers_view_contact_information)? 1 : 0 | html %];
1016
        var script = "circulation";
1017
        var script = "circulation";
1017
        var relatives_borrowernumbers = new Array();
1018
        var relatives_borrowernumbers = new Array();
1018
        [% FOREACH b IN relatives_borrowernumbers %]
1019
        [% FOREACH b IN relatives_borrowernumbers %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (+10 lines)
Lines 81-86 Link Here
81
                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
81
                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
82
                                        </li>
82
                                        </li>
83
83
84
                                        [% IF CAN_user_view_contact_information %]
84
                                        [% INCLUDE display_holdpatron_address %]
85
                                        [% INCLUDE display_holdpatron_address %]
85
86
86
                                        [% IF ( patron.phone ) %]
87
                                        [% IF ( patron.phone ) %]
Lines 96-101 Link Here
96
                                                [% END %]
97
                                                [% END %]
97
                                            </li>
98
                                            </li>
98
                                        [% END %]
99
                                        [% END %]
100
                                        [% END %]
99
101
100
                                        [% UNLESS ( transfertodo) %]
102
                                        [% UNLESS ( transfertodo) %]
101
                                            [% INCLUDE display_bormessagepref %]
103
                                            [% INCLUDE display_bormessagepref %]
Lines 654-659 Link Here
654
                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
656
                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
655
                                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
657
                                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
656
                                                        </li>
658
                                                        </li>
659
                                                        [% IF CAN_user_view_contact_information %]
657
                                                        [% INCLUDE display_holdpatron_address %]
660
                                                        [% INCLUDE display_holdpatron_address %]
658
                                                        [% IF ( patron.phone ) %]
661
                                                        [% IF ( patron.phone ) %]
659
                                                            <li> [% patron.phone | html %]</li>
662
                                                            <li> [% patron.phone | html %]</li>
Lines 662-667 Link Here
662
                                                        [% IF ( patron.email ) %]
665
                                                        [% IF ( patron.email ) %]
663
                                                            <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
666
                                                            <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
664
                                                        [% END %]
667
                                                        [% END %]
668
                                                        [% END %]
665
669
666
                                                        [% IF ( patron.is_debarred ) %]
670
                                                        [% IF ( patron.is_debarred ) %]
667
                                                            <li class="error">Patron is RESTRICTED</li>
671
                                                            <li class="error">Patron is RESTRICTED</li>
Lines 837-842 Link Here
837
                                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
841
                                                            <span class="patron-category"> - [% patron.category.description | html %]</span>
838
                                                        </li>
842
                                                        </li>
839
843
844
                                                        [% IF CAN_user_view_contact_information %]
840
                                                        [% INCLUDE display_holdpatron_address %]
845
                                                        [% INCLUDE display_holdpatron_address %]
841
846
842
                                                        [% IF ( patron.phone ) %]
847
                                                        [% IF ( patron.phone ) %]
Lines 852-857 Link Here
852
                                                                [% END %]
857
                                                                [% END %]
853
                                                            </li>
858
                                                            </li>
854
                                                        [% END %]
859
                                                        [% END %]
860
                                                        [% END %]
855
861
856
                                                        [% UNLESS ( transfertodo) %]
862
                                                        [% UNLESS ( transfertodo) %]
857
                                                            [% INCLUDE display_bormessagepref %]
863
                                                            [% INCLUDE display_bormessagepref %]
Lines 956-961 Link Here
956
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
962
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
957
                                                        </li>
963
                                                        </li>
958
964
965
                                                        [% IF CAN_user_view_contact_information %]
959
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
966
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
960
967
961
                                                        [% IF ( recall.patron.phone ) %]
968
                                                        [% IF ( recall.patron.phone ) %]
Lines 971-976 Link Here
971
                                                                [% END %]
978
                                                                [% END %]
972
                                                            </li>
979
                                                            </li>
973
                                                        [% END %]
980
                                                        [% END %]
981
                                                        [% END %]
974
982
975
                                                        [% UNLESS ( transfertodo) %]
983
                                                        [% UNLESS ( transfertodo) %]
976
                                                            [% INCLUDE display_bormessagepref %]
984
                                                            [% INCLUDE display_bormessagepref %]
Lines 1059-1064 Link Here
1059
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
1067
                                                            <span class="patron-category"> - [% recall.patron.category.description | html %]</span>
1060
                                                        </li>
1068
                                                        </li>
1061
1069
1070
                                                        [% IF CAN_user_view_contact_information %]
1062
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
1071
                                                        [% INCLUDE display_holdpatron_address patron=recall.patron %]
1063
1072
1064
                                                        [% IF ( recall.patron.phone ) %]
1073
                                                        [% IF ( recall.patron.phone ) %]
Lines 1074-1079 Link Here
1074
                                                                [% END %]
1083
                                                                [% END %]
1075
                                                            </li>
1084
                                                            </li>
1076
                                                        [% END %]
1085
                                                        [% END %]
1086
                                                        [% END %]
1077
1087
1078
                                                        [% UNLESS ( transfertodo) %]
1088
                                                        [% UNLESS ( transfertodo) %]
1079
                                                            [% INCLUDE display_bormessagepref %]
1089
                                                            [% INCLUDE display_bormessagepref %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +1 lines)
Lines 216-222 Link Here
216
                          <p>
216
                          <p>
217
                              [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
217
                              [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
218
                          </p>
218
                          </p>
219
                          [% UNLESS Koha.Preference('HidePatronName') %]
219
                          [% UNLESS Koha.Preference('HidePatronName') || !CAN_user_borrowers_view_contact_information %]
220
                             <p>[% itemsloo.patron.phone | html %]</p>
220
                             <p>[% itemsloo.patron.phone | html %]</p>
221
                          [% END %]
221
                          [% END %]
222
                        </td>
222
                        </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt (+1 lines)
Lines 22-27 Link Here
22
        </div>
22
        </div>
23
        <div class="row">
23
        <div class="row">
24
            <div class="col-xs-6">
24
            <div class="col-xs-6">
25
            [% IF CAN_user_borrowers_view_contact_information %]
25
                <div id="patron-information">
26
                <div id="patron-information">
26
27
27
        [% IF ( patron.othernames ) %]&ldquo;[% patron.othernames | html %]&rdquo;[% END %]
28
        [% IF ( patron.othernames ) %]&ldquo;[% patron.othernames | html %]&rdquo;[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 / +11 lines)
Lines 127-138 Link Here
127
127
128
                                [% IF ( patron.othernames ) %]<div>&ldquo;[% patron.othernames | html %]&rdquo;</div>[% END %]
128
                                [% IF ( patron.othernames ) %]<div>&ldquo;[% patron.othernames | html %]&rdquo;</div>[% END %]
129
129
130
                                [% IF CAN_user_borrowers_view_contact_information %]
130
                                <div class="address">
131
                                <div class="address">
131
                                    <ul>
132
                                    <ul>
132
                                        [% PROCESS 'display-address-style' %]
133
                                        [% PROCESS 'display-address-style' %]
133
                                    </ul>
134
                                    </ul>
134
                                </div>
135
                                </div>
136
                                [% END %]
135
137
138
                                [% IF CAN_user_borrowers_view_contact_information %]
136
                                <div class="rows">
139
                                <div class="rows">
137
                                    <ol>
140
                                    <ol>
138
                                        [% IF ( patron.phone ) %]
141
                                        [% IF ( patron.phone ) %]
Lines 272-277 Link Here
272
                                        [% END %]
275
                                        [% END %]
273
                                    </ol>
276
                                    </ol>
274
                                </div> [% # /div.rows %]
277
                                </div> [% # /div.rows %]
278
                                [% END %]
275
                            </div> [% # /div#patron-information %]
279
                            </div> [% # /div#patron-information %]
276
280
277
                            [% IF Koha.Preference('HouseboundModule') %]
281
                            [% IF Koha.Preference('HouseboundModule') %]
Lines 571-583 Link Here
571
                                            <a class="btn btn-default btn-xs" href="memberentry.pl?op=edit_form&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=6"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
575
                                            <a class="btn btn-default btn-xs" href="memberentry.pl?op=edit_form&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=6"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
572
                                        [% END %]
576
                                        [% END %]
573
                                    </div>
577
                                    </div>
578
                                    [% IF CAN_user_borrowers_view_contact_information %]
574
                                    <div class="address">
579
                                    <div class="address">
575
                                        <ul>
580
                                        <ul>
576
                                            [% PROCESS 'display-alt-address-style' %]
581
                                            [% PROCESS 'display-alt-address-style' %]
577
                                        </ul>
582
                                        </ul>
578
                                    </div>
583
                                    </div>
584
                                    [% END %]
579
                                    <div class="rows">
585
                                    <div class="rows">
580
                                        <ol>
586
                                        <ol>
587
                                        [% IF CAN_user_borrowers_view_contact_information %]
581
                                            [% IF ( patron.B_phone ) %]
588
                                            [% IF ( patron.B_phone ) %]
582
                                                <li id="patron-bphone">
589
                                                <li id="patron-bphone">
583
                                                    <span class="label">Phone: </span>
590
                                                    <span class="label">Phone: </span>
Lines 598-603 Link Here
598
                                                    [% patron.contactnote |html %]
605
                                                    [% patron.contactnote |html %]
599
                                                </li>
606
                                                </li>
600
                                            [% END %]
607
                                            [% END %]
608
                                            [% END %]
601
                                        </ol>
609
                                        </ol>
602
                                    </div>
610
                                    </div>
603
                                [% ELSE %]
611
                                [% ELSE %]
Lines 620-625 Link Here
620
                                    </div>
628
                                    </div>
621
                                    <div class="rows">
629
                                    <div class="rows">
622
                                        <ol>
630
                                        <ol>
631
                                        [% IF CAN_user_borrowers_view_contact_information %]
623
                                            [% IF ( patron.altcontactsurname ) %]
632
                                            [% IF ( patron.altcontactsurname ) %]
624
                                                <li id="patron-altcontactsurname">
633
                                                <li id="patron-altcontactsurname">
625
                                                    <span class="label">Surname: </span>
634
                                                    <span class="label">Surname: </span>
Lines 675-680 Link Here
675
                                                    <a href="tel:[% patron.altcontactphone | url %]">[% patron.altcontactphone | html %]</a>
684
                                                    <a href="tel:[% patron.altcontactphone | url %]">[% patron.altcontactphone | html %]</a>
676
                                                </li>
685
                                                </li>
677
                                            [% END %]
686
                                            [% END %]
687
                                            [% END %]
678
                                        </ol>
688
                                        </ol>
679
                                    </div> [% # /div.rows %]
689
                                    </div> [% # /div.rows %]
680
                                [% ELSE %]
690
                                [% ELSE %]
Lines 751-756 Link Here
751
        var branchcode = "[% Branches.GetLoggedInBranchcode() | html %]";
761
        var branchcode = "[% Branches.GetLoggedInBranchcode() | html %]";
752
        var exports_enabled = "[% Koha.Preference('ExportCircHistory') | html %]";
762
        var exports_enabled = "[% Koha.Preference('ExportCircHistory') | html %]";
753
        var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %];
763
        var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %];
764
        var ViewContactInformation = [% (CAN_user_borrowers_view_contact_information)? 1 : 0 | html %];
754
        var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
765
        var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
755
        var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
766
        var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
756
        var script = "moremember";
767
        var script = "moremember";
757
- 

Return to bug 37144