Merge pull request #928 from vishal-singh-webkul/gli-1683

Added: Hooks in the AdminDashDashboardController and in some template files.
This commit is contained in:
Rohit Jain
2024-03-15 12:16:33 +05:30
committed by GitHub
6 changed files with 19 additions and 5 deletions

View File

@@ -46,7 +46,7 @@
{assign var=curr_id value=$cart->id_currency|intval}
{foreach from=$cart_detail_data item=data}
<tr data-id-booking-data="{$data.id}" data-id-product="{$data.id_product}" data-id-room="{$data.id_room}" data-date-from="{$data.date_from}" data-date-to="{$data.date_to}" >
<td>{$data.room_num|escape:'html':'UTF-8'}</td>
<td>{$data.room_num|escape:'html':'UTF-8'} {hook h='displayRoomNumAfter' data=$data type='adminOrder'}</td>
<td><img src="{$data.image_link|escape:'html':'UTF-8'}" title="Room image" /></td>
<td>
<p>{$data.room_type|escape:'html':'UTF-8'}</p>

View File

@@ -386,7 +386,16 @@ class AdminDashboardControllerCore extends AdminController
'extra' => Tools::getValue('extra')
);
die(json_encode(Hook::exec('dashboardData', $params, $id_module, true, true, (int)Tools::getValue('dashboard_use_push'))));
// code to be added.
$data = Hook::exec('dashboardData', $params, $id_module, true, true, (int)Tools::getValue('dashboard_use_push'));
Hook::exec('actionDashboardDataModifier', array(
'data' => &$data,
'params' => $params,
'id_module' => $id_module,
'dashboard_use_push' => (int)Tools::getValue('dashboard_use_push')
));
$this->ajaxDie(json_encode($data));
}
public function ajaxProcessSetSimulationMode()

View File

@@ -61,6 +61,7 @@
<span class="label label-info" id="dgc_count_cancellations">0</span>
</a>
</li>
{hook h='displayDashGuestCycleTab'}
</ul>
<div class="tab-content panel panel-sm">
@@ -94,6 +95,7 @@
<tbody></tbody>
</table>
</div>
{hook h='displayDashGuestCycleTabContent'}
</div>
</section>
</section>

View File

@@ -40,7 +40,7 @@
<tbody>
{foreach from=$book_v['data']['available'] key=avai_k item=avai_v}
<tr>
<td>{$avai_v['room_num']|escape:'htmlall':'UTF-8'}</td>
<td>{$avai_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$avai_v type='available'}</td>
<td>{dateFormat date=date('Y-m-d', strtotime($date_from))} - {dateFormat date=date('Y-m-d', strtotime($date_to))}</td>
<td>{$avai_v['room_comment']|escape:'htmlall':'UTF-8'}</td>
<td>
@@ -129,7 +129,7 @@
<p>{dateFormat date=date('Y-m-d', strtotime($part_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($part_v['date_to']))}</p>
</td>
{/if}
<td >{$sub_part_v['room_num']|escape:'htmlall':'UTF-8'}</td>
<td >{$sub_part_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$sub_part_v type='partially_available'}</td>
<td>
{foreach $allotment_types as $allotment_type}
<label class="control-label">
@@ -211,7 +211,7 @@
{foreach from=$booked_v['detail'] key=rm_dtl_k item=rm_dtl_v}
<tr>
{if $rm_dtl_v@first}
<td rowspan="{$booked_v['detail']|count}">{$booked_v['room_num']|escape:'htmlall':'UTF-8'}</td>
<td rowspan="{$booked_v['detail']|count}">{$booked_v['room_num']|escape:'htmlall':'UTF-8'} {hook h='displayRoomNumAfter' data=$booked_v key=$rm_dtl_k type='booked'}</td>
{/if}
<td>{dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_from']))} - {dateFormat date=date('Y-m-d', strtotime($rm_dtl_v['date_to']))}</td>
<td>{$rm_dtl_v['comment']|escape:'htmlall':'UTF-8'}</td>

View File

@@ -315,6 +315,8 @@
</span>
</p>
{/if}
{hook h="displayCartTotalPriceLabel" type='before_tax'}
<p class="cart_total_tax">
<span>{l s='Total tax'}</span>
<span class="cart_total_values">{displayPrice price=($total_tax)}</span>

View File

@@ -205,6 +205,7 @@
</div>
</div>
</div>
{hook h='displayCartProductContentAfter' cart_detail=$data_v key=$rm_k}
</div>
</div>
<hr>