Bugzilla – Attachment 142281 Details for
Bug 31811
Add 'page-section' to MARC modification templates pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31811: Add 'page-section' to MARC modification templates pages
Bug-31811-Add-page-section-to-MARC-modification-te.patch (text/plain), 19.33 KB, created by
David Nind
on 2022-10-20 19:09:50 UTC
(
hide
)
Description:
Bug 31811: Add 'page-section' to MARC modification templates pages
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-10-20 19:09:50 UTC
Size:
19.33 KB
patch
obsolete
>From 03a0e7c43ba23bd2078b636fdec26270a53792a8 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 20 Oct 2022 17:59:19 +0000 >Subject: [PATCH] Bug 31811: Add 'page-section' to MARC modification templates > pages > >This patch adds "page-section" divs to the MARC modification templates >template so that sections are properly defined and content has adequate >contrast. > >Note: The patch includes indentation changes, so please ignore >whitespace when checking the diff. > >To test, apply the patch and go to Cataloging -> MARC modification >templates. > >The main content should be surrounded by a white box whether you're >looking at the list of templates, the the action add/edit form. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../tools/marc_modification_templates.tt | 195 +++++++++--------- > 1 file changed, 99 insertions(+), 96 deletions(-) > >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 56883bb135..436c726ba1 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 >@@ -87,123 +87,126 @@ > > <h1>MARC modification templates [% template_id | html %]</h1> > >- <table id="templatest"> >- <thead> >- <tr> >- <th>Id</th> >- <th>Template</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> >- <a class="btn btn-default btn-xs duplicate_template" href="#" data-toggle="modal" data-template_id="[% TemplatesLoo.template_id | html %]" data-target="#createTemplate"><i class="fa fa-fw fa-copy"></i> Duplicate</a> >- <a class="btn btn-default btn-xs delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END %] >- </tbody> >- </table> >- >- [% ELSE %] >- >- <h1>Actions for <em>[% template_name | html %]</em></h1> >- >- [% IF ( ActionsLoop ) %] >- >- <table id="template_actions" class="template_actions"> >+ <div class="page-section"> >+ <table id="templatest"> > <thead> > <tr> >- <th>Change order</th> >- <th>Rank</th> >- <th>Action</th> >- <th>Description</th> >- <th> </th> >- <th> </th> >+ <th>Id</th> >+ <th>Template</th> >+ <th class="NoSort noExport">Actions</th> > </tr> > </thead> > <tbody> >- [% FOREACH ActionsLoo IN ActionsLoop %] >+ [% FOREACH TemplatesLoo IN TemplatesLoop %] > <tr> >+ <td>[% TemplatesLoo.template_id | html %]</td> >+ <td>[% TemplatesLoo.name | html %]</td> > <td class="actions"> >- <a title="Move action up" href="marc_modification_templates.pl?op=move_action&where=up&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >- <i class="fa fa-arrow-up fa-lg order-control"></i> >- </a> >- >- <a title="Move action to top" href="marc_modification_templates.pl?op=move_action&where=top&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >- <i class="fa fa-arrow-up fa-lg overline order-control"></i> >- </a> >+ <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> >+ <a class="btn btn-default btn-xs duplicate_template" href="#" data-toggle="modal" data-template_id="[% TemplatesLoo.template_id | html %]" data-target="#createTemplate"><i class="fa fa-fw fa-copy"></i> Duplicate</a> >+ <a class="btn btn-default btn-xs delete_template" href="/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=[% TemplatesLoo.template_id | html %]&op=delete_template"><i class="fa fa-fw fa-trash"></i> Delete</a> >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> > >- <a title="Move action to bottom" href="marc_modification_templates.pl?op=move_action&where=bottom&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >- <i class="fa fa-arrow-down fa-lg underline order-control"></i> >- </a> >+ [% ELSE %] > >- <a title="Move action down" href="marc_modification_templates.pl?op=move_action&where=down&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >- <i class="fa fa-arrow-down fa-lg order-control"></i> >- </a> >- </td> >+ <h1>Actions for <em>[% template_name | html %]</em></h1> > >- <td>[% ActionsLoo.ordering | html %]</td> >- <td> >- [% IF ( ActionsLoo.action_delete_field ) %] <span>Delete</span> [% END %] >- [% IF ( ActionsLoo.action_add_field ) %] <span>Add new</span> [% END %] >- [% IF ( ActionsLoo.action_update_field ) %] <span>Update existing or add new</span> [% END %] >- [% IF ( ActionsLoo.action_move_field ) %] <span>Move</span> [% END %] >- [% IF ( ActionsLoo.action_copy_field ) %] <span>Copy</span> [% END %] >- [% IF ( ActionsLoo.action_copy_and_replace_field ) %] <span>Copy and replace</span> [% END %] >- >- [% UNLESS ( ActionsLoo.action_update_field ) %] >- [% IF ( ActionsLoo.field_number ) %] >- <span>1st</span> >+ [% IF ( ActionsLoop ) %] >+ <div class="page-section"> >+ <table id="template_actions" class="template_actions"> >+ <thead> >+ <tr> >+ <th>Change order</th> >+ <th>Rank</th> >+ <th>Action</th> >+ <th>Description</th> >+ <th> </th> >+ <th> </th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH ActionsLoo IN ActionsLoop %] >+ <tr> >+ <td class="actions"> >+ <a title="Move action up" href="marc_modification_templates.pl?op=move_action&where=up&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >+ <i class="fa fa-arrow-up fa-lg order-control"></i> >+ </a> >+ >+ <a title="Move action to top" href="marc_modification_templates.pl?op=move_action&where=top&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >+ <i class="fa fa-arrow-up fa-lg overline order-control"></i> >+ </a> >+ >+ <a title="Move action to bottom" href="marc_modification_templates.pl?op=move_action&where=bottom&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >+ <i class="fa fa-arrow-down fa-lg underline order-control"></i> >+ </a> >+ >+ <a title="Move action down" href="marc_modification_templates.pl?op=move_action&where=down&template_id=[% ActionsLoo.template_id | html %]&mmta_id=[% ActionsLoo.mmta_id | html %]"> >+ <i class="fa fa-arrow-down fa-lg order-control"></i> >+ </a> >+ </td> >+ >+ <td>[% ActionsLoo.ordering | html %]</td> >+ <td> >+ [% IF ( ActionsLoo.action_delete_field ) %] <span>Delete</span> [% END %] >+ [% IF ( ActionsLoo.action_add_field ) %] <span>Add new</span> [% END %] >+ [% IF ( ActionsLoo.action_update_field ) %] <span>Update existing or add new</span> [% END %] >+ [% IF ( ActionsLoo.action_move_field ) %] <span>Move</span> [% END %] >+ [% IF ( ActionsLoo.action_copy_field ) %] <span>Copy</span> [% END %] >+ [% IF ( ActionsLoo.action_copy_and_replace_field ) %] <span>Copy and replace</span> [% END %] >+ >+ [% UNLESS ( ActionsLoo.action_update_field ) %] >+ [% IF ( ActionsLoo.field_number ) %] >+ <span>1st</span> >+ [% END %] > [% END %] >- [% END %] > >- <span>field</span> >+ <span>field</span> > >- [% ActionsLoo.from_field | html %][% IF ( ActionsLoo.from_subfield.length ) %]$[% ActionsLoo.from_subfield | html %][% END %] >+ [% ActionsLoo.from_field | html %][% IF ( ActionsLoo.from_subfield.length ) %]$[% ActionsLoo.from_subfield | html %][% END %] > >- [% IF ( ActionsLoo.field_value ) %] >- <span>with value</span> <em>[% ActionsLoo.field_value | html %]</em> >- [% END %] >+ [% IF ( ActionsLoo.field_value ) %] >+ <span>with value</span> <em>[% ActionsLoo.field_value | html %]</em> >+ [% END %] > >- [% IF ( ActionsLoo.to_field ) %] >- <span>to</span> [% ActionsLoo.to_field | html %][% IF ( ActionsLoo.to_subfield.length ) %]$[% ActionsLoo.to_subfield | html %][% END %] >+ [% IF ( ActionsLoo.to_field ) %] >+ <span>to</span> [% ActionsLoo.to_field | html %][% IF ( ActionsLoo.to_subfield.length ) %]$[% ActionsLoo.to_subfield | html %][% END %] > >- [% IF ( ActionsLoo.to_regex_search ) %] >- <span>using RegEx</span> s<strong>/[% ActionsLoo.to_regex_search | html %]/[% ActionsLoo.to_regex_replace | html %]/[% ActionsLoo.to_regex_modifiers | html %]</strong> >+ [% IF ( ActionsLoo.to_regex_search ) %] >+ <span>using RegEx</span> s<strong>/[% ActionsLoo.to_regex_search | html %]/[% ActionsLoo.to_regex_replace | html %]/[% ActionsLoo.to_regex_modifiers | html %]</strong> >+ [% END %] > [% END %] >- [% END %] > >- [% IF ( ActionsLoo.conditional ) %] >- [% IF ( ActionsLoo.conditional_if ) %] <span>if</span> [% END %] >- [% IF ( ActionsLoo.conditional_unless ) %] <span>unless</span> [% END %] >+ [% IF ( ActionsLoo.conditional ) %] >+ [% IF ( ActionsLoo.conditional_if ) %] <span>if</span> [% END %] >+ [% IF ( ActionsLoo.conditional_unless ) %] <span>unless</span> [% END %] > >- [% ActionsLoo.conditional_field | html %][% IF ( ActionsLoo.conditional_subfield.length ) %]$[% ActionsLoo.conditional_subfield | html %][% END %] >+ [% ActionsLoo.conditional_field | html %][% IF ( ActionsLoo.conditional_subfield.length ) %]$[% ActionsLoo.conditional_subfield | html %][% END %] > >- [% IF ( ActionsLoo.conditional_comparison_exists ) %] <span>exists</span> [% END %] >- [% IF ( ActionsLoo.conditional_comparison_not_exists ) %] <span>does not exist</span> [% END %] >- [% IF ( ActionsLoo.conditional_comparison_equals ) %] <span>matches</span> [% END %] >- [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] <span>does not match</span> [% END %] >+ [% IF ( ActionsLoo.conditional_comparison_exists ) %] <span>exists</span> [% END %] >+ [% IF ( ActionsLoo.conditional_comparison_not_exists ) %] <span>does not exist</span> [% END %] >+ [% IF ( ActionsLoo.conditional_comparison_equals ) %] <span>matches</span> [% END %] >+ [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] <span>does not match</span> [% END %] > >- [% IF ( ActionsLoo.conditional_regex ) %] <span>RegEx</span> m/[% END %]<strong>[% ActionsLoo.conditional_value | html %]</strong>[% IF ( ActionsLoo.conditional_regex ) %]/[% END %] >- [% END %] >- </td> >- <td>[% ActionsLoo.description | html %]</td> >- <td> >- <a class="btn btn-default btn-xs edit_action" href="#modaction" data-mmta_id="[% ActionsLoo.mmta_id | html %]"><i class="fa fa-pencil"></i> Edit</a> >- </td> >- <td> >- <a class="btn btn-default btn-xs" href="marc_modification_templates.pl?template_id=[% ActionsLoo.template_id | html %]&op=delete_action&mmta_id=[% ActionsLoo.mmta_id | html %]" onclick="return confirmDeleteAction();"><i class="fa fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END # /FOREACH ActionsLoo %] >- </tbody> >- </table> >+ [% IF ( ActionsLoo.conditional_regex ) %] <span>RegEx</span> m/[% END %]<strong>[% ActionsLoo.conditional_value | html %]</strong>[% IF ( ActionsLoo.conditional_regex ) %]/[% END %] >+ [% END %] >+ </td> >+ <td>[% ActionsLoo.description | html %]</td> >+ <td> >+ <a class="btn btn-default btn-xs edit_action" href="#modaction" data-mmta_id="[% ActionsLoo.mmta_id | html %]"><i class="fa fa-pencil"></i> Edit</a> >+ </td> >+ <td> >+ <a class="btn btn-default btn-xs" href="marc_modification_templates.pl?template_id=[% ActionsLoo.template_id | html %]&op=delete_action&mmta_id=[% ActionsLoo.mmta_id | html %]" onclick="return confirmDeleteAction();"><i class="fa fa-trash"></i> Delete</a> >+ </td> >+ </tr> >+ [% END # /FOREACH ActionsLoo %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> > [% ELSE %] > <div class="dialog message template_actions"><p>There are no defined actions for this template.</p></div> > [% END # /IF ActionsLoop %] >-- >2.30.2
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 31811
:
142276
|
142281
|
142311