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

(-)a/circ/circulation-home.pl (-3 lines)
Lines 40-46 $template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' ) Link Here
40
40
41
$template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation');
41
$template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation');
42
42
43
my $pending_checkout_notes = Koha::Checkouts->search({ noteseen => 0 })->count;
44
$template->param( pending_checkout_notes => $pending_checkout_notes );
45
46
output_html_with_http_headers $query, $cookie, $template->output;
43
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/checkout-notes.tt (-10 / +23 lines)
Lines 23-29 Link Here
23
23
24
            <h1>Checkout notes</h1>
24
            <h1>Checkout notes</h1>
25
25
26
            <div class="dialog alert" id="error"></div>
26
            <div class="dialog alert" id="error" style="display:none;"></div>
27
27
28
            [% IF ( selected_count ) %]
28
            [% IF ( selected_count ) %]
29
                <div class="dialog message">
29
                <div class="dialog message">
Lines 38-49 Link Here
38
            [% END %]
38
            [% END %]
39
39
40
            [% IF ( notes.count ) %]
40
            [% IF ( notes.count ) %]
41
                <fieldset class="action">
41
                <fieldset class="action" style="cursor:pointer;">
42
                    <a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
42
                    <a class="SelectAll"><i class="fa fa-check"></i> Select all</a>
43
                    | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
44
                    | <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a>
45
                    | <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a>
43
                </fieldset>
46
                </fieldset>
44
47
45
                <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
48
                <form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl">
46
49
50
                    <fieldset class="action">
51
                        <button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button>
52
                        <button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
53
                    </fieldset>
54
47
                    <table id="notestable">
55
                    <table id="notestable">
48
                        <thead>
56
                        <thead>
49
                            <tr>
57
                            <tr>
Lines 64-70 Link Here
64
                                    <td>[% note.note | html %]</td>
72
                                    <td>[% note.note | html %]</td>
65
                                    <td>[% note.notedate | $KohaDates %]</td>
73
                                    <td>[% note.notedate | $KohaDates %]</td>
66
                                    <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
74
                                    <td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td>
67
                                    <td>
75
                                    <td class="seen[% note.noteseen %]">
68
                                        [% IF ( note.noteseen == 0 ) %]
76
                                        [% IF ( note.noteseen == 0 ) %]
69
                                            <span id="status_[% note.issue_id %]">Not seen</span>
77
                                            <span id="status_[% note.issue_id %]">Not seen</span>
70
                                        [% ELSIF ( note.noteseen == 1 ) %]
78
                                        [% ELSIF ( note.noteseen == 1 ) %]
Lines 83-93 Link Here
83
                        </tbody>
91
                        </tbody>
84
                    </table>
92
                    </table>
85
93
86
                    <fieldset class="action">
87
                        <button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button>
88
                        <button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button>
89
                    </fieldset>
90
91
                </form>
94
                </form>
92
95
93
            [% ELSE %]
96
            [% ELSE %]
Lines 131-136 Link Here
131
                $(".btn-sm").prop("disabled", true);
134
                $(".btn-sm").prop("disabled", true);
132
            });
135
            });
133
136
137
            $(".HideSeen").on("click", function(){
138
                $(".seen1").parent().hide();
139
            });
140
141
            $(".ShowAll").on("click", function(){
142
                $("tr").show();
143
            });
144
134
            $("#error").hide();
145
            $("#error").hide();
135
146
136
            $("input[type='checkbox']").click(function(event){
147
            $("input[type='checkbox']").click(function(event){
Lines 141-147 Link Here
141
                }
152
                }
142
            });
153
            });
143
154
144
            $(".btn-xs").click(function(event){
155
            $("button.seen, button.notseen").click(function(event){
145
                event.preventDefault(); // prevent form submission
156
                event.preventDefault(); // prevent form submission
146
                var $action = $(this).attr("name");
157
                var $action = $(this).attr("name");
147
                var $issue_id = $(this).data('issue_id');
158
                var $issue_id = $(this).data('issue_id');
Lines 161-170 Link Here
161
                    if (data.status == 'success'){
172
                    if (data.status == 'success'){
162
                        if ( $action == 'notseen' ){
173
                        if ( $action == 'notseen' ){
163
                            $("#status_" + $issue_id).text(_("Not seen"));
174
                            $("#status_" + $issue_id).text(_("Not seen"));
175
                            $(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0");
164
                            $(event.target).siblings(".seen").prop("disabled", false);
176
                            $(event.target).siblings(".seen").prop("disabled", false);
165
                            $(event.target).prop("disabled", true);
177
                            $(event.target).prop("disabled", true);
166
                        } else {
178
                        } else {
167
                            $("#status_" + $issue_id).text(_("Seen"));
179
                            $("#status_" + $issue_id).text(_("Seen"));
180
                            $(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1");
168
                            $(event.target).siblings(".notseen").prop("disabled", false);
181
                            $(event.target).siblings(".notseen").prop("disabled", false);
169
                            $(event.target).prop("disabled", true);
182
                            $(event.target).prop("disabled", true);
170
                        }
183
                        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-2 / +1 lines)
Lines 41-47 Link Here
41
                    [% END %]
41
                    [% END %]
42
                    [% IF ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes ) %]
42
                    [% IF ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes ) %]
43
                        <li>
43
                        <li>
44
                            <a class="circ-button" href="/cgi-bin/koha/circ/checkout-notes.pl"><i class="fa fa-sticky-note"></i> Checkout notes</a> [% IF ( pending_checkout_notes ) %]<span class="number_box"><a href="/cgi-bin/koha/circ/checkout-notes.pl">[% pending_checkout_notes %]</a></span>[% END %]
44
                            <a class="circ-button" href="/cgi-bin/koha/circ/checkout-notes.pl"><i class="fa fa-sticky-note"></i> Checkout notes</a>
45
                        </li>
45
                        </li>
46
                    [% END %]
46
                    [% END %]
47
                </ul>
47
                </ul>
48
- 

Return to bug 17698