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

(-)a/admin/columns_settings.yml (+35 lines)
Lines 858-860 modules: Link Here
858
          columnname: actions
858
          columnname: actions
859
          cannot_be_toggled: 1
859
          cannot_be_toggled: 1
860
          cannot_be_modified: 1
860
          cannot_be_modified: 1
861
862
    stockrotation:
863
      stock_rotation:
864
        -
865
          columnname: name
866
        -
867
          columnname: cyclical
868
        -
869
          columnname: active
870
        -
871
          columnname: description
872
        -
873
          columnname: number_of_items
874
        -
875
          columnname: actions
876
          cannot_be_toggled: 1
877
          cannot_be_modified: 1
878
879
      stock_rotation_manage_items:
880
        -
881
          columnname: barcode
882
        -
883
          columnname: title
884
        -
885
          columnname: author
886
        -
887
          columnname: call_number
888
        -
889
          columnname: in_transit
890
        -
891
          columnname: stages
892
        -
893
          columnname: actions
894
          cannot_be_toggled: 1
895
          cannot_be_modified: 1
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt (-24 / +18 lines)
Lines 3-8 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE ColumnsSettings %]
6
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
<title>Koha &rsaquo; Stock rotation</title>
9
<title>Koha &rsaquo; Stock rotation</title>
Lines 56-70 Link Here
56
                    <h2>Stock rotation</h2>
57
                    <h2>Stock rotation</h2>
57
58
58
                    [% IF existing_rotas.size > 0 %]
59
                    [% IF existing_rotas.size > 0 %]
59
                        <table class="rotas_table" role="grid">
60
                        <table id="stock_rotation" class="rotas_table" role="grid">
60
                            <thead>
61
                            <thead>
61
                                <tr>
62
                                <tr>
62
                                <th>Name</th>
63
                                <th class="anti-the">Name</th>
63
                                <th>Cyclical</th>
64
                                <th>Cyclical</th>
64
                                <th>Active</th>
65
                                <th>Active</th>
65
                                <th>Description</th>
66
                                <th>Description</th>
66
                                <th>Number of items</th>
67
                                <th>Number of items</th>
67
                                <th>&nbsp;</th>
68
                                <th class="NoSort">&nbsp;</th>
68
                                </tr>
69
                                </tr>
69
                            </thead>
70
                            </thead>
70
                            <tbody>
71
                            <tbody>
Lines 80-91 Link Here
80
                                                <i class="fa fa-pencil"></i>
81
                                                <i class="fa fa-pencil"></i>
81
                                                Edit
82
                                                Edit
82
                                            </a>
83
                                            </a>
83
                                            <div class="btn-group" role="group">
84
                                            <div class="btn-group dropup" role="group">
84
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
85
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
85
                                                    Manage
86
                                                    Manage
86
                                                    <i class="fa fa-caret-down"></i>
87
                                                    <i class="fa fa-caret-down"></i>
87
                                                </button>
88
                                                </button>
88
                                                <ul class="dropdown-menu">
89
                                                <ul class="dropdown-menu pull-right">
89
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
90
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
90
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
91
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
91
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
92
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
Lines 364-379 Link Here
364
365
365
                    [% IF items.count > 0 %]
366
                    [% IF items.count > 0 %]
366
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
367
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
367
                        <table id="sr_manage_items" class="items_table" role="grid">
368
                        <table id="stock_rotation_manage_items" class="items_table" role="grid">
368
                            <thead>
369
                            <thead>
369
                                <tr>
370
                                <tr>
370
                                <th>Barcode</th>
371
                                    <th>Barcode</th>
371
                                <th>Title</th>
372
                                    <th>Title</th>
372
                                <th>Author</th>
373
                                    <th>Author</th>
373
                                <th>Callnumber</th>
374
                                    <th>Call number</th>
374
                                <th class="NoSearch">In transit</th>
375
                                    <th class="NoSearch">In transit</th>
375
                                <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
376
                                    <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
376
                                <th class="NoSort">&nbsp;</th>
377
                                    <th class="NoSort">&nbsp;</th>
377
                                </tr>
378
                                </tr>
378
                            </thead>
379
                            </thead>
379
                            <tbody>
380
                            <tbody>
Lines 498-503 Link Here
498
499
499
                [% END %]
500
                [% END %]
500
            </div>
501
            </div>
502
501
            </main>
503
            </main>
502
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
504
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
503
505
Lines 508-529 Link Here
508
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
510
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
509
    </div> <!-- /.row -->
511
    </div> <!-- /.row -->
510
512
511
512
[% MACRO jsinclude BLOCK %]
513
[% MACRO jsinclude BLOCK %]
513
    [% Asset.js("js/tools-menu.js") | $raw %]
514
    [% Asset.js("js/tools-menu.js") | $raw %]
514
    [% INCLUDE 'datatables.inc' %]
515
    [% INCLUDE 'datatables.inc' %]
516
    [% INCLUDE 'columns_settings.inc' %]
515
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
517
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
516
    <script>
518
    <script>
517
        $(document).ready(function() {
519
        var stock_rotation_items_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
518
            $('#sr_manage_items').dataTable($.extend(true, {}, dataTablesDefaults, {
520
        var stock_rotation_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
519
                "autoWidth": false,
520
                "aoColumnDefs": [
521
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
522
                    { "bSortable": true, "bSearchable": false, 'aTargets': [ 'NoSearch' ] }
523
                ],
524
                "sPaginationType": "four_button"
525
            }));
526
        });
527
    </script>
521
    </script>
528
[% END %]
522
[% END %]
529
523
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js (-1 / +23 lines)
Lines 1-3 Link Here
1
/* global KohaTable columns_settings */
2
1
function init() {
3
function init() {
2
    $('#ajax_status').hide();
4
    $('#ajax_status').hide();
3
    $('#ajax_saving_msg').hide();
5
    $('#ajax_saving_msg').hide();
Lines 62-65 $(document).ready(function() { Link Here
62
            })
64
            })
63
        }
65
        }
64
    });
66
    });
67
68
    KohaTable("stock_rotation_manage_items", {
69
        "aoColumnDefs": [
70
            { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
71
            { "sType": "anti-the", "aTargets": [ "anti-the" ] }
72
        ],
73
        "sPaginationType": "four_button",
74
        "autoWidth": false,
75
        "exportColumns": [0,1,2,3,4,5]
76
    }, stock_rotation_items_columns_settings);
77
78
    KohaTable("stock_rotation", {
79
        "aoColumnDefs": [
80
            { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
81
            { "sType": "anti-the", "aTargets": [ "anti-the" ] }
82
        ],
83
        "sPaginationType": "four_button",
84
        "autoWidth": false,
85
        "exportColumns": [0,1,2,3,4]
86
    }, stock_rotation_columns_settings);
87
65
});
88
});
66
- 

Return to bug 22175