diff --git a/administrator/components/com_actionlogs/config.xml b/administrator/components/com_actionlogs/config.xml index 8ccd6e176e251..f84146d31ccf0 100644 --- a/administrator/components/com_actionlogs/config.xml +++ b/administrator/components/com_actionlogs/config.xml @@ -56,5 +56,16 @@ + + + + diff --git a/administrator/components/com_actionlogs/src/View/Actionlogs/HtmlView.php b/administrator/components/com_actionlogs/src/View/Actionlogs/HtmlView.php index e9cd3bb568397..30a5cc415b0f3 100644 --- a/administrator/components/com_actionlogs/src/View/Actionlogs/HtmlView.php +++ b/administrator/components/com_actionlogs/src/View/Actionlogs/HtmlView.php @@ -78,6 +78,14 @@ class HtmlView extends BaseHtmlView */ protected $showIpColumn = false; + /** + * Setting if the date should be displayed relative to the current date. + * + * @var boolean + * @since __DEPLOY_VERSION__ + */ + protected $dateRelative = false; + /** * Method to display the view. * @@ -100,6 +108,7 @@ public function display($tpl = null) $this->activeFilters = $model->getActiveFilters(); $params = ComponentHelper::getParams('com_actionlogs'); $this->showIpColumn = (bool) $params->get('ip_logging', 0); + $this->dateRelative = (bool) $params->get('date_relative', 1); if (count($errors = $model->getErrors())) { diff --git a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php index 469d66edcf73e..51a7970c3d0ee 100644 --- a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php +++ b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php @@ -88,10 +88,14 @@ escape(Text::_($extension)); ?> - log_date); ?> -
+ dateRelative) : ?> + log_date); ?> +
+ log_date, Text::_('DATE_FORMAT_LC6')); ?> -
+ dateRelative) : ?> +
+ escape($item->name); ?> diff --git a/administrator/language/en-GB/com_actionlogs.ini b/administrator/language/en-GB/com_actionlogs.ini index 93a3cd90a0305..2223a0ddd2ee5 100644 --- a/administrator/language/en-GB/com_actionlogs.ini +++ b/administrator/language/en-GB/com_actionlogs.ini @@ -14,6 +14,7 @@ COM_ACTIONLOGS_COMMA="Comma" COM_ACTIONLOGS_CONFIGURATION="User Actions Log: Options" COM_ACTIONLOGS_CSV_DELIMITER_LABEL="CSV Delimiter" COM_ACTIONLOGS_DATE="Date" +COM_ACTIONLOGS_DATE_RELATIVE_LABEL="Relative Date/Time" COM_ACTIONLOGS_DISABLED="Disabled" COM_ACTIONLOGS_EMAIL_BODY="Latest User Actions\n------\nThis is the latest action performed by a user on your website.\n\nAction | Date | Extension | Name\n{MESSAGES} {MESSAGE} | {DATE} | {EXTENSION} | {USERNAME} \n{/MESSAGES}" COM_ACTIONLOGS_EMAIL_DESC="This is the latest action performed by a user on your website."