Merge branch 'master' of https://github.com/thelia/thelia into coupon

* 'master' of https://github.com/thelia/thelia: (102 commits)
  add higher priority to module routing
  update smarty version
  select default country in front register form
  add modal error id changing default country failed
  enabled change default country
  fiw module generator class name issue
  complete javascript for changing default country
  validate country removal
  validate country creation
  implement abstract method from AbstractCrudController in Country Controller
  create country action class
  add pre/post CRUD method in Country model
  create coutry events
  finish customer address update
  complete readme
  update .gitignore file
  add specifig php.ini file for travis
  try to fix travis conf
  remove unused directory
  check session directory permission in install process
  ...
This commit is contained in:
Kahn
2013-10-08 23:22:53 +02:00
481 changed files with 9445 additions and 15685 deletions

View File

@@ -4,6 +4,9 @@
{check_auth roles="ADMIN" permissions="{block name="check-permissions"}{/block}" login_tpl="/admin/login"}
{/block}
{* -- Define some stuff for Smarty ----------------------------------------- *}
{config_load file='variables.conf'}
<!DOCTYPE html>
<html lang="{$lang_code}">
<head>
@@ -111,26 +114,30 @@
{/loop}
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown">
<li class="dropdown {if $admin_current_location == 'order'}active{/if}" id="orders_menu">
<a href="#">{intl l="Orders"} <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
<ul class="dropdown-menu config_menu" role="menu">
<ul class="dropdown-menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
<li role="menuitem">
<a class="clearfix" data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
<span class="pull-left">{intl l="All orders"}</span>
<span class="label label-default pull-right">{count type="order" customer="*" backend_context="1"}</span>
</a>
</li>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{loop name="order-status-list" type="order-status"}
{assign "orderStatusLabel" "order_$CODE"}
<li role="menuitem">
<a class="clearfix" data-target="{url path='admin/orders/$LABEL'}" href="{url path="admin/orders" status=$ID}">
<span class="pull-left">{$TITLE}</span>
<span class="label label-{#$orderStatusLabel#} pull-right">{count type="order" customer="*" backend_context="1" status=$ID}</span>
</a>
</li>
{/loop}
</ul>
</li>
{/loop}
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}

View File

@@ -0,0 +1,111 @@
{* Update an Address *}
{form name="thelia.address.update"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label} }" placeholder="{intl l='Label'}">
</div>
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
<option value="{$ID}" {if $value == $ID}selected{/if}>{$LONG}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l={$label}} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}" {if $value == $ID}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "edit_address_dialog"
dialog_title = {intl l="Edit an address"}
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path="/admin/address/save/{$address_id}"}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}

View File

@@ -9,6 +9,14 @@
// Base class and wrapper
.navbar {
margin-bottom: 0;
.dropdown-menu {
> li {
> a > .label {
font-size: 15px;
}
}
}
}
// Inner for background effects

View File

@@ -13,6 +13,19 @@
}
}
}
tbody {
tr.active, tr {
td.td-unstyled {
background-color: white;
border-top: none;
border-right: 1px solid @table-border-color;
}
td.last {
border-bottom: 1px solid @table-border-color;
}
}
}
}
@@ -55,10 +68,6 @@ tfoot{
}
}
// td, th {
// text-align: center;
// }
td.object-title, th.object-title {
text-align: left;
}

View File

@@ -193,6 +193,11 @@
padding: 1em;
margin-bottom: 20px;
.select-fixed-width {
width: 120px;
}
// The block title
.title {
color: #5A6876;
@@ -290,6 +295,13 @@
width: auto;
}
.modal-backdrop .loading {
left: 50%;
top: 50%;
right: auto;
position: absolute;
}
.existing-image .col-sm-6{
position: relative;

View File

@@ -0,0 +1,9 @@
#order
max_displayed_orders = 20
#order status
order_not_paid = 'warning'
order_paid = 'success'
order_processing = 'primary'
order_sent = 'info'
order_canceled = 'danger'

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="false" editing_content="true"}
<div class="row">
{loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"}
@@ -42,7 +42,7 @@
<ul class="nav nav-tabs" id="tabbed-menu">
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li><a href="#association" data-toggle="tab">{intl l="Associations"}</a></li>
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
@@ -102,7 +102,7 @@
{$myparent=$DEFAULT_FOLDER}
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if}>{$TITLE}</option>
{/loop }
</select>
@@ -141,108 +141,8 @@
</div>
</div>
<div class="tab-pane fade" id="details">
<div class="form-container">
<div class="form-group">
<form action="{url path='/admin/folders/related-content/add'}" id="related_content_form">
{include
file="includes/inner-form-toolbar.html"
hide_submit_buttons=true
close_url="{url path='/admin/folders' folder_id=$folder_id}"
}
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="folders"}
<div class="row">
<div class="col-md-6">
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
<span class="help-block">{intl l='Select a folder to get its content'}</span>
</div>
<div class="col-md-6">
<div id="content_selector" class="hide">
<div class="input-group">
<select required="required" name="content_id" id="content_id" class="form-control">
<option value="">Select a folder content...</option>
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a content and click (+) to add it to this category'}</span>
</div>
</div>
</div>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No folders found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Attribute title'}</th>
{module_include location='folder_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{*loop name="assigned_contents" type="associated_content" folder="$folder_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='folder_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.folder.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This folder contains no contents"}
</div>
</td>
</tr>
{/elseloop*}
</tbody>
</table>
</div>
<div class="tab-pane fade" id="association">
{include file="includes/content-folder-management.html"}
</div>
<div class="tab-pane fade" id="images">
@@ -265,28 +165,29 @@
</div>
{* Delete related content confirmation dialog *}
{* Delete category confirmation dialog *}
{capture "delete_content_dialog"}
<!-- <input type="hidden" name="category_id" value="{$category_id}" /> -->
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
{capture "delete_folder_dialog"}
<input type="hidden" name="content_id" value="{$content_id}" />
<input type="hidden" name="additional_folder_id" id="additional_folder_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
<input type="hidden" name="current_tab" value="association" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_content_dialog"
dialog_title = {intl l="Remove related content"}
dialog_message = {intl l="Do you really want to remove this related content ?"}
dialog_id = "delete_folder_dialog"
dialog_title = {intl l="Remove associated folder"}
dialog_message = {intl l="Do you really want to remove the content from this folder ?"}
form_action = {url path='/admin/folders/related-content/delete'}
form_content = {$smarty.capture.delete_content_dialog nofilter}
form_action = {url path='/admin/content/folder/delete'}
form_content = {$smarty.capture.delete_folder_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/dropzone.js'}
<script src="{$asset_url}"></script>
@@ -314,6 +215,9 @@ form_content = {$smarty.capture.delete_content_dialog nofilter}
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
{/if}
$('a.delete-folder').click(function(e) {
$('#additional_folder_delete_id').val($(this).data('id'));
});
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {

View File

@@ -35,12 +35,12 @@
</caption>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
<th>{intl l="ID"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Default"}</th>
<th>{intl l="Shop"}</th>
<th>{intl l="N° ISO"}</th>
<th>{intl l="ISO Code"}</th>
{module_include location='countries_table_header'}
@@ -54,8 +54,8 @@
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" 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 class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
<div class="make-switch switch-small switch-radio change-default-toggle" 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 class="change-default-toggle" type="radio" name="by_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
<td>
@@ -71,7 +71,7 @@
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/country/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
@@ -121,7 +121,7 @@
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/country/update' country_id='_ID_'}" />
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/country/update/_ID_'}" />
{/form_field}
{form_field form=$form field='title'}
@@ -160,6 +160,12 @@
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
</div>
{/form_field}
{loop type="lang" name="default-lang" default_only="1"}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
{module_include location='country_create_form'}
@@ -202,6 +208,23 @@
form_content = {$smarty.capture.delete_dialog nofilter}
}
<div class="modal fade" id="toggle-default-failed" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content alert alert-block alert-danger ">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h2>{intl l="Error"}</h2>
</div>
<div class="modal-body">
<strong>{intl l="Impossible to change default country. Please contact your administrator or try later"}</strong>
</div>
</div>
</div>
</div>
{/block}
{block name="javascript-initialization"}
@@ -210,10 +233,30 @@
<script src="{$asset_url}"></script>
<script>
// Toogle switch on input radio
$('.switch-radio').on('switch-change', function () {
$('.switch-radio').bootstrapSwitch('toggleRadioState');
$(document).ready(function(){
// Toogle switch on input radio
$('.switch-radio').on('switch-change', function () {
$('.switch-radio').bootstrapSwitch('toggleRadioState');
});
$('.country-delete').click(function(ev){
$('#country_delete_id').val($(this).data('id'));
});
$('.change-default-toggle').on('switch-change', function(e, data){
if(data.value) {
$.ajax({
url : "{url path='/admin/configuration/country/toggleDefault'}",
data : {
country_id: $(this).data('id')
}
}).fail(function(){
$('#toggle-default-failed').modal('show');
});
}
});
});
</script>
{/javascripts}

View File

@@ -92,13 +92,13 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
</div>
{/form_field}
{form_field form=$form field='short-description'}
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country short description'}"></textarea>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l=""}" placeholder="{intl l='Country short description'}"></textarea>
</div>
{/form_field}
{form_field form=$form field='description'}

View File

@@ -44,7 +44,7 @@
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}
<div class="col-md-6">
<p class="title title-without-tabs">{intl l="Customer informations"}</p>
@@ -74,7 +74,7 @@
</div>
{/form_field}
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}
<p class="title title-without-tabs">{intl l="Default address"}</p>
@@ -171,15 +171,15 @@
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<a class="btn btn-default btn-xs customer-update-address" title="{intl l='Edit this address'}" href="#" data-id="{$ID}">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<a class="btn btn-default btn-xs customer-address-use" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-id="{$ID}" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<a class="btn btn-default btn-xs customer-address-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
@@ -218,7 +218,7 @@
</div>
</div>
<div id="address-update-modal"></div>
{* Add an Address *}
{form name="thelia.address.create"}
@@ -227,7 +227,10 @@
{capture "address_creation_dialog"}
{form_hidden_fields form=$form}
<input type="hidden" name="customer_id" value="{$customer_id}">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/customer/update/{$customer_id}"}" />
{/form_field}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
@@ -246,7 +249,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
@@ -257,21 +260,21 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}" required>
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}" required>
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}" required>
</div>
<div class="form-group">
@@ -290,21 +293,21 @@
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}" required>
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}" required>
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
@@ -331,117 +334,7 @@
{/form}
{* Update an Address *}
{form name="thelia.address.update"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
</div>
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "edit_address_dialog"
dialog_title = {intl l="Edit an address"}
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/address/update'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* Default confirmation dialog *}
@@ -475,7 +368,7 @@
dialog_message = {intl l="Do you really want to delete this address ?"}
form_action = {url path='/admin/address/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
form_content = {$smarty.capture.delete_address_dialog nofilter}
}
{/block}
@@ -483,4 +376,35 @@
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
(function($) {
$(document).ready(function(){
$("a.customer-address-delete").click(function(e){
$("#address_delete_id").val($(this).data("id"));
});
$("a.customer-address-use").click(function(e){
$("#address_use_id").val($(this).data("id"));
});
$("a.customer-update-address").click(function(e){
var baseUrl = "{url path="/admin/address/update/"}";
$('body').append('<div class="modal-backdrop fade in" id="loading-event"><div class="loading"></div></div>');
$.ajax({
method: 'get',
url: baseUrl+$(this).data('id')
}).done(function(data){
$("#loading-event").remove();
$("#address-update-modal").html(data);
$("#edit_address_dialog").modal("show");
});
});
$(document).on("hidden.bs.modal", "#edit_address_dialog", function(ev){
$("#edit_address_dialog").remove();
});
});
})(jQuery);
</script>
{/block}

View File

@@ -64,9 +64,21 @@
</thead>
<tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
{loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" page={$customer_page} limit={$display_customer}}
{assign "lastOrderDate" ''}
{assign "lastOrderAmount" ''}
{assign "lastOrderCurrency" ''}
{loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"}
{assign "lastOrderDate" "{format_date date=$CREATE_DATE}"}
{assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"}
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "lastOrderCurrency" $SYMBOL}
{/loop}
{/loop}
<tr>
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
<td>
{$COMPANY}
@@ -79,11 +91,11 @@
{module_include location='customer_list_row'}
<td>
{format_date date=$LASTORDER_DATE}
{$lastOrderDate}
</td>
<td>
{format_number number=$LASTORDER_AMOUNT}
{$lastOrderCurrency} {$lastOrderAmount}
</td>
<td>
<div class="btn-group">

View File

@@ -8,7 +8,7 @@
<div class="folder edit-folder">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
{include file="includes/folder-breadcrumb.html" editing_category="true" }
<div class="row">
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id"}

View File

@@ -5,332 +5,337 @@
{block name="check-permissions"}admin.folders.view{/block}
{block name="main-content"}
<div class="folders">
<div class="folders">
<div id="wrapper" class="container">
{* include file="includes/folder-breadcrumb.html" *}
{include file="includes/folder-breadcrumb.html" folder_id=$parent }
{module_include location='folders_top'}
{module_include location='folders_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$parent}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
{*
<td class="object-title">
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>*}
{module_include location='folder_list_caption'}
{module_include location='folder_list_caption'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
{module_include location='folder_list_header'}
{module_include location='folder_list_header'}
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' parent=$parent}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' id_folder=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$parent order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
<td class="object-title">
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
{module_include location='folder_list_row'}
{module_include location='folder_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" 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="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" 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="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" 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="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
{elseloop rel="can_change"}
<div class="make-switch switch-small" 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="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' parent=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path="/admin/folders/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="can_create"}
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Contents in %fold" fold=$TITLE}
{/loop}
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
{loop name="folder_title" type="folder" visible="*" id=$parent}
{intl l="Contents in %fold" fold=$TITLE}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level Contents"}
{/elseloop}
{elseloop rel="folder_title"}
{intl l="Top level Contents"}
{/elseloop}
{module_include location='content_list_caption'}
{module_include location='content_list_caption'}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</caption>
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</caption>
{ifloop rel="content_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
{ifloop rel="content_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$content_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='ID'}"
}
}
<th>&nbsp;</th>
<th>&nbsp;</th>
<th class="object-title">
{admin_sortable_header
<th class="object-title">
{admin_sortable_header
current_order=$content_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Content title'}"
}
}
{module_include location='content_list_header'}
{module_include location='content_list_header'}
<th>
{admin_sortable_header
<th>
{admin_sortable_header
current_order=$content_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Online'}"
}
</th>
}
</th>
<th>
{admin_sortable_header
<th>
{admin_sortable_header
current_order=$content_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
path={url path='/admin/folders' parent=$parent target='contents'}
label="{intl l='Position'}"
}
</th>
}
</th>
<th>&nbsp;</th>
</tr>
</thead>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{loop name="content_list" type="content" visible="*" folder_default=$folder_id order=$content_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="content_list" type="content" visible="*" folder_default=$parent order=$content_order}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/content/edit' id=$ID}" title="{intl l='Edit this content'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td>
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path="admin/content/update/$ID"}" title="{intl l='Edit this content'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
{module_include location='content_list_row'}
{module_include location='content_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
<div class="make-switch switch-small contentVisibleToggle" 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="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
<div class="make-switch switch-small contentVisibleToggle" 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="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" 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="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.content.edit"
path={url path='/admin/content/update-position' content_id=$ID}
url_parameter="content_id"
in_place_edit_class="contentPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{/loop}
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" 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="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.content.edit"
path={url path='/admin/content/update-position' content_id=$ID}
url_parameter="content_id"
in_place_edit_class="contentPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="content_list"}
<thead>
<tr>
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
</tr>
</thead>
{/elseloop}
</table>
{elseloop rel="content_list"}
<thead>
<tr>
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
</div>
{module_include location='folders_bottom'}
{module_include location='folders_bottom'}
</div>
</div>
</div>
{* -- Adding a new folder ------------------------------------------------- *}
{form name="thelia.admin.folder.creation"}
{form name="thelia.admin.folder.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "folder_creation_dialog"}
@@ -338,12 +343,12 @@
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update' folder_id='_ID_'}" />
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update/_ID_'}" />
{/form_field}
{form_field form=$form field='parent'}
<input type="hidden" name="{$name}" value="{$folder_id}" />
<input type="hidden" name="{$name}" value="{$parent}" />
{/form_field}
{form_field form=$form field='title'}
@@ -357,12 +362,12 @@
<div class="help-block">{intl l='Enter here the folder name in the default language (%title)' title="$TITLE"}</div>
{* Switch edition to the current locale *}
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
</div>
{/form_field}
@@ -382,55 +387,55 @@
{/capture}
{include
{include
file = "includes/generic-create-dialog.html"
dialog_id = "folder_creation_dialog"
dialog_title = {intl l="Create a new folder"}
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
dialog_ok_label = {intl l="Create this folder"}
dialog_ok_label = {intl l="Create this folder"}
form_action = {url path='/admin/folders/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
form_action = {url path='/admin/folders/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{/form}
{* -- Adding a new content -------------------------------------------------- *}
{form name="thelia.admin.content.creation"}
{form name="thelia.admin.content.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "content_creation_dialog"}
{capture "content_creation_dialog"}
{form_hidden_fields form=$form}
{form_hidden_fields form=$form}
{* Be sure to get the folder_id, even if the form could not be validated *}
<input type="hidden" name="folder_id" value="{$folder_id}" />
{* Be sure to get the folder_id, even if the form could not be validated *}
<input type="hidden" name="parent" value="{$parent}" />
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/contents/update' content_id='_ID_'}" />
{/form_field}
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/content/update/_ID_' }" />
{/form_field}
{form_field form=$form field='default_folder'}
<input type="hidden" name="{$name}" value="{$folder_id}" />
{/form_field}
{form_field form=$form field='default_folder'}
<input type="hidden" name="{$name}" value="{$parent}" />
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
</div>
</div>
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
@@ -455,18 +460,18 @@
{/capture}
{include
file = "includes/generic-create-dialog.html"
file = "includes/generic-create-dialog.html"
dialog_id = "content_creation_dialog"
dialog_title = {intl l="Create a new content"}
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
dialog_id = "content_creation_dialog"
dialog_title = {intl l="Create a new content"}
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
dialog_ok_label = {intl l="Create this content"}
dialog_ok_label = {intl l="Create this content"}
form_action = {url path='/admin/contents/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
form_action = {url path='/admin/content/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* -- Delete folder confirmation dialog ----------------------------------- *}
@@ -479,36 +484,36 @@
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
file = "includes/generic-confirm-dialog.html"
dialog_id = "folder_delete_dialog"
dialog_title = {intl l="Delete folder"}
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
dialog_id = "folder_delete_dialog"
dialog_title = {intl l="Delete folder"}
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
form_action = {url path='/admin/folders/delete'}
form_content = {$smarty.capture.folder_delete_dialog nofilter}
}
form_action = {url path='/admin/folders/delete'}
form_content = {$smarty.capture.folder_delete_dialog nofilter}
}
{* -- Delete content confirmation dialog ------------------------------------ *}
{capture "content_delete_dialog"}
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="folder_id" value="{$parent}" />
{module_include location='content_delete_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
file = "includes/generic-confirm-dialog.html"
dialog_id = "content_delete_dialog"
dialog_title = {intl l="Delete content"}
dialog_message = {intl l="Do you really want to delete this content ?"}
dialog_id = "content_delete_dialog"
dialog_title = {intl l="Delete content"}
dialog_message = {intl l="Do you really want to delete this content ?"}
form_action = {url path='/admin/content/delete'}
form_content = {$smarty.capture.content_delete_dialog nofilter}
}
form_action = {url path='/admin/content/delete'}
form_content = {$smarty.capture.content_delete_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
@@ -536,23 +541,23 @@
// JS stuff for creation form
{include
file = "includes/generic-js-dialog.html"
dialog_id = "folder_creation_dialog"
form_name = "thelia.admin.folder.creation"
}
file = "includes/generic-js-dialog.html"
dialog_id = "folder_creation_dialog"
form_name = "thelia.admin.folder.creation"
}
{include
file = "includes/generic-js-dialog.html"
dialog_id = "content_creation_dialog"
form_name = "thelia.admin.content.creation"
}
file = "includes/generic-js-dialog.html"
dialog_id = "content_creation_dialog"
form_name = "thelia.admin.content.creation"
}
{* Toggle object visibility *}
$(".folderVisibleToggle").on('switch-change', function(event, data) {
$.ajax({
url : "{url path='admin/folders/toggle-online'}",
data : {
data : {
folder_id : $(this).data('id'),
action : 'visibilityToggle'
}
@@ -570,9 +575,9 @@
});
});
{* Inline editing of object position using bootstrap-editable *}
{* Inline editing of object position using bootstrap-editable *}
$('.folderPositionChange').editable({
$('.folderPositionChange').editable({
type : 'text',
title : '{intl l="Enter new folder position"}',
mode : 'popup',
@@ -580,18 +585,18 @@
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url noamp='1' path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))
.replace('__POS__', newValue);
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))
.replace('__POS__', newValue);
// Reload the page
location.href = url;
}
});
// Reload the page
location.href = url;
}
});
$('.contentPositionChange').editable({
$('.contentPositionChange').editable({
type : 'text',
title : '{intl l="Enter new content position"}',
mode : 'popup',
@@ -599,7 +604,7 @@
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url noamp='1' path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id'))

View File

@@ -28,7 +28,7 @@
<div class="col-md-12">
{form name="$formId"}
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" {form_enctype form=$form} class="clearfix">
<div class="row inner-toolbar clearfix">
<div class="col-md-6 inner-actions pull-right">

View File

@@ -1,8 +1,8 @@
{* Breadcrumb for categories browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/catalog'}">{intl l="Catalog"}</a></li>
{ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}

View File

@@ -0,0 +1,102 @@
<div class="form-container">
<div class="row">
{* -- Begin folders management ----------------------------------- *}
<div class="col-md-6">
<div class="well well-sm">
<div class="form-group">
<form method="POST" action="{url path='/admin/content/folder/add'}" id="related_content_form">
<p class="title title-without-tabs">{intl l='Additional categories'}</p>
<p>{intl l='A content could be attached to more than one folder. Select here the additional fodlers for this content.'}
{loop name="default_folder" type="folder" id=$DEFAULT_FOLDER}
{intl l='You can change the default folder (%title) in the "General" tab.' title=$TITLE}
{/loop}
{$exclude_from_tree = "-1"}
{loop name="additional_folders" type="folder" exclude=$DEFAULT_FOLDER content=$content_id backend_context="1" lang="$edit_language_id"}
{$exclude_from_tree = "$exclude_from_tree,$ID"}
{/loop}
<input type="hidden" name="content_id" value="{$content_id}" />
<input type="hidden" name="current_tab" value="association" />
{ifloop rel="folders"}
<div class="input-group">
<select name="additional_folder_id" id="additional_folder_id" class="form-control">
<option value="">{intl l='Select a folder...'}</option>
{loop name="folders" type="folder-tree" folder="0" exclude=$exclude_from_tree backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_FOLDER==$ID}disabled="disabled"{/if}>
{$TITLE} {if $DEFAULT_FOLDER==$ID}{intl l=' (default)'}{/if}
</option>
{/loop}
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a folder and click (+) to add it to the additional folder list'}</span>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No Folders found"}</div>
{/elseloop}
</form>
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Folder title'}</th>
{module_include location='product_folders_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="additional_folders" type="folder" content=$content_id exclude=$DEFAULT_FOLDER backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='product_folders_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
<a class="btn btn-default btn-xs delete-folder" title="{intl l='Remove the product from this category'}" href="#delete_folder_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="additional_folders"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This product doesn't belong to any additional folder."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</div>
{* -- End folders management ------------------------------------- *}
</div>
</div>

View File

@@ -1,26 +1,28 @@
{* Breadcrumb for folders browsing and editing *}
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/folders'}">Folders</a>
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='admin/folders'}">{intl l="Folders"}</a></li>
{ifloop rel="folder_path"}</li>
{ifloop rel="folder_path"}
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
{if $ID == $folder_id}
{if $ID == $parent}
<li class="active">
{if $editing_folder == true}
{intl l='Editing %fold' fold="{$TITLE}"}
{else}
{$TITLE} <a href="{url path='/admin/folders/update' folder_id=$ID}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
{$TITLE} <a href="{url path="/admin/folders/update/$ID"}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
{/if}
</li>
{else}
<li><a href="{url path='/admin/folders' folder_id=" $ID" action='browse'}">{$TITLE}</a></li>
<li><a href="{url path='/admin/folders' parent="$ID" }">{$TITLE}</a></li>
{/if}
{/loop}
{/ifloop}
{elseloop rel="folder_path"}
</li>
{/elseloop}
{if $editing_content == true}
{loop name="content_path" type="content" visible="*" id=$content_id}
<li>{intl l="Editing %title" title="$TITLE"}</li>
{/loop}
{/if}
</ul>

View File

@@ -5,6 +5,9 @@
{block name="check-permissions"}admin.order.edit{/block}
{block name="main-content"}
{assign oder_tab {$smarty.get.tab|default:"cart"}}
<div class="orders edit-order">
<div id="wrapper" class="container">
@@ -17,325 +20,327 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<ul class="nav nav-tabs">
<li class="active"><a href="#cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Cart"}</a></li>
<li><a href="#bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Bill"}</a></li>
<li><a href="#carriage" data-toggle="tab"><span class="glyphicon glyphicon-send"></span> {intl l="Carriage"}</a></li>
<li><a href="#settlement" data-toggle="tab"><span class="glyphicon glyphicon-credit-card"></span> {intl l="Settlement"}</a></li>
<li><a href="#address" data-toggle="tab"><span class="glyphicon glyphicon-home"></span> {intl l="Address"}</a></li>
<li><a href="#supplements" data-toggle="tab"><span class="glyphicon glyphicon-info-sign"></span> {intl l="Further information"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="cart">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<div class="general-block-decorator">
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
</div> <!-- #cart -->
{ifloop rel='the-order'}
<div class="tab-pane fade" id="bill">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
{loop type="order" name="the-order" id=$order_id customer="*"}
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #bill -->
{loop type="currency" name="order-currency" id=$CURRENCY}
{assign "orderCurrency" $SYMBOL}
{/loop}
<div class="tab-pane fade" id="carriage">
<p class="title title-without-tabs clearfix">
{intl l='Information about the carriage'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Download pdf bill'}" href="#">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download pdf bill'}
</a>
</p>
{assign "orderStatusId" $STATUS}
<dl class="dl-horizontal">
<dt>{intl l="Mode of transportation"}</dt>
<dd>Colissimo</dd>
</dl>
<dl class="dl-horizontal">
<dt>{intl l="Description"}</dt>
<dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, error, necessitatibus ipsam dolores ad quisquam provident sed repudiandae ullam quasi quae perferendis numquam voluptates doloribus laborum possimus dicta similique in?</dd>
</dl>
</div> <!-- #carriage -->
<div class="lead clearfix">
<span class='label label-default pull-left'>{$REF}</span>
<div class="pull-right select-fixed-width">
<form id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
<select class="js-update-order-status" name="status_id" data-toggle="selectpicker">
{loop type="order-status" name="all-status"}
{assign "orderStatusLabel" "order_$CODE"}
<option {if $ID == $orderStatusId}selected="selected" {/if} value="{$ID}" data-content="<span class='label label-{#$orderStatusLabel#}'>{$TITLE}</span>">{$TITLE}</option>
{/loop}
</select>
</form>
</div>
</div>
<div class="tab-pane fade" id="settlement">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #settlement -->
<ul class="nav nav-tabs clearfix">
<li {if $oder_tab == 'cart'}class="active"{/if}><a href="#cart" data-tab-name="cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Ordered products"}</a></li>
<li {if $oder_tab == 'bill'}class="active"{/if}><a href="#bill" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Invoice and Delivery"}</a></li>
<div class="tab-pane fade clearfix" id="address">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</ul>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- #address -->
<div class="tab-pane fade clearfix" id="supplements">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
<div class="tab-content">
<div class="tab-pane fade {if $oder_tab == 'cart'}active in{/if}" id="cart">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Cart'}
</caption>
<thead>
<tr>
<th class="col-md-7">{intl l="Product"}</th>
<th class="col-md-1">{intl l="Unit. price"}</th>
<th class="col-md-1">{intl l="Tax"}</th>
<th class="col-md-1">{intl l="Unit taxed price"}</th>
<th class="col-md-1">{intl l="Quantity"}</th>
<th class="col-md-1">{intl l="Taxed total"}</th>
</tr>
</thead>
</div>
<tbody>
{loop type="order_product" name="order-products" order=$ID}
{if $WAS_IN_PROMO == 1}
{assign "realPrice" $PROMO_PRICE}
{assign "realTax" $PROMO_PRICE_TAX}
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
{else}
{assign "realPrice" $PRICE}
{assign "realTax" $PRICE_TAX}
{assign "realTaxedPrice" $TAXED_PRICE}
{/if}
<tr>
<td>
<a href="#">{$TITLE}</a>
{ifloop rel="combinations"}
<dl class="dl-horizontal">
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
<dt>{$ATTRIBUTE_TITLE}</dt>
<dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
{/loop}
</dl>
{/ifloop}
</td>
<td>{$orderCurrency} {$realPrice}</td>
<td>{$orderCurrency} {$realTax}</td>
<td>{$orderCurrency} {$realTaxedPrice}</td>
<td>{$QUANTITY}</td>
<td>{$orderCurrency} {$realTaxedPrice * $QUANTITY}</td>
</tr>
{/loop}
</tbody>
<tbody class="table-condensed">
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Total without discount"}</strong></td>
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Discount"}</strong></td>
<td><strong>{$orderCurrency} 0</strong></td>
</tr>
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Coupon code"}</strong></td>
<td><strong>{$orderCurrency} 0</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Total including discount"}</strong></td>
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
</tr>
<tr class="active">
<td colspan="2" class="td-unstyled"></td>
<td colspan="3"><strong>{intl l="Postage"}</strong></td>
<td><strong>{$orderCurrency} {$POSTAGE}</strong></td>
</tr>
<tr>
<td colspan="2" class="td-unstyled"></td>
<td colspan="3" class="last"><strong>{intl l="Total"}</strong></td>
<td class="last"><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</strong></td>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Payment information'}
</caption>
<tbody>
<tr>
<th>{intl l="Payment module"}</th>
<td>{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>{$TRANSACTION_REF}</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #cart -->
<div class="tab-pane fade {if $oder_tab == 'bill'}active in{/if} clearfix" id="bill">
<div class="title title-without-tabs clearfix">
{intl l='Delivery module'}
<div class="pull-right col-md-3">
<form action="{url path="/admin/order/update/$ID/delivery-ref"}" method="post">
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
<div class="input-group">
<input class="form-control" type="text" name="delivery_ref" value="{$DELIVERY_REF}" placeholder="{intl l="tracking reference"}"/>
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
</span>
</div>
</form>
</div>
</div>
{loop name="payment-module" type="module" id=$DELIVERY_MODULE}
<dl class="dl-horizontal">
<dt>{intl l="Name"}</dt>
<dd>{$TITLE}</dd>
</dl>
<dl class="dl-horizontal">
<dt>{intl l="Description"}</dt>
<dd>{$DESCRIPTION}</dd>
</dl>
{/loop}
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Invoice informations'}
<div class="pull-right">
<a class="btn btn-default btn-primary" title="{intl l='Download invoice as PDF'}" href="{url path="/admin/order/pdf/invoice/$ID"}">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Invoice'}
</a>
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$INVOICE_ADDRESS}" title="{intl l='Edit invoice address'}" href="#edit_order_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</caption>
<tbody>
<tr>
<th>{intl l="Invoice reference"}</th>
<td>{$INVOICE_REF}</td>
</tr>
<tr>
<th>{intl l="Invoice date"}</th>
<td>{format_date date=$INVOICE_DATE output="date"}</td>
</tr>
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-invoice-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<div class="pull-right">
<a class="btn btn-default btn-primary" title="{intl l='Download purchase order as PDF'}" href="{url path="/admin/order/pdf/delivery/$ID"}">
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Purchase order'}
</a>
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$DELIVERY_ADDRESS}" title="{intl l='Edit delivery address'}" href="#edit_order_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</caption>
<tbody>
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div> <!-- #bill -->
</div>
{/loop}
{/ifloop}
{elseloop rel="the-order"}
DOES NOT EXISTS
{/elseloop}
</div>
@@ -347,34 +352,31 @@
{* Update an Address *}
{form name="thelia.address.update"}
{form name="thelia.order.update.address"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "edit_address_dialog"}
{capture "edit_order_address_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
</div>
{form_field form=$form field='id'}
<input type="hidden" id="{$label_attr.for}" name="{$name}" class="js-order-address-id" value="{$value}">
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-company" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<select name="{$name}" id="{$label_attr.for}" class="form-control js-title">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
<option value='{$ID}'>{$LONG}</option>
{/loop}
</select>
</div>
@@ -382,79 +384,128 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-firstname" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-lastname" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address1" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address2" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address3" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-zipcode" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-city" value="{$value}" title="{intl l=$label}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control js-country">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{/form_field}
{form_field form=$form field='phone'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-phone" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Phone'}">
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "edit_address_dialog"
dialog_title = {intl l="Edit an address"}
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
dialog_id = "edit_order_address_dialog"
dialog_title = {intl l="Edit order address"}
dialog_body = {$smarty.capture.edit_order_address_dialog nofilter}
dialog_ok_label = {intl l="Edit this address"}
dialog_ok_label = {intl l="Confirm changes"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/address/update'}
form_action = {url path="/admin/order/update/$order_id/address"}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
form_id = 'updateOrderAddressForm'
}
{/form}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src='{$asset_url}'></script>
{/javascripts}
{javascripts file='assets/js/main.js'}
<script src='{$asset_url}'></script>
{/javascripts}
<script type="text/javascript">
$(".js-update-order-status").change(function(e){
e.preventDefault();
$('#order-update-status-form').submit();
});
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$(".js-current-tab").val($(e.target).data("tab-name"));
});
$(".js-update-order-address").click(function(){
$(".js-order-address-id").val(
$(this).data("address-id")
);
$(this).parents('table').find('tr').each(function(k, v) {
if(!$(v).data('field-class')) {
return true;
}
if($(v).data('value')) {
var fieldValue = $(v).data('value');
} else {
var fieldValue = $(v).children('td').text();
}
$('.' + $(v).data('field-class')).val(fieldValue);
});
});
</script>
{/block}

View File

@@ -5,13 +5,15 @@
{block name="check-permissions"}admin.orders.view{/block}
{block name="main-content"}
{assign order_page {$smarty.get.page|default:1}}
{assign status_filter {$smarty.get.status|assertType:'IntListType'}}
<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/orders'}">{intl l="Orders"}</a></li>
<li><a href="#">{intl l="Orders"}</a></li>
</ul>
{module_include location='orders_top'}
@@ -23,17 +25,15 @@
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="order-list"}
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Company"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
@@ -45,88 +45,83 @@
</thead>
<tbody>
{loop type="order" name="order-list" customer="*" backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
{assign "orderInvoiceFirstName" $FIRSTNAME}
{assign "orderInvoiceLastName" $LASTNAME}
{assign "orderInvoiceCompany" $COMPANY}
{/loop}
{loop type="order-status" name="order-status" id=$STATUS}
{assign "orderStatus" $TITLE}
{assign "orderStatusLabel" "order_$CODE"}
{/loop}
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
<td>{format_date date=$CREATE_DATE}</td>
<td>{$orderInvoiceCompany}</td>
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
<td>{$TOTAL_TAXED_AMOUNT}</td>
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.update"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{if $STATUS !== 5}
<a class="btn btn-default btn-xs order-cancel" title="{intl l='Cancel this order'}" href="#cancel_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a>
{/if}
{/loop}
</div>
</td>
</tr>
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="7">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $order_page != 1}
<li><a href="{url path="/admin/orders" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="order-list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/orders" page=$PAGE}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/orders" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
</div>
@@ -138,22 +133,34 @@
</div>
</div>
{* Delete order confirmation dialog *}
{* Cancel order confirmation dialog *}
{capture "delete_order_dialog"}
<input type="hidden" name="current_order_id" value="{$current_order_id}" />
<input type="hidden" name="order_id" id="delete_order_id" value"" />
{capture "cancel_order_dialog"}
<input type="hidden" name="order_page" value="{$order_page}">
<input type="hidden" name="order_id" id="cancel_order_id" />
<input type="hidden" name="status_id" value="5" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_order_dialog"
dialog_id = "cancel_order_dialog"
dialog_title = {intl l="Delete an order"}
dialog_message = {intl l="Do you really want to delete this order ?"}
dialog_message = {intl l="Do you really want to cancel this order ?"}
form_action = {url path='/admin/orders/delete'}
form_content = {$smarty.capture.delete_order_dialog nofilter}
form_action = {url path='/admin/order/update/status'}
form_content = {$smarty.capture.cancel_order_dialog nofilter}
form_id = "cancel-order-form"
}
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
$(".order-cancel").click(function(){
$("#cancel_order_id").val($(this).attr("data-id"));
});
</script>
{/block}