Bugzilla – Attachment 144010 Details for
Bug 32213
Reindent item search fields template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32213: Reindent item search fields templates
Bug-32213-Reindent-item-search-fields-templates.patch (text/plain), 20.77 KB, created by
Owen Leonard
on 2022-11-17 15:50:45 UTC
(
hide
)
Description:
Bug 32213: Reindent item search fields templates
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-11-17 15:50:45 UTC
Size:
20.77 KB
patch
obsolete
>From eb1232d951d4f8fa235585867800168a02e9ff06 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 17 Nov 2022 15:26:48 +0000 >Subject: [PATCH] Bug 32213: Reindent item search fields templates > >This patch reindents three item search field templates so that they have >consistent indentation. > >To test, apply the patch and go to Administration -> Item search fields. > >Test all aspects of viewing, adding, and deleting item search fields. >Everything should look correct and work correctly. >--- > .../admin-items-search-field-form.inc | 56 ++--- > .../en/modules/admin/items_search_field.tt | 109 +++++---- > .../en/modules/admin/items_search_fields.tt | 230 +++++++++--------- > 3 files changed, 198 insertions(+), 197 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >index e7286bf62a..bf320e527e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >@@ -1,35 +1,35 @@ > [% PROCESS 'html_helpers.inc' %] > <ol> >- <li> >- [% IF field %] >- <span class="label">Name: </span> >- [% field.name | html %] >- <input type="hidden" name="name" value="[% field.name | html %]"> >- [% ELSE %] >- <label class="required" for="name">Name: </label> >- <input type="text" name="name" id="name" class="required" required="required" /> >- <span class="required">Required</span> >- [% END %] >- </li> >- <li> >- <label class="required" for="label">Label: </label> >+ <li> >+ [% IF field %] >+ <span class="label">Name: </span> >+ [% field.name | html %] >+ <input type="hidden" name="name" value="[% field.name | html %]"> >+ [% ELSE %] >+ <label class="required" for="name">Name: </label> >+ <input type="text" name="name" id="name" class="required" required="required" /> >+ <span class="required">Required</span> >+ [% END %] >+ </li> >+ <li> >+ <label class="required" for="label">Label: </label> > <input type="text" name="label" id="label" value="[% field.label | html %]" class="required" required="required" /> >- <span class="required">Required</span> >- </li> >- <li> >- <label class="required" for="tagfield">MARC field: </label> >+ <span class="required">Required</span> >+ </li> >+ <li> >+ <label class="required" for="tagfield">MARC field: </label> > <input type="text" id="tagfield" name="tagfield" maxlength="3" size="3" class="required" pattern="[a-zA-Z0-9]+" required="required" value="[% field.tagfield | html %]" /> > <span class="required">Required</span> >- </li> >- <li> >- <label for="tagsubfield">MARC subfield: </label> >+ </li> >+ <li> >+ <label for="tagsubfield">MARC subfield: </label> > <input type="text" id="tagsubfield" name="tagsubfield" pattern="[a-zA-Z0-9]+" maxlength="1" size="1" value="[% field.tagsubfield | html %]" /> >- </li> >- <li> >- <label for="authorised_values_category">Authorised values category: </label> >- <select id="authorised_values_category" name="authorised_values_category"> >- <option value="">- None -</option> >- [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => field.authorised_values_category ) %] >- </select> >- </li> >+ </li> >+ <li> >+ <label for="authorised_values_category">Authorised values category: </label> >+ <select id="authorised_values_category" name="authorised_values_category"> >+ <option value="">- None -</option> >+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => field.authorised_values_category ) %] >+ </select> >+ </li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >index 7aa147d30b..81f98ba7ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >@@ -3,75 +3,76 @@ > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] > [% INCLUDE 'doc-head-open.inc' %] >- <title>Item search fields › Administration › Koha</title> >- [% INCLUDE 'doc-head-close.inc' %] >+ <title>Item search fields › Administration › Koha</title> >+ [% INCLUDE 'doc-head-close.inc' %] > </head> >+ > <body id="admin_itemssearchfields" class="admin"> >- [% WRAPPER 'header.inc' %] >- [% INCLUDE 'prefs-admin-search.inc' %] >-[% END %] >+ [% WRAPPER 'header.inc' %] >+ [% INCLUDE 'prefs-admin-search.inc' %] >+ [% END %] > > [% WRAPPER 'sub-header.inc' %] >- <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> >- <ol> >- <li> >- <a href="/cgi-bin/koha/mainpage.pl">Home</a> >- </li> >- <li> >- <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> >- </li> >- >- [% IF (field) %] >+ <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> >+ <ol> > <li> >- <a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a> >+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> > </li> > <li> >- <a href="#" aria-current="page"> >- [% field.name | html %] >- </a> >+ <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> > </li> > >- [% ELSE %] >- <li> >- <a href="#" aria-current="page"> >- Item search fields >- </a> >- </li> >- [% END %] >- </ol> >- </nav> >+ [% IF (field) %] >+ <li> >+ <a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a> >+ </li> >+ <li> >+ <a href="#" aria-current="page"> >+ [% field.name | html %] >+ </a> >+ </li> >+ >+ [% ELSE %] >+ <li> >+ <a href="#" aria-current="page"> >+ Item search fields >+ </a> >+ </li> >+ [% END %] >+ </ol> >+ </nav> > [% END %] > >-<div class="main container-fluid"> >- <div class="row"> >- <div class="col-sm-10 col-sm-push-2"> >- <main> >+ <div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> > >- <h1>Item search field: [% field.label | html %]</h1> >+ <h1>Item search field: [% field.label | html %]</h1> > >- <form action="/cgi-bin/koha/admin/items_search_field.pl" method="POST" id="edit_search_fields"> >- <fieldset class="rows"> >- <legend>Edit field</legend> >- [% INCLUDE 'admin-items-search-field-form.inc' field=field %] >- <div> >- <input type="hidden" name="op" value="mod" /> >- </div> >- </fieldset> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Submit" /> >- <a class="cancel" href="/cgi-bin/koha/admin/items_search_fields.pl">Cancel</a> >- </fieldset> >- </form> >+ <form action="/cgi-bin/koha/admin/items_search_field.pl" method="POST" id="edit_search_fields"> >+ <fieldset class="rows"> >+ <legend>Edit field</legend> >+ [% INCLUDE 'admin-items-search-field-form.inc' field=field %] >+ <div> >+ <input type="hidden" name="op" value="mod" /> >+ </div> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ <a class="cancel" href="/cgi-bin/koha/admin/items_search_fields.pl">Cancel</a> >+ </fieldset> >+ </form> > >- </main> >- </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> > >- <div class="col-sm-2 col-sm-pull-10"> >- <aside> >- [% INCLUDE 'admin-menu.inc' %] >- </aside> >- </div> <!-- /.col-sm-2.col-sm-pull-10 --> >- </div> <!-- /.row --> >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'admin-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >index 9c9837f2dc..645ecf865c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >@@ -3,131 +3,131 @@ > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] > [% INCLUDE 'doc-head-open.inc' %] >- <title>Item search fields › Administration › Koha</title> >- [% INCLUDE 'doc-head-close.inc' %] >+ <title>Item search fields › Administration › Koha</title> >+ [% INCLUDE 'doc-head-close.inc' %] > </head> > > <body id="admin_itemssearchfields" class="admin"> >- [% WRAPPER 'header.inc' %] >- [% INCLUDE 'prefs-admin-search.inc' %] >-[% END %] >+ [% WRAPPER 'header.inc' %] >+ [% INCLUDE 'prefs-admin-search.inc' %] >+ [% END %] > >-[% WRAPPER 'sub-header.inc' %] >-<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> >- <ol> >- <li> >- <a href="/cgi-bin/koha/mainpage.pl">Home</a> >- </li> >- <li> >- <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> >- </li> >- <li> >- <a href="#" aria-current="page"> >- Item search fields >- </a> >- </li> >- </ol> >-</nav> >-[% END %] >+ [% WRAPPER 'sub-header.inc' %] >+ <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> >+ <ol> >+ <li> >+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> >+ </li> >+ <li> >+ <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> >+ </li> >+ <li> >+ <a href="#" aria-current="page"> >+ Item search fields >+ </a> >+ </li> >+ </ol> >+ </nav> >+ [% END %] > >-<div class="main container-fluid"> >- <div class="row"> >- <div class="col-sm-10 col-sm-push-2"> >- <main> >+ <div class="main container-fluid"> >+ <div class="row"> >+ <div class="col-sm-10 col-sm-push-2"> >+ <main> > >- <div id="toolbar" class="btn-toolbar"> >- <a class="btn btn-default" id="new_search_field" href="/cgi-bin/koha/admin/items_search_fields.pl"><i class="fa fa-plus"></i> New search field</a> >- </div> >+ <div id="toolbar" class="btn-toolbar"> >+ <a class="btn btn-default" id="new_search_field" href="/cgi-bin/koha/admin/items_search_fields.pl"><i class="fa fa-plus"></i> New search field</a> >+ </div> > >- [% IF field_added %] >- <div class="dialog message"> >- Field successfully added: [% field_added.label | html %] >- </div> >- [% ELSIF field_not_added %] >- <div class="dialog alert"> >- <p>Failed to add field. Please make sure the field name doesn't already exist.</p> >- <p>Check logs for more details.</p> >- </div> >- [% ELSIF field_deleted %] >- <div class="dialog message"> >- Field successfully deleted. >- </div> >- [% ELSIF field_not_deleted %] >- <div class="dialog alert"> >- <p>Failed to delete field.</p> >- <p>Check logs for more details.</p> >- </div> >- [% ELSIF field_updated %] >- <div class="dialog message"> >- Field successfully updated: [% field_updated.label | html %] >- </div> >- [% ELSIF field_not_updated %] >- <div class="dialog alert"> >- <p>Failed to update field.</p> >- <p>Check logs for more details.</p> >- </div> >- [% END %] >- [% IF fields.size %] >- <div id="search_fields_list"> >- <h1>Item search fields</h1> >- <div class="page-section"> >- <table id="search_fields_table"> >- <thead> >- <tr> >- <th>Name</th> >- <th>Label</th> >- <th>MARC field</th> >- <th>MARC subfield</th> >- <th>Authorised values category</th> >- <th class="noExport">Actions</th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH field IN fields %] >- <tr> >- <td>[% field.name | html %]</td> >- <td>[% field.label | html %]</td> >- <td>[% field.tagfield | html %]</td> >- <td>[% field.tagsubfield | html %]</td> >- <td>[% field.authorised_values_category | html %]</td> >- <td> >- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_field.pl?name=[% field.name | html %]"><i class="fa fa-pencil"></i> Edit</a> >- <a class="field-delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_fields.pl?op=del&name=[% field.name | html %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >- </tr> >- [% END %] >- </tbody> >- </table> >- </div> <!-- /.page-section --> >- </div> <!-- /#search_fields_list --> >- [% ELSE %] >- <h1>Item search fields</h1> >- <div class="dialog message"> >- There are no item search fields defined. >- </div> >- [% END %] >+ [% IF field_added %] >+ <div class="dialog message"> >+ Field successfully added: [% field_added.label | html %] >+ </div> >+ [% ELSIF field_not_added %] >+ <div class="dialog alert"> >+ <p>Failed to add field. Please make sure the field name doesn't already exist.</p> >+ <p>Check logs for more details.</p> >+ </div> >+ [% ELSIF field_deleted %] >+ <div class="dialog message"> >+ Field successfully deleted. >+ </div> >+ [% ELSIF field_not_deleted %] >+ <div class="dialog alert"> >+ <p>Failed to delete field.</p> >+ <p>Check logs for more details.</p> >+ </div> >+ [% ELSIF field_updated %] >+ <div class="dialog message"> >+ Field successfully updated: [% field_updated.label | html %] >+ </div> >+ [% ELSIF field_not_updated %] >+ <div class="dialog alert"> >+ <p>Failed to update field.</p> >+ <p>Check logs for more details.</p> >+ </div> >+ [% END %] >+ [% IF fields.size %] >+ <div id="search_fields_list"> >+ <h1>Item search fields</h1> >+ <div class="page-section"> >+ <table id="search_fields_table"> >+ <thead> >+ <tr> >+ <th>Name</th> >+ <th>Label</th> >+ <th>MARC field</th> >+ <th>MARC subfield</th> >+ <th>Authorised values category</th> >+ <th class="noExport">Actions</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH field IN fields %] >+ <tr> >+ <td>[% field.name | html %]</td> >+ <td>[% field.label | html %]</td> >+ <td>[% field.tagfield | html %]</td> >+ <td>[% field.tagsubfield | html %]</td> >+ <td>[% field.authorised_values_category | html %]</td> >+ <td> >+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_field.pl?name=[% field.name | html %]"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="field-delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/items_search_fields.pl?op=del&name=[% field.name | html %]"><i class="fa fa-trash"></i> Delete</a> >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> <!-- /.page-section --> >+ </div> <!-- /#search_fields_list --> >+ [% ELSE %] >+ <h1>Item search fields</h1> >+ <div class="dialog message"> >+ There are no item search fields defined. >+ </div> >+ [% END %] > >- <form id="add_field_form" action="/cgi-bin/koha/admin/items_search_fields.pl" method="POST"> >- <fieldset class="rows"> >- <legend><h1>Add a new field</h1></legend> >- [% INCLUDE 'admin-items-search-field-form.inc' field=undef %] >- <input type="hidden" name="op" value="add" /> >- </fieldset> >- <fieldset class="action"> >- <input type="submit" class="btn btn-primary" value="Submit" /> >- <a href="#" class="cancel hide_form">Cancel</a> >- </fieldset> >- </form> >+ <form id="add_field_form" action="/cgi-bin/koha/admin/items_search_fields.pl" method="POST"> >+ <fieldset class="rows"> >+ <legend><h1>Add a new field</h1></legend> >+ [% INCLUDE 'admin-items-search-field-form.inc' field=undef %] >+ <input type="hidden" name="op" value="add" /> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="submit" class="btn btn-primary" value="Submit" /> >+ <a href="#" class="cancel hide_form">Cancel</a> >+ </fieldset> >+ </form> > >- </main> >- </div> <!-- /.col-sm-10.col-sm-push-2 --> >+ </main> >+ </div> <!-- /.col-sm-10.col-sm-push-2 --> > >- <div class="col-sm-2 col-sm-pull-10"> >- <aside> >- [% INCLUDE 'admin-menu.inc' %] >- </aside> >- </div> <!-- /.col-sm-2.col-sm-pull-10 --> >- </div> <!-- /.row --> >+ <div class="col-sm-2 col-sm-pull-10"> >+ <aside> >+ [% INCLUDE 'admin-menu.inc' %] >+ </aside> >+ </div> <!-- /.col-sm-2.col-sm-pull-10 --> >+ </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] >-- >2.20.1
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 32213
:
144010
|
144031
|
144035
|
144314