Régularisation de commits manquants
This commit is contained in:
172
templates/backOffice/default/order-status-edit.html
Normal file
172
templates/backOffice/default/order-status-edit.html
Normal file
@@ -0,0 +1,172 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="no-return-functions"}
|
||||
{$admin_current_location = 'tools'}
|
||||
{/block}
|
||||
|
||||
{block name="check-resource"}admin.order-status{/block}
|
||||
{block name="check-access"}view{/block}
|
||||
|
||||
{block name="page-title"}{intl l='Edit order status'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="order-status edit-order-status">
|
||||
<div id="wrapper" class="container">
|
||||
{loop name="order_status__edit" type="order-status" id=$order_status_id backend_context="1" lang=$edit_language_id}
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/order-status'}">{intl l="Order status"}</a></li>
|
||||
<li>{intl l='Editing order status "%title"' title="{$TITLE}"}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{hook name="order-status-edit.top" order_status_id=$order_status_id}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-7 title">
|
||||
{intl l='Edit order status %title' title={$TITLE}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{hookblock name="order-status.tab" order_status_id="{$order_status_id}" fields="id,title,href,content"}
|
||||
|
||||
{capture "order_status_tab_tab"}
|
||||
{forhook rel="order-status.tab"}
|
||||
<li>
|
||||
<a href="#{$id}"
|
||||
{if $href}data-href="{$href}"{/if}
|
||||
data-toggle="tab">{$title}
|
||||
</a>
|
||||
</li>
|
||||
{/forhook}
|
||||
{/capture}
|
||||
|
||||
{capture "order_status_tab_content"}
|
||||
{forhook rel="order-status.tab"}
|
||||
<div class="tab-pane fade" id="{$id}">
|
||||
{if $href}
|
||||
{* ajax *}
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
{else}
|
||||
{$content nofilter}
|
||||
{/if}
|
||||
</div>
|
||||
{/forhook}
|
||||
{/capture}
|
||||
|
||||
{/hookblock}
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li class="active">
|
||||
<a href="#general" data-toggle="tab">{intl l="General description"}</a>
|
||||
</li>
|
||||
{$smarty.capture.order_status_tab_tab nofilter}
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.order-status.modification"}
|
||||
|
||||
<form method="POST" action="{url path="/admin/configuration/order-status/save/%id" id=$ID}" class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url={url path='/admin/configuration/order-status'}}
|
||||
|
||||
<input type="hidden" name="current_tab" value="general"/>
|
||||
|
||||
{* Be sure to get the currency ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="order_status_id" value="{$ID}" />
|
||||
|
||||
{form_hidden_fields}
|
||||
|
||||
{render_form_field field="success_url" value={url path="/admin/configuration/order-status"}}
|
||||
{render_form_field field="locale" value={$edit_language_locale}}
|
||||
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{custom_render_form_field field="code"}
|
||||
<div class="input-group">
|
||||
<input type="text" {if $PROTECTED_STATUS}disabled{/if} class="form-control" {form_field_attributes field="code"}>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{custom_render_form_field field="color"}
|
||||
<div class="input-group">
|
||||
<input type="color" class="form-control" style="width: 100px;" {form_field_attributes field="color"}>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
</div>
|
||||
</div>
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hook name="order-status.update-form" order_status_id=$order_status_id}
|
||||
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
hide_flags = true
|
||||
|
||||
close_url={url path="/admin/configuration/order-status"}
|
||||
}
|
||||
|
||||
<small>{intl l='Order status created on %date_create. Last modification: %date_change' date_create={format_date date=$CREATE_DATE} date_change={format_date date=$UPDATE_DATE} }</small>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{$smarty.capture.order_status_tab_content nofilter}
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
<div class="form-container">
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = true
|
||||
page_url = $pageUrl
|
||||
close_url = {$closeUrl}
|
||||
current_tab = "modules"
|
||||
}
|
||||
</div>
|
||||
{* bad fix : {hook name="brand.tab-content"} *}
|
||||
{include file="includes/module-tab-content.html" hook="order-status.tab-content" id=$order_status_id view="order-status"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hook name="order-status-edit.bottom" order_status_id=$order_status_id}
|
||||
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{hook name='order-status.edit-js' order_status_id=$order_status_id}
|
||||
{hook name="wysiwyg.js"}
|
||||
{/block}
|
||||
241
templates/backOffice/default/order-status.html
Normal file
241
templates/backOffice/default/order-status.html
Normal file
@@ -0,0 +1,241 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="no-return-functions"}
|
||||
{$admin_current_location = 'order-status'}
|
||||
{/block}
|
||||
|
||||
{block name="page-title"}{intl l='Order status'}{/block}
|
||||
|
||||
{block name="check-resource"}admin.order-status{/block}
|
||||
{block name="check-access"}view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="orders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="#">{intl l="Order status"}</a></li>
|
||||
</ul>
|
||||
|
||||
{hook name="order-status.top"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
{if ! empty($general_error) }
|
||||
<div class="alert alert-danger">{$general_error}</div>
|
||||
{/if}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Orders status'}
|
||||
<a class="btn btn-primary action-btn" title="{intl l='Add a new order status'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{intl l='ID'}
|
||||
</th>
|
||||
|
||||
<th class="object-title">
|
||||
{intl l='Code'}
|
||||
</th>
|
||||
|
||||
<th class="object-title">
|
||||
{intl l='Title'}
|
||||
</th>
|
||||
|
||||
<th class="object-title">
|
||||
{intl l='Orders'}
|
||||
</th>
|
||||
|
||||
<th class="object-title">
|
||||
{intl l='Position'}
|
||||
</th>
|
||||
|
||||
{hook name="order-status.table-header"}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
{loop type="order-status" name="order-status-list" backend_context="1"}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{url path="/admin/configuration/order-status/update/%id" id=$ID}">{$ID}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{url path="/admin/configuration/order-status/update/%id" id=$ID}">{$CODE}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="label" style="background-color: {$COLOR};" href="{url path="/admin/configuration/order-status/update/%id" id=$ID}">{$TITLE}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{url path="/admin/orders" status=$ID}">
|
||||
{count type="order" name="order" customer="*" backend_context="1" status=$ID}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{admin_position_block
|
||||
resource="admin.order-status"
|
||||
access="UPDATE"
|
||||
path={url path='admin/configuration/order-status/update-position' order_status_id=$ID}
|
||||
url_parameter="order_status_id"
|
||||
in_place_edit_class="orderStatusPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
{hook name="order-status.table-row" order_status_id={$ID} }
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-toolbar btn toolbar-primary">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
</div>
|
||||
<div class="toolbar-options hidden">
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.order-status" access="UPDATE"}
|
||||
<a title="{intl l='Edit this order status'}" href="{url path="/admin/configuration/order-status/update/%id" id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{if !$DELETABLE}
|
||||
<a class="order-status-cancel" title="{intl l='Delete this order status'}" href="#cancel_order-status_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a>
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hook name="order-status.bottom"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.order-status.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields exclude="locale"}
|
||||
|
||||
{render_form_field field="success_url" value={url path='/admin/configuration/order-status/update/_ID_'}}
|
||||
|
||||
{custom_render_form_field field="title"}
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{render_form_field field="locale" value=$LOCALE}
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {form_field_attributes field="title"}>
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.png"}" alt="{$TITLE}" /></span>
|
||||
</div>
|
||||
{/loop}
|
||||
{/custom_render_form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{custom_render_form_field field="code"}
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" {form_field_attributes field="code"}>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{custom_render_form_field field="color"}
|
||||
<div class="input-group">
|
||||
<input type="color" class="form-control" style="width: 100px;" {form_field_attributes field="color"}>
|
||||
</div>
|
||||
{/custom_render_form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{hook name='brand.create-form' location='brand_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "creation_dialog"
|
||||
dialog_title = {intl l="Create a new order status"}
|
||||
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this order status"}
|
||||
|
||||
form_action = {url path="/admin/configuration/order-status/create"}
|
||||
form_enctype = {form_enctype}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* Cancel order confirmation dialog *}
|
||||
|
||||
{capture "cancel_order_status_dialog"}
|
||||
<input type="hidden" name="order_status_id" id="cancel_order-status_id" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "cancel_order-status_dialog"
|
||||
dialog_title = {intl l="Delete an order status"}
|
||||
dialog_message = {intl l="Do you really want to delete this order status ?"}
|
||||
|
||||
form_action = {token_url path='/admin/configuration/order-status/delete'}
|
||||
form_content = {$smarty.capture.cancel_order_status_dialog nofilter}
|
||||
form_id = "cancel-order-status-form"
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".order-status-cancel").click(function(){
|
||||
$("#cancel_order-status_id").val($(this).attr("data-id"));
|
||||
});
|
||||
|
||||
$('.orderStatusPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new order status position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/configuration/order-status/update-position' order_status_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{hook name="order-status.js"}
|
||||
{/block}
|
||||
Reference in New Issue
Block a user