-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from techjoomla/release-1.0.4
Merge `Release 1.0.4` into `master`
- Loading branch information
Showing
6 changed files
with
120 additions
and
74 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 |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
<extension version="3.9" type="plugin" group="actionlog" method="upgrade"> | ||
<name>plg_actionlog_tjreports</name> | ||
<author>Techjoomla</author> | ||
<creationDate>16th Nov 2018</creationDate> | ||
<creationDate>25th Dec 2018</creationDate> | ||
<copyright>Copyright (C) 2016 - 2018 Techjoomla. All rights reserved.</copyright> | ||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>https://techjoomla.com</authorUrl> | ||
<version>1.0.3</version> | ||
<version>1.0.4</version> | ||
<description>PLG_ACTIONLOG_TJREPORTS_XML_DESCRIPTION</description> | ||
<files> | ||
<filename plugin="tjreports">tjreports.php</filename> | ||
|
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,8 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension version="3.4" type="plugin" group="privacy" method="upgrade"> | ||
<name>plg_privacy_tjreports</name> | ||
<version>1.0.3</version> | ||
<creationDate>16th Nov 2018</creationDate> | ||
<version>1.0.4</version> | ||
<creationDate>25th Dec 2018</creationDate> | ||
<author>Techjoomla</author> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>https://techjoomla.com</authorUrl> | ||
|
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,60 +1,62 @@ | ||
<?php | ||
/** | ||
* @version 1.0.0 | ||
* @package com_tjreports | ||
* @copyright Copyright (C) 2014. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
* @author TechJoomla <[email protected]> - http://www.techjoomla.com | ||
*/ | ||
|
||
// no direct access | ||
defined('_JEXEC') or die; | ||
|
||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); | ||
|
||
$app = JFactory::getApplication(); | ||
$headerLevel = $this->headerLevel; | ||
$this->listOrder = $this->state->get('list.ordering'); | ||
$this->listDirn = $this->state->get('list.direction'); | ||
$totalCount = 0; | ||
|
||
foreach ($this->colToshow as $key=>$data) | ||
{ | ||
if (is_array($data)) | ||
{ | ||
$totalCount = $totalCount + count($data); | ||
} | ||
else | ||
{ | ||
$totalCount++; | ||
} | ||
} | ||
|
||
$input = JFactory::getApplication()->input; | ||
$displayFilters = $this->userFilters; | ||
$totalHeadRows = count($displayFilters); | ||
|
||
if ($app->isSite()) | ||
{ | ||
$siteUrl = JUri::root(); | ||
$message = array(); | ||
$message['success'] = JText::_("COM_TJREPORTS_EXPORT_FILE_SUCCESS"); | ||
$message['error'] = JText::_("COM_TJREPORTS_EXPORT_FILE_ERROR"); | ||
$message['inprogress'] = JText::_("COM_TJREPORTS_EXPORT_FILE_NOTICE"); | ||
$message['text'] = JText::_("COM_TJREPORTS_CSV_EXPORT"); | ||
|
||
JHtml::script(JUri::base() . 'libraries/techjoomla/assets/js/tjexport.js'); | ||
$document = JFactory::getDocument(); | ||
$csv_url = 'index.php?option=' . $input->get('option') . '&view=' . $input->get('view') . '&format=csv'; | ||
|
||
$document->addScriptDeclaration("var csv_export_url='{$csv_url}';"); | ||
$document->addScriptDeclaration("var csv_export_success='{$message['success']}';"); | ||
$document->addScriptDeclaration("var csv_export_error='{$message['error']}';"); | ||
$document->addScriptDeclaration("var csv_export_inprogress='{$message['inprogress']}';"); | ||
$document->addScriptDeclaration("var tj_csv_site_root='{$siteUrl}';"); | ||
} | ||
|
||
?> | ||
/** | ||
* @version 1.0.0 | ||
* @package com_tjreports | ||
* @copyright Copyright (C) 2014. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
* @author TechJoomla <[email protected]> - http://www.techjoomla.com | ||
*/ | ||
|
||
// no direct access | ||
defined('_JEXEC') or die; | ||
|
||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); | ||
|
||
$app = JFactory::getApplication(); | ||
$headerLevel = $this->headerLevel; | ||
$this->listOrder = $this->state->get('list.ordering'); | ||
$this->listDirn = $this->state->get('list.direction'); | ||
$totalCount = 0; | ||
|
||
foreach ($this->colToshow as $key=>$data) | ||
{ | ||
if (is_array($data)) | ||
{ | ||
$totalCount = $totalCount + count($data); | ||
} | ||
else | ||
{ | ||
$totalCount++; | ||
} | ||
} | ||
|
||
$input = JFactory::getApplication()->input; | ||
$displayFilters = $this->userFilters; | ||
$totalHeadRows = count($displayFilters); | ||
$reportId = $app->getUserStateFromRequest('reportId', 'reportId', ''); | ||
$user = JFactory::getUser(); | ||
$userAuthorisedExport = $user->authorise('core.export', 'com_tjreports.tjreport.' . $reportId); | ||
|
||
if ($app->isSite()) | ||
{ | ||
$siteUrl = JUri::root(); | ||
$message = array(); | ||
$message['success'] = JText::_("COM_TJREPORTS_EXPORT_FILE_SUCCESS"); | ||
$message['error'] = JText::_("COM_TJREPORTS_EXPORT_FILE_ERROR"); | ||
$message['inprogress'] = JText::_("COM_TJREPORTS_EXPORT_FILE_NOTICE"); | ||
$message['text'] = JText::_("COM_TJREPORTS_CSV_EXPORT"); | ||
|
||
JHtml::script(JUri::base() . 'libraries/techjoomla/assets/js/tjexport.js'); | ||
$document = JFactory::getDocument(); | ||
$csv_url = 'index.php?option=' . $input->get('option') . '&view=' . $input->get('view') . '&format=csv'; | ||
|
||
$document->addScriptDeclaration("var csv_export_url='{$csv_url}';"); | ||
$document->addScriptDeclaration("var csv_export_success='{$message['success']}';"); | ||
$document->addScriptDeclaration("var csv_export_error='{$message['error']}';"); | ||
$document->addScriptDeclaration("var csv_export_inprogress='{$message['inprogress']}';"); | ||
$document->addScriptDeclaration("var tj_csv_site_root='{$siteUrl}';"); | ||
} | ||
?> | ||
<div id="reports-container"> | ||
<div class="<?php echo COM_TJLMS_WRAPPER_DIV ?> tjBs3"> | ||
<?php | ||
|
@@ -222,7 +224,7 @@ | |
</div> | ||
<!--/col-md-2--> | ||
<?php | ||
if (!$app->isAdmin()) | ||
if (!$app->isAdmin() && $userAuthorisedExport && $user) | ||
{ | ||
?> | ||
<div class="col-sm-5 col-md-8"> | ||
|
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
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