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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt (-45 / +49 lines)
Lines 254-260 Link Here
254
            >
254
            >
255
        </div>
255
        </div>
256
        <h1>Basket grouping for <a href="/cgi-bin/koha/acquisition/vendors/[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
256
        <h1>Basket grouping for <a href="/cgi-bin/koha/acquisition/vendors/[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
257
        [% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
257
        [% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]<div class="alert alert-warning">No EDIFACT configuration for [% booksellername | html %]</div>[% END %]
258
258
259
        [% WRAPPER tabs id= "basket_groups" %]
259
        [% WRAPPER tabs id= "basket_groups" %]
260
            [% WRAPPER tabs_nav %]
260
            [% WRAPPER tabs_nav %]
Lines 289-308 Link Here
289
                                        <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
289
                                        <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
290
                                        <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
290
                                        <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
291
                                        <td>[% basketgroup.basketsqty | html %]</td>
291
                                        <td>[% basketgroup.basketsqty | html %]</td>
292
                                        <td>
292
                                        <td class="actions">
293
                                            <input type="button" id="close_and_print" data-basketgroupid="[% basketgroup.id | html %]" value="Close and export as PDF" />
293
                                            <button type="button" class="btn btn-default btn-xs close_and_print" data-basketgroupid="[% basketgroup.id | html %]"
294
                                                ><i class="fa fa-file-export" aria-hidden="true"></i> Close and export PDF</button
295
                                            >
294
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get">
296
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get">
295
                                                <input type="hidden" name="op" value="add_form" />
297
                                                <input type="hidden" name="op" value="add_form" />
296
                                                <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
298
                                                <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
297
                                                <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
299
                                                <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
298
                                                <input type="submit" class="btn btn-primary" value="Edit" />
300
                                                <button type="submit" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</button>
299
                                            </form>
301
                                            </form>
300
                                            [% UNLESS basketgroup.basketsqty %]
302
                                            [% UNLESS basketgroup.basketsqty %]
301
                                                <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
303
                                                <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
302
                                                    <input type="hidden" name="op" value="cud-delete" />
304
                                                    <input type="hidden" name="op" value="cud-delete" />
303
                                                    <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
305
                                                    <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
304
                                                    <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
306
                                                    <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
305
                                                    <input type="submit" id="delete_basketgroup" class="btn btn-primary" value="Delete" />
307
                                                    <button type="submit" class="btn btn-default btn-xs delete_basketgroup"><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</button>
306
                                                    [% INCLUDE 'csrf-token.inc' %]
308
                                                    [% INCLUDE 'csrf-token.inc' %]
307
                                                </form>
309
                                                </form>
308
                                            [% END %]
310
                                            [% END %]
Lines 331-385 Link Here
331
                                [% IF ( basketgroup.closed ) %]
333
                                [% IF ( basketgroup.closed ) %]
332
                                    <tr>
334
                                    <tr>
333
                                        <td>
335
                                        <td>
334
                                            [% IF ( basketgroup.name ) %]
336
                                            <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add_form&booksellerid=[% basketgroup.booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]">
335
                                                [% basketgroup.name | html %]
337
                                                [% IF ( basketgroup.name ) %]
336
                                            [% ELSE %]
338
                                                    [% basketgroup.name | html %]
337
                                                <span>Basket group no. [% basketgroup.id | html %]</span>
339
                                                [% ELSE %]
338
                                            [% END %]
340
                                                    <span>Basket group no. [% basketgroup.id | html %]</span>
341
                                                [% END %]
342
                                            </a>
339
                                        </td>
343
                                        </td>
340
                                        <td>[% basketgroup.id | html %]</td>
344
                                        <td>[% basketgroup.id | html %]</td>
341
                                        <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
345
                                        <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
342
                                        <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
346
                                        <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
343
                                        <td>[% basketgroup.basketsqty | html %]</td>
347
                                        <td>[% basketgroup.basketsqty | html %]</td>
344
                                        <td>
348
                                        <td class="actions">
345
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"
349
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
346
                                                ><input type="hidden" name="op" value="add_form" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input
350
                                                <input type="hidden" name="op" value="cud-reopen" />
347
                                                    type="hidden"
351
                                                <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
348
                                                    name="basketgroupid"
352
                                                <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
349
                                                    value="[% basketgroup.id | html %]" /><input type="submit" class="btn btn-primary" value="View"
353
                                                <button type="submit" class="btn btn-xs btn-default"><i class="fa fa-rotate-left" aria-hidden="true"></i> Reopen</button>
350
                                            /></form>
351
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"
352
                                                ><input type="hidden" name="op" value="cud-reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input
353
                                                    type="hidden"
354
                                                    name="basketgroupid"
355
                                                    value="[% basketgroup.id | html %]"
356
                                                /><input type="submit" class="btn btn-primary" value="Reopen" />
357
                                                [% INCLUDE 'csrf-token.inc' %]
354
                                                [% INCLUDE 'csrf-token.inc' %]
358
                                            </form>
355
                                            </form>
359
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"
356
                                            <div class="btn-group">
360
                                                ><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input
357
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa fa-file-export"></i> Export</button>
361
                                                    type="submit"
358
                                                <ul class="dropdown-menu">
362
                                                    class="btn btn-primary"
359
                                                    <li>
363
                                                    value="Export as PDF"
360
                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get">
364
                                            /></form>
361
                                                            <input type="hidden" name="op" value="export" />
365
                                            <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"
362
                                                            <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
366
                                                ><input type="hidden" name="op" value="export" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input
363
                                                            <button type="submit" class="dropdown-item">Export as CSV</button>
367
                                                    type="submit"
364
                                                        </form>
368
                                                    class="btn btn-primary"
365
                                                    </li>
369
                                                    value="Export as CSV"
366
                                                    <li>
370
                                            /></form>
367
                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get">
368
                                                            <input type="hidden" name="op" value="print" />
369
                                                            <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
370
                                                            <button type="submit" class="dropdown-item">Export PDF</button>
371
                                                        </form>
372
                                                    </li>
373
                                                </ul>
374
                                            </div>
371
                                            [% IF Koha.Preference('EDIFACT') %]
375
                                            [% IF Koha.Preference('EDIFACT') %]
372
                                                [% IF (ediaccount) %]
376
                                                [% IF (ediaccount) %]
373
                                                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"
377
                                                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
374
                                                        ><input type="hidden" name="op" value="cud-ediprint" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input
378
                                                        <input type="hidden" name="op" value="cud-ediprint" />
375
                                                            type="hidden"
379
                                                        <input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" />
376
                                                            name="booksellerid"
380
                                                        <input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" />
377
                                                            value="[% basketgroup.booksellerid | html %]"
381
                                                        <button type="submit" class="btn btn-xs btn-default"><i class="fa fa-bolt" aria-hidden="true"></i> Generate EDIFACT order</button>
378
                                                        /><input type="submit" class="btn btn-primary" value="Generate EDIFACT order" />
379
                                                        [% INCLUDE 'csrf-token.inc' %]
382
                                                        [% INCLUDE 'csrf-token.inc' %]
380
                                                    </form>
383
                                                    </form>
381
                                                [% ELSE %]
384
                                                [% ELSE %]
382
                                                    <div>No EDIFACT configuration for [% booksellername | html %]</div>
385
                                                    <span data-bs-toggle="tooltip" title="No EDIFACT configuration for [% booksellername | html %]"
386
                                                        ><button type="button" class="btn btn-xs btn-default disabled" disabled><i class="fa fa-bolt" aria-hidden="true"></i> Generate EDIFACT order</button></span
387
                                                    >
383
                                                [% END %]
388
                                                [% END %]
384
                                            [% END %]
389
                                            [% END %]
385
                                        </td>
390
                                        </td>
Lines 471-477 Link Here
471
                }
476
                }
472
            });
477
            });
473
478
474
            $("#close_and_print").on("click", function(e){
479
            $(".close_and_print").on("click", function(e){
475
                e.preventDefault();
480
                e.preventDefault();
476
                const basketgroupid = $(this).data("basketgroupid");
481
                const basketgroupid = $(this).data("basketgroupid");
477
                closeandprint( basketgroupid );
482
                closeandprint( basketgroupid );
Lines 482-488 Link Here
482
                submitForm(this);
487
                submitForm(this);
483
            });
488
            });
484
489
485
            $("#delete_basketgroup").on("click", function(e){
490
            $(".delete_basketgroup").on("click", function(e){
486
                return confirm(_("Are you sure you want to delete this basket group?"));
491
                return confirm(_("Are you sure you want to delete this basket group?"));
487
            });
492
            });
488
        });
493
        });
489
- 

Return to bug 41803