Skip to content

Commit 76099dc

Browse files
authored
Merge pull request #211 from techjoomla/release-1.1.5
Merge `Release 1.1.5` into `master`
2 parents b55d986 + f4dab70 commit 76099dc

32 files changed

+1158
-282
lines changed

changelog.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Changelog
2+
3+
#### Legend
4+
5+
- Bug Fix (-)
6+
- Feature Addition (+)
7+
- Improvement (^)
8+
9+
---
10+
11+
## com_tjreports v1.1.5
12+
13+
### + Features Additions:
14+
15+
- #156044 Bulk Email sending
16+
- #155499 Add a function in tjreports to get the reports that support google data studio connector
17+
- #153710 Show summary report for Feedback
18+
19+
### ^ Improvements:
20+
21+
- #168311 Remove duplicates Language constant from language files.
22+
- #160788 Added index in #__tjreports_com_users_user table
23+
- #148927 Add reports API plugin in TJReport package
24+
25+
#### - Bug Fixes:
26+
27+
- #169471 Reports > In report data not showing count with link, it's showing href string
28+
- #169429 Reports > Frontend > Reports > Radio button and Export CSV alignment messed up
29+
- #169428 Reports > Frontend > Reports > Language constant missing
30+
- #169363 CSV export not working when report name has special characters
31+
- #169215 Reports > Reports having dynamic column shows different data with / without loading params
32+
- #165179 Search tools on Reports not working on mobile devices
33+
- #165071 Fix height for column level filter in report
34+
- #164411 Getting Unknown column 'Array' in 'field list' error
35+
- #164232 Single quotes and double quotes are getting removed
36+
- #163952 Users com_fields are saving by converting some characters to HTML entities instead of the original value
37+
- #163509 After Block the user from users list then 'user field' not showing in the user reports
38+
- #160788 fix: TjReports Performance Issue in reports model as it fetches all the record from the database without pagination/limit
39+
- #180 Added missing language constants for column wise sorting
40+
- #176 Compatible date field filter for any date format and modified in query
41+
- #172 Notice: Undefined index in reports model & reports default view
42+
43+
44+
45+
46+
47+
48+
49+
50+

tjreports/administrator/models/indexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function createTable($context)
6969
// Create table
7070
$db = Factory::getDbo();
7171
$query = 'CREATE TABLE IF NOT EXISTS ' . $db->quoteName($this->customFieldsTable) . ' (
72-
`record_id` int(11) NOT NULL
72+
`record_id` int(11) NOT NULL, KEY `record_id` (`record_id`)
7373
) ENGINE=InnoDB DEFAULT CHARSET=utf8';
7474

7575
$db->setQuery($query);

tjreports/administrator/models/tjreport.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,31 @@ public function getReportPluginData($pluginId, $pluginName = null)
175175

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

178-
$params = array();
179-
$params['filter_order'] = $plgModel->getState('list.ordering');
180-
$params['filter_order_Dir'] = $plgModel->getState('list.direction');
181-
$params['limit'] = $plgModel->getState('list.limit');
182-
$params['emailColumn'] = $plgModel->getState('emailColumn');
183-
$params['colToshow'] = $plgModel->getState('colToshow');
184-
$params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true));
178+
$params = array();
179+
$params['filter_order'] = $plgModel->getState('list.ordering');
180+
$params['filter_order_Dir'] = $plgModel->getState('list.direction');
181+
$params['limit'] = $plgModel->getState('list.limit');
182+
183+
// Show summary report configuration in params
184+
$params['showSummaryReport'] = $plgModel->getState('showSummaryReport');
185+
186+
$params['emailColumn'] = $plgModel->getState('emailColumn');
187+
$params['colToshow'] = $plgModel->getState('colToshow');
188+
$params['colToshow'] = array_combine($params['colToshow'], array_fill(0, count($params['colToshow']), true));
185189

186190
/* Here merge colToshow (array value is true) with defaultColToHide (array value is false) column -
187191
* so false value column not display on report by default.*/
188192
if (!empty($defaultColToHide))
189193
{
194+
// Here remove dynamic column(for example: lesson::lesson_status) from defaultColToHide because no need to load dynamic column.
195+
foreach ($defaultColToHide as $key => $colHide)
196+
{
197+
if (strpos($key, '::') !== false)
198+
{
199+
unset($defaultColToHide[$key]);
200+
}
201+
}
202+
190203
$params['colToshow'] = array_merge($params['colToshow'], $defaultColToHide);
191204
}
192205

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* @package TJRports
4+
* @subpackage com_tjreports
5+
*
6+
* @author Techjoomla <extensions@techjoomla.com>
7+
* @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved.
8+
* @license GNU General Public License version 2 or later; see LICENSE.txt
9+
*/
10+
11+
// No direct access
12+
defined('_JEXEC') or die;
13+
14+
// Load the layout & push variables
15+
16+
$path = $this->tjreportsHelper->getViewpath('com_tjreports', 'reports', 'default_summary', 'SITE', 'SITE');
17+
ob_start();
18+
include $path;
19+
$html = ob_get_contents();
20+
ob_end_clean();
21+
echo $html;

tjreports/administrator/views/tjreport/view.html.php

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@
88
*/
99
// No direct access to this file
1010
defined('_JEXEC') or die;
11+
12+
Use Joomla\CMS\Uri\Uri;
13+
use Joomla\CMS\Factory;
14+
use Joomla\CMS\Language\Text;
15+
use Joomla\CMS\HTML\HTMLHelper;
16+
use Joomla\CMS\MVC\View\HtmlView;
17+
use Joomla\CMS\Toolbar\ToolbarHelper;
18+
1119
require_once JPATH_COMPONENT . '/helpers/tjreports.php';
20+
1221
/**
1322
* tjreport View
1423
*
1524
* @since 0.0.1
1625
*/
17-
class TjreportsViewTjreport extends JViewLegacy
26+
class TjreportsViewTjreport extends HtmlView
1827
{
1928
/**
2029
* View form
@@ -44,7 +53,7 @@ public function display($tpl = null)
4453
return false;
4554
}
4655

47-
$input = JFactory::getApplication()->input;
56+
$input = Factory::getApplication()->input;
4857
$extension = $input->get('extension', '', 'STRING');
4958

5059
$this->addToolBar();
@@ -63,25 +72,25 @@ public function display($tpl = null)
6372
*/
6473
protected function addToolBar()
6574
{
66-
$input = JFactory::getApplication()->input;
75+
$input = Factory::getApplication()->input;
6776

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

7281
if ($isNew)
7382
{
74-
$title = JText::_('COM_TJREPORTS_NEW');
83+
$title = Text::_('COM_TJREPORTS_NEW');
7584
}
7685
else
7786
{
78-
$title = JText::_('COM_TJREPORTS_EDIT');
87+
$title = Text::_('COM_TJREPORTS_EDIT');
7988
}
8089

81-
JToolBarHelper::title($title, 'tjreport');
82-
JToolBarHelper::apply('tjreport.apply');
83-
JToolBarHelper::save('tjreport.save');
84-
JToolBarHelper::cancel(
90+
ToolbarHelper::title($title, 'tjreport');
91+
ToolbarHelper::apply('tjreport.apply');
92+
ToolbarHelper::save('tjreport.save');
93+
ToolbarHelper::cancel(
8594
'tjreport.cancel',
8695
$isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE'
8796
);
@@ -96,14 +105,17 @@ protected function addToolBar()
96105
*/
97106
protected function addDocumentHeaderData()
98107
{
99-
JHtml::_('jquery.framework');
100-
JText::script('COM_TJREPORTS_FORM_DEFAULT_OPTION');
101-
JText::script('COM_TJREPORTS_INVALID_JSON_VALUE');
102-
$document = JFactory::getDocument();
103-
$document->addScript(JURI::root() . '/components/com_tjreports/assets/js/tjrContentService.js');
104-
$document->addScript(JURI::root() . '/components/com_tjreports/assets/js/tjrContentUI.js');
105-
$document->addStylesheet(JURI::root() . '/components/com_tjreports/assets/css/tjreports.css');
106-
$document->addScriptDeclaration('tjrContentUI.base_url = "' . Juri::base() . '"');
107-
$document->addScriptDeclaration('tjrContentUI.root_url = "' . Juri::root() . '"');
108+
HTMLHelper::_('jquery.framework');
109+
Text::script('COM_TJREPORTS_FORM_DEFAULT_OPTION');
110+
Text::script('COM_TJREPORTS_INVALID_JSON_VALUE');
111+
112+
$document = Factory::getDocument();
113+
114+
HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentService.min.js');
115+
HTMLHelper::_('script', 'components/com_tjreports/assets/js/tjrContentUI.min.js');
116+
HTMLHelper::_('stylesheet', 'components/com_tjreports/assets/css/tjreports.min.css');
117+
118+
$document->addScriptDeclaration('tjrContentUI.base_url = "' . Uri::base() . '"');
119+
$document->addScriptDeclaration('tjrContentUI.root_url = "' . Uri::root() . '"');
108120
}
109121
}

tjreports/languages/administrator/en-GB/en-GB.com_tjreports.ini

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ COM_TJREPORTS_LIST_ID="Id"
3838

3939
COM_TJREPORTS_TITLE_REPORT="Reports"
4040
COM_TJREPORTS_CSV_EXPORT="CSV Export"
41-
COM_TJREPORTS_FILTER_SELECT_COURSE="Select Course"
41+
COM_TJREPORTS_FILTER_SELECT_COURSE="- Select Course -"
4242
COM_TJREPORTS_FORM_DEFAULT_OPTION="- Select Plugin -"
4343
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."
4444
COM_TJREPORT_VIEW_WITH_SAME_ALIAS="Alias name cannot be same as view names."
@@ -48,7 +48,6 @@ COM_TJREPORTS_EXPORT_FILE_SUCCESS="100% Download Complete."
4848

4949
;Common for reports
5050
COM_TJREPORTS_FILTER_SELECT_ACCESSLEVEL="- Select Access Level -"
51-
COM_TJREPORTS_FILTER_SELECT_COURSE="- Select Course -"
5251
COM_TJREPORTS_FILTER_SELECT_LESSON="Select lesson -"
5352
COM_TJREPORTS_FILTER_SELECT_COURSE_CATEGORY="- Select Category -"
5453
COM_TJREPORTS_FILTER_SELECT_COURSE_TYPE="- Select Type -"
@@ -139,3 +138,16 @@ COM_TJREPORTS_QUERY_DELETE_SUCCESS="Query deleted successfully."
139138
;Added in v1.0.2
140139
COM_TJREPORTS_NOTHING_TO_DISCOVER_PLUGINS="Nothing to discover"
141140
COM_TJREPORTS_DISCOVER_NEW_PLUGINS="%d new plugin(s) discovered"
141+
142+
; Column wise sorting
143+
COM_TJREPORTS_PLUGIN_ASC="Plugin ascending"
144+
COM_TJREPORTS_PLUGIN_DESC="Plugin descending"
145+
COM_TJREPORTS_CLIENT_ASC="Client ascending"
146+
COM_TJREPORTS_CLIENT_DESC="Client descending"
147+
COM_TJREPORTS_SAVED_QUERY_ASC="Saved Query ascending"
148+
COM_TJREPORTS_SAVED_QUERY_DESC="Saved Query descending"
149+
150+
; Added in __DEPLOY_VERSION__
151+
COM_TJREPORTS_REPORT_SUMMARY="Summary Report"
152+
COM_TJREPORTS_REPORT_DETAILS="Details Report"
153+
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."

tjreports/languages/site/en-GB/en-GB.com_tjreports.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,6 @@ LIB_TECHJOOMLA_CSV_EXPORT_ABORT="Abort"
107107
LIB_TECHJOOMLA_CSV_EXPORT_CONFIRM_ABORT="Are you sure to abort CSV Export?"
108108
LIB_TECHJOOMLA_CSV_EXPORT_UESR_ABORTED="Export aborted."
109109

110+
; Since __DEPLOY_VERSION__
111+
COM_TJREPORTS_REPORT_DETAILS="Details Report"
112+
COM_TJREPORTS_REPORT_SUMMARY="Summary Report"

tjreports/media/js/chartBundle.min.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; @package Com_Tjreports
2+
; @copyright Copyright © 2009-2018 Techjoomla. All rights reserved.
3+
; @license GNU General Public License version 2, or later
4+
; Note: All ini files need to be saved as UTF-8
5+
6+
PLG_API_REPORTS_REPORT_NAME_MISSSING="Please enter report name"
7+
PLG_API_REPORTS_REPORT_NAME_INVALID="Please enter valid report name"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
; @package Com_Tjreports
2+
; @copyright Copyright © 2009-2018 Techjoomla. All rights reserved.
3+
; @license GNU General Public License version 2, or later
4+
; Note: All ini files need to be saved as UTF-8
5+
6+
PLG_API_REPORTS="TJ Reports Api Plugin"
7+
PLG_API_REPORTS_DESCRIPTION="TJ Reports Api Plugin"

0 commit comments

Comments
 (0)