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

(-)a/admin/columns_settings.yml (+12 lines)
Lines 1525-1530 modules: Link Here
1525
              columnname: info
1525
              columnname: info
1526
            -
1526
            -
1527
              columnname: interface
1527
              columnname: interface
1528
    marc-modification-templates:
1529
      templatest:
1530
        columns:
1531
            -
1532
              columnname: id
1533
              is_hidden: 1
1534
            -
1535
              columnname: template
1536
            -
1537
              columnname: actions
1538
              cannot_be_toggled: 1
1539
              cannot_be_modified: 1
1528
    notices:
1540
    notices:
1529
      lettert:
1541
      lettert:
1530
        columns:
1542
        columns:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt (-2 / +8 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE JSON.Escape %]
2
[% USE JSON.Escape %]
3
[% USE Asset %]
3
[% USE Asset %]
4
[% USE TablesSettings %]
4
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>MARC modification templates &rsaquo; Tools &rsaquo; Koha</title>
7
<title>MARC modification templates &rsaquo; Tools &rsaquo; Koha</title>
Lines 86-98 Link Here
86
                    <table id="templatest">
87
                    <table id="templatest">
87
                        <thead>
88
                        <thead>
88
                            <tr>
89
                            <tr>
90
                                <th>Id</th>
89
                                <th>Template</th>
91
                                <th>Template</th>
90
                                <th class="noExport">Actions</th>
92
                                <th class="NoSort noExport">Actions</th>
91
                            </tr>
93
                            </tr>
92
                        </thead>
94
                        </thead>
93
                        <tbody>
95
                        <tbody>
94
                            [% FOREACH TemplatesLoo IN TemplatesLoop %]
96
                            [% FOREACH TemplatesLoo IN TemplatesLoop %]
95
                                <tr>
97
                                <tr>
98
                                    <td>[% TemplatesLoo.template_id | html %]</td>
96
                                    <td>[% TemplatesLoo.name | html %]</td>
99
                                    <td>[% TemplatesLoo.name | html %]</td>
97
                                    <td class="actions">
100
                                    <td class="actions">
98
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&amp;op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a>
101
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&amp;op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a>
Lines 352-363 Link Here
352
355
353
[% MACRO jsinclude BLOCK %]
356
[% MACRO jsinclude BLOCK %]
354
    [% Asset.js("js/tools-menu.js") | $raw %]
357
    [% Asset.js("js/tools-menu.js") | $raw %]
355
    [% Asset.js("js/marc_modification_templates.js") | $raw %]
358
    [% INCLUDE 'datatables.inc' %]
359
    [% INCLUDE 'columns_settings.inc' %]
356
    <script>
360
    <script>
361
        columns_settings = [% TablesSettings.GetColumns('tools', 'marc-modification-templates', 'templatest', 'json') | $raw %];
357
        [% IF ActionsLoop %]
362
        [% IF ActionsLoop %]
358
            var mmtas = [% ActionsLoop.json | $raw %]
363
            var mmtas = [% ActionsLoop.json | $raw %]
359
        [% END %]
364
        [% END %]
360
    </script>
365
    </script>
366
    [% Asset.js("js/marc_modification_templates.js") | $raw %]
361
[% END %]
367
[% END %]
362
368
363
[% INCLUDE 'intranet-bottom.inc' %]
369
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js (-3 / +6 lines)
Lines 1-4 Link Here
1
/* global __ */
1
/* global __ KohaTable columns_settings */
2
$(document).ready(function() {
2
$(document).ready(function() {
3
    window.modaction_legend_innerhtml = $("#modaction_legend").text();
3
    window.modaction_legend_innerhtml = $("#modaction_legend").text();
4
    window.action_submit_value = $("#action_submit").val();
4
    window.action_submit_value = $("#action_submit").val();
Lines 49-55 $(document).ready(function() { Link Here
49
            }
49
            }
50
            if ( $("#conditional_comparison").val() == '' ) {
50
            if ( $("#conditional_comparison").val() == '' ) {
51
                alert( __("The conditional comparison operator should be filled.") );
51
                alert( __("The conditional comparison operator should be filled.") );
52
                return false
52
                return false;
53
            }
53
            }
54
            if ( $("#conditional_value").val() == '' &&
54
            if ( $("#conditional_value").val() == '' &&
55
                 ( $("#conditional_comparison").val() == 'equals' || $("#conditional_comparison").val() == 'not_equals' ) ) {
55
                 ( $("#conditional_comparison").val() == 'equals' || $("#conditional_comparison").val() == 'not_equals' ) ) {
Lines 108-113 $(document).ready(function() { Link Here
108
        editAction( mmta[0] );
108
        editAction( mmta[0] );
109
        updateAllEvery();
109
        updateAllEvery();
110
    });
110
    });
111
112
    KohaTable("templatest", {
113
    }, columns_settings);
114
111
});
115
});
112
116
113
function updateAllEvery(){
117
function updateAllEvery(){
114
- 

Return to bug 28418