From 88c3076c66da978b01da51889674f28de96fccd6 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Thu, 3 Nov 2022 17:46:15 +0000 Subject: [PATCH] Bug 32028: Add page-section to various admin pages This patch adds the page section to div to the following administration pages: admin/cash_registers.tt admin/cities.tt admin/credit_types.tt admin/debit_types.tt admin/patron-attr-types.tt admin/restrictions.tt plugins/plugins-home.tt To test go the following pages and make sure everything looks good: Administration > Cash registers. You must enable the sys pref 'UseCashRegisters' Administration > Cities and towns. Administration > Credit types Administration > Debit types Administration > Patron restrictions Adminstration > Patron attribute types Administration > Manage plugins --- .../prog/en/modules/admin/cash_registers.tt | 72 +++--- .../prog/en/modules/admin/cities.tt | 28 +-- .../prog/en/modules/admin/credit_types.tt | 102 ++++---- .../prog/en/modules/admin/debit_types.tt | 116 ++++----- .../en/modules/admin/patron-attr-types.tt | 112 ++++----- .../prog/en/modules/admin/restrictions.tt | 66 +++--- .../prog/en/modules/plugins/plugins-home.tt | 220 +++++++++--------- 7 files changed, 366 insertions(+), 350 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt index 73a62f5ccc5..4acc81a23ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cash_registers.tt @@ -166,44 +166,46 @@ Cash registers › Administration › Koha [% IF cash_registers.count %] - - - - - - - - - - - [% FOREACH cash_register IN cash_registers %] - [% IF cash_register.branch_default %] - - [% ELSE %] - - [% END %] - - - - - - [% IF cash_register.archived == '0' %] - +
NameDescriptionLibraryLibrary defaultInitial floatActions
[% cash_register.name | html %][% cash_register.description | html %][% cash_register.library.branchname | html %][% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %][% cash_register.starting_float | $Price %] - Edit - [% IF cash_register.branch_default %] - Drop default +
+ + + + + + + + + + + [% FOREACH cash_register IN cash_registers %] + [% IF cash_register.branch_default %] + + [% ELSE %] + + [% END %] + + + + + + [% IF cash_register.archived == '0' %] + [% ELSE %] - Make default + [% END %] - Archive - - [% ELSE %] - + [% END %] - - [% END %] - -
NameDescriptionLibraryLibrary defaultInitial floatActions
[% cash_register.name | html %][% cash_register.description | html %][% cash_register.library.branchname | html %][% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %][% cash_register.starting_float | $Price %] + Edit + [% IF cash_register.branch_default %] + Drop default + [% ELSE %] + Make default + [% END %] + Archive + Restore Restore
+
+ [% ELSE %]
There are no cash registers defined. Start adding cash registers.
[% END # /cash_register.count %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt index c05f3d7992b..f78cd0f8199 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt @@ -181,19 +181,21 @@ [% END %] [% IF cities_count > 0 %] -
- - - - - - - - - - - -
City IDCityStateZIP/Postal codeCountryActions
+
+
+ + + + + + + + + + + +
City IDCityStateZIP/Postal codeCountryActions
+
[% ELSE %]
There are no cities defined. Create a new city. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt index 66588da1b78..55184158de9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt @@ -162,59 +162,61 @@

Account credit types

[% IF credit_types.count %] - - - - - - - - - - - - - [% FOREACH credit_type IN credit_types %] - - - - - - - - + + [% END %] + +
ArchivedSystemCodeDescriptionAvailable forCredit number enabledLibrary limitationsActions
[% credit_type.archived | html %][% credit_type.is_system | html %][% credit_type.code | html %][% credit_type.description | html %][% IF credit_type.can_be_added_manually %]Manual credit[% END %][% IF credit_type.credit_number_enabled %]Yes[% ELSE %]No[% END %] - [% IF credit_type.library_limits.count > 0 %] - [% library_limits_str = "" %] - [% FOREACH library IN credit_type.library_limits %] - [%- IF loop.first -%] - [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %] - [% ELSE %] - [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] +
+ + + + + + + + + + + + + [% FOREACH credit_type IN credit_types %] + + + + + + + + + - - - [% END %] - -
ArchivedSystemCodeDescriptionAvailable forCredit number enabledLibrary limitationsActions
[% credit_type.archived | html %][% credit_type.is_system | html %][% credit_type.code | html %][% credit_type.description | html %][% IF credit_type.can_be_added_manually %]Manual credit[% END %][% IF credit_type.credit_number_enabled %]Yes[% ELSE %]No[% END %] + [% IF credit_type.library_limits.count > 0 %] + [% library_limits_str = "" %] + [% FOREACH library IN credit_type.library_limits %] + [%- IF loop.first -%] + [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %] + [% ELSE %] + [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] + [% END %] [% END %] + + [% limits_count = credit_type.library_limits.count %] + [% tnx('{count} library limitation', '{count} library limitations', limits_count, { count => limits_count }) %] + [% ELSE %] + No library limitation + [% END %] + + [% IF !credit_type.archived %] + Edit + [% END %] + [% IF !credit_type.is_system && !credit_type.archived %] + Archive [% END %] - - [% limits_count = credit_type.library_limits.count %] - [% tnx('{count} library limitation', '{count} library limitations', limits_count, { count => limits_count }) %] - [% ELSE %] - No library limitation - [% END %] - - [% IF !credit_type.archived %] - Edit - [% END %] - [% IF !credit_type.is_system && !credit_type.archived %] - Archive - [% END %] - [% IF !credit_type.is_system && credit_type.archived %] - Restore - [% END %] -
+ [% IF !credit_type.is_system && credit_type.archived %] + Restore + [% END %] +
+
[% ELSE %]
There are no account credit types defined. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt index 518602ccbf4..546e51e00ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt @@ -153,65 +153,67 @@

Account debit types

[% IF debit_types.count %] - - - - - - - - - - - - - [% FOREACH debit_type IN debit_types %] - - - - - - - - + + + [% END %] + +
ArchivedSystemCodeDescriptionDefault amountAvailable forLibrary limitationsActions
[% debit_type.archived | html %][% debit_type.is_system | html %][% debit_type.code | html %][% debit_type.description | html %][% debit_type.default_amount | $Price %][% IF debit_type.can_be_invoiced && debit_type.can_be_sold %] - Invoicing, Sale - [% ELSIF debit_type.can_be_invoiced %] - Invoicing - [% ELSIF debit_type.can_be_sold %] - Sale - [% END %] - - [% IF debit_type.library_limits.count > 0 %] - [% library_limits_str = "" %] - [% FOREACH library IN debit_type.library_limits %] - [%- IF loop.first -%] - [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %] - [% ELSE %] - [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] - [% END %] +
+ + + + + + + + + + + + + [% FOREACH debit_type IN debit_types %] + + + + + + + + - - - [% END %] - -
ArchivedSystemCodeDescriptionDefault amountAvailable forLibrary limitationsActions
[% debit_type.archived | html %][% debit_type.is_system | html %][% debit_type.code | html %][% debit_type.description | html %][% debit_type.default_amount | $Price %][% IF debit_type.can_be_invoiced && debit_type.can_be_sold %] + Invoicing, Sale + [% ELSIF debit_type.can_be_invoiced %] + Invoicing + [% ELSIF debit_type.can_be_sold %] + Sale [% END %] - - [% IF debit_type.library_limits.count > 1 %] - [% debit_type.library_limits.count | html %] library limitations - [% ELSE %] - [% debit_type.library_limits.count | html %] library limitation + + [% IF debit_type.library_limits.count > 0 %] + [% library_limits_str = "" %] + [% FOREACH library IN debit_type.library_limits %] + [%- IF loop.first -%] + [% library_limits_str = library.branchname _ " (" _ library.branchcode _ ")" %] + [% ELSE %] + [% library_limits_str = library_limits_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] + [% END %] [% END %] - [% ELSE %] - No limitation - [% END %] - - [% IF !debit_type.is_system && !debit_type.archived %] - Edit - Archive - [% ELSIF debit_type.archived %] - Restore - [% END %] -
+ + [% IF debit_type.library_limits.count > 1 %] + [% debit_type.library_limits.count | html %] library limitations + [% ELSE %] + [% debit_type.library_limits.count | html %] library limitation + [% END %] + [% ELSE %] + No limitation + [% END %] +
+ [% IF !debit_type.is_system && !debit_type.archived %] + Edit + Archive + [% ELSIF debit_type.archived %] + Restore + [% END %] +
+
[% ELSE %]
There are no account debit types defined. Create new debit type diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt index 2a4e1e2ffc0..b35a242c116 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -291,65 +291,67 @@ Patron attribute types › Administration › Koha — it was already absent from the database.
[% END %] [% IF ( available_attribute_types ) %] - [% FOREACH attribute IN available_attribute_types %] + [% FOREACH attribute IN available_attribute_types %] [% IF attribute.class %]

[% attribute.lib | html %]

[% END %] - - - - - - - - - - - - - [% FOREACH item IN attribute.items %] - - - - + + [% ELSE %] + [% item.authorised_value_category | html %] + [% END %] + + + + [% END %] + +
CodeDescriptionLibrary limitationAuthorized value categoryMandatoryActions
[% item.code | html %][% item.description | html %] - [% SET libraries = item.library_limits %] - [% IF ( libraries && libraries.count > 0 ) %] - [% branches_str = "" %] - [% FOREACH branch IN libraries %] - [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] - [% END %] - - [% IF libraries.count > 1 %] - [% libraries.count | html %] library limitations - [% ELSE %] - [% libraries.count | html %] library limitation +
+ + + + + + + + + + + + + [% FOREACH item IN attribute.items %] + + + + - - [% ELSE %] - [% item.authorised_value_category | html %] - [% END %] - - - - [% END %] - -
CodeDescriptionLibrary limitationAuthorized value categoryMandatoryActions
[% item.code | html %][% item.description | html %] + [% SET libraries = item.library_limits %] + [% IF ( libraries && libraries.count > 0 ) %] + [% branches_str = "" %] + [% FOREACH branch IN libraries %] + [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %] [% END %] - - [% ELSE %] - No limitation - [% END %] - - [% IF ( CAN_user_parameters_manage_auth_values ) %] - [% item.authorised_value_category | html %] - [% IF ( item.mandatory ) -%] - Yes - [% ELSE -%] - No - [% END %] - - Edit - Delete -
+ + [% IF libraries.count > 1 %] + [% libraries.count | html %] library limitations + [% ELSE %] + [% libraries.count | html %] library limitation + [% END %] + + [% ELSE %] + No limitation + [% END %] +
+ [% IF ( CAN_user_parameters_manage_auth_values ) %] + [% item.authorised_value_category | html %] + [% IF ( item.mandatory ) -%] + Yes + [% ELSE -%] + No + [% END %] + + Edit + Delete +
+ [% END %] [% ELSE %]

There are no saved patron attribute types.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt index 5a225b2294c..c298c725f56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt @@ -165,40 +165,42 @@ You Searched for [% searchfield | html %] [% END %] [% IF restrictions %] - - - - - - - - - - - [% FOREACH restriction IN restrictions %] +
+
CodeLabelDefaultActions
+ - - - - + + + + - [% END %] - -
- [% restriction.code | html %] - - [% PROCESS restriction_type_description %] - - [% IF restriction.is_default %]Yes[% END %] - - Edit - [% IF !restriction.is_system && !restriction.is_default %] - Delete - [% END %] - [% IF !restriction.is_system && !restriction.is_default %] - Make default - [% END %] - CodeLabelDefaultActions
+ + + [% FOREACH restriction IN restrictions %] + + + [% restriction.code | html %] + + + [% PROCESS restriction_type_description %] + + + [% IF restriction.is_default %]Yes[% END %] + + + Edit + [% IF !restriction.is_system && !restriction.is_default %] + Delete + [% END %] + [% IF !restriction.is_system && !restriction.is_default %] + Make default + [% END %] + + + [% END %] + + + [% ELSE %]
No restrictions have been defined. Create a new restriction.
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index ce2d1ded3f3..fd55daf8286 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -74,27 +74,29 @@ [% IF search_results %]

Search results

- - - - - - - - - - - - [% FOREACH sr IN search_results %] - - - - - - - - [% END %] -
NameDescriptionOrganizationLatest version 
[% sr.result.name | html %][% sr.result.description | html %][% sr.repo.name | html %][% sr.result.tag_name | html %] Install
+
+ + + + + + + + + + + + [% FOREACH sr IN search_results %] + + + + + + + + [% END %] +
NameDescriptionOrganizationLatest version 
[% sr.result.name | html %][% sr.result.description | html %][% sr.repo.name | html %][% sr.result.tag_name | html %] Install
+
[% END %] [% UNLESS ( plugins ) %] @@ -116,105 +118,107 @@ [% END %] [% END %] [% ELSE %] - - - - - - - - - - - [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] - - [% END %] - - - - [% FOREACH plugin IN plugins %] - [% IF plugin.error %] - - - [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] - - [% ELSE %] - - [% END %] - - [% ELSE %] - -
NameDescriptionAuthorPlugin versionMinimum Koha versionMaximum Koha versionLast updatedActions
- [% plugin.name | html %] - ERRORS - Error found whilst attempting to load pluginError found whilst attempting to load plugin
- [% plugin.metadata.name | html %] - [% IF ( plugin.is_enabled ) %] - ENABLED - [% ELSE %] - DISABLED +
+ + + + + + + + + + + [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] + [% END %] - - + - [% IF ( plugin.metadata.minimum_version && koha_version < plugin.metadata.minimum_version ) %] -
- Warning: This plugin was written for a newer version of Koha. Use at your own risk. -
+ [% FOREACH plugin IN plugins %] + [% IF plugin.error %] + + + [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] + + [% ELSE %] + [% END %] + + [% ELSE %] + + + - - - - - - [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] - + + + + + + [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %] + + + + + [% END %] + [% END %] - [% END %] - [% END %] -
NameDescriptionAuthorPlugin versionMinimum Koha versionMaximum Koha versionLast updatedActions - [% plugin.metadata.description | html %] +
+ [% plugin.name | html %] + ERRORS + Error found whilst attempting to load pluginError found whilst attempting to load plugin
+ [% plugin.metadata.name | html %] + [% IF ( plugin.is_enabled ) %] + ENABLED + [% ELSE %] + DISABLED + [% END %] + + [% plugin.metadata.description | html %] - [% IF ( plugin.metadata.maximum_version && koha_version > plugin.metadata.maximum_version ) %] -
- Warning: This plugin was written for an older version of Koha. Use at your own risk. -
- [% END %] -
[% plugin.metadata.author | html %][% plugin.metadata.version | html %][% plugin.metadata.minimum_version | html %][% plugin.metadata.maximum_version | html %][% plugin.metadata.date_updated | $KohaDates %] -
- - Actions - -
[% plugin.metadata.author | html %][% plugin.metadata.version | html %][% plugin.metadata.minimum_version | html %][% plugin.metadata.maximum_version | html %][% plugin.metadata.date_updated | $KohaDates %] +
+ + Actions + + -
-
+
+ [% END %] -- 2.30.2