[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Action log Configuration Feedback for Record and Report
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68922a785b0ce_2cd5cdc4884c@gitlab-sidekiq-low-urgency-cpu-bound-v2-5b648c79b-497rm.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
a77c158e by Alain Cisirika at 2025-08-05T15:51:43+00:00
[ENH] Action log Configuration Feedback for Record and Report
---
* [ENH] Action log Configuration Feedback for Record and Report
See merge request tikiwiki/tiki!8110
- - - - -
2 changed files:
- templates/tiki-admin_actionlog.tpl
- tiki-admin_actionlog.php
Changes:
=====================================
templates/tiki-admin_actionlog.tpl
=====================================
@@ -9,7 +9,10 @@
<form method="get" action="tiki-admin_actionlog.php#List">
{* no ticket needed as this form doesn't change the database *}
{if empty($nbViewedConfs)}
- {button _text="{tr}Please select some actions to be reported.{/tr}" href="#" _onclick="showTab(2); return true;"}
+ {remarksbox type="tip" title="{tr}No Actions selected to be Reported{/tr}"}
+ {tr}No action selected to be reported. Follow the link below to select actions you want to report.{/tr}
+ {button _text="{tr}Select actions to be reported.{/tr}" href="#" _onclick="showTab(2); return true;"}
+ {/remarksbox}
{else}
<fieldset>
<legend>{tr}Date{/tr}</legend>
=====================================
tiki-admin_actionlog.php
=====================================
@@ -164,6 +164,28 @@ if (isset($_REQUEST['max'])) {
if ($tiki_p_view_actionlog == 'y') {
if (isset($_POST['save']) && $access->checkCsrf()) {
+ $itemsSelected = false;
+ $recordedWithoutReported = [];
+
+ foreach ($action_log_conf_selected as $index => $conf) {
+ $recorded = isset($_REQUEST[$conf['code']]) && $_REQUEST[$conf['code']] == 'on';
+ $reported = isset($_REQUEST['v_' . $conf['code']]) && $_REQUEST['v_' . $conf['code']] == 'on';
+
+ if ($recorded || $reported) {
+ $itemsSelected = true;
+ }
+
+ if ($recorded && ! $reported) {
+ $recordedWithoutReported[] = $conf['action'] . ' - ' . $conf['objectType'];
+ }
+ }
+
+ if (! $itemsSelected) {
+ Feedback::warning(tra('Action logs have been configured successfully. No item checked to be recorded or reported.'));
+ } elseif (! empty($recordedWithoutReported)) {
+ Feedback::success(tra('Action logs have been configured successfully. Some selected items have been recorded but not reported'));
+ }
+
foreach ($action_log_conf_selected as $index => $conf) {
if (isset($_REQUEST['v_' . $conf['code']]) && $_REQUEST['v_' . $conf['code']] == 'on') { //viewed and reported
$logslib->set_actionlog_conf($conf['action'], $conf['objectType'], 'v');
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a77c158ec76ab499b9c160300d66ecee23b742c1
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a77c158ec76ab499b9c160300d66ecee23b742c1
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs