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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+8 lines)
Lines 3470-3475 label { Link Here
3470
.modal-body {
3470
.modal-body {
3471
    background-color: #FFF;
3471
    background-color: #FFF;
3472
    overflow-y: auto;
3472
    overflow-y: auto;
3473
3474
    fieldset,
3475
    ol {
3476
        background-color: transparent;
3477
        border: 0;
3478
        margin: 0;
3479
        padding: 0;
3480
    }
3473
}
3481
}
3474
3482
3475
.modal-content {
3483
.modal-content {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (+8 lines)
Lines 3-8 Link Here
3
<div id="toolbar" class="btn-toolbar">
3
<div id="toolbar" class="btn-toolbar">
4
    <div class="btn-group"><a id="newshelf" class="btn btn-default btn-sm" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&amp;referer=[% op | html %]"><i class="fa fa-plus"></i> New list</a></div>
4
    <div class="btn-group"><a id="newshelf" class="btn btn-default btn-sm" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=add_form&amp;referer=[% op | html %]"><i class="fa fa-plus"></i> New list</a></div>
5
5
6
    [% IF ( can_add_biblios ) %]
7
        <div class="btn-group">
8
            <button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#addToList">
9
                <i class="fa fa-plus"></i> Add items
10
            </button>
11
        </div>
12
    [% END %]
13
6
    [% IF shelf AND op == 'view' %]
14
    [% IF shelf AND op == 'view' %]
7
        [% IF can_manage_shelf %]
15
        [% IF can_manage_shelf %]
8
        <div class="btn-group">
16
        <div class="btn-group">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-40 / +46 lines)
Lines 59-74 Link Here
59
59
60
[% IF op == 'view' %]&rsaquo; Contents of <i>[% shelf.shelfname | html %]</i>[% END %][% IF op == 'add_form' %] &rsaquo; Create new list[% END %][% IF op == 'edit_form' %] &rsaquo; Edit list <i>[% shelf.shelfname | html %]</i>[% END %]</div>
60
[% IF op == 'view' %]&rsaquo; Contents of <i>[% shelf.shelfname | html %]</i>[% END %][% IF op == 'add_form' %] &rsaquo; Create new list[% END %][% IF op == 'edit_form' %] &rsaquo; Edit list <i>[% shelf.shelfname | html %]</i>[% END %]</div>
61
61
62
[% IF ( can_add_biblios ) %]
63
    <div class="main container-fluid">
64
        <div class="row">
65
            <div class="col-sm-10 col-sm-push-2">
66
[% ELSE %]
67
    <div class="main container-fluid">
62
    <div class="main container-fluid">
68
        <div class="row">
63
        <div class="row">
69
            <div class="col-md-8 col-md-offset-2">
64
            <div class="col-sm-10 col-sm-push-1">
70
[% END %]
65
                <main>
71
            <main>
72
66
73
                [% INCLUDE 'virtualshelves-toolbar.inc' %]
67
                [% INCLUDE 'virtualshelves-toolbar.inc' %]
74
68
Lines 393-430 Link Here
393
387
394
            </main>
388
            </main>
395
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
389
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
396
        [% IF ( can_add_biblios ) %]
397
            <div class="col-sm-2 col-sm-pull-10">
398
                <aside>
399
                        <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
400
                            <fieldset class="brief noprint">
401
                                <h4>Add items</h4>
402
                                <ol>
403
                                    <li>
404
                                        <label for="barcodes">Barcodes:</label>
405
                                        <textarea name="barcodes" id="barcodes" class="focus" autocomplete="off" rows="5"></textarea>
406
                                        <input type="hidden" name="op" value="add_biblio" />
407
                                        <input type="hidden" name="referer" value="view" />
408
                                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
409
                                    </li>
410
                                    <li>
411
                                        <label for="biblionumbers">Biblio numbers:</label>
412
                                        <textarea name="biblionumbers" id="biblionumbers" class="focus" autocomplete="off" rows="5"></textarea>
413
                                        <input type="hidden" name="op" value="add_biblio" />
414
                                        <input type="hidden" name="referer" value="view" />
415
                                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
416
                                    </li>
417
                                </ol>
418
                                <fieldset class="action">
419
                                    <input type="submit" value="Add" />
420
                                </fieldset>
421
                            </fieldset>
422
                        </form>
423
                </aside>
424
            </div> <!-- /.col-sm-2.col-sm-pull-10 -->
425
        [% END %]
426
    </div> <!-- /.row -->
390
    </div> <!-- /.row -->
427
391
392
[% IF ( can_add_biblios ) %]
393
    <!-- Modal -->
394
    <div class="modal" id="addToList" tabindex="-1" role="dialog" aria-labelledby="addToListLabel">
395
        <div class="modal-dialog" role="document">
396
            <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
397
                <div class="modal-content">
398
                    <div class="modal-header">
399
                        <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
400
                        <h4 class="modal-title" id="addToListLabel">Add items</h4>
401
                    </div>
402
                    <div class="modal-body">
403
                        <fieldset class="brief">
404
                        <ol>
405
                            <li>
406
                                <label for="barcodes">Barcodes:</label>
407
                                <textarea name="barcodes" id="barcodes" rows="5"></textarea>
408
                                <input type="hidden" name="op" value="add_biblio" />
409
                                <input type="hidden" name="referer" value="view" />
410
                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
411
                            </li>
412
                            <li>
413
                                <label for="biblionumbers">Biblio numbers:</label>
414
                                <textarea name="biblionumbers" id="biblionumbers" rows="5"></textarea>
415
                                <input type="hidden" name="op" value="add_biblio" />
416
                                <input type="hidden" name="referer" value="view" />
417
                                <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
418
                            </li>
419
                        </ol>
420
                        </fieldset>
421
                    </div>
422
                    <div class="modal-footer">
423
                        <button type="submit" class="btn btn-default">Save</button>
424
                        <a href="#" data-dismiss="modal" class="cancel">Cancel</a>
425
                    </div>
426
                </div>
427
            </form>
428
        </div>
429
    </div>
430
[% END %]
431
428
[% MACRO jsinclude BLOCK %]
432
[% MACRO jsinclude BLOCK %]
429
    [% INCLUDE 'datatables.inc' %]
433
    [% INCLUDE 'datatables.inc' %]
430
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
434
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
Lines 453-460 Link Here
453
                [% ELSE %]
457
                [% ELSE %]
454
                    var type = [% PRIVATE | html %];
458
                    var type = [% PRIVATE | html %];
455
                [% END %]
459
                [% END %]
456
                var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
457
460
461
                var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
458
                "aaSorting": [[ 5, "asc" ]],
462
                "aaSorting": [[ 5, "asc" ]],
459
                    'bServerSide': true,
463
                    'bServerSide': true,
460
                    'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search",
464
                    'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search",
Lines 612-617 Link Here
612
                        e.preventDefault();
616
                        e.preventDefault();
613
                    }
617
                    }
614
                });
618
                });
619
                $("#addToList").on("shown.bs.modal", function(e){
620
                    $("#barcodes").focus();
621
                });
615
            });
622
            });
616
        [% END %]
623
        [% END %]
617
624
618
- 

Return to bug 21573