From 4ec14508adb60b10cd95cdbc12e3b270efefbc58 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 3 Apr 2024 07:58:33 +0200 Subject: [PATCH] new InfoLog status filter "Archived too" --- infolog/inc/class.infolog_bo.inc.php | 1 + infolog/inc/class.infolog_so.inc.php | 11 +++++++++-- infolog/inc/class.infolog_ui.inc.php | 4 ++-- infolog/lang/egw_de.lang | 1 + infolog/lang/egw_en.lang | 1 + 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 8ddbe3a3e9..01b50a5a74 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -298,6 +298,7 @@ class infolog_bo if ($type !== 'defaults' && !isset($statis['archive'])) { $statis['archive'] = 'archive'; + $statis['archive_too'] = lang('Archived too'); } } } diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 168cbd83c2..7bf7afaa5c 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -299,8 +299,8 @@ class infolog_so * generate sql to filter based on the status of the log-entry * * @param string $_filter done = done or billed, open = not (done, billed, cancelled or deleted), offer = offer - * @param boolean $prefix_and =true if true prefix the fileter with ' AND ' - * @return string the necesary sql + * @param boolean $prefix_and =true if true prefix the filter with ' AND ' + * @return string the necessary sql */ function statusFilter($_filter = '',$prefix_and=true) { @@ -883,6 +883,13 @@ class infolog_so $filtermethod .= ' AND '.$this->db->expression($this->info_table,'main.',array('info_id' => $data)); break; + case 'info_status': + if ($data === 'archive_too') + { + $filtermethod .= "AND info_status NOT IN ('deleted','template','nonactive')"; + break; + } + // fall through default: $filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data)); break; diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 3a70f73ed4..42c7aa9283 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -821,11 +821,11 @@ class infolog_ui /** * Shows the infolog list * - * @param array/string $values etemplate content or 'reset_action_view' if called by index.php to reset an action-view + * @param array|string $values etemplate content or 'reset_action_view' if called by index.php to reset an action-view * @param string $action if set only entries liked to that $action:$action_id are shown * @param string $action_id if set only entries liked to that $action:$action_id are shown * @param mixed $called_as is how we got called, for a hook eg. the call-params of that page containing the hook - * @param boolean $e$extra_app_header * @param boolean $return_html=false + * @param boolean $extra_app_header * @param boolean $return_html=false * @param string $own_referer='' this is our own referer * @param string $action_title='' app_header for the action, if '' we try the link-title */ diff --git a/infolog/lang/egw_de.lang b/infolog/lang/egw_de.lang index 532acd2558..6723da14d0 100644 --- a/infolog/lang/egw_de.lang +++ b/infolog/lang/egw_de.lang @@ -60,6 +60,7 @@ application mail expected but got: %1 infolog de Mail-Applikation erwartet aber apply the action on the whole query, not only the shown entries!!! infolog de Wendet den Befehl auf die gesamte Abfrage an, NICHT nur auf die angezeigten Datensätze! apply the changes infolog de Übernimmt die Änderungen archive infolog de Archiviert +archived too infolog de Auch archiviert are you shure you want to close this entry ? infolog de Wollen Sie wirklich den InfoLog schliessen? are you shure you want to delete this entry ? infolog de Wollen Sie diesen InfoLog wirklich löschen? attach a file infolog de Datei anhängen diff --git a/infolog/lang/egw_en.lang b/infolog/lang/egw_en.lang index 2a93710c8f..678daff47c 100644 --- a/infolog/lang/egw_en.lang +++ b/infolog/lang/egw_en.lang @@ -60,6 +60,7 @@ application mail expected but got: %1 infolog en Application email expected but apply the action on the whole query, not only the shown entries!!! infolog en Apply the action on the whole query, NOT only the shown entries! apply the changes infolog en Apply the changes archive infolog en Archive +archived too infolog en Archived too are you shure you want to close this entry ? infolog en Are you sure you want to close this entry? are you shure you want to delete this entry ? infolog en Are you sure you want to delete this entry? attach a file infolog en Attach a file