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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
0e34f555f9
commit
77f00cafa3
1 changed files with 110 additions and 107 deletions
|
@ -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 %]
|
||||
<div class="page-section">
|
||||
<table id="templatest">
|
||||
<thead>
|
||||
<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>
|
||||
<th>Id</th>
|
||||
<th>Template</th>
|
||||
<th class="NoSort noExport">Actions</th>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
</div> <!-- /.page-section -->
|
||||
|
||||
[% ELSE %]
|
||||
|
||||
<h1>Actions for <em>[% template_name | html %]</em></h1>
|
||||
|
||||
[% IF ( ActionsLoop ) %]
|
||||
|
||||
<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 %]
|
||||
<div class="page-section">
|
||||
<table id="template_actions" class="template_actions">
|
||||
<thead>
|
||||
<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 %]
|
||||
|
||||
<span>field</span>
|
||||
|
||||
[% 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.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>
|
||||
[% END %]
|
||||
[% 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 %]
|
||||
|
||||
[% 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>
|
||||
<th>Change order</th>
|
||||
<th>Rank</th>
|
||||
<th>Action</th>
|
||||
<th>Description</th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
[% END # /FOREACH ActionsLoo %]
|
||||
</tbody>
|
||||
</table>
|
||||
</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 %]
|
||||
|
||||
<span>field</span>
|
||||
|
||||
[% 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.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>
|
||||
[% END %]
|
||||
[% 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 %]
|
||||
|
||||
[% 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>
|
||||
</div> <!-- /.page-section -->
|
||||
[% ELSE %]
|
||||
<div class="dialog message template_actions"><p>There are no defined actions for this template.</p></div>
|
||||
[% END # /IF ActionsLoop %]
|
||||
|
|
Loading…
Reference in a new issue