forked from techjoomla/TJ-Notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue techjoomla#48 chore: Log Email details in DB table - Tj Notific…
…ation
- Loading branch information
1 parent
ed9135b
commit 3430e09
Showing
3 changed files
with
135 additions
and
156 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
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,25 +1,22 @@ | ||
<?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 | ||
*/ | ||
|
||
* @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 to this file | ||
defined('_JEXEC') or die; | ||
|
||
use Joomla\CMS\Factory; | ||
use Joomla\CMS\HTML\HTMLHelper; | ||
use Joomla\CMS\Layout\LayoutHelper; | ||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\Router\Route; | ||
use Joomla\CMS\Language\Text; | ||
|
||
HTMLHelper::_('behavior.modal', 'a.modal'); | ||
HTMLHelper::_('formbehavior.chosen', 'select'); | ||
|
||
$listOrder = $this->escape($this->state->get('list.ordering')); | ||
$listDirn = $this->escape($this->state->get('list.direction')); | ||
|
||
|
@@ -28,23 +25,21 @@ | |
?> | ||
<script type="text/javascript"> | ||
jQuery(document).ready(function() { | ||
var width = jQuery(window).width(); | ||
var height = jQuery(window).height(); | ||
|
||
//ID of container | ||
jQuery('.modal notification').attr('rel','{handler: "iframe", size: {x: '+(width-(width*0.10))+', y: '+(height-(height*0.10))+'}}'); | ||
var width = jQuery(window).width(); | ||
var height = jQuery(window).height(); | ||
//ID of container | ||
jQuery('.modal notification').attr('rel','{handler: "iframe", size: {x: '+(width-(width*0.10))+', y: '+(height-(height*0.10))+'}}'); | ||
}); | ||
</script> | ||
|
||
<form action="index.php?option=com_tjnotifications&view=logs" method="post" id="adminForm" name="adminForm"> | ||
<?php if (!empty( $this->sidebar)) : ?> | ||
<div id="j-sidebar-container" class="span2"> | ||
<div id="j-sidebar-container" class="span2"> | ||
<?php echo $this->sidebar; ?> | ||
</div> | ||
<div id="j-main-container" class="span10"> | ||
<?php else : ?> | ||
</div> | ||
<div id="j-main-container" class="span10"> | ||
<?php else : ?> | ||
<div id="j-main-container"> | ||
<?php endif; ?> | ||
<?php endif; ?> | ||
<?php | ||
// Search tools bar | ||
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => 1,'filtersHidden' => 0))); | ||
|
@@ -58,131 +53,118 @@ | |
<div class="table-responsive"> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th width="2%" class=""> | ||
<input type="checkbox" name="checkall-toggle" value="" | ||
<tr> | ||
<th width="2%" class=""> | ||
<input type="checkbox" name="checkall-toggle" value="" | ||
title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" | ||
onclick="Joomla.checkAll(this)"/> | ||
</th> | ||
<th class="minwidth-150px"> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_SUBJECT"), 'subject', $listDirn, $listOrder);?> | ||
</th> | ||
<th class="minwidth-150px"> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BODY"), 'title', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_TO"), 'to', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_CC"), 'cc', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BCC"), 'bcc', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_DATE"), 'date', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="" class="minwidth-150px"> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_STATE"), 'state', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_KEY"), 'key', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_PROVIDER"), 'provider', $listDirn, $listOrder);?> | ||
</th> | ||
|
||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_FROM"), 'from', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_PARAMS"), 'params', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="2%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_ID"), 'id', $listDirn, $listOrder);?> | ||
</th> | ||
</tr> | ||
</th> | ||
<th class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_SUBJECT"), 'subject', $listDirn, $listOrder);?> | ||
</th> | ||
<th class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BODY"), 'title', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_TO"), 'to', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_CC"), 'cc', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_BCC"), 'bcc', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_DATE"), 'date', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_STATE"), 'state', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_KEY"), 'key', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_PROVIDER"), 'provider', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_FROM"), 'from', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="10%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_PARAMS"), 'params', $listDirn, $listOrder);?> | ||
</th> | ||
<th width="2%" class=""> | ||
<?php echo JHtml::_('grid.sort', Text::_("COM_TJNOTIFICATIONS_VIEW_NOTIFICATIONS_DEFAULT_FIELD_ID"), 'id', $listDirn, $listOrder);?> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php if (!empty($this->items)) : ?> | ||
<?php foreach ($this->items as $i => $row) : | ||
?> | ||
<tr> | ||
<td class=""> | ||
<?php echo JHtml::_('grid.id', $i, $row->id); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->subject, ENT_COMPAT, 'UTF-8'); ?> | ||
</td> | ||
<td class=""> | ||
<a class="modal notification" href="<?php echo Route::_('index.php?option=com_tjnotifications&tmpl=component&view=logs&layout=body&id='. $row->id); ?>"><?php echo Text::_("COM_TJNOTIFICATIONS_TITLE_VIEW_CONTENTS");?></a> | ||
</a> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->to); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->cc); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->bcc); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->date, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
<td class=""> | ||
<?php | ||
if($row->state ==1) | ||
{ | ||
echo Text::_('COM_TJNOTIFICATIONS_STATE_SENT'); | ||
} | ||
elseif($row->state ==0) | ||
{ | ||
echo Text::_('COM_TJNOTIFICATIONS_STATE_FAILED'); | ||
} | ||
?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->key, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
|
||
<td class=""> | ||
<?php echo htmlspecialchars($row->provider, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
|
||
<td class=""> | ||
<?php echo htmlspecialchars($row->from, ENT_COMPAT, 'UTF-8'); ?> | ||
</td> | ||
<td class=""> | ||
<?php if(!empty($row->params)){ ?> | ||
<a class="modal notification" href="<?php echo Route::_('index.php?option=com_tjnotifications&tmpl=component&view=logs&layout=param&id='. $row->id); ?>"><?php echo Text::_("COM_TJNOTIFICATIONS_VIEW_PARAMS_POPUP");?></a> | ||
</a> | ||
<?php } | ||
else | ||
{ | ||
echo Text::_('COM_TJNOTIFICATIONS_EMPTY_PARAMS'); | ||
}?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->id, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
<?php foreach ($this->items as $i => $row) : | ||
?> | ||
<tr> | ||
<td class=""> | ||
<?php echo JHtml::_('grid.id', $i, $row->id); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->subject, ENT_COMPAT, 'UTF-8'); ?> | ||
</td> | ||
<td class=""> | ||
<a class="modal notification" href="<?php echo Route::_('index.php?option=com_tjnotifications&tmpl=component&view=logs&layout=body&id='. $row->id); ?>"> | ||
<?php echo Text::_("COM_TJNOTIFICATIONS_TITLE_VIEW_CONTENTS");?></a> | ||
</a> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->to); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->cc); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo str_replace(',', '<br />', $row->bcc); ?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->date, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
<td class=""> | ||
<?php | ||
echo empty($row->state ==1) ? Text::_('COM_TJNOTIFICATIONS_STATE_SENT') : Text::_('COM_TJNOTIFICATIONS_STATE_FAILED'); | ||
?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->key, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->provider, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->from, ENT_COMPAT, 'UTF-8'); ?> | ||
</td> | ||
<td class=""> | ||
<?php | ||
if(!empty($row->params)) | ||
{ ?> | ||
<a class="modal notification" href="<?php echo Route::_('index.php?option=com_tjnotifications&tmpl=component&view=logs&layout=param&id='. $row->id); ?>"> | ||
<?php echo Text::_("COM_TJNOTIFICATIONS_VIEW_PARAMS_POPUP");?></a> | ||
<?php | ||
} | ||
else | ||
{ | ||
echo Text::_('COM_TJNOTIFICATIONS_EMPTY_PARAMS'); | ||
}?> | ||
</td> | ||
<td class=""> | ||
<?php echo htmlspecialchars($row->id, ENT_COMPAT, 'UTF-8');?> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<?php echo $this->pagination->getListFooter(); ?> | ||
|
||
<input type="hidden" name="task" value=""/> | ||
<input type="hidden" name="boxchecked" value="0"/> | ||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>"/> | ||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>"/> | ||
<?php echo JHtml::_('form.token'); ?> | ||
</div> | ||
</form> | ||
<input type="hidden" name="task" value=""/> | ||
<input type="hidden" name="boxchecked" value="0"/> | ||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>"/> | ||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>"/> | ||
<?php echo JHtml::_('form.token'); ?> | ||
</div> | ||
</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 |
---|---|---|
@@ -1,23 +1,19 @@ | ||
<?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 | ||
*/ | ||
|
||
* @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\Factory; | ||
use Joomla\CMS\Language\Text; | ||
use Joomla\CMS\Table\Table; | ||
|
||
$jinput = Factory::getApplication()->input; | ||
$logId = $jinput->get('id', 0, 'INT'); | ||
|
||
if($logId) | ||
{ | ||
Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tjnotifications/tables'); | ||
|
@@ -28,11 +24,11 @@ | |
<div> | ||
<?php if ($logTable->id) : ?> | ||
<h3 class="modal-title"> | ||
<?php echo Text::_("COM_TJNOTIFICATIONS_VIEW_PARAMS_POPUP"); ?> | ||
</h3> | ||
<?php echo Text::_("COM_TJNOTIFICATIONS_VIEW_PARAMS_POPUP"); | ||
?> | ||
</h3> | ||
<div class="col-xs-12"> | ||
<?php echo $logTable->params; ?> | ||
</div> | ||
<?php endif; ?> | ||
</div> | ||
|
||
</div> |