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

(-)a/admin/columns_settings.yml (+35 lines)
Lines 765-767 modules: Link Here
765
          columnname: actions
765
          columnname: actions
766
          cannot_be_toggled: 1
766
          cannot_be_toggled: 1
767
          cannot_be_modified: 1
767
          cannot_be_modified: 1
768
769
    stockrotation:
770
      stock_rotation:
771
        -
772
          columnname: name
773
        -
774
          columnname: cyclical
775
        -
776
          columnname: active
777
        -
778
          columnname: description
779
        -
780
          columnname: number_of_items
781
        -
782
          columnname: actions
783
          cannot_be_toggled: 1
784
          cannot_be_modified: 1
785
786
      stock_rotation_manage_items:
787
        -
788
          columnname: barcode
789
        -
790
          columnname: title
791
        -
792
          columnname: author
793
        -
794
          columnname: call_number
795
        -
796
          columnname: in_transit
797
        -
798
          columnname: stages
799
        -
800
          columnname: actions
801
          cannot_be_toggled: 1
802
          cannot_be_modified: 1
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt (-25 / +20 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 54-67 Link Here
54
                    <h2>Stock rotation</h2>
55
                    <h2>Stock rotation</h2>
55
56
56
                    [% IF existing_rotas.size > 0 %]
57
                    [% IF existing_rotas.size > 0 %]
57
                        <table class="rotas_table" role="grid">
58
                        <table id="stock_rotation" class="rotas_table" role="grid">
58
                            <thead>
59
                            <thead>
59
                                <th>Name</th>
60
                                <th class="anti-the">Name</th>
60
                                <th>Cyclical</th>
61
                                <th>Cyclical</th>
61
                                <th>Active</th>
62
                                <th>Active</th>
62
                                <th>Description</th>
63
                                <th>Description</th>
63
                                <th>Number of items</th>
64
                                <th>Number of items</th>
64
                                <th>&nbsp;</th>
65
                                <th class="NoSort">&nbsp;</th>
65
                            </thead>
66
                            </thead>
66
                            <tbody>
67
                            <tbody>
67
                                [% FOREACH rota IN existing_rotas %]
68
                                [% FOREACH rota IN existing_rotas %]
Lines 76-87 Link Here
76
                                                <i class="fa fa-pencil"></i>
77
                                                <i class="fa fa-pencil"></i>
77
                                                Edit
78
                                                Edit
78
                                            </a>
79
                                            </a>
79
                                            <div class="btn-group" role="group">
80
                                            <div class="btn-group dropup" role="group">
80
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
81
                                                <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
81
                                                    Manage
82
                                                    Manage
82
                                                    <i class="fa fa-caret-down"></i>
83
                                                    <i class="fa fa-caret-down"></i>
83
                                                </button>
84
                                                </button>
84
                                                <ul class="dropdown-menu">
85
                                                <ul class="dropdown-menu pull-right">
85
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
86
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
86
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
87
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
87
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
88
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
Lines 360-374 Link Here
360
361
361
                    [% IF items.count > 0 %]
362
                    [% IF items.count > 0 %]
362
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
363
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
363
                        <table id="sr_manage_items" class="items_table" role="grid">
364
                        <table id="stock_rotation_manage_items" class="items_table" role="grid">
364
                            <thead>
365
                            <thead>
365
                                <th>Barcode</th>
366
                                <tr>
366
                                <th>Title</th>
367
                                    <th>Barcode</th>
367
                                <th>Author</th>
368
                                    <th>Title</th>
368
                                <th>Callnumber</th>
369
                                    <th>Author</th>
369
                                <th class="NoSearch">In transit</th>
370
                                    <th>Call number</th>
370
                                <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
371
                                    <th class="NoSearch">In transit</th>
371
                                <th class="NoSort">&nbsp;</th>
372
                                    <th class="NoSort">Stages &amp; duration in days<br>(current stage highlighted)</th>
373
                                    <th class="NoSort">&nbsp;</th>
374
                                </tr>
372
                            </thead>
375
                            </thead>
373
                            <tbody>
376
                            <tbody>
374
                                [% FOREACH item IN items %]
377
                                [% FOREACH item IN items %]
Lines 497-519 Link Here
497
            [% INCLUDE 'tools-menu.inc' %]
500
            [% INCLUDE 'tools-menu.inc' %]
498
        </div>
501
        </div>
499
    </div>
502
    </div>
500
</div>
501
503
502
[% MACRO jsinclude BLOCK %]
504
[% MACRO jsinclude BLOCK %]
503
    [% Asset.js("js/tools-menu.js") | $raw %]
505
    [% Asset.js("js/tools-menu.js") | $raw %]
504
    [% INCLUDE 'datatables.inc' %]
506
    [% INCLUDE 'datatables.inc' %]
507
    [% INCLUDE 'columns_settings.inc' %]
505
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
508
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
506
    <script type="text/javascript">
509
    <script>
507
    $(document).ready(function() {
510
        var stock_rotation_items_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
508
        $('#sr_manage_items').dataTable($.extend(true, {}, dataTablesDefaults, {
511
        var stock_rotation_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
509
            "autoWidth": false,
510
            "aoColumnDefs": [
511
                { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
512
                { "bSortable": true, "bSearchable": false, 'aTargets': [ 'NoSearch' ] }
513
            ],
514
            "sPaginationType": "four_button"
515
        }));
516
    });
517
    </script>
512
    </script>
518
[% END %]
513
[% END %]
519
514
(-)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]
86
    }, stock_rotation_columns_settings);
87
65
});
88
});
66
- 

Return to bug 22175