//display date on dashproducts && added param date_from & date_to on dashboard hooks

This commit is contained in:
Vincent Augagneur
2013-10-23 09:59:16 +02:00
parent 48a70cc8ac
commit c61cec9f2a
4 changed files with 27 additions and 28 deletions
@@ -221,10 +221,15 @@ class AdminDashboardControllerCore extends AdminController
$calendar_helper->setCompareDateFrom($stats_compare_from);
$calendar_helper->setCompareDateTo($stats_compare_to);
$calendar_helper->setCompareOption(Tools::getValue('compare_date_option', $this->context->employee->stats_compare_option));
$params = array(
'date_from' => $this->context->employee->stats_date_from,
'date_to' => $this->context->employee->stats_date_to
);
$this->tpl_view_vars = array(
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne'),
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo'),
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne', $params),
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo', $params),
'translations' => $translations,
'action' => '#',
'warning' => $this->getWarningDomainName(),
+9 -1
View File
@@ -240,12 +240,20 @@ function toggleDashConfig(widget)
function bindSubmitDashConfig()
{
$('.submit_dash_config').on('click', function () {
$('.cancel_dash_config').on('click', function () {
saveDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
}
function bindCancelDashConfig()
{
$('.cancel_dash_config').on('click', function () {
toggleDashConfig($(this).closest('section.widget').attr('id'));
return false;
});
}
function saveDashConfig(widget_name)
{
configs = '';
+1
View File
@@ -49,6 +49,7 @@ class Dashproducts extends Module
public function hookDashboardZoneTwo($params)
{
$this->context->smarty->assign(array('date_from' => Tools::displayDate($params['date_from']), 'date_to' => Tools::displayDate($params['date_to'])));
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
}
@@ -72,7 +72,7 @@
</table>
</div>
<div class="tab-pane" id="dash_best_sellers">
<h3>{l s="Top 10 products"}</h3>
<h3>{l s="Top 10 products"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
<table class="table data_table" id="table_best_sellers">
<thead>
</thead>
@@ -81,7 +81,7 @@
</table>
</div>
<div class="tab-pane" id="dash_most_viewed">
<h3>{l s="Coming soon"}</h3>
<h3>{l s="Most Viewed"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
<table class="table data_table" id="table_most_viewed">
<thead>
</thead>
@@ -90,28 +90,13 @@
</table>
</div>
<div class="tab-pane" id="dash_top_search">
<div class="row">
<div class="col-lg-12">
<h3>{l s="Top 10 most search terms"}</h3>
<table class="table data_table" id="table_top_10_most_search">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
{*
<div class="col-lg-5">
<h3>{l s="Coming soon"}</h3>
<table class="table data_table" id="table_top_5_search">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
*}
</div>
<h3>{l s="Top 10 most search terms"} - {l s="From:"} {$date_from} {l s="to:"} {$date_to}</h3>
<table class="table data_table" id="table_top_10_most_search">
<thead>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</section>