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

(-)a/admin/columns_settings.yml (+35 lines)
Lines 967-969 modules: Link Here
967
          columnname: actions
967
          columnname: actions
968
          cannot_be_toggled: 1
968
          cannot_be_toggled: 1
969
          cannot_be_modified: 1
969
          cannot_be_modified: 1
970
971
    stockrotation:
972
      stock_rotation:
973
        -
974
          columnname: name
975
        -
976
          columnname: cyclical
977
        -
978
          columnname: active
979
        -
980
          columnname: description
981
        -
982
          columnname: number_of_items
983
        -
984
          columnname: actions
985
          cannot_be_toggled: 1
986
          cannot_be_modified: 1
987
988
      stock_rotation_manage_items:
989
        -
990
          columnname: barcode
991
        -
992
          columnname: title
993
        -
994
          columnname: author
995
        -
996
          columnname: call_number
997
        -
998
          columnname: in_transit
999
        -
1000
          columnname: stages
1001
        -
1002
          columnname: actions
1003
          cannot_be_toggled: 1
1004
          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 55-69 Link Here
55
                    <h2>Stock rotation</h2>
56
                    <h2>Stock rotation</h2>
56
57
57
                    [% IF existing_rotas.size > 0 %]
58
                    [% IF existing_rotas.size > 0 %]
58
                        <table class="rotas_table" role="grid">
59
                        <table id="stock_rotation" class="rotas_table" role="grid">
59
                            <thead>
60
                            <thead>
60
                                <tr>
61
                                <tr>
61
                                <th>Name</th>
62
                                <th class="anti-the">Name</th>
62
                                <th>Cyclical</th>
63
                                <th>Cyclical</th>
63
                                <th>Active</th>
64
                                <th>Active</th>
64
                                <th>Description</th>
65
                                <th>Description</th>
65
                                <th>Number of items</th>
66
                                <th>Number of items</th>
66
                                <th>&nbsp;</th>
67
                                <th class="NoSort">&nbsp;</th>
67
                                </tr>
68
                                </tr>
68
                            </thead>
69
                            </thead>
69
                            <tbody>
70
                            <tbody>
Lines 79-90 Link Here
79
                                                <i class="fa fa-pencil"></i>
80
                                                <i class="fa fa-pencil"></i>
80
                                                Edit
81
                                                Edit
81
                                            </a>
82
                                            </a>
82
                                            <div class="btn-group" role="group">
83
                                            <div class="btn-group dropup" role="group">
83
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
84
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
84
                                                    Manage
85
                                                    Manage
85
                                                    <i class="fa fa-caret-down"></i>
86
                                                    <i class="fa fa-caret-down"></i>
86
                                                </button>
87
                                                </button>
87
                                                <ul class="dropdown-menu">
88
                                                <ul class="dropdown-menu pull-right">
88
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
89
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
89
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
90
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
90
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
91
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
Lines 363-378 Link Here
363
364
364
                    [% IF items.count > 0 %]
365
                    [% IF items.count > 0 %]
365
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
366
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
366
                        <table id="sr_manage_items" class="items_table" role="grid">
367
                        <table id="stock_rotation_manage_items" class="items_table" role="grid">
367
                            <thead>
368
                            <thead>
368
                                <tr>
369
                                <tr>
369
                                <th>Barcode</th>
370
                                    <th>Barcode</th>
370
                                <th>Title</th>
371
                                    <th>Title</th>
371
                                <th>Author</th>
372
                                    <th>Author</th>
372
                                <th>Callnumber</th>
373
                                    <th>Call number</th>
373
                                <th class="NoSearch">In transit</th>
374
                                    <th class="NoSearch">In transit</th>
374
                                <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
375
                                    <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
375
                                <th class="NoSort">&nbsp;</th>
376
                                    <th class="NoSort">&nbsp;</th>
376
                                </tr>
377
                                </tr>
377
                            </thead>
378
                            </thead>
378
                            <tbody>
379
                            <tbody>
Lines 497-502 Link Here
497
498
498
                [% END %]
499
                [% END %]
499
            </div>
500
            </div>
501
500
            </main>
502
            </main>
501
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
503
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
502
504
Lines 507-528 Link Here
507
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
509
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
508
    </div> <!-- /.row -->
510
    </div> <!-- /.row -->
509
511
510
511
[% MACRO jsinclude BLOCK %]
512
[% MACRO jsinclude BLOCK %]
512
    [% Asset.js("js/tools-menu.js") | $raw %]
513
    [% Asset.js("js/tools-menu.js") | $raw %]
513
    [% INCLUDE 'datatables.inc' %]
514
    [% INCLUDE 'datatables.inc' %]
515
    [% INCLUDE 'columns_settings.inc' %]
514
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
516
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
515
    <script>
517
    <script>
516
        $(document).ready(function() {
518
        var stock_rotation_items_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
517
            $('#sr_manage_items').dataTable($.extend(true, {}, dataTablesDefaults, {
519
        var stock_rotation_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
518
                "autoWidth": false,
519
                "aoColumnDefs": [
520
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
521
                    { "bSortable": true, "bSearchable": false, 'aTargets': [ 'NoSearch' ] }
522
                ],
523
                "sPaginationType": "four_button"
524
            }));
525
        });
526
    </script>
520
    </script>
527
[% END %]
521
[% END %]
528
522
(-)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