diff --git a/src/com_tjnotifications/admin/config.xml b/src/com_tjnotifications/admin/config.xml index b9c3f5b9..6760ceaf 100644 --- a/src/com_tjnotifications/admin/config.xml +++ b/src/com_tjnotifications/admin/config.xml @@ -1,7 +1,7 @@
- + diff --git a/src/com_tjnotifications/admin/controllers/log.php b/src/com_tjnotifications/admin/controllers/log.php index 5d242f5a..8e61b5e2 100644 --- a/src/com_tjnotifications/admin/controllers/log.php +++ b/src/com_tjnotifications/admin/controllers/log.php @@ -1,10 +1,14 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ +// No direct access defined('_JEXEC') or die; use Joomla\CMS\MVC\Controller\FormController; diff --git a/src/com_tjnotifications/admin/controllers/logs.php b/src/com_tjnotifications/admin/controllers/logs.php index f3c7797c..1893314a 100644 --- a/src/com_tjnotifications/admin/controllers/logs.php +++ b/src/com_tjnotifications/admin/controllers/logs.php @@ -1,11 +1,14 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ -// No direct access to this file +// No direct access defined('_JEXEC') or die; use Joomla\CMS\MVC\Controller\AdminController; diff --git a/src/com_tjnotifications/admin/language/en-GB.com_tjnotifications.ini b/src/com_tjnotifications/admin/language/en-GB.com_tjnotifications.ini index cb6f18c9..dbd2f7ae 100644 --- a/src/com_tjnotifications/admin/language/en-GB.com_tjnotifications.ini +++ b/src/com_tjnotifications/admin/language/en-GB.com_tjnotifications.ini @@ -22,7 +22,7 @@ COM_TJNOTIFICATIONS_FIELD_KEY_OPTION="-- Select Key --" COM_TJNOTIFICATIONS_FIELD_TITLE_OPTION="-- Select Title --" COM_TJNOTIFICATIONS_FIELD_EMAIL_STATUS_LABEL="Email Status" COM_TJNOTIFICATIONS_FIELD_EMAIL_SUBJECT_LABEL="Subject" -COM_TJNOTIFICATIONS_FIELD_EMAIL_BODY_LABEL="Notification body" +COM_TJNOTIFICATIONS_FIELD_EMAIL_BODY_LABEL="Email body" COM_TJNOTIFICATIONS_FIELD_SMS_STATUS_LABEL="SMS Status" COM_TJNOTIFICATIONS_FIELD_SMS_SUBJECT_LABEL="Subject" COM_TJNOTIFICATIONS_FIELD_SMS_BODY_LABEL="SMS Body" @@ -106,6 +106,7 @@ COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BCC="BCC" COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_DATE="Date" COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_STATE="State" COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_PARAMS="Params" +; Since v1.1.0 COM_TJNOTIFICATIONS_TITLE_NOTIFICATIONS="Notifications" COM_TJNOTIFICATIONS_TITLE_NOTIFICATIONLOGS="Notifications Logs" COM_TJNOTIFICATIONS_LOGS="Logs" @@ -137,6 +138,8 @@ COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BODY="Body" COM_TJNOTIFICATIONS_TITLE_VIEW_CONTENTS="View Content" COM_TJNOTIFICATIONS_STATE_SENT="Sent" COM_TJNOTIFICATIONS_STATE_FAILED="Failed" +COM_TJNOTIFICATIONS_FIELD_NOTIFICATION_BODY_LABEL="Notification Body" +COM_TJNOTIFICATIONS_LIST_LOGS_DESC="List all notifiaction logs" ; permissions JACTION_VIEW="View" JACTION_VIEW_COMPONENT_DESC="Allow user to view notifications logs" diff --git a/src/com_tjnotifications/admin/models/forms/filter_logs.xml b/src/com_tjnotifications/admin/models/forms/filter_logs.xml index 6e77d220..c2d8616c 100644 --- a/src/com_tjnotifications/admin/models/forms/filter_logs.xml +++ b/src/com_tjnotifications/admin/models/forms/filter_logs.xml @@ -1,66 +1,20 @@ - -
+ - - - - - - + + + + + - - - - + + + + diff --git a/src/com_tjnotifications/admin/models/log.php b/src/com_tjnotifications/admin/models/log.php index 24d99254..45c557c5 100644 --- a/src/com_tjnotifications/admin/models/log.php +++ b/src/com_tjnotifications/admin/models/log.php @@ -1,16 +1,20 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ -// No direct access to this file +// No direct access defined('_JEXEC') or die; + jimport('joomla.application.component.model'); -use Joomla\CMS\Table\Table; use Joomla\CMS\MVC\Model\AdminModel; +use Joomla\CMS\Table\Table; /** * Log model. diff --git a/src/com_tjnotifications/admin/models/logs.php b/src/com_tjnotifications/admin/models/logs.php index 1dc8ebd2..e5ef21c4 100644 --- a/src/com_tjnotifications/admin/models/logs.php +++ b/src/com_tjnotifications/admin/models/logs.php @@ -1,13 +1,18 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access to this file defined('_JEXEC') or die; + jimport('joomla.application.component.model'); + use Joomla\CMS\MVC\Model\ListModel; /** @@ -67,7 +72,7 @@ protected function populateState($ordering = 'tjl.id', $direction = 'desc') parent::populateState($ordering, $direction); // Get pagination request variables - $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int'); + $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int'); $limitstart = $app->input->post->get('limitstart', 0, '', 'int'); // In case limit has been changed, adjust it diff --git a/src/com_tjnotifications/admin/tables/log.php b/src/com_tjnotifications/admin/tables/log.php index 5a9be7e9..e4f0c6d8 100644 --- a/src/com_tjnotifications/admin/tables/log.php +++ b/src/com_tjnotifications/admin/tables/log.php @@ -1,13 +1,16 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access to this file defined('_JEXEC') or die; + use Joomla\CMS\Table\Table; /** diff --git a/src/com_tjnotifications/admin/views/logs/tmpl/body.php b/src/com_tjnotifications/admin/views/logs/tmpl/body.php index e296459a..8ae7c535 100644 --- a/src/com_tjnotifications/admin/views/logs/tmpl/body.php +++ b/src/com_tjnotifications/admin/views/logs/tmpl/body.php @@ -1,16 +1,19 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access to this file defined('_JEXEC') or die; -use Joomla\CMS\Table\Table; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; +use Joomla\CMS\Table\Table; $jinput = Factory::getApplication()->input; $logId = $jinput->get('id', 0, 'INT'); @@ -25,7 +28,7 @@
id) : ?>
diff --git a/src/com_tjnotifications/admin/views/logs/tmpl/default.php b/src/com_tjnotifications/admin/views/logs/tmpl/default.php index b7c0d052..657c77c1 100644 --- a/src/com_tjnotifications/admin/views/logs/tmpl/default.php +++ b/src/com_tjnotifications/admin/views/logs/tmpl/default.php @@ -1,31 +1,29 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access to this file defined('_JEXEC') or die; -use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Factory; -use Joomla\CMS\Language\Text; -use Joomla\CMS\Router\Route; use Joomla\CMS\HTML\HTMLHelper; +use Joomla\CMS\Layout\LayoutHelper; +use Joomla\CMS\Router\Route; +use Joomla\CMS\Language\Text; -include 'header.html'; -HTMLHelper::_('behavior.keepalive'); HTMLHelper::_('behavior.modal', 'a.modal'); -HTMLHelper::_('bootstrap.tooltip'); -HTMLHelper::_('behavior.multiselect'); HTMLHelper::_('formbehavior.chosen', 'select'); -$listOrder = $this->escape($this->state->get('list.ordering')); -$listDirn = $this->escape($this->state->get('list.direction')); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); $doc = Factory::getDocument(); - $doc->addStyleSheet(JUri::root() . 'administrator/components/com_tjnotifications/assets/css/tjnotifcations.css'); ?> - sidebar)):?> + sidebar)) : ?>
- sidebar;?> + sidebar; ?>
- +
- - - $this, 'options' => array('filterButton' => 1,'filtersHidden' => 0)));?> - -
- - pagination->getLimitBox(); ?> -
-
+ + $this, 'options' => array('filterButton' => 1,'filtersHidden' => 0))); + ?> +
+ + pagination->getLimitBox(); ?> +
+
- - - @@ -186,12 +179,12 @@
+ title="" + onclick="Joomla.checkAll(this)"/> @@ -119,30 +118,25 @@ id); ?> - subject, ENT_COMPAT, 'UTF-8'); - ?> + subject, ENT_COMPAT, 'UTF-8'); + ?> - ', $row->to); ?> + ', $row->to); ?> - ', $row->cc); ?> + ', $row->cc); ?> - ', $row->bcc); ?> + ', $row->bcc); ?> date, ENT_COMPAT, 'UTF-8');?> state ==1) @@ -152,15 +146,15 @@ elseif($row->state ==0) { echo Text::_('COM_TJNOTIFICATIONS_STATE_FAILED'); - } ?> + } + ?> - key, ENT_COMPAT, 'UTF-8'); - ?> + key, ENT_COMPAT, 'UTF-8');?> - provider, ENT_COMPAT, 'UTF-8'); ?> + provider, ENT_COMPAT, 'UTF-8');?> @@ -177,8 +171,7 @@ }?> - id, ENT_COMPAT, 'UTF-8'); - ?> + id, ENT_COMPAT, 'UTF-8');?>
- pagination->getListFooter(); ?> + pagination->getListFooter(); ?> - - - - - + + + + +
diff --git a/src/com_tjnotifications/admin/views/logs/tmpl/default.xml b/src/com_tjnotifications/admin/views/logs/tmpl/default.xml index 6ae7b9cc..c2620b17 100644 --- a/src/com_tjnotifications/admin/views/logs/tmpl/default.xml +++ b/src/com_tjnotifications/admin/views/logs/tmpl/default.xml @@ -2,7 +2,7 @@ - + diff --git a/src/com_tjnotifications/admin/views/logs/tmpl/param.php b/src/com_tjnotifications/admin/views/logs/tmpl/param.php index 348de5fa..e27ba236 100644 --- a/src/com_tjnotifications/admin/views/logs/tmpl/param.php +++ b/src/com_tjnotifications/admin/views/logs/tmpl/param.php @@ -1,16 +1,19 @@ + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ -// No direct access to this file +// No direct access defined('_JEXEC') or die; -use Joomla\CMS\Table\Table; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; +use Joomla\CMS\Table\Table; $jinput = Factory::getApplication()->input; $logId = $jinput->get('id', 0, 'INT'); diff --git a/src/com_tjnotifications/admin/views/logs/view.csv.php b/src/com_tjnotifications/admin/views/logs/view.csv.php index ab7061df..62c29d67 100644 --- a/src/com_tjnotifications/admin/views/logs/view.csv.php +++ b/src/com_tjnotifications/admin/views/logs/view.csv.php @@ -1,15 +1,19 @@ - * @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved. - * @license GNU General Public License version 2 or later. + * @package TJNotifications + * @subpackage com_tjnotifications + * + * @author Techjoomla + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ -//Import CSV library view -jimport('techjoomla.view.csv'); +// No direct access +defined('_JEXEC') or die('Restricted access'); +jimport('techjoomla.view.csv'); + /** * View class for a list of notifications logs. * @@ -17,9 +21,15 @@ */ class TjnotificationsViewLogs extends TjExportCsv { + /** + * Display the view + * + * @param string $tpl The name of the template file to parse; automatically searches through the template paths. + * + * @return mixed A string if successful, otherwise an Error object. + */ public function display($tpl = null) { parent::display(); } - } diff --git a/src/com_tjnotifications/admin/views/logs/view.html.php b/src/com_tjnotifications/admin/views/logs/view.html.php index bce4e32f..4485520f 100644 --- a/src/com_tjnotifications/admin/views/logs/view.html.php +++ b/src/com_tjnotifications/admin/views/logs/view.html.php @@ -1,14 +1,18 @@ - * @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved. - * @license GNU General Public License version 2 or later. + * @package TJNotifications + * @subpackage com_tjnotifications + * + * @author Techjoomla + * @copyright Copyright (C) 2009 - 2019 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; + jimport('joomla.application.component.view'); JLoader::register('TjnotificationsHelper', JPATH_ADMINISTRATOR . '/components/com_tjnotifications/helpers/tjnotifications.php'); + use Joomla\CMS\MVC\View\HtmlView; use Joomla\CMS\Language\Text; use Joomla\CMS\Toolbar\ToolbarHelper; @@ -33,9 +37,9 @@ public function display($tpl = null) { $this->canDo = JHelperContent::getActions('com_tjnotifications'); - $this->state = $this->get('State'); - $this->items = $this->get('Items'); - $this->pagination = $this->get('Pagination'); + $this->state = $this->get('State'); + $this->items = $this->get('Items'); + $this->pagination = $this->get('Pagination'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); @@ -68,8 +72,8 @@ protected function addToolBar() $bar = Toolbar::getInstance('toolbar'); $message = array(); - $message['success'] = Text::_("COM_TJNOTIFICATIONS_EXPORT_FILE_SUCCESS"); - $message['error'] = Text::_("COM_TJNOTIFICATIONS_EXPORT_FILE_ERROR"); + $message['success'] = Text::_("COM_TJNOTIFICATIONS_EXPORT_FILE_SUCCESS"); + $message['error'] = Text::_("COM_TJNOTIFICATIONS_EXPORT_FILE_ERROR"); $message['inprogress'] = Text::_("COM_TJNOTIFICATIONS_EXPORT_FILE_NOTICE"); $bar->appendButton('CsvExport', $message);