From 9a43dd7f9acc44a5c6e7f82b3e4d27ec2d9af9b4 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 1 Apr 2024 11:23:15 +0000 Subject: [PATCH] Bug 36118: Preparation: Move action logs tt methods This moves action logs related methods to its own .inc file in order to be reusable Sponsored-by: UKHSA - UK Health Security Agency Sponsored-by: PTFS Europe Ltd Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Pedro Amorim Signed-off-by: Jeremy Evans Signed-off-by: Katrin Fischer --- .../prog/en/includes/action-logs.inc | 107 +++++++++++++++++ .../prog/en/modules/tools/viewlog.tt | 108 +----------------- 2 files changed, 108 insertions(+), 107 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc new file mode 100644 index 0000000000..509e29d2e4 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc @@ -0,0 +1,107 @@ +[% BLOCK translate_log_module %] +[% SWITCH module %] +[% CASE 'AUTH' %]Authentication[% UNLESS Koha.Preference('AuthFailureLog') || Koha.Preference('AuthScuccessLog') %] [% END %] +[% CASE 'CATALOGUING' %]Cataloging[% UNLESS Koha.Preference('CataloguingLog') %] [% END %] + +[% CASE 'AUTHORITIES' %]Authorities[% UNLESS Koha.Preference('AuthoritiesLog') %] [% END %] + +[% CASE 'MEMBERS' %]Patrons[% UNLESS Koha.Preference('BorrowersLog') %] [% END %] + +[% CASE 'ACQUISITIONS' %]Acquisitions[% UNLESS Koha.Preference('AcquisitionLog') %] [% END %] + +[% CASE 'SERIAL' %]Serials[% UNLESS Koha.Preference('SubscriptionLog') %] [% END %] + +[% CASE 'HOLDS' %]Holds[% UNLESS Koha.Preference('HoldsLog') %] [% END %] + +[% CASE 'ILL' %]Interlibrary loans[% UNLESS Koha.Preference('IllLog') %] [% END %] + +[% CASE 'CIRCULATION' %]Circulation[% UNLESS Koha.Preference('IssueLog') %] [% END %] + +[% CASE 'CLAIMS' %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] [% END %] + +[% CASE 'FINES' %]Fines[% UNLESS Koha.Preference('FinesLog') %] [% END %] + +[% CASE 'SYSTEMPREFERENCE' %]System preferences + +[% CASE 'CRONJOBS' %]Cron jobs[% UNLESS Koha.Preference('CronjobLog') %] [% END %] + +[% CASE 'REPORTS' %]Reports[% UNLESS Koha.Preference('ReportsLog') %] [% END %] + +[% CASE 'SEARCHENGINE' %]Search engine + +[% CASE 'NOTICES' %]Notices[% UNLESS Koha.Preference('NoticesLog') %] [% END %] +[% CASE 'NEWS' %]News[% UNLESS Koha.Preference('NewsLog') %] [% END %] +[% CASE 'RECALLS' %]Recalls[% UNLESS Koha.Preference('RecallsLog') %] [% END %] +[% CASE 'SUGGESTION' %]Suggestions[% UNLESS Koha.Preference('SuggestionsLog') %] [% END %] + +[% CASE %][% module | html %] +[% END %] +[% END %] + +[% BLOCK translate_log_action %] +[% SWITCH action %] +[% CASE 'ADD' %]Add +[% CASE 'DELETE' %]Delete +[% CASE 'MODIFY' %]Modify +[% CASE 'ISSUE' %]Checkout +[% CASE 'RETURN' %]Return +[% CASE 'CREATE' %]Create +[% CASE 'CANCEL' %]Cancel +[% CASE 'FILL' %]Fill +[% CASE 'RESUME' %]Resume +[% CASE 'SUSPEND' %]Suspend +[% CASE 'RENEW' %]Renew +[% CASE 'RENEWAL' %]Renew +[% CASE 'CHANGE PASS' %]Change password +[% CASE 'RESET PASS' %]Reset password +[% CASE 'ADDCIRCMESSAGE' %]Add circulation message +[% CASE 'MODCIRCMESSAGE' %]Modify circulation message +[% CASE 'DELCIRCMESSAGE' %]Delete circulation message +[% CASE 'STATUS_CHANGE' %]Change ILL request status +[% CASE 'PATRON_NOTICE' %]ILL notice sent to patron +[% CASE 'ADD_BASKET' %]Create an acquisitions basket +[% CASE 'MODIFY_BASKET' %]Modify an acquisitions basket +[% CASE 'MODIFY_BASKET_HEADER' %]Modify an acquisitions basket header +[% CASE 'MODIFY_BASKET_USERS' %]Modify an acquisitions basket's users +[% CASE 'CLOSE_BASKET' %]Close an acquisitions basket +[% CASE 'APPROVE_BASKET' %]Approve an acquisitions basket +[% CASE 'REOPEN_BASKET' %]Reopen an acquisitions basket +[% CASE 'CANCEL_ORDER' %]Cancel an order +[% CASE 'CREATE_ORDER' %]Create an order +[% CASE 'MODIFY_ORDER' %]Modify an order +[% CASE 'CREATE_INVOICE_ADJUSTMENT' %]Create an invoice adjustment +[% CASE 'UPDATE_INVOICE_ADJUSTMENT' %]Modify an invoice adjustment +[% CASE 'DELETE_INVOICE_ADJUSTMENT' %]Delete an invoice adjustment +[% CASE 'RECEIVE_ORDER' %]Receive an order +[% CASE 'MODIFY_BUDGET' %]Modify a budget +[% CASE 'CREATE_FUND' %]Create a fund +[% CASE 'MODIFY_FUND' %]Modify a fund +[% CASE 'DELETE_FUND' %]Delete a fund +[% CASE 'CREATE_RESTRICTION' %]Create restriction +[% CASE 'MODIFY_RESTRICTION' %]Modify restriction +[% CASE 'DELETE_RESTRICTION' %]Delete restriction +[% CASE 'Run' %]Run +[% CASE 'End' %]End +[% CASE 'EDIT_MAPPINGS' %]Edit mappings +[% CASE 'RESET_MAPPINGS' %]Reset mappings +[% CASE 'SERIAL CLAIM' %]Serial claim +[% CASE 'ACQUISITION CLAIM' %]Acquisition claim +[% CASE 'ACQUISITION ORDER' %]Acquisition order +[% CASE 'OVERDUE' %]Overdue +[% CASE 'EXPIRE' %]Expire +[% CASE %][% action | html %] +[% END %] +[% END %] + +[% BLOCK translate_log_interface %] +[% SWITCH log_interface.upper %] +[% CASE 'INTRANET' %]Staff interface +[% CASE 'OPAC' %]OPAC +[% CASE 'SIP' %]SIP +[% CASE 'COMMANDLINE' %]Command-line +[% CASE 'API' %]REST API +[% CASE 'CRON' %]Cron job +[% CASE 'UPGRADE' %]Upgrade +[% CASE %][% log_interface | html %] +[% END %] +[% END %] \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index cd693f01b0..1998abf264 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -67,113 +67,7 @@ [% INCLUDE 'cat-search.inc' %] [% END %] -[% BLOCK translate_log_module %] -[% SWITCH module %] -[% CASE 'AUTH' %]Authentication[% UNLESS Koha.Preference('AuthFailureLog') || Koha.Preference('AuthScuccessLog') %] [% END %] -[% CASE 'CATALOGUING' %]Cataloging[% UNLESS Koha.Preference('CataloguingLog') %] [% END %] - -[% CASE 'AUTHORITIES' %]Authorities[% UNLESS Koha.Preference('AuthoritiesLog') %] [% END %] - -[% CASE 'MEMBERS' %]Patrons[% UNLESS Koha.Preference('BorrowersLog') %] [% END %] - -[% CASE 'ACQUISITIONS' %]Acquisitions[% UNLESS Koha.Preference('AcquisitionLog') %] [% END %] - -[% CASE 'SERIAL' %]Serials[% UNLESS Koha.Preference('SubscriptionLog') %] [% END %] - -[% CASE 'HOLDS' %]Holds[% UNLESS Koha.Preference('HoldsLog') %] [% END %] - -[% CASE 'ILL' %]Interlibrary loans[% UNLESS Koha.Preference('IllLog') %] [% END %] - -[% CASE 'CIRCULATION' %]Circulation[% UNLESS Koha.Preference('IssueLog') %] [% END %] - -[% CASE 'CLAIMS' %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] [% END %] - -[% CASE 'FINES' %]Fines[% UNLESS Koha.Preference('FinesLog') %] [% END %] - -[% CASE 'SYSTEMPREFERENCE' %]System preferences - -[% CASE 'CRONJOBS' %]Cron jobs[% UNLESS Koha.Preference('CronjobLog') %] [% END %] - -[% CASE 'REPORTS' %]Reports[% UNLESS Koha.Preference('ReportsLog') %] [% END %] - -[% CASE 'SEARCHENGINE' %]Search engine - -[% CASE 'NOTICES' %]Notices[% UNLESS Koha.Preference('NoticesLog') %] [% END %] -[% CASE 'NEWS' %]News[% UNLESS Koha.Preference('NewsLog') %] [% END %] -[% CASE 'RECALLS' %]Recalls[% UNLESS Koha.Preference('RecallsLog') %] [% END %] -[% CASE 'SUGGESTION' %]Suggestions[% UNLESS Koha.Preference('SuggestionsLog') %] [% END %] - -[% CASE %][% module | html %] -[% END %] -[% END %] - -[% BLOCK translate_log_action %] -[% SWITCH action %] -[% CASE 'ADD' %]Add -[% CASE 'DELETE' %]Delete -[% CASE 'MODIFY' %]Modify -[% CASE 'ISSUE' %]Checkout -[% CASE 'RETURN' %]Return -[% CASE 'CREATE' %]Create -[% CASE 'CANCEL' %]Cancel -[% CASE 'FILL' %]Fill -[% CASE 'RESUME' %]Resume -[% CASE 'SUSPEND' %]Suspend -[% CASE 'RENEW' %]Renew -[% CASE 'RENEWAL' %]Renew -[% CASE 'CHANGE PASS' %]Change password -[% CASE 'RESET PASS' %]Reset password -[% CASE 'ADDCIRCMESSAGE' %]Add circulation message -[% CASE 'MODCIRCMESSAGE' %]Modify circulation message -[% CASE 'DELCIRCMESSAGE' %]Delete circulation message -[% CASE 'STATUS_CHANGE' %]Change ILL request status -[% CASE 'PATRON_NOTICE' %]ILL notice sent to patron -[% CASE 'ADD_BASKET' %]Create an acquisitions basket -[% CASE 'MODIFY_BASKET' %]Modify an acquisitions basket -[% CASE 'MODIFY_BASKET_HEADER' %]Modify an acquisitions basket header -[% CASE 'MODIFY_BASKET_USERS' %]Modify an acquisitions basket's users -[% CASE 'CLOSE_BASKET' %]Close an acquisitions basket -[% CASE 'APPROVE_BASKET' %]Approve an acquisitions basket -[% CASE 'REOPEN_BASKET' %]Reopen an acquisitions basket -[% CASE 'CANCEL_ORDER' %]Cancel an order -[% CASE 'CREATE_ORDER' %]Create an order -[% CASE 'MODIFY_ORDER' %]Modify an order -[% CASE 'CREATE_INVOICE_ADJUSTMENT' %]Create an invoice adjustment -[% CASE 'UPDATE_INVOICE_ADJUSTMENT' %]Modify an invoice adjustment -[% CASE 'DELETE_INVOICE_ADJUSTMENT' %]Delete an invoice adjustment -[% CASE 'RECEIVE_ORDER' %]Receive an order -[% CASE 'MODIFY_BUDGET' %]Modify a budget -[% CASE 'CREATE_FUND' %]Create a fund -[% CASE 'MODIFY_FUND' %]Modify a fund -[% CASE 'DELETE_FUND' %]Delete a fund -[% CASE 'CREATE_RESTRICTION' %]Create restriction -[% CASE 'MODIFY_RESTRICTION' %]Modify restriction -[% CASE 'DELETE_RESTRICTION' %]Delete restriction -[% CASE 'Run' %]Run -[% CASE 'End' %]End -[% CASE 'EDIT_MAPPINGS' %]Edit mappings -[% CASE 'RESET_MAPPINGS' %]Reset mappings -[% CASE 'SERIAL CLAIM' %]Serial claim -[% CASE 'ACQUISITION CLAIM' %]Acquisition claim -[% CASE 'ACQUISITION ORDER' %]Acquisition order -[% CASE 'OVERDUE' %]Overdue -[% CASE 'EXPIRE' %]Expire -[% CASE %][% action | html %] -[% END %] -[% END %] - -[% BLOCK translate_log_interface %] -[% SWITCH log_interface.upper %] -[% CASE 'INTRANET' %]Staff interface -[% CASE 'OPAC' %]OPAC -[% CASE 'SIP' %]SIP -[% CASE 'COMMANDLINE' %]Command-line -[% CASE 'API' %]REST API -[% CASE 'CRON' %]Cron job -[% CASE 'UPGRADE' %]Upgrade -[% CASE %][% log_interface | html %] -[% END %] -[% END %] +[% PROCESS 'action-logs.inc' %] [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] -- 2.39.5