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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-70 / +71 lines)
Lines 198-274 Link Here
198
                    [% END %]
198
                    [% END %]
199
199
200
                    [% IF letter %]
200
                    [% IF letter %]
201
                        <table id="lettert">
201
                        <div class="page-section">
202
                            <thead>
202
                            <table id="lettert">
203
                                <tr>
203
                                <thead>
204
                                    <th>Library</th>
205
                                    <th>Module</th>
206
                                    <th>Code</th>
207
                                    <th>Name</th>
208
                                    <th>Last updated</th>
209
                                    <th class="NoSort noExport">Copy notice</th>
210
                                    <th class="NoSort noExport">Actions</th>
211
                                </tr>
212
                            </thead>
213
                            <tbody>
214
                                [% FOREACH lette IN letter %]
215
                                    [% can_edit = lette.branchcode || !independant_branch %]
216
                                    <tr>
204
                                    <tr>
217
                                        <td>
205
                                        <th>Library</th>
218
                                            [% IF lette.branchname %]
206
                                        <th>Module</th>
219
                                                [% lette.branchname | html %]
207
                                        <th>Code</th>
220
                                            [% ELSE %]
208
                                        <th>Name</th>
221
                                                <span>(All libraries)</span>
209
                                        <th>Last updated</th>
222
                                            [% END %]
210
                                        <th class="NoSort noExport">Copy notice</th>
223
                                        </td>
211
                                        <th class="NoSort noExport">Actions</th>
224
                                        <td>
225
                                            [% SWITCH lette.module %]
226
                                                [% CASE 'acquisition' %]<span>Acquisition</span>
227
                                                [% CASE 'catalogue' %]<span>Catalog</span>
228
                                                [% CASE 'circulation' %]<span>Circulation</span>
229
                                                [% CASE 'orderacquisition' %]<span>Order acquisition</span>
230
                                                [% CASE 'claimacquisition' %]<span>Claim acquisition</span>
231
                                                [% CASE 'claimissues' %]<span>Claim serial issue</span>
232
                                                [% CASE 'reserves' %]<span>Holds</span>
233
                                                [% CASE 'ill' %]<span>Interlibrary loans</span>
234
                                                [% CASE 'members' %]<span>Patrons</span>
235
                                                [% CASE 'serial' %]<span>Serials (new issue)</span>
236
                                                [% CASE 'suggestions' %]<span>Suggestions</span>
237
                                                [% CASE 'pos' %]<span>Point of sale</span>
238
                                                [% CASE %]<span>[% lette.module | html %]</span>
239
                                            [% END %]
240
                                        </td>
241
                                        <td>[% lette.code | html %]</td>
242
                                        <td>[% lette.name | html %]</td>
243
                                        <td data-order="[% lette.updated_on | html %]">[% lette.updated_on | $KohaDates with_hours = 1 %]</td>
244
                                        <td class="actions">
245
                                            [% IF !independant_branch || !lette.branchcode %]
246
                                                <form method="post" action="/cgi-bin/koha/tools/letter.pl">
247
                                                    <input type="hidden" name="op" value="copy_form" />
248
                                                    <input type="hidden" name="oldbranchcode" value="[% lette.branchcode | html %]" />
249
                                                    <input type="hidden" name="module" value="[% lette.module | html %]" />
250
                                                    <input type="hidden" name="code" value="[% lette.code | html %]" />
251
                                                    [% IF independant_branch %]
252
                                                        <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
253
                                                    [% ELSE %]
254
                                                        [% select_for_copy | $raw %]
255
                                                    [% END %]
256
                                                    <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
257
                                                </form>
258
                                            [% END # /IF !independent_branch %]
259
                                        </td>
260
                                        <td class="actions">
261
                                            [% IF can_edit %]
262
                                                <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-pencil"></i> Edit</a>
263
                                            [% END %]
264
                                            [% IF !lette.protected && can_edit %]
265
                                                <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-trash"></i> Delete</a>
266
                                            [% END %]
267
                                        </td>
268
                                    </tr>
212
                                    </tr>
269
                                [% END # /FOREACH lette %]
213
                                </thead>
270
                            </tbody>
214
                                <tbody>
271
                        </table> <!-- /#lettert -->
215
                                    [% FOREACH lette IN letter %]
216
                                        [% can_edit = lette.branchcode || !independant_branch %]
217
                                        <tr>
218
                                            <td>
219
                                                [% IF lette.branchname %]
220
                                                    [% lette.branchname | html %]
221
                                                [% ELSE %]
222
                                                    <span>(All libraries)</span>
223
                                                [% END %]
224
                                            </td>
225
                                            <td>
226
                                                [% SWITCH lette.module %]
227
                                                    [% CASE 'acquisition' %]<span>Acquisition</span>
228
                                                    [% CASE 'catalogue' %]<span>Catalog</span>
229
                                                    [% CASE 'circulation' %]<span>Circulation</span>
230
                                                    [% CASE 'orderacquisition' %]<span>Order acquisition</span>
231
                                                    [% CASE 'claimacquisition' %]<span>Claim acquisition</span>
232
                                                    [% CASE 'claimissues' %]<span>Claim serial issue</span>
233
                                                    [% CASE 'reserves' %]<span>Holds</span>
234
                                                    [% CASE 'ill' %]<span>Interlibrary loans</span>
235
                                                    [% CASE 'members' %]<span>Patrons</span>
236
                                                    [% CASE 'serial' %]<span>Serials (new issue)</span>
237
                                                    [% CASE 'suggestions' %]<span>Suggestions</span>
238
                                                    [% CASE 'pos' %]<span>Point of sale</span>
239
                                                    [% CASE %]<span>[% lette.module | html %]</span>
240
                                                [% END %]
241
                                            </td>
242
                                            <td>[% lette.code | html %]</td>
243
                                            <td>[% lette.name | html %]</td>
244
                                            <td data-order="[% lette.updated_on | html %]">[% lette.updated_on | $KohaDates with_hours = 1 %]</td>
245
                                            <td class="actions">
246
                                                [% IF !independant_branch || !lette.branchcode %]
247
                                                    <form method="post" action="/cgi-bin/koha/tools/letter.pl">
248
                                                        <input type="hidden" name="op" value="copy_form" />
249
                                                        <input type="hidden" name="oldbranchcode" value="[% lette.branchcode | html %]" />
250
                                                        <input type="hidden" name="module" value="[% lette.module | html %]" />
251
                                                        <input type="hidden" name="code" value="[% lette.code | html %]" />
252
                                                        [% IF independant_branch %]
253
                                                            <input type="hidden" name="branchcode" value="[% independant_branch | html %]" />
254
                                                        [% ELSE %]
255
                                                            [% select_for_copy | $raw %]
256
                                                        [% END %]
257
                                                        <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
258
                                                    </form>
259
                                                [% END # /IF !independent_branch %]
260
                                            </td>
261
                                            <td class="actions">
262
                                                [% IF can_edit %]
263
                                                    <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-pencil"></i> Edit</a>
264
                                                [% END %]
265
                                                [% IF !lette.protected && can_edit %]
266
                                                    <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;branchcode=[% lette.branchcode | html %]&amp;module=[% lette.module | html %]&amp;code=[% lette.code | html %]"><i class="fa fa-trash"></i> Delete</a>
267
                                                [% END %]
268
                                            </td>
269
                                        </tr>
270
                                    [% END # /FOREACH lette %]
271
                                </tbody>
272
                            </table> <!-- /#lettert -->
273
                        </div><!-- /.page-section -->
272
                    [% ELSE # IF lette %]
274
                    [% ELSE # IF lette %]
273
                        <div class="dialog message">
275
                        <div class="dialog message">
274
                            [% IF ( branchcode ) %]
276
                            [% IF ( branchcode ) %]
275
- 

Return to bug 31766