Bugzilla – Attachment 121328 Details for
Bug 28418
Show template_id of MARC modification templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28418: Show template_id of MARC modification templates
Bug-28418-Show-templateid-of-MARC-modification-tem.patch (text/plain), 5.43 KB, created by
Katrin Fischer
on 2021-05-24 13:36:48 UTC
(
hide
)
Description:
Bug 28418: Show template_id of MARC modification templates
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-05-24 13:36:48 UTC
Size:
5.43 KB
patch
obsolete
>From cf6c7bdc60ba1c25ecaf676aa83e1cc1b35fe660 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 May 2021 18:10:14 +0000 >Subject: [PATCH] Bug 28418: Show template_id of MARC modification templates > >This patch adds an "id" column to the table of MARC modification >templates. The table is now a DataTable with table settings, with the >new column hidden by default to preserve the existing configuration. > >To test, apply the patch and restart services. > > - Go to Administration -> MARC modification templates. > - If necessary, add two or more templates. > - Confirm that table of templates displays as a DataTable, with all > associated sorting, filtering, export, etc. > - The "id" column should be hidden by default. > - Confirm that column visibility controls work correctly. > - Confirm that the table settings found under Administration -> Table > settings work correctly to set the default visibility of the table > columns. > >Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/columns_settings.yml | 12 ++++++++++++ > .../prog/en/modules/tools/marc_modification_templates.tt | 10 ++++++++-- > .../intranet-tmpl/prog/js/marc_modification_templates.js | 8 ++++++-- > 3 files changed, 26 insertions(+), 4 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index a4986652b6..b6eee4fb28 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1525,6 +1525,18 @@ modules: > columnname: info > - > columnname: interface >+ marc-modification-templates: >+ templatest: >+ columns: >+ - >+ columnname: id >+ is_hidden: 1 >+ - >+ columnname: template >+ - >+ columnname: actions >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 > notices: > lettert: > columns: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >index 6459266260..ba67ec7622 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE JSON.Escape %] > [% USE Asset %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>MARC modification templates › Tools › Koha</title> >@@ -86,13 +87,15 @@ > <table id="templatest"> > <thead> > <tr> >+ <th>Id</th> > <th>Template</th> >- <th class="noExport">Actions</th> >+ <th class="NoSort noExport">Actions</th> > </tr> > </thead> > <tbody> > [% FOREACH TemplatesLoo IN TemplatesLoop %] > <tr> >+ <td>[% TemplatesLoo.template_id | html %]</td> > <td>[% TemplatesLoo.name | html %]</td> > <td class="actions"> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=select_template" ><i class="fa fa-fw fa-pencil"></i> Edit actions</a> >@@ -352,12 +355,15 @@ > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/tools-menu.js") | $raw %] >- [% Asset.js("js/marc_modification_templates.js") | $raw %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > <script> >+ columns_settings = [% TablesSettings.GetColumns('tools', 'marc-modification-templates', 'templatest', 'json') | $raw %]; > [% IF ActionsLoop %] > var mmtas = [% ActionsLoop.json | $raw %] > [% END %] > </script> >+ [% Asset.js("js/marc_modification_templates.js") | $raw %] > [% END %] > > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >index 4f33c33ccd..b7565b734e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js >@@ -1,4 +1,4 @@ >-/* global __ */ >+/* global __ KohaTable columns_settings */ > $(document).ready(function() { > window.modaction_legend_innerhtml = $("#modaction_legend").text(); > window.action_submit_value = $("#action_submit").val(); >@@ -49,7 +49,7 @@ $(document).ready(function() { > } > if ( $("#conditional_comparison").val() == '' ) { > alert( __("The conditional comparison operator should be filled.") ); >- return false >+ return false; > } > if ( $("#conditional_value").val() == '' && > ( $("#conditional_comparison").val() == 'equals' || $("#conditional_comparison").val() == 'not_equals' ) ) { >@@ -108,6 +108,10 @@ $(document).ready(function() { > editAction( mmta[0] ); > updateAllEvery(); > }); >+ >+ KohaTable("templatest", { >+ }, columns_settings); >+ > }); > > function updateAllEvery(){ >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28418
:
121283
|
121288
| 121328