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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-45 / +49 lines)
Lines 169-222 Link Here
169
                </div>
169
                </div>
170
            </div>
170
            </div>
171
171
172
            <table id="patron-list-table">
172
            <div class="page-section">
173
                <thead>
173
                <table id="patron-list-table">
174
                    <tr>
174
                    <thead>
175
                        <th class="NoSort">&nbsp;</th>
176
                        <th>Card</th>
177
                        <th>First name</th>
178
                        <th>Surname</th>
179
                        <th>Address</th>
180
                        <th>Category</th>
181
                        <th>Library</th>
182
                        <th>Expires on</th>
183
                        <th>Circ notes</th>
184
                    </tr>
185
                </thead>
186
187
                <tbody>
188
                    [% FOREACH p IN list.patron_list_patrons %]
189
                        <tr>
175
                        <tr>
190
                            <td>
176
                            <th class="NoSort">&nbsp;</th>
191
                                <input type="checkbox" name="patrons_to_remove" class="selection" value="[% p.patron_list_patron_id | html %]" />
177
                            <th>Card</th>
192
                                <input type="hidden" id="borrowernumber_[% p.patron_list_patron_id | html %]" value="[% p.borrowernumber.id | html %]" />
178
                            <th>First name</th>
193
                            </td>
179
                            <th>Surname</th>
194
                            <td>
180
                            <th>Address</th>
195
                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber | uri %]">
181
                            <th>Category</th>
196
                                    [% p.borrowernumber.cardnumber | html %]
182
                            <th>Library</th>
197
                                </a>
183
                            <th>Expires on</th>
198
                            </td>
184
                            <th>Circ notes</th>
199
                            <td>[% p.borrowernumber.firstname | html %]</td>
200
                            <td>[% p.borrowernumber.surname | html %]</td>
201
                            <td>
202
                                [% p.borrowernumber.address | html %]
203
                                [% p.borrowernumber.address2 | html %]
204
                                [% p.borrowernumber.city | html %]
205
                                [% p.borrowernumber.state | html %]
206
                                [% p.borrowernumber.country | html %]
207
                            </td>
208
                            <td>[% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %])</td>
209
                            <td>[% p.borrowernumber.branchcode.branchname | html %]</td>
210
                            <td data-order="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</td>
211
                            <td>[% p.borrowernumber.borrowernotes | html %]</td>
212
                        </tr>
185
                        </tr>
213
                    [% END %]
186
                    </thead>
214
                </tbody>
187
215
            </table>
188
                    <tbody>
189
                        [% FOREACH p IN list.patron_list_patrons %]
190
                            <tr>
191
                                <td>
192
                                    <input type="checkbox" name="patrons_to_remove" class="selection" value="[% p.patron_list_patron_id | html %]" />
193
                                    <input type="hidden" id="borrowernumber_[% p.patron_list_patron_id | html %]" value="[% p.borrowernumber.id | html %]" />
194
                                </td>
195
                                <td>
196
                                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber | uri %]">
197
                                        [% p.borrowernumber.cardnumber | html %]
198
                                    </a>
199
                                </td>
200
                                <td>[% p.borrowernumber.firstname | html %]</td>
201
                                <td>[% p.borrowernumber.surname | html %]</td>
202
                                <td>
203
                                    [% p.borrowernumber.address | html %]
204
                                    [% p.borrowernumber.address2 | html %]
205
                                    [% p.borrowernumber.city | html %]
206
                                    [% p.borrowernumber.state | html %]
207
                                    [% p.borrowernumber.country | html %]
208
                                </td>
209
                                <td>[% p.borrowernumber.categorycode.description | html %] ([% p.borrowernumber.categorycode.categorycode | html %])</td>
210
                                <td>[% p.borrowernumber.branchcode.branchname | html %]</td>
211
                                <td data-order="[% p.borrowernumber.dateexpiry | html %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</td>
212
                                <td>[% p.borrowernumber.borrowernotes | html %]</td>
213
                            </tr>
214
                        [% END %]
215
                    </tbody>
216
                </table>
217
            </div> <!-- /.page-section -->
216
218
217
            <input type="hidden" name="patron_list_id" value="[% list.patron_list_id | html %]" />
219
            <fieldset class="action">
218
            <button type="submit" class="btn btn-default btn-sm list-remove"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button>
220
                <input type="hidden" name="patron_list_id" value="[% list.patron_list_id | html %]" />
219
            <button class="btn btn-default btn-sm merge-patrons" type="submit"><i class="fa fa-compress"></i> Merge selected patrons</button>
221
                <button type="submit" class="btn btn-default btn-sm list-remove"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button>
222
                <button class="btn btn-default btn-sm merge-patrons" type="submit"><i class="fa fa-compress"></i> Merge selected patrons</button>
223
            </fieldset>
220
        </form>
224
        </form>
221
225
222
            </main>
226
            </main>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt (-58 / +59 lines)
Lines 45-113 Link Here
45
45
46
        [% IF ( lists ) %]
46
        [% IF ( lists ) %]
47
47
48
        <table id="patron-lists-table">
48
        <div class="page-section">
49
            <thead>
49
            <table id="patron-lists-table">
50
                <tr>
50
                <thead>
51
                    <th>Name</th>
52
                    <th>Patrons in list</th>
53
                    <th>Shared</th>
54
                    <th class="NoSort">&nbsp;</th>
55
                </tr>
56
            </thead>
57
58
            <tbody>
59
                [% FOREACH l IN lists %]
60
                    [% SET shared_by_other = l.owner.id != logged_in_user.id %]
61
                    <tr>
51
                    <tr>
62
                        <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td>
52
                        <th>Name</th>
63
                        <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td>
53
                        <th>Patrons in list</th>
64
                        <td>
54
                        <th>Shared</th>
65
                            [% IF l.shared %]
55
                        <th class="NoSort">&nbsp;</th>
66
                                [% IF shared_by_other %]
56
                    </tr>
67
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | uri %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a>
57
                </thead>
68
                                [% ELSE %]
58
69
                                    by you
59
                <tbody>
70
                                [% END %]
60
                    [% FOREACH l IN lists %]
71
                            [% END %]
61
                        [% SET shared_by_other = l.owner.id != logged_in_user.id %]
72
                        </td>
62
                        <tr>
73
                        <td>
63
                            <td><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]">[% l.name | html %]</a></td>
74
                            <div class="btn-group dropup">
64
                            <td>[% l.patron_list_patrons_rs.count || 0 | html %]</td>
75
                                <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#">
65
                            <td>
76
                                   Actions <b class="caret"></b>
66
                                [% IF l.shared %]
77
                                </a>
67
                                    [% IF shared_by_other %]
78
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]">
68
                                        by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% l.owner.id | uri %]">[% INCLUDE 'patron-title.inc' patron=l.owner %]</a>
79
                                    <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li>
69
                                    [% ELSE %]
80
                                    [% UNLESS shared_by_other %]
70
                                        by you
81
                                        <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li>
82
                                        <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li>
83
                                    [% END %]
71
                                    [% END %]
84
                                    [% IF ( l.patron_list_patrons_rs.count ) %]
72
                                [% END %]
85
                                        <li class="divider"></li>
73
                            </td>
86
                                        <li>
74
                            <td>
87
                                            <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id | html %]" data-patron_list_id="[% l.patron_list_id | html %]"><i class="fa fa-print"></i> Print patron cards</a>
75
                                <div class="btn-group dropup">
88
                                        </li>
76
                                    <a class="btn btn-default btn-xs dropdown-toggle" id="listactions[% l.patron_list_id | html %]" role="button" data-toggle="dropdown" href="#">
89
                                        [% IF CAN_user_tools_edit_patrons %]
77
                                    Actions <b class="caret"></b>
90
                                            <li>
78
                                    </a>
91
                                                <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show">
79
                                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="listactions[% l.patron_list_id | html %]">
92
                                                    <i class="fa fa-pencil"></i> Batch edit patrons
80
                                        <li><a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-user"></i> Add patrons</a></li>
93
                                                </a>
81
                                        [% UNLESS shared_by_other %]
94
                                            </li>
82
                                            <li><a href="/cgi-bin/koha/patron_lists/add-modify.pl?patron_list_id=[% l.patron_list_id | uri %]"><i class="fa fa-pencil"></i> Edit list</a></li>
83
                                            <li><a class="delete_patron" href="/cgi-bin/koha/patron_lists/delete.pl?patron_list_id=[% l.patron_list_id | html %]" data-list-name="[% l.name | html %]"><i class="fa fa-trash"></i> Delete list</a></li>
95
                                        [% END %]
84
                                        [% END %]
96
                                        [% IF CAN_user_tools_delete_anonymize_patrons %]
85
                                        [% IF ( l.patron_list_patrons_rs.count ) %]
86
                                            <li class="divider"></li>
97
                                            <li>
87
                                            <li>
98
                                                <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower">
88
                                                <a class="print_cards" href="/cgi-bin/koha/patroncards/print.pl?patronlist_id=[% l.patron_list_id | html %]" data-patron_list_id="[% l.patron_list_id | html %]"><i class="fa fa-print"></i> Print patron cards</a>
99
                                                    <i class="fa fa-trash"></i> Batch delete patrons
100
                                                </a>
101
                                            </li>
89
                                            </li>
90
                                            [% IF CAN_user_tools_edit_patrons %]
91
                                                <li>
92
                                                    <a href="/cgi-bin/koha/tools/modborrowers.pl?patron_list_id=[% l.patron_list_id | uri %]&op=show">
93
                                                        <i class="fa fa-pencil"></i> Batch edit patrons
94
                                                    </a>
95
                                                </li>
96
                                            [% END %]
97
                                            [% IF CAN_user_tools_delete_anonymize_patrons %]
98
                                                <li>
99
                                                    <a href="/cgi-bin/koha/tools/cleanborrowers.pl?step=2&patron_list_id=[% l.patron_list_id | uri %]&checkbox=borrower">
100
                                                        <i class="fa fa-trash"></i> Batch delete patrons
101
                                                    </a>
102
                                                </li>
103
                                            [% END %]
102
                                        [% END %]
104
                                        [% END %]
103
                                    [% END %]
105
                                    </ul>
104
                                </ul>
106
                                </div>
105
                            </div>
107
                            </td>
106
                        </td>
108
                        </tr>
107
                    </tr>
109
                    [% END %]
108
                [% END %]
110
                </tbody>
109
            </tbody>
111
            </table>
110
        </table>
112
        </div> <!-- /.page-section -->
111
113
112
            <!-- Modal to print patron cards -->
114
            <!-- Modal to print patron cards -->
113
            <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
115
            <div class="modal" id="patronExportModal" tabindex="-1" role="dialog" aria-labelledby="patronExportModal_label" aria-hidden="true">
114
- 

Return to bug 31763