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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/notices.tt (-13 / +22 lines)
Lines 6-16 Link Here
6
[% USE TablesSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Notices management &rsaquo; Tools &rsaquo; Koha</title>
9
[% PROCESS 'i18n.inc' %]
10
[% PROCESS "patron-search.inc" %]
10
[% PROCESS "patron-search.inc" %]
11
[% SET libraries = Branches.all %]
11
[% SET libraries = Branches.all %]
12
[% SET categories = Categories.all.unblessed %]
12
[% SET categories = Categories.all.unblessed %]
13
[% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %]
13
[% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %]
14
<title>[% FILTER collapse %]
15
    [% t("Notices management") | html %] &rsaquo;
16
    [% t("Tools") | html %] &rsaquo;
17
    [% t("Koha") | html %]
18
[% END %]</title>
14
[% INCLUDE 'doc-head-close.inc' %]
19
[% INCLUDE 'doc-head-close.inc' %]
15
<style>
20
<style>
16
    .notice { display: none; }
21
    .notice { display: none; }
Lines 54-59 Link Here
54
                <span id="checkbox_actions"><a href="#" class="select_all"><i class="fa fa-check"></i> Select all</a> | <a href="#" class="clear_all"><i class="fa fa-remove"></i> Clear all</a></span>
59
                <span id="checkbox_actions"><a href="#" class="select_all"><i class="fa fa-check"></i> Select all</a> | <a href="#" class="clear_all"><i class="fa fa-remove"></i> Clear all</a></span>
55
60
56
                <form id="print_multiple" action="/cgi-bin/koha/tools/print_notice.pl" method="post" target="_blank">
61
                <form id="print_multiple" action="/cgi-bin/koha/tools/print_notice.pl" method="post" target="_blank">
62
                    [% INCLUDE 'csrf-token.inc' %]
57
63
58
                    <table id="notices">
64
                    <table id="notices">
59
                        <thead>
65
                        <thead>
Lines 94-110 Link Here
94
                [% ELSE %]
100
                [% ELSE %]
95
101
96
                    Use the search form on the left to find sent notices, or go directly to a patron's notices.
102
                    Use the search form on the left to find sent notices, or go directly to a patron's notices.
97
                    <div id="notices_patronsearch" class="toptabs">
103
98
                        <ul class="nav nav-tabs" role="tablist">
104
                    [% WRAPPER tabs id= "notices_patronsearch" %]
99
                            <li role="presentation" class="active"><a href="#notices_patronsearch_pane" aria-controls="notices_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li>
105
                        [% WRAPPER tabs_nav %]
100
                        </ul>
106
                            [% WRAPPER tab_item tabname= "notices_patronsearch_pane" bt_active= 1 %] <span>Patrons</span> [% END %]
101
                        <div class="tab-content">
107
                        [% END %]
102
                            <div id="notice_patronsearch_pane" role="tabpanel" class="tab-pane active">
108
                        [% WRAPPER tab_panels %]
109
                            [% WRAPPER tab_panel tabname="notices_patronsearch_pane" bt_active= 1 %]
103
                                [% PROCESS patron_search_filters_simple %]
110
                                [% PROCESS patron_search_filters_simple %]
104
                                [% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %]
111
                                [% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %]
105
                            </div>
112
                            [% END %]
106
                        </div>
113
                        [% END %]
107
                    </div>
114
                    [% END %]
108
115
109
                    [% IF notices && notices.count == 0 %]
116
                    [% IF notices && notices.count == 0 %]
110
117
Lines 123-129 Link Here
123
            <aside>
130
            <aside>
124
                <fieldset class="sidebar brief">
131
                <fieldset class="sidebar brief">
125
                    <form id="notices-search" action="/cgi-bin/koha/tools/notices.pl" method="post">
132
                    <form id="notices-search" action="/cgi-bin/koha/tools/notices.pl" method="post">
126
                        <input type="hidden" name="op" value="search">
133
                        [% INCLUDE 'csrf-token.inc' %]
134
                        <input type="hidden" name="op" value="cud-search">
127
                        <h3>Search filters</h3>
135
                        <h3>Search filters</h3>
128
                        <ol>
136
                        <ol>
129
                            <li>
137
                            <li>
Lines 243-249 Link Here
243
    [% Asset.js("js/tools-menu.js") | $raw %]
251
    [% Asset.js("js/tools-menu.js") | $raw %]
244
    [% INCLUDE 'calendar.inc' %]
252
    [% INCLUDE 'calendar.inc' %]
245
    [% INCLUDE 'datatables.inc' %]
253
    [% INCLUDE 'datatables.inc' %]
246
    [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/tools/notices.pl?', redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/tools/notices.pl?', redirect_if_attribute_equal => 'cardnumber' %]
247
254
248
    <script>
255
    <script>
249
        table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %];
256
        table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %];
Lines 274-280 Link Here
274
            $("#notices_patronsearch").on("submit", filter);
281
            $("#notices_patronsearch").on("submit", filter);
275
            [% UNLESS notices %]
282
            [% UNLESS notices %]
276
                [% IF ( Koha.Preference('PatronAutoComplete') ) %]
283
                [% IF ( Koha.Preference('PatronAutoComplete') ) %]
277
                    patron_autocomplete($("#search_patron_filter"), { 'link-to': 'notices', 'url-params': '[% url_biblio_params | url %]' });
284
                    patron_autocomplete($(".search_patron_filter"), { 'link-to': 'notices' });
278
                [% END %]
285
                [% END %]
279
            [% END %]
286
            [% END %]
280
287
Lines 303-308 Link Here
303
        });
310
        });
304
    </script>
311
    </script>
305
312
313
    [% SET search_results_block_id = 'notices_patronsearch_pane_panel' %] [%# adjusting variable for patron-search.inc %]
314
    [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/members/notices.pl?', redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/members/notices.pl?', redirect_if_attribute_equal => 'cardnumber' %]
306
[% END %]
315
[% END %]
307
316
308
[% INCLUDE 'intranet-bottom.inc' %]
317
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/tools/notices.pl (-2 / +1 lines)
Lines 39-45 unless ( C4::Context->preference('NoticesManagement') ) { Link Here
39
39
40
my $op = $query->param('op');
40
my $op = $query->param('op');
41
41
42
if ( $op and $op eq 'search' ) {
42
if ( $op and $op eq 'cud-search' ) {
43
    my $letter_code  = $query->param('letter_code')  || undef;
43
    my $letter_code  = $query->param('letter_code')  || undef;
44
    my $categorycode = $query->param('categorycode') || undef;
44
    my $categorycode = $query->param('categorycode') || undef;
45
    my $branchcode   = $query->param('branchcode')   || undef;
45
    my $branchcode   = $query->param('branchcode')   || undef;
46
- 

Return to bug 33260