Ajout du module OrderStatusNotify
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl d='orderstatusnotify' l='Order status notification'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
{intl d='orderstatusnotify' l='Purpose of feature'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="order-status">
|
||||
<div id="wrapper" class="container">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl d='orderstatusnotify' l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/tools'}">{intl d='orderstatusnotify' l="Tools"}</a></li>
|
||||
<li><a href="{url path='/admin/module/orderstatusnotify'}">{intl d='orderstatusnotify' l="Order status notification"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{include file="include/order-status-list.html"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
/* Gestion des switch */
|
||||
$(".visibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url: "{url path='admin/module/orderstatusnotify/toggle-online'}",
|
||||
data: {
|
||||
order_status_id: $(this).data('id')
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -0,0 +1,44 @@
|
||||
<!-- On dé-serialise le tableau des statuts à notifier. //-->
|
||||
{assign var="array" value=","|explode:$status}
|
||||
|
||||
{$error_message = ''}
|
||||
{if $error_message}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
{$error_message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form name="" action="">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl d='orderstatusnotify' l="Status list"}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl d='orderstatusnotify' l="ID"}</th>
|
||||
<th>{intl d='orderstatusnotify' l="Status"}</th>
|
||||
<th>{intl d='orderstatusnotify' l="To notify"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{loop type="order-status" name="order-status-loop" visible="yes" order="alpha"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small visibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
|
||||
<input type="checkbox" class="visibleToggle" {if in_array($ID, $array)}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
Reference in New Issue
Block a user