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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-2 / +5 lines)
Lines 269-276 Link Here
269
                    [% ELSIF view == 'errors' %]
269
                    [% ELSIF view == 'errors' %]
270
                        [% FOR error IN errors %]
270
                        [% FOR error IN errors %]
271
                            [% IF error == 'no_template_defined' %]
271
                            [% IF error == 'no_template_defined' %]
272
                                <div class="dialog alert">
272
                                <div class="dialog message">
273
                                    No MARC modification template is defined. You have <a href="/cgi-bin/koha/tools/marc_modification_templates.pl">to create</a> at least one template for using this tool.
273
                                    <p>No MARC modification template is defined. You have to create at least one template in order to use this tool.</p>
274
                                    [% IF ( CAN_user_tools_marc_modification_templates ) %]
275
                                        <a class="btn btn-default" href="/cgi-bin/koha/tools/marc_modification_templates.pl"><i class="fa fa-plus"></i> Create a new MARC modification template</a>
276
                                    [% END %]
274
                                </div>
277
                                </div>
275
                            [% END %]
278
                            [% END %]
276
                        [% END %]
279
                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt (-3 / +9 lines)
Lines 70-76 Link Here
70
            <div id="toolbar" class="btn-toolbar">
70
            <div id="toolbar" class="btn-toolbar">
71
                <a href="#" data-toggle="modal" data-template_id="" data-target="#createTemplate" id="new_template" class="btn btn-default duplicate_template"><i class="fa fa-plus"></i> New template</a>
71
                <a href="#" data-toggle="modal" data-template_id="" data-target="#createTemplate" id="new_template" class="btn btn-default duplicate_template"><i class="fa fa-plus"></i> New template</a>
72
                [% IF ( template_id != '' ) %]
72
                [% IF ( template_id != '' ) %]
73
                    <a href="#" id="new_action" class="btn btn-default"><i class="fa fa-plus"></i> New action</a>
73
                    <a href="#" class="btn btn-default new_action"><i class="fa fa-plus"></i> New action</a>
74
                    <a class="btn btn-default delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% template_id | html %]&amp;op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete template</a>
74
                    <a class="btn btn-default delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% template_id | html %]&amp;op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete template</a>
75
                [% END %]
75
                [% END %]
76
            </div>
76
            </div>
Lines 208-214 Link Here
208
                            </table>
208
                            </table>
209
                        </div> <!-- /.page-section -->
209
                        </div> <!-- /.page-section -->
210
                    [% ELSE %]
210
                    [% ELSE %]
211
                        <div class="dialog message template_actions"><p>There are no defined actions for this template.</p></div>
211
                        <div class="dialog message" id="no_defined_actions">
212
                            <p>There are no defined actions for this template.</p>
213
                            <p><a href="#" class="btn btn-default approve new_action"><i class="fa fa-plus" aria-hidden="true"></i> New action</a></p>
214
                        </div>
212
                    [% END # /IF ActionsLoop %]
215
                    [% END # /IF ActionsLoop %]
213
216
214
                    <form method="post" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="add_action" >
217
                    <form method="post" action="/cgi-bin/koha/tools/marc_modification_templates.pl" id="add_action" >
Lines 307-313 Link Here
307
310
308
            [% ELSE %]
311
            [% ELSE %]
309
                <h1>MARC modification templates</h1>
312
                <h1>MARC modification templates</h1>
310
                <div class="dialog message"><p>There are no defined templates. Please create a template first.</p></div>
313
                <div class="dialog message">
314
                    <p>There are no defined templates. Please create a template first.</p>
315
                    <a href="#" data-toggle="modal" data-target="#createTemplate" class="btn btn-default"><i class="fa fa-plus" aria-hidden="true"></i> Create a new template</a>
316
                </div>
311
            [% END # /IF TemplatesLoop %]
317
            [% END # /IF TemplatesLoop %]
312
318
313
            <!-- Modal to create new template -->
319
            <!-- Modal to create new template -->
(-)a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js (-2 / +7 lines)
Lines 68-76 $(document).ready(function() { Link Here
68
        updateAllEvery();
68
        updateAllEvery();
69
    });
69
    });
70
70
71
    $("#new_action").on("click",function(e){
71
    $(".new_action").on("click",function(e){
72
        e.preventDefault();
72
        e.preventDefault();
73
        cancelEditAction();
73
        cancelEditAction();
74
        $("#no_defined_actions").hide();
74
        $("#add_action").show();
75
        $("#add_action").show();
75
        $("#action").focus();
76
        $("#action").focus();
76
    });
77
    });
Lines 350-355 function cancelEditAction() { Link Here
350
351
351
    document.getElementById('modaction_legend').innerHTML = window.modaction_legend_innerhtml;
352
    document.getElementById('modaction_legend').innerHTML = window.modaction_legend_innerhtml;
352
    document.getElementById('action_submit').value = window.action_submit_value;
353
    document.getElementById('action_submit').value = window.action_submit_value;
354
355
    if( $("#template_actions").length < 1 ){
356
        $("#no_defined_actions").show();
357
    }
358
353
    $("#add_action").hide();
359
    $("#add_action").hide();
354
}
360
}
355
361
356
- 

Return to bug 32164