Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-07-11 03:21:08 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-07-11 03:21:08 +0400
commit4f0e655a7c9fade57851bb539db285c8f88ae35c (patch)
treeaf799681f2be501bc201c6f8356dca03c0ea5868 /plugins
parent00839a262d4757a6a3ae3326a848220255003614 (diff)
Refs #4041, allow subtable template to be used if idSubtable is in request so Actions controller doesn't have to call setTemplate. Also did some mild refactoring for Piwik_ViewDataTable_HtmlTable::setRecursiveLoadDataTableIfSearchingForPattern.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Actions/Controller.php11
-rw-r--r--plugins/CoreHome/templates/_dataTable.twig2
-rw-r--r--plugins/CoreHome/templates/_dataTableActions_subDataTable.twig4
3 files changed, 7 insertions, 10 deletions
diff --git a/plugins/Actions/Controller.php b/plugins/Actions/Controller.php
index d8bf8a12c6..4980cd7764 100644
--- a/plugins/Actions/Controller.php
+++ b/plugins/Actions/Controller.php
@@ -454,14 +454,11 @@ class Piwik_Actions_Controller extends Piwik_Controller
{
$view->setDataTableType('dataTableActions');
$view->setJsType('actionDataTable');
+ $view->setSubtableTemplate('@CoreHome/_dataTableActions_subDataTable.twig');
-
- if (Piwik_Common::getRequestVar('idSubtable', -1) != -1) {
- $view->setTemplate('@CoreHome/_dataTableActions_subDataTable');
- }
- $currentlySearching = $view->setSearchRecursive();
- if ($currentlySearching) {
- $view->showExpanded($subtableTemplate = '@CoreHome/_dataTableActions_subDataTable.twig');
+ $view->setSearchRecursive();
+ if ($view->isLoadingExpandedDataTable()) {
+ $view->showExpanded();
// set levelN css class for each row
$self = $this;
diff --git a/plugins/CoreHome/templates/_dataTable.twig b/plugins/CoreHome/templates/_dataTable.twig
index 3bfe563aa0..27ace4d782 100644
--- a/plugins/CoreHome/templates/_dataTable.twig
+++ b/plugins/CoreHome/templates/_dataTable.twig
@@ -42,7 +42,7 @@
{# display subtable if present and showing expanded datatable #}
{% if properties.show_expanded|default(false) and rowHasSubtable %}
- {% include properties.subtable_template|default("@CoreHome/_dataTable.twig") with {'dataTable': row.getSubtable()} %}
+ {% include properties.subtable_template with {'dataTable': row.getSubtable()} %}
{% endif %}
{% endfor %}
</tbody>
diff --git a/plugins/CoreHome/templates/_dataTableActions_subDataTable.twig b/plugins/CoreHome/templates/_dataTableActions_subDataTable.twig
index cdd0bc603f..4f4789d49e 100644
--- a/plugins/CoreHome/templates/_dataTableActions_subDataTable.twig
+++ b/plugins/CoreHome/templates/_dataTableActions_subDataTable.twig
@@ -1,5 +1,5 @@
-{% if arrayDataTable.result is defined and arrayDataTable.result == 'error' %}
- {{ arrayDataTable.message }}
+{% if error is defined %}
+ {{ error.message }}
{% else %}
{% if (dataTable is empty or dataTable.getRowsCount() == 0) and not properties.show_expanded|default(false) %}
<tr>