-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Issue #48 chore: Log Email details in DB table - Tj Notification * Issue #48 chore: Log Email details in DB table - Tj Notification
- Loading branch information
1 parent
1591458
commit e03faa4
Showing
22 changed files
with
867 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<access component="com_tjnotifications"> | ||
<section name="component"> | ||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" /> | ||
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" /> | ||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" /> | ||
<action name="core.view" title="JACTION_VIEW" description="JACTION_VIEW_COMPONENT_DESC" /> | ||
<action name="core.export" title="JACTION_EXPORT" description="JACTION_EXPORT_COMPONENT_DESC" /> | ||
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" /> | ||
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" /> | ||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" /> | ||
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" /> | ||
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" /> | ||
<action name="core.viewlist" title="JACTION_VIEW_LIST" description="JACTION_VIEW_LIST_DESC" /> | ||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" /> | ||
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" /> | ||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" /> | ||
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" /> | ||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" /> | ||
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" /> | ||
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" /> | ||
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" /> | ||
<action name="core.view" title="JACTION_VIEW" description="JACTION_VIEW_COMPONENT_DESC" /> | ||
<action name="core.viewlist" title="JACTION_VIEW_LIST" description="JACTION_VIEW_LIST_DESC" /> | ||
<action name="core.emailstatus" title="JACTION_EMAIL_STATUS" description="JACTION_EMAIL_STATUS_DESC" /> | ||
<action name="core.usercontrol" title="JACTION_USER_CONTROL" description="JACTION_USER_CONTROL_DESC" /> | ||
<action name="core.export" title="JACTION_EXPORT" description="JACTION_EXPORT_COMPONENT_DESC" /> | ||
</section> | ||
</access> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.minwidth-150px{min-width:150px} | ||
.minwidth-100px{min-width:100px} | ||
.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* @package TJNotifications | ||
* @subpackage com_tjnotifications | ||
* | ||
* @author Techjoomla <[email protected]> | ||
* @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; | ||
|
||
/** | ||
* Log Controller | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
class TjnotificationsControllerLog extends FormController | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @package TJNotifications | ||
* @subpackage com_tjnotifications | ||
* | ||
* @author Techjoomla <[email protected]> | ||
* @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\AdminController; | ||
|
||
/** | ||
* Logs controller class. | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
class TjnotificationsControllerLogs extends AdminController | ||
{ | ||
/** | ||
* Proxy for getModel. | ||
* | ||
* @param string $name The name of the model. | ||
* @param string $prefix The prefix for the PHP class name. | ||
* @param array $config Array of configuration parameters. | ||
* | ||
* @return JModelLegacy | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
public function getModel($name = 'log', $prefix = 'TjnotificationsModel', $config = array('ignore_request' => true)) | ||
{ | ||
$model = parent::getModel($name, $prefix, $config); | ||
|
||
return $model; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/com_tjnotifications/admin/models/forms/filter_logs.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fields name="filter"> | ||
<field name="search" type="text" label="search" hint="search" class="js-stools-search-string" /> | ||
<field name="client" label="COM_TJNOTIFICATIONS_FIELD_CLIENT_LABEL" description="COM_TJNOTIFICATIONS_FIELD_CLIENT_DESC" onchange="this.form.submit();" type="sql" class="inputbox" query="SELECT DISTINCT(client) FROM `#__tj_notification_templates`" key_field="client" value_field="client"> | ||
<option value=''>COM_TJNOTIFICATIONS_FIELD_CLIENT_OPTION</option> | ||
</field> | ||
<field name="provider" type="list" class="inputbox" label="COM_TJNOTIFICATIONS_FIELD_PROVIDER_LABEL" default="email" description="COM_TJNOTIFICATIONS_FIELD_PROVIDER_DESC" onchange="this.form.submit();" key_field="provider" value_field="provider"> | ||
<option value="email">COM_TJNOTIFICATIONS_PROVIDER_EMAIL</option> | ||
<option value="sms">COM_TJNOTIFICATIONS_PROVIDER_SMS</option> | ||
<option value="push">COM_TJNOTIFICATIONS_PROVIDER_PUSH</option> | ||
<option value="web">COM_TJNOTIFICATIONS_PROVIDER_WEB</option> | ||
</field> | ||
<field name="key" label="COM_TJNOTIFICATIONS_FIELD_KEY_LABEL" description="COM_TJNOTIFICATIONS_FIELD_KEY_DESC" onchange="this.form.submit();" type="sql" class="inputbox" query="SELECT DISTINCT(`key`) AS `tmpkey` FROM `#__tj_notification_templates`" key_field="tmpkey" value_field="tmpkey"> | ||
<option value=''>COM_TJNOTIFICATIONS_FIELD_KEY_OPTION</option> | ||
</field> | ||
<field name="state" type="list" class="inputbox" label="COM_TJNOTIFICATIONS_FIELD_STATE_LABEL" description="COM_TJNOTIFICATIONS_FIELD_STATE_DESC" onchange="this.form.submit();" key_field="provider" value_field="provider"> | ||
<option value="">COM_TJNOTIFICATIONS_FIELD_STATE_OPTION</option> | ||
<option value="1">COM_TJNOTIFICATIONS_STATE_SENT</option> | ||
<option value="0">COM_TJNOTIFICATIONS_STATE_FAILED</option> | ||
</field> | ||
</fields> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/** | ||
* @package TJNotifications | ||
* @subpackage com_tjnotifications | ||
* | ||
* @author Techjoomla <[email protected]> | ||
* @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; | ||
|
||
jimport('joomla.application.component.model'); | ||
|
||
use Joomla\CMS\MVC\Model\AdminModel; | ||
use Joomla\CMS\Table\Table; | ||
|
||
/** | ||
* Log model. | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
class TjnotificationsModelLog extends AdminModel | ||
{ | ||
/** | ||
* Method to get the record form. | ||
* | ||
* @param array $data Data for the form. | ||
* @param boolean $loadData True if the form is to load its own data (default case), false if not. | ||
* | ||
* @return JForm|boolean A JForm object on success, false on failure | ||
* | ||
* @since 1.1.0 | ||
*/ | ||
public function getForm($data = array(), $loadData = true) | ||
{ | ||
// Get the form. | ||
$form = $this->loadForm('com_tjnotifications.log', 'log', array('control' => 'jform', 'load_data' => $loadData)); | ||
|
||
if (empty($form)) | ||
{ | ||
return false; | ||
} | ||
|
||
return $form; | ||
} | ||
|
||
/** | ||
* Returns a Table object, always creating it. | ||
* | ||
* @param string $type The table type to instantiate | ||
* @param string $prefix A prefix for the table class name. Optional. | ||
* @param array $config Configuration array for model. Optional. | ||
* | ||
* @return JTable A database object | ||
*/ | ||
public function getTable($type = 'Log', $prefix = 'TjnotificationsTable', $config = array()) | ||
{ | ||
return Table::getInstance($type, $prefix, $config); | ||
} | ||
} |
Oops, something went wrong.