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

(-)a/circ/on-site_checkouts.pl (-1 / +1 lines)
Lines 45-51 my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts(); Link Here
45
45
46
$template->param(
46
$template->param(
47
    pending_onsite_checkouts => $pending_onsite_checkouts,
47
    pending_onsite_checkouts => $pending_onsite_checkouts,
48
    pending_onsite_notes     => $pending_onsite_notes,
48
    pending_checkout_notes   => $pending_checkout_notes,
49
);
49
);
50
50
51
output_html_with_http_headers $cgi, $cookie, $template->output;
51
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/installer/data/mysql/atomicupdate/bug-17698_add-permission-to-manage-checkout-notes.sql (-1 / +1 lines)
Line 1 Link Here
1
INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'manage_checkout_nots', 'Mark checkout notes as seen/not seen');
1
INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen');
(-)a/installer/data/mysql/userpermissions.sql (-1 / +1 lines)
Lines 5-11 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
5
   ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
5
   ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
6
   ( 1, 'manage_restrictions', 'Manage restrictions for accounts'),
6
   ( 1, 'manage_restrictions', 'Manage restrictions for accounts'),
7
   ( 1, 'self_checkout', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
7
   ( 1, 'self_checkout', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
8
   ( 1, 'manage_checkout_nots', 'Mark checkout notes as seen/not seen'),
8
   ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen'),
9
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
9
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
10
   ( 3, 'manage_circ_rules', 'Manage circulation rules'),
10
   ( 3, 'manage_circ_rules', 'Manage circulation rules'),
11
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
11
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 lines)
Lines 32-38 Link Here
32
    [%- CASE 'manage_restrictions' -%]<span>Manage restrictions for accounts</span>
32
    [%- CASE 'manage_restrictions' -%]<span>Manage restrictions for accounts</span>
33
    [%- CASE 'overdues_report' -%]<span>Execute overdue items report</span>
33
    [%- CASE 'overdues_report' -%]<span>Execute overdue items report</span>
34
    [%- CASE 'override_renewals' -%]<span>Override blocked renewals</span>
34
    [%- CASE 'override_renewals' -%]<span>Override blocked renewals</span>
35
    [%- CASE 'self_checkout' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
36
    [%- CASE 'manage_checkout_notes' %]<span>Mark checkout notes as seen/not seen</span>
35
    [%- CASE 'manage_checkout_notes' %]<span>Mark checkout notes as seen/not seen</span>
37
    [%- CASE 'manage_circ_rules' -%]<span>manage circulation rules</span>
36
    [%- CASE 'manage_circ_rules' -%]<span>manage circulation rules</span>
38
    [%- CASE 'parameters_remaining_permissions' -%]<span>Remaining system parameters permissions</span>
37
    [%- CASE 'parameters_remaining_permissions' -%]<span>Remaining system parameters permissions</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt (-71 / +75 lines)
Lines 1-79 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Home &rsaquo; Circulation &rsaquo; Checkout Notes</title>
6
<title>Home &rsaquo; Circulation &rsaquo; Checkout notes</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8
[% INCLUDE 'datatables.inc' %]
9
<script type="text/javascript">
10
//<![CDATA[
11
    $(document).ready(function(){
12
        $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
13
            "aoColumnDefs": [
14
                { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false },
15
            ],
16
            "sPaginationType": "four_button"
17
        }));
18
19
        $(".SelectAll").on("click", function(){
20
            $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
21
            $(".btn-sm").prop("disabled", false);
22
        });
23
24
        $(".ClearAll").on("click", function(){
25
            $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
26
            $(".btn-sm").prop("disabled", true);
27
        });
28
29
        $("#error").hide();
30
31
        $("input[type='checkbox']").click(function(event){
32
            if ( $("input[type='checkbox']").is(":checked") ) {
33
                $(".btn-sm").prop("disabled", false);
34
            } else {
35
                $(".btn-sm").prop("disabled", true);
36
            }
37
        });
38
39
        $(".btn-xs").click(function(event){
40
            event.preventDefault(); // prevent form submission
41
            var $action = $(this).attr("name");
42
            var $issue_id = $(this).data('issue_id');
43
            var ajaxData = {
44
                'action': $action,
45
                'issue_id': $issue_id,
46
            };
47
48
            $.ajax({
49
                url: '/cgi-bin/koha/svc/checkout_notes/',
50
                type: 'POST',
51
                dataType: 'json',
52
                data: ajaxData,
53
            })
54
55
            .done(function(data){
56
                if (data.status == 'success'){
57
                    if ( $action == 'notseen' ){
58
                        $("#status_" + $issue_id).text("Not seen");
59
                        $(event.target).siblings(".seen").prop("disabled", false);
60
                        $(event.target).prop("disabled", true);
61
                    } else {
62
                        $("#status_" + $issue_id).text("Seen");
63
                        $(event.target).siblings(".notseen").prop("disabled", false);
64
                        $(event.target).prop("disabled", true);
65
                    }
66
                } else {
67
                    $("#error").text(_("Unable to change status of note."));
68
                    $("#error").show();
69
                }
70
            });
71
        });
72
    });
73
//]]>
74
</script>
75
[% INCLUDE 'calendar.inc' %]
76
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
77
</head>
9
</head>
78
[% INCLUDE 'header.inc' %]
10
[% INCLUDE 'header.inc' %]
79
[% INCLUDE 'circ-search.inc' %]
11
[% INCLUDE 'circ-search.inc' %]
Lines 131-137 Link Here
131
                                        <td>[% note.item.biblio.title %] - [% note.item.biblio.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber %]">[% note.item.barcode %]</a>)</td>
63
                                        <td>[% note.item.biblio.title %] - [% note.item.biblio.author %] (<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% note.item.biblionumber %]">[% note.item.barcode %]</a>)</td>
132
                                        <td>[% note.note %]</td>
64
                                        <td>[% note.note %]</td>
133
                                        <td>[% note.notedate | $KohaDates %]</td>
65
                                        <td>[% note.notedate | $KohaDates %]</td>
134
                                        <td>[% IF note.patron.title %][% note.patron.title [% END %][% note.patron.firstname %] [% note.patron.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.patron.borrowernumber %]">[% note.patron.cardnumber %]</a>)</td>
66
                                        <td>[% IF note.patron.title %][% note.patron.title %][% END %][% note.patron.firstname %] [% note.patron.surname %] (<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% note.patron.borrowernumber %]">[% note.patron.cardnumber %]</a>)</td>
135
                                        <td>
67
                                        <td>
136
                                            [% IF ( note.noteseen == 0 ) %]
68
                                            [% IF ( note.noteseen == 0 ) %]
137
                                                <span id="status_[% note.issue_id %]">Not seen</span>
69
                                                <span id="status_[% note.issue_id %]">Not seen</span>
Lines 175-178 Link Here
175
    </div> <!-- bd -->
107
    </div> <!-- bd -->
176
</div> <!-- doc3 -->
108
</div> <!-- doc3 -->
177
109
110
[% MACRO jsinclude BLOCK %]
111
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
112
    [% INCLUDE 'calendar.inc' %]
113
    [% INCLUDE 'datatables.inc' %]
114
    <script type="text/javascript">
115
    //<![CDATA[
116
        $(document).ready(function(){
117
            $("#notestable").dataTable($.extend(true, {}, dataTablesDefaults, {
118
                "aoColumnDefs": [
119
                    { "aTargets": [ 0, -1 ], "bSearchable": false, "bSortable": false },
120
                ],
121
                "sPaginationType": "four_button"
122
            }));
123
124
            $(".SelectAll").on("click", function(){
125
                $("input[name='issue_ids'][type='checkbox']").prop("checked", true);
126
                $(".btn-sm").prop("disabled", false);
127
            });
128
129
            $(".ClearAll").on("click", function(){
130
                $("input[name='issue_ids'][type='checkbox']").prop("checked", false);
131
                $(".btn-sm").prop("disabled", true);
132
            });
133
134
            $("#error").hide();
135
136
            $("input[type='checkbox']").click(function(event){
137
                if ( $("input[type='checkbox']").is(":checked") ) {
138
                    $(".btn-sm").prop("disabled", false);
139
                } else {
140
                    $(".btn-sm").prop("disabled", true);
141
                }
142
            });
143
144
            $(".btn-xs").click(function(event){
145
                event.preventDefault(); // prevent form submission
146
                var $action = $(this).attr("name");
147
                var $issue_id = $(this).data('issue_id');
148
                var ajaxData = {
149
                    'action': $action,
150
                    'issue_id': $issue_id,
151
                };
152
153
                $.ajax({
154
                    url: '/cgi-bin/koha/svc/checkout_notes/',
155
                    type: 'POST',
156
                    dataType: 'json',
157
                    data: ajaxData,
158
                })
159
160
                .done(function(data){
161
                    if (data.status == 'success'){
162
                        if ( $action == 'notseen' ){
163
                            $("#status_" + $issue_id).text(_("Not seen"));
164
                            $(event.target).siblings(".seen").prop("disabled", false);
165
                            $(event.target).prop("disabled", true);
166
                        } else {
167
                            $("#status_" + $issue_id).text(_("Seen"));
168
                            $(event.target).siblings(".notseen").prop("disabled", false);
169
                            $(event.target).prop("disabled", true);
170
                        }
171
                    } else {
172
                        $("#error").text(_("Unable to change status of note."));
173
                        $("#error").show();
174
                    }
175
                });
176
            });
177
        });
178
    //]]>
179
    </script>
180
[% END %]
181
178
[% INCLUDE 'intranet-bottom.inc' %]
182
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-2 / +1 lines)
Lines 125-131 Link Here
125
                <div class="row">
125
                <div class="row">
126
                    <div class="col-sm-12">
126
                    <div class="col-sm-12">
127
                        [%# Following statement must be in one line for translatability %]
127
                        [%# Following statement must be in one line for translatability %]
128
                        [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) %]
128
                        [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes ) %]
129
                            <div id="area-pending">
129
                            <div id="area-pending">
130
                                [% IF pending_article_requests %]
130
                                [% IF pending_article_requests %]
131
                                <div class="pending-info" id="article_requests_pending">
131
                                <div class="pending-info" id="article_requests_pending">
132
- 

Return to bug 17698