diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-11 02:45:12 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-07-11 02:45:12 +0400 |
commit | 4ab3f934dd59806fbd44914aada8adc2d11190d5 (patch) | |
tree | 096a787d99ade4aa694398c857746ed806e2dd7c /core/ViewDataTable | |
parent | e05325bcb4314d768c02adb90514537f39e045c2 (diff) |
Modified _dataTable.twig to use a Piwik_DataTable instance instead of a DataTable converted to an array, allowed HtmlTables to render expanded DataTables, and removed @CoreHome/_dataTableActions_recursive.twig.
Diffstat (limited to 'core/ViewDataTable')
-rw-r--r-- | core/ViewDataTable/HtmlTable.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/ViewDataTable/HtmlTable.php b/core/ViewDataTable/HtmlTable.php index 402355dc53..9b951f392f 100644 --- a/core/ViewDataTable/HtmlTable.php +++ b/core/ViewDataTable/HtmlTable.php @@ -104,6 +104,14 @@ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable { $this->dataTableJsType = $type; } + + public function showExpanded($subtableTemplate = false) + { + $this->viewProperties['show_expanded'] = true; + if ($subtableTemplate !== false) { + $this->viewProperties['subtable_template'] = $subtableTemplate; + } + } /** * @return Piwik_View with all data set @@ -125,7 +133,7 @@ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable } if (!$this->isDataAvailable) { - $view->arrayDataTable = array(); + $view->dataTable = null; } else { $columns = $this->getColumnsToDisplay(); $columnTranslations = $columnDocumentation = array(); @@ -139,7 +147,7 @@ class Piwik_ViewDataTable_HtmlTable extends Piwik_ViewDataTable $nbColumns = count($this->columnsToDisplay); } - $view->arrayDataTable = $this->getPHPArrayFromDataTable(); + $view->dataTable = $this->dataTable; $view->dataTableColumns = $columns; $view->reportDocumentation = $this->getReportDocumentation(); $view->columnTranslations = $columnTranslations; |