Skip to content

Commit

Permalink
Merge pull request #211 from techjoomla/release-1.1.5
Browse files Browse the repository at this point in the history
Merge `Release 1.1.5` into `master`
  • Loading branch information
manojLondhe authored Mar 16, 2021
2 parents b55d986 + f4dab70 commit 76099dc
Show file tree
Hide file tree
Showing 32 changed files with 1,158 additions and 282 deletions.
50 changes: 50 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Changelog

#### Legend

- Bug Fix (-)
- Feature Addition (+)
- Improvement (^)

---

## com_tjreports v1.1.5

### + Features Additions:

- #156044 Bulk Email sending
- #155499 Add a function in tjreports to get the reports that support google data studio connector
- #153710 Show summary report for Feedback

### ^ Improvements:

- #168311 Remove duplicates Language constant from language files.
- #160788 Added index in #__tjreports_com_users_user table
- #148927 Add reports API plugin in TJReport package

#### - Bug Fixes:

- #169471 Reports > In report data not showing count with link, it's showing href string
- #169429 Reports > Frontend > Reports > Radio button and Export CSV alignment messed up
- #169428 Reports > Frontend > Reports > Language constant missing
- #169363 CSV export not working when report name has special characters
- #169215 Reports > Reports having dynamic column shows different data with / without loading params
- #165179 Search tools on Reports not working on mobile devices
- #165071 Fix height for column level filter in report
- #164411 Getting Unknown column 'Array' in 'field list' error
- #164232 Single quotes and double quotes are getting removed
- #163952 Users com_fields are saving by converting some characters to HTML entities instead of the original value
- #163509 After Block the user from users list then 'user field' not showing in the user reports
- #160788 fix: TjReports Performance Issue in reports model as it fetches all the record from the database without pagination/limit
- #180 Added missing language constants for column wise sorting
- #176 Compatible date field filter for any date format and modified in query
- #172 Notice: Undefined index in reports model & reports default view









2 changes: 1 addition & 1 deletion tjreports/administrator/models/indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function createTable($context)
// Create table
$db = Factory::getDbo();
$query = 'CREATE TABLE IF NOT EXISTS ' . $db->quoteName($this->customFieldsTable) . ' (
`record_id` int(11) NOT NULL
`record_id` int(11) NOT NULL, KEY `record_id` (`record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8';

$db->setQuery($query);
Expand Down
27 changes: 20 additions & 7 deletions tjreports/administrator/models/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,31 @@ public function getReportPluginData($pluginId, $pluginName = null)

$defaultColToHide = $plgModel->getState('defaultColToHide');

$params = array();
$params['filter_order'] = $plgModel->getState('list.ordering');
$params['filter_order_Dir'] = $plgModel->getState('list.direction');
$params['limit'] = $plgModel->getState('list.limit');
$params['emailColumn'] = $plgModel->getState('emailColumn');
$params['colToshow'] = $plgModel->getState('colToshow');
$params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true));
$params = array();
$params['filter_order'] = $plgModel->getState('list.ordering');
$params['filter_order_Dir'] = $plgModel->getState('list.direction');
$params['limit'] = $plgModel->getState('list.limit');

// Show summary report configuration in params
$params['showSummaryReport'] = $plgModel->getState('showSummaryReport');

$params['emailColumn'] = $plgModel->getState('emailColumn');
$params['colToshow'] = $plgModel->getState('colToshow');
$params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true));

/* Here merge colToshow (array value is true) with defaultColToHide (array value is false) column -
* so false value column not display on report by default.*/
if (!empty($defaultColToHide))
{
// Here remove dynamic column(for example: lesson::lesson_status) from defaultColToHide because no need to load dynamic column.
foreach ($defaultColToHide as $key => $colHide)
{
if (strpos($key, '::') !== false)
{
unset($defaultColToHide[$key]);
}
}

$params['colToshow'] = array_merge($params['colToshow'], $defaultColToHide);
}

Expand Down
21 changes: 21 additions & 0 deletions tjreports/administrator/views/reports/tmpl/default_summary.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* @package TJRports
* @subpackage com_tjreports
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
defined('_JEXEC') or die;

// Load the layout & push variables

$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default_summary', 'SITE', 'SITE');
ob_start();
include $path;
$html = ob_get_contents();
ob_end_clean();
echo $html;
48 changes: 30 additions & 18 deletions tjreports/administrator/views/tjreport/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@
*/
// No direct access to this file
defined('_JEXEC') or die;

Use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;

require_once JPATH_COMPONENT . '/helpers/tjreports.php';

/**
* tjreport View
*
* @since 0.0.1
*/
class TjreportsViewTjreport extends JViewLegacy
class TjreportsViewTjreport extends HtmlView
{
/**
* View form
Expand Down Expand Up @@ -44,7 +53,7 @@ public function display($tpl = null)
return false;
}

$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;
$extension = $input->get('extension', '', 'STRING');

$this->addToolBar();
Expand All @@ -63,25 +72,25 @@ public function display($tpl = null)
*/
protected function addToolBar()
{
$input = JFactory::getApplication()->input;
$input = Factory::getApplication()->input;

// Hide Joomla Administrator Main menu
$input->set('hidemainmenu', true);
$isNew = ($this->item->id == 0);

if ($isNew)
{
$title = JText::_('COM_TJREPORTS_NEW');
$title = Text::_('COM_TJREPORTS_NEW');
}
else
{
$title = JText::_('COM_TJREPORTS_EDIT');
$title = Text::_('COM_TJREPORTS_EDIT');
}

JToolBarHelper::title($title, 'tjreport');
JToolBarHelper::apply('tjreport.apply');
JToolBarHelper::save('tjreport.save');
JToolBarHelper::cancel(
ToolbarHelper::title($title, 'tjreport');
ToolbarHelper::apply('tjreport.apply');
ToolbarHelper::save('tjreport.save');
ToolbarHelper::cancel(
'tjreport.cancel',
$isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE'
);
Expand All @@ -96,14 +105,17 @@ protected function addToolBar()
*/
protected function addDocumentHeaderData()
{
JHtml::_('jquery.framework');
JText::script('COM_TJREPORTS_FORM_DEFAULT_OPTION');
JText::script('COM_TJREPORTS_INVALID_JSON_VALUE');
$document = JFactory::getDocument();
$document->addScript(JURI::root() . '/components/com_tjreports/assets/js/tjrContentService.js');
$document->addScript(JURI::root() . '/components/com_tjreports/assets/js/tjrContentUI.js');
$document->addStylesheet(JURI::root() . '/components/com_tjreports/assets/css/tjreports.css');
$document->addScriptDeclaration('tjrContentUI.base_url = "' . Juri::base() . '"');
$document->addScriptDeclaration('tjrContentUI.root_url = "' . Juri::root() . '"');
HTMLHelper::_('jquery.framework');
Text::script('COM_TJREPORTS_FORM_DEFAULT_OPTION');
Text::script('COM_TJREPORTS_INVALID_JSON_VALUE');

$document = Factory::getDocument();

HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentService.min.js');
HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentUI.min.js');
HTMLHelper::_('stylesheet', 'components/com_tjreports/assets/css/tjreports.min.css');

$document->addScriptDeclaration('tjrContentUI.base_url = "' . Uri::base() . '"');
$document->addScriptDeclaration('tjrContentUI.root_url = "' . Uri::root() . '"');
}
}
16 changes: 14 additions & 2 deletions tjreports/languages/administrator/en-GB/en-GB.com_tjreports.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ COM_TJREPORTS_LIST_ID="Id"

COM_TJREPORTS_TITLE_REPORT="Reports"
COM_TJREPORTS_CSV_EXPORT="CSV Export"
COM_TJREPORTS_FILTER_SELECT_COURSE="Select Course"
COM_TJREPORTS_FILTER_SELECT_COURSE="- Select Course -"
COM_TJREPORTS_FORM_DEFAULT_OPTION="- Select Plugin -"
COM_TJREPORT_SAVE_ALIAS_WARNING="Alias already existed so a number was added at the end. You can re-edit the article to customise the alias."
COM_TJREPORT_VIEW_WITH_SAME_ALIAS="Alias name cannot be same as view names."
Expand All @@ -48,7 +48,6 @@ COM_TJREPORTS_EXPORT_FILE_SUCCESS="100% Download Complete."

;Common for reports
COM_TJREPORTS_FILTER_SELECT_ACCESSLEVEL="- Select Access Level -"
COM_TJREPORTS_FILTER_SELECT_COURSE="- Select Course -"
COM_TJREPORTS_FILTER_SELECT_LESSON="Select lesson -"
COM_TJREPORTS_FILTER_SELECT_COURSE_CATEGORY="- Select Category -"
COM_TJREPORTS_FILTER_SELECT_COURSE_TYPE="- Select Type -"
Expand Down Expand Up @@ -139,3 +138,16 @@ COM_TJREPORTS_QUERY_DELETE_SUCCESS="Query deleted successfully."
;Added in v1.0.2
COM_TJREPORTS_NOTHING_TO_DISCOVER_PLUGINS="Nothing to discover"
COM_TJREPORTS_DISCOVER_NEW_PLUGINS="%d new plugin(s) discovered"

; Column wise sorting
COM_TJREPORTS_PLUGIN_ASC="Plugin ascending"
COM_TJREPORTS_PLUGIN_DESC="Plugin descending"
COM_TJREPORTS_CLIENT_ASC="Client ascending"
COM_TJREPORTS_CLIENT_DESC="Client descending"
COM_TJREPORTS_SAVED_QUERY_ASC="Saved Query ascending"
COM_TJREPORTS_SAVED_QUERY_DESC="Saved Query descending"

; Added in __DEPLOY_VERSION__
COM_TJREPORTS_REPORT_SUMMARY="Summary Report"
COM_TJREPORTS_REPORT_DETAILS="Details Report"
COM_TJREPORTS_NO_RECORDS_FOUND_SUMMARY="No records found. Either you do not have any records or fields types found in records are not supported for showing summary report."
3 changes: 3 additions & 0 deletions tjreports/languages/site/en-GB/en-GB.com_tjreports.ini
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ LIB_TECHJOOMLA_CSV_EXPORT_ABORT="Abort"
LIB_TECHJOOMLA_CSV_EXPORT_CONFIRM_ABORT="Are you sure to abort CSV Export?"
LIB_TECHJOOMLA_CSV_EXPORT_UESR_ABORTED="Export aborted."

; Since __DEPLOY_VERSION__
COM_TJREPORTS_REPORT_DETAILS="Details Report"
COM_TJREPORTS_REPORT_SUMMARY="Summary Report"
10 changes: 10 additions & 0 deletions tjreports/media/js/chartBundle.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; @package Com_Tjreports
; @copyright Copyright © 2009-2018 Techjoomla. All rights reserved.
; @license GNU General Public License version 2, or later
; Note: All ini files need to be saved as UTF-8

PLG_API_REPORTS_REPORT_NAME_MISSSING="Please enter report name"
PLG_API_REPORTS_REPORT_NAME_INVALID="Please enter valid report name"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; @package Com_Tjreports
; @copyright Copyright © 2009-2018 Techjoomla. All rights reserved.
; @license GNU General Public License version 2, or later
; Note: All ini files need to be saved as UTF-8

PLG_API_REPORTS="TJ Reports Api Plugin"
PLG_API_REPORTS_DESCRIPTION="TJ Reports Api Plugin"
43 changes: 43 additions & 0 deletions tjreports/plugins/api/reports/reports.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* @package Tjreports
* @subpackage com_api
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access.
defined('_JEXEC') or die;

jimport('joomla.plugin.plugin');
JLoader::import('components.com_tjreports.models.report', JPATH_SITE);

/**
* Tjreports API plugin
*
* @since 1.0
*/
class PlgAPIReports extends ApiPlugin
{
/**
* Constructor
*
* @param STRING &$subject subject
* @param array $config config
*
* @since 1.0
*/
public function __construct(&$subject, $config = array())
{
parent::__construct($subject, $config = array());

// Set resource path
ApiResource::addIncludePath(dirname(__FILE__) . '/reports');

// Load language files
$lang = JFactory::getLanguage();
$lang->load('plg_api_reports', JPATH_SITE . "/plugins/api/reports/", 'en-GB', true);
}
}
21 changes: 21 additions & 0 deletions tjreports/plugins/api/reports/reports.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.0.0" type="plugin" group="api" method="upgrade">
<name>PLG_API_REPORTS</name>
<version>1.0</version>
<creationDate>28th May 2018</creationDate>
<author>Techjoomla</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://techjoomla.com</authorUrl>
<copyright>Techjoomla. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>PLG_API_REPORTS_DESCRIPTION</description>
<files>
<filename plugin="reports">reports.php</filename>
<folder>reports</folder>
<folder>language</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_api_reports.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_api_reports.sys.ini</language>
</languages>
</extension>
Loading

0 comments on commit 76099dc

Please sign in to comment.