From f2153a721c1b68ef75bb686168a71442eb89aae8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 24 Jan 2024 14:29:46 +0000 Subject: [PATCH] Bug 35895: Reindent tags review template This patch reindents the tags review template so that it has consistent indentation, with tab indentation coverted to space. The patch also adds "FILTER collapse" around the +[% FILTER collapse %][% END %] -[% WRAPPER 'header.inc' %] - [% INCLUDE 'cat-search.inc' %] -[% END %] + [% WRAPPER 'header.inc' %] + [% INCLUDE 'cat-search.inc' %] + [% END %] -[% WRAPPER 'sub-header.inc' %] - [% WRAPPER breadcrumbs %] - [% WRAPPER breadcrumb_item %] - Tools - [% END %] - [% IF ( filter_approved_ok || filter_approved_pending || filter_approved_rej ) %] + [% WRAPPER 'sub-header.inc' %] + [% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item %] - Tags - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - Tags + Tools [% END %] - [% END %] - [% IF ( filter_approved_ok ) %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - [% t("Approved") | html %] + [% IF ( filter_approved_ok || filter_approved_pending || filter_approved_rej ) %] + [% WRAPPER breadcrumb_item %] + Tags + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Tags + [% END %] [% END %] - [% ELSIF ( filter_approved_pending ) %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - [% t("Pending") | html %] + [% IF ( filter_approved_ok ) %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% t("Approved") | html %] + [% END %] + [% ELSIF ( filter_approved_pending ) %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% t("Pending") | html %] + [% END %] + [% ELSIF ( filter_approved_rej ) %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% t("Rejected") | html %] + [% END %] [% END %] - [% ELSIF ( filter_approved_rej ) %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - [% t("Rejected") | html %] - [% END %] - [% END %] - [% END #/ WRAPPER breadcrumbs %] -[% END #/ WRAPPER sub-header.inc %] + [% END #/ WRAPPER breadcrumbs %] + [% END #/ WRAPPER sub-header.inc %] -
-
-
-
+
+
+
+
+
+
+

Tags

+
+

+ [% IF ( filter_approved_all ) %]Displaying all terms[% END %] + [% IF ( filter_approved_ok ) %]Displaying approved terms[% END %] + [% IF ( filter_approved_pending ) %]Displaying pending terms[% END %] + [% IF ( filter_approved_rej ) %]Displaying rejected terms[% END %] +

-
-
-

Tags

- -

- [% IF ( filter_approved_all ) %]Displaying all terms[% END %] - [% IF ( filter_approved_ok ) %]Displaying approved terms[% END %] - [% IF ( filter_approved_pending ) %]Displaying pending terms[% END %] - [% IF ( filter_approved_rej ) %]Displaying rejected terms[% END %] -

+ [% IF ( op_count ) %] +
+ [% IF ( op == 'approve' ) %] Approved + [% ELSIF ( op == 'reject' ) %] Rejected + [% ELSIF ( op == 'test' ) %] Tested + [% ELSE %]Unknown operation ([% op | html %]) on + [% END %] + [% op_count | html %] Term(s). +
+ [% END %] + [% IF ( message_loop ) %] +
+ [% FOREACH message_loo IN message_loop %] + [% IF ( message_loo.failed_ok ) %] + Error: + Failed to approve term ([% message_loo.failed_ok | html %]). + [% ELSIF ( message_loo.failed_rej ) %] + Error: + Failed to reject term ([% message_loo.failed_rej | html %]). + [% ELSIF ( message_loo.approver ) %] + No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name). + [% ELSIF ( message_loo.approved_by ) %] + Error: + No match for borrowernumber ([% message_loo.approved_by | html %]). + [% ELSIF ( message_loo.op_zero ) %] + Error: + The root koha user in your KOHA_CONF file (default: kohaadmin) is not a valid tag moderator. These actions are logged by borrowernumber, so the moderator must exist in your borrowers table. Please log in as a different authorized staff user to moderate tags. + [% ELSE %] + Unrecognized error! + [% END %] +
+ [% END %] +
+ [% END %] - [% IF ( op_count ) %] -
- [% IF ( op == 'approve' ) %] Approved - [% ELSIF ( op == 'reject' ) %] Rejected - [% ELSIF ( op == 'test' ) %] Tested - [% ELSE %]Unknown operation ([% op | html %]) on - [% END %] - [% op_count | html %] Term(s). -
- [% END %] - [% IF ( message_loop ) %] -
- [% FOREACH message_loo IN message_loop %] - [% IF ( message_loo.failed_ok ) %]Error: Failed to approve term ([% message_loo.failed_ok | html %]). - [% ELSIF ( message_loo.failed_rej ) %]Error: Failed to reject term ([% message_loo.failed_rej | html %]). - [% ELSIF ( message_loo.approver ) %]No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name). - [% ELSIF ( message_loo.approved_by ) %]Error: No match for borrowernumber ([% message_loo.approved_by | html %]). - [% ELSIF ( message_loo.op_zero ) %]Error: - The root koha user in your KOHA_CONF file - (default: kohaadmin) is not a valid tag moderator. These actions are logged - by borrowernumber, so the moderator must exist in your borrowers table. - Please log in as a different authorized staff user to moderate tags. - [% ELSE %]Unrecognized error! - [% END %] -
- [% END %] -
- [% END %] - [% IF ( pagination_bar ) %] -
- [% pagination_bar | $raw %] -
- [% END %] - [% IF ( tagloop ) %] -
-

- - - - - - - - - [% UNLESS ( filter_approved_pending ) %][% END %] - - - - - [% FOREACH tagloo IN tagloop %] - - - - - - [% IF ( tagloo.approved ) %] - - - [% ELSE %] - - [% UNLESS ( filter_approved_pending ) %][% END %] - [% END %] - - - [% END %] - -
 StatusTermWeightActionsReviewerDate
- [% IF ( tagloo.approved == 0 ) %] - - [% ELSIF ( tagloo.approved == 1 ) %] - - [% ELSE %] - - [% END %] - - [% IF ( tagloo.approved == -1 ) %] - - [% ELSIF ( tagloo.approved == 1 ) %] - - [% ELSE %] - - [% END %] - [% tagloo.term | html %] - [% tagloo.weight_total | html %] - - [% IF ( tagloo.approved_by_name ) %][% tagloo.approved_by_name | html %][% ELSE %] [% END %] - -   - [% tagloo.date_approved | $KohaDates %] -
-
- [% END %] - [% IF ( tagloop ) %]
- - -
[% END %] - -
-
- -
-
-
+
+ +
+ +
+ -
-
-
-
-
+ +
+
+ +
+
[% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] -- 2.30.2