From 4b3c14df4d95ebe69d39a5a4e10afeb1e36fa789 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 18 Aug 2023 10:03:49 +0000 Subject: [PATCH] Bug 34382: Fix inconsistencies in Patron categories page titles, breadcrumbs, and header This patch makes some changes to the patron categories administration page so that the page title, breadcrumb navigation, and headings are more consistent with each other. To test, apply the patch and go to Administration -> Patron categories. - Test all variations of the page: - Main page (listing categories) - New category - Edit category - Confirm deletion of category when the category is in use (there are existing patrons who have that category) - Confirm deletion of category when the category is not in use Note: This patch contains whitespace changes, so please ignore whitespace if you're checking the diff. Signed-off-by: Amanda Hovey Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/categories.tt | 154 +++++++++--------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt index 89f522c24b..1e360ca394 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -18,7 +18,7 @@ [% END %] [% IF op == 'delete_confirm' %] [% IF ( patrons_in_category > 0 ) %] - [% tx("Cannot delete: category '{categorycode}'", { categorycode = categorycode }) | html %] + [% tx("Cannot delete category '{categorycode}'", { categorycode = categorycode }) | html %] [% ELSE %] [% tx("Confirm deletion of category '{categorycode}'", { categorycode = categorycode }) | html %] [% END %] › @@ -55,7 +55,7 @@ [% IF op == 'add_form' %] [% IF ( categorycode ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify category '[% categorycode | html %]' + [% tx("Modify category '{categorycode}'", { categorycode = categorycode }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] @@ -67,11 +67,11 @@ [% IF op == 'delete_confirm' %] [% IF ( patrons_in_category > 0 ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Cannot delete: Category [% categorycode | html %] in use + [% tx("Cannot delete category '{categorycode}'", { categorycode = categorycode }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Confirm deletion of category '[% categorycode | html %]' + [% tx("Confirm deletion of category '{categorycode}'", { categorycode = categorycode }) | html %] [% END %] [% END %] [% END %] @@ -117,7 +117,7 @@ [% IF category %] -

Modify category [% categorycode | html %]

+

[% tx("Modify category '{categorycode}'", { categorycode = categorycode }) | html %]

[% ELSE %]

New category

[% END %] @@ -436,83 +436,83 @@ [% END %] [% IF op == 'delete_confirm' %] -
-
- -

- [% IF patrons_in_category > 0 %] - Category [% categorycode | html %] is in use. Deletion not possible! +

+ [% IF patrons_in_category > 0 %] + [% tx("Cannot delete category '{categorycode}'", { categorycode = categorycode }) | html %] + [% ELSE %] + [% tx("Confirm deletion of category '{categorycode}'", { categorycode = categorycode }) | html %] + [% END %] +

+ + [% IF patrons_in_category > 0 %] +
+ This category is used [% patrons_in_category | html %] times. Deletion not possible +
+ [% END %] + +
+ + + + + + + + + + + + + - [% IF patrons_in_category > 0 %] -
- This category is used [% patrons_in_category | html %] times. Deletion not possible -
+ [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] + + + + [% END %] -
Category code: [% category.categorycode | html %]
Description: [% category.description | html %]
Enrollment period: + [% IF category.enrolmentperiod %] + [% category.enrolmentperiod | html %] months [% ELSE %] - Confirm deletion of category [% categorycode | html %] + until [% category.enrolmentperioddate | $KohaDates %] [% END %] - - +
Password expiration: [% category.password_expiry_days | html %] days
Age required: [% category.dateofbirthrequired | html %] years
Upperage limit: [% category.upperagelimit | html %] years
Enrollment fee: [% category.enrolmentfee | $Price %]
Receives overdue notices: [% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]
Lost items in staff interface[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]
Hold fee: [% category.reservefee | $Price %]
Check previous checkouts: + [% SWITCH category.checkprevcheckout %] + [% CASE 'yes' %] + Yes + [% CASE 'no' %] + No + [% CASE 'inherit' %] + Inherit + [% END %] +
- - - - - - - - - - - - + + + + + +
Category code: [% category.categorycode | html %]
Description: [% category.description | html %]
Enrollment period: - [% IF category.enrolmentperiod %] - [% category.enrolmentperiod | html %] months - [% ELSE %] - until [% category.enrolmentperioddate | $KohaDates %] - [% END %] -
Password expiration: [% category.password_expiry_days | html %] days
Age required: [% category.dateofbirthrequired | html %] years
Upperage limit: [% category.upperagelimit | html %] years
Enrollment fee: [% category.enrolmentfee | $Price %]
Receives overdue notices: [% IF category. overduenoticerequired %]Yes[% ELSE %]No[% END %]
Lost items in staff interface[% IF category.hidelostitems %]Hidden by default[% ELSE %]Shown[% END %]
Hold fee: [% category.reservefee | $Price %]
Can be guarantee[% IF category.can_be_guarantee %]Yes[% ELSE %]No[% END %]
Default privacy: + [% SWITCH category.default_privacy %] + [% CASE 'default' %] + Default + [% CASE 'never' %] + Never + [% CASE 'forever' %] + Forever + [% END %] +
+
- [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %] - - Check previous checkouts: - - [% SWITCH category.checkprevcheckout %] - [% CASE 'yes' %] - Yes - [% CASE 'no' %] - No - [% CASE 'inherit' %] - Inherit - [% END %] - - - [% END %] - Can be guarantee[% IF category.can_be_guarantee %]Yes[% ELSE %]No[% END %] - - Default privacy: - - [% SWITCH category.default_privacy %] - [% CASE 'default' %] - Default - [% CASE 'never' %] - Never - [% CASE 'forever' %] - Forever - [% END %] - - - -
- [% IF patrons_in_category > 0 %] - - [% ELSE %] - - - - Cancel - [% END %] -
+ +
+ [% IF patrons_in_category > 0 %] + + [% ELSE %] + + + + Cancel + [% END %]
[% END %] -- 2.39.2