Merge with master
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<body>
|
||||
{* display top bar only if admin is connected *}
|
||||
|
||||
{loop name="top-bar-auth" type="auth" roles="ADMIN"}
|
||||
{loop name="top-bar-auth" type="auth" role="ADMIN"}
|
||||
|
||||
{* -- Brand bar section ------------------------------------------------- *}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="profile" href="{url path='admin/profile/update'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
|
||||
<li><a class="profile" href="{url path='admin/configuration/administrators'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
|
||||
<li><a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}"><span class="glyphicon glyphicon-off"></span> {intl l="Logout"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -107,13 +107,13 @@
|
||||
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
|
||||
</li>
|
||||
|
||||
{loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
|
||||
{loop name="menu-auth-customer" type="auth" role="ADMIN" resource="admin.customer" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'customer'}active{/if}" id="customers_menu">
|
||||
<a href="{url path='/admin/customers'}">{intl l="Customers"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
|
||||
{loop name="menu-auth-order" type="auth" role="ADMIN" resource="admin.order" access="VIEW"}
|
||||
<li class="dropdown {if $admin_current_location == 'order'}active{/if}" id="orders_menu">
|
||||
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
|
||||
@@ -140,31 +140,31 @@
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
|
||||
{loop name="menu-auth-catalog" type="auth" role="ADMIN" resource="admin.category" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'catalog'}active{/if}" id="catalog_menu">
|
||||
<a href="{url path='/admin/catalog'}">{intl l="Catalog"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.folders.view"}
|
||||
{loop name="menu-auth-content" type="auth" role="ADMIN" resource="admin.folder" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'folder'}active{/if}" id="folders_menu">
|
||||
<a href="{url path='/admin/folders'}">{intl l="Folders"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
|
||||
{loop name="menu-auth-coupon" type="auth" role="ADMIN" resource="admin.coupon" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
|
||||
<a href="{url path='/admin/coupon'}">{intl l="Coupons"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
|
||||
{loop name="menu-auth-config" type="auth" role="ADMIN" resource="admin.config" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'configuration'}active{/if}" id="config_menu">
|
||||
<a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
|
||||
{loop name="menu-auth-modules" type="auth" role="ADMIN" resource="admin.module" access="VIEW"}
|
||||
<li class="{if $admin_current_location == 'modules'}active{/if}" id="modules_menu">
|
||||
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
|
||||
</li>
|
||||
@@ -174,7 +174,7 @@
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
|
||||
{loop name="top-bar-search" type="auth" role="ADMIN" resource="admin.search" access="VIEW"}
|
||||
<form class="navbar-form pull-right hidden-xs" action="{url path='/admin/search'}">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="search_term" name="search_term" placeholder="{intl l='Search'}">
|
||||
@@ -250,6 +250,17 @@
|
||||
|
||||
{block name="javascript-initialization"}{/block}
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
$(document).ready(function(){
|
||||
var testModal = $(".modal-force-show");
|
||||
if(testModal.length > 0) {
|
||||
testModal.modal("show");
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
{* Modules scripts are included now *}
|
||||
{module_include location='footer_js'}
|
||||
|
||||
|
||||
351
templates/admin/default/administrators.html
Normal file
351
templates/admin/default/administrators.html
Normal file
@@ -0,0 +1,351 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Taxes rules'}{/block}
|
||||
|
||||
{block name="check-resource"}admin.configuration.administrator{/block}
|
||||
{block name="check-access"}view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div>
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/administrators'}">{intl l="Administrators"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{module_include location='administrators_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 table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Taxes"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.administrator" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new administrator'}" href="#administrator_create_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Login"}</th>
|
||||
<th>{intl l="FirstName"}</th>
|
||||
<th>{intl l="LastName"}</th>
|
||||
<th>{intl l="Profile"}</th>
|
||||
<th class="col-md-1">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{loop type="admin" name="administrators" backend_context="1"}
|
||||
|
||||
<tr>
|
||||
<td data-field-class="js-login">{$LOGIN}</td>
|
||||
<td data-field-class="js-firstname">{$FIRSTNAME}</td>
|
||||
<td data-field-class="js-lastname">{$LASTNAME}</td>
|
||||
<td data-field-class="js-profile" data-value="{$PROFILE}">
|
||||
{if $PROFILE}
|
||||
{loop type="profile" name="admin-profile" id=$PROFILE}
|
||||
{$TITLE}
|
||||
{/loop}
|
||||
{else}
|
||||
{intl l='Superadministrator'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.administrator" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs js-update-administrator" title="{intl l='Change this administrator'}" href="#administrator_update_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.administrator" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs js-delete-administrator" title="{intl l='Delete this administrator'}" href="#administrator_delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='administrators_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- Add administrator confirmation dialog ----------------------------------- *}
|
||||
{form name="thelia.admin.administrator.add"}
|
||||
|
||||
{if $form_error_message}
|
||||
{$administratorCreateError = true}
|
||||
{else}
|
||||
{$administratorCreateError = false}
|
||||
{/if}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "administrator_create_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='login'}
|
||||
<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}" required="required" title="{intl l='Login'}" placeholder="{intl l='Login'}" class="form-control" value="{if $form_error}{$value}{/if}">
|
||||
</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}" required="required" title="{intl l='FirstName'}" placeholder="{intl l='FirstName'}" class="form-control" value="{if $form_error}{$value}{/if}">
|
||||
</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}" required="required" title="{intl l='LastName'}" placeholder="{intl l='LastName'}" class="form-control" value="{if $form_error}{$value}{/if}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password_confirm'}
|
||||
{$passwordError = $error}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<div class="form-group {if $passwordError}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Password'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password_confirm'}
|
||||
<div class="form-group {if $passwordError}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Password'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='profile'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
|
||||
<select id="{$label_attr.for}" name="{$name}" required="required" data-toggle="selectpicker">
|
||||
{foreach $choices as $choice}
|
||||
{if $choice->value == 0}
|
||||
<option value="0">{intl l='Superadministrator'}</option>
|
||||
{else}
|
||||
{loop name='profile' type="profile" id=$choice->value}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "administrator_create_dialog"
|
||||
dialog_title = {intl l="Create a new administrator"}
|
||||
dialog_body = {$smarty.capture.administrator_create_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/configuration/administrators/add"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
|
||||
{* -- Update administrator confirmation dialog ----------------------------------- *}
|
||||
{form name="thelia.admin.administrator.update"}
|
||||
|
||||
{if $form_error_message}
|
||||
{$administratorUpdateError = true}
|
||||
{else}
|
||||
{$administratorUpdateError = false}
|
||||
{/if}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "administrator_update_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='login'}
|
||||
<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}" required="required" title="{intl l='Login'}" placeholder="{intl l='Login'}" class="form-control js-login" value="{if $form_error}{$value}{/if}">
|
||||
</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}" required="required" title="{intl l='FirstName'}" placeholder="{intl l='FirstName'}" class="form-control js-firstname" value="{if $form_error}{$value}{/if}">
|
||||
</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}" required="required" title="{intl l='LastName'}" placeholder="{intl l='LastName'}" class="form-control js-lastname" value="{if $form_error}{$value}{/if}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password_confirm'}
|
||||
{$passwordError = $error}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<div class="form-group {if $passwordError}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" title="{intl l='Password'}" placeholder="{intl l='Leave empty to keep current password'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password_confirm'}
|
||||
<div class="form-group {if $passwordError}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="password" id="{$label_attr.for}" name="{$name}" title="{intl l='Password'}" placeholder="{intl l='Leave empty to keep current password'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='profile'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
|
||||
<select id="{$label_attr.for}" name="{$name}" required="required" data-toggle="selectpicker" class="js-profile">
|
||||
{foreach $choices as $choice}
|
||||
{if $choice->value == 0}
|
||||
<option value="0">{intl l='Superadministrator'}</option>
|
||||
{else}
|
||||
{loop name='profile' type="profile" id=$choice->value}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "administrator_update_dialog"
|
||||
dialog_title = {intl l="Update a new administrator"}
|
||||
dialog_body = {$smarty.capture.administrator_update_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Update"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/configuration/administrators/save"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
|
||||
{* -- Delete administrator confirmation dialog ----------------------------------- *}
|
||||
|
||||
{capture "administrator_delete_dialog"}
|
||||
<input type="hidden" name="administrator_id" id="administrator_delete_id" value="" />
|
||||
|
||||
{module_include location='administrator_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "administrator_delete_dialog"
|
||||
dialog_title = {intl l="Delete administrator"}
|
||||
dialog_message = {intl l="Do you really want to delete this administrator ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/administrators/delete'}
|
||||
form_content = {$smarty.capture.administrator_delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{include
|
||||
file = "includes/generic-warning-dialog.html"
|
||||
|
||||
dialog_id = "administrator_cannot_delete_dialog"
|
||||
dialog_title = {intl l="You can't delete this administrator"}
|
||||
dialog_body = {intl l="They are some administrator which are linked to this administrator. Please edit/remove them before deleting this administrator."}
|
||||
}
|
||||
|
||||
{/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">
|
||||
jQuery(function($) {
|
||||
|
||||
{if $administratorCreateError == true}
|
||||
$('#administrator_create_dialog').modal();
|
||||
{/if}
|
||||
|
||||
{if $administratorUpdateError == true}
|
||||
$('#administrator_update_dialog').modal();
|
||||
{/if}
|
||||
|
||||
$(".js-delete-administrator").click(function(e){
|
||||
$('#administrator_delete_id').val($(this).data('id'))
|
||||
});
|
||||
|
||||
$(".js-update-administrator").click(function(e){
|
||||
$('#administrator_update_id').val($(this).data('id'))
|
||||
|
||||
$(this).parents('tr').find('td').each(function(k, v) {
|
||||
if(!$(v).data('field-class')) {
|
||||
return true;
|
||||
}
|
||||
if($(v).data('value')) {
|
||||
var fieldValue = $(v).data('value');
|
||||
} else {
|
||||
var fieldValue = $(v).text();
|
||||
}
|
||||
|
||||
$('.' + $(v).data('field-class')).val(fieldValue);
|
||||
if($('.' + $(v).data('field-class')).is('select')) {
|
||||
$('.' + $(v).data('field-class')).selectpicker('refresh');
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
64
templates/admin/default/ajax/language-update-modal.html
Normal file
64
templates/admin/default/ajax/language-update-modal.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{* Update an Address *}
|
||||
|
||||
{form name="thelia.lang.update"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "edit_lang_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{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='Label'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='code'}
|
||||
<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='locale'}
|
||||
<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='date_format'}
|
||||
<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='time_format'}
|
||||
<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}
|
||||
|
||||
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "edit_lang_dialog"
|
||||
dialog_title = {intl l="Edit a language"}
|
||||
dialog_body = {$smarty.capture.edit_lang_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Edit this language"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/configuration/languages/save/{$lang_id}"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.content.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<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>
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.accessory.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
@@ -331,7 +331,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resources="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-category" title="{intl l='Remove the product from this category'}" href="#delete_category_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.attribute.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-attribute" title="{intl l='Delete this attribute'}" href="#delete_attribute_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.feature.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs delete-feature" title="{intl l='Delete this feature'}" href="#delete_feature_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -55,7 +55,7 @@ $(function($){
|
||||
$.couponManager.conditionToSave = $.couponManager.conditionsToSave[id];
|
||||
|
||||
// Set the condition selector
|
||||
$("#category-rule option").filter(function() {
|
||||
$("#category-condition option").filter(function() {
|
||||
return $(this).val() == $.couponManager.conditionToSave.serviceId;
|
||||
}).prop('selected', true);
|
||||
|
||||
@@ -89,8 +89,8 @@ $(function($){
|
||||
|
||||
// Save conditions on click
|
||||
$.couponManager.onClickSaveCondition = function() {
|
||||
$('#constraint-save-btn').on('click', function () {
|
||||
if($('#category-rule').val() == 'thelia.condition.match_for_everyone') {
|
||||
$('#condition-save-btn').on('click', function () {
|
||||
if($('#category-condition').val() == 'thelia.condition.match_for_everyone') {
|
||||
// // @todo translate message + put it in modal
|
||||
var r = confirm("Do you really want to set this coupon available to everyone ?");
|
||||
if (r == true) {
|
||||
@@ -106,7 +106,7 @@ $(function($){
|
||||
|
||||
// Remove condition on click
|
||||
$.couponManager.onClickDeleteCondition = function() {
|
||||
$('.constraint-delete-btn').on('click', function (e) {
|
||||
$('.condition-delete-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
$.couponManager.removeConditionAjax($this.attr('data-int'));
|
||||
@@ -140,7 +140,7 @@ $(function($){
|
||||
|
||||
// Reload condition inputs when changing effect
|
||||
$.couponManager.onConditionChange = function() {
|
||||
$('#category-rule').on('change', function () {
|
||||
$('#category-condition').on('change', function () {
|
||||
$.couponManager.loadConditionInputs($(this).val(), function() {});
|
||||
});
|
||||
};
|
||||
@@ -152,9 +152,9 @@ $(function($){
|
||||
|
||||
// Set max usage to unlimited or not
|
||||
$.couponManager.onUsageUnlimitedChange = function() {
|
||||
var isUnlimited = $('#is-unlimited');
|
||||
var $isUnlimited = $('#is-unlimited');
|
||||
if ($('#max-usage').val() == -1) {
|
||||
isUnlimited.prop('checked', true);
|
||||
$isUnlimited.prop('checked', true);
|
||||
$('#max-usage').hide();
|
||||
$('#max-usage-label').hide();
|
||||
} else {
|
||||
@@ -163,7 +163,7 @@ $(function($){
|
||||
$('#max-usage-label').show();
|
||||
}
|
||||
|
||||
isUnlimited.change(function(){
|
||||
$isUnlimited.change(function(){
|
||||
var $this = $(this);
|
||||
if ($this.is(':checked')) {
|
||||
$('#max-usage').hide().val('-1');
|
||||
|
||||
94
templates/admin/default/assets/js/jquery.typewatch.js
Normal file
94
templates/admin/default/assets/js/jquery.typewatch.js
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* TypeWatch 2.2
|
||||
*
|
||||
* Examples/Docs: github.com/dennyferra/TypeWatch
|
||||
*
|
||||
* Copyright(c) 2013
|
||||
* Denny Ferrassoli - dennyferra.com
|
||||
* Charles Christolini
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
(function(jQuery) {
|
||||
jQuery.fn.typeWatch = function(o) {
|
||||
// The default input types that are supported
|
||||
var _supportedInputTypes =
|
||||
['TEXT', 'TEXTAREA', 'PASSWORD', 'TEL', 'SEARCH', 'URL', 'EMAIL', 'DATETIME', 'DATE', 'MONTH', 'WEEK', 'TIME', 'DATETIME-LOCAL', 'NUMBER', 'RANGE'];
|
||||
|
||||
// Options
|
||||
var options = jQuery.extend({
|
||||
wait: 750,
|
||||
callback: function() { },
|
||||
highlight: true,
|
||||
captureLength: 2,
|
||||
inputTypes: _supportedInputTypes
|
||||
}, o);
|
||||
|
||||
function checkElement(timer, override) {
|
||||
var value = jQuery(timer.el).val();
|
||||
|
||||
// Fire if text >= options.captureLength AND text != saved text OR if override AND text >= options.captureLength
|
||||
if ((value.length >= options.captureLength && value.toUpperCase() != timer.text)
|
||||
|| (override && value.length >= options.captureLength))
|
||||
{
|
||||
timer.text = value.toUpperCase();
|
||||
timer.cb.call(timer.el, value);
|
||||
}
|
||||
};
|
||||
|
||||
function watchElement(elem) {
|
||||
var elementType = elem.type.toUpperCase();
|
||||
if (jQuery.inArray(elementType, options.inputTypes) >= 0) {
|
||||
|
||||
// Allocate timer element
|
||||
var timer = {
|
||||
timer: null,
|
||||
text: jQuery(elem).val().toUpperCase(),
|
||||
cb: options.callback,
|
||||
el: elem,
|
||||
wait: options.wait
|
||||
};
|
||||
|
||||
// Set focus action (highlight)
|
||||
if (options.highlight) {
|
||||
jQuery(elem).focus(
|
||||
function() {
|
||||
this.select();
|
||||
});
|
||||
}
|
||||
|
||||
// Key watcher / clear and reset the timer
|
||||
var startWatch = function(evt) {
|
||||
var timerWait = timer.wait;
|
||||
var overrideBool = false;
|
||||
var evtElementType = this.type.toUpperCase();
|
||||
|
||||
// If enter key is pressed and not a TEXTAREA and matched inputTypes
|
||||
if (typeof evt.keyCode != 'undefined' && evt.keyCode == 13 && evtElementType != 'TEXTAREA' && jQuery.inArray(evtElementType, options.inputTypes) >= 0) {
|
||||
timerWait = 1;
|
||||
overrideBool = true;
|
||||
}
|
||||
|
||||
var timerCallbackFx = function() {
|
||||
checkElement(timer, overrideBool)
|
||||
}
|
||||
|
||||
// Clear timer
|
||||
clearTimeout(timer.timer);
|
||||
timer.timer = setTimeout(timerCallbackFx, timerWait);
|
||||
};
|
||||
|
||||
jQuery(elem).on('keydown paste cut input', startWatch);
|
||||
}
|
||||
};
|
||||
|
||||
// Watch Each Element
|
||||
return this.each(function() {
|
||||
watchElement(this);
|
||||
});
|
||||
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{intl l='Attribute values'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<span class="pull-right">
|
||||
<a data-toggle="modal" href="#creation_dialog" title="Add a new attribute value" class="btn btn-default btn-primary">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<caption>
|
||||
{intl l='Thelia product attributes'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.attribute" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product attribute'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<a title="{intl l='Change this attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}">{$TITLE}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -100,7 +100,7 @@
|
||||
{module_include location='attributes_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-minus"></span>
|
||||
@@ -112,11 +112,11 @@
|
||||
{/loop}
|
||||
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.attribute" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs attribute-delete" title="{intl l='Delete this product attribute'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
{module_include location='category_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.category" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#category_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -113,7 +113,7 @@
|
||||
{module_include location='category_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.category" access="UPDATE"}
|
||||
<div class="make-switch switch-small categoryVisibleToggle" 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="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
@@ -142,11 +142,11 @@
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this category'}" href="{url path='admin/categories' category_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.category" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this category'}" href="{url path='/admin/categories/update' category_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.category" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs category-delete" title="{intl l='Delete this category and all its contents'}" href="#category_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
@@ -161,7 +161,7 @@
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.category" access="CREATE"}
|
||||
{intl l="This category has no sub-categories. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
{module_include location='product_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.products.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.product" access="UPDATE"}
|
||||
<div class="make-switch switch-small productVisibleToggle" 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="productVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
@@ -308,11 +308,11 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.product" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs product-delete" title="{intl l='Delete this product'}" href="#product_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.category" access="UPDATE"}
|
||||
<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>
|
||||
|
||||
@@ -24,42 +24,42 @@
|
||||
|
||||
{module_include location='catalog_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"}
|
||||
{loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.template" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"}
|
||||
{loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.attribute" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"}
|
||||
{loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.feature" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"}
|
||||
{loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.message" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.currencies"}
|
||||
{loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.currency" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/currencies'}">{intl l='Currencies'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.taxe-rules"}
|
||||
{loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.tax-rule" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/taxes_rules'}">{intl l='Taxes rules'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/taxes_rules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
@@ -80,21 +80,21 @@
|
||||
|
||||
{module_include location='shipping_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.contries"}
|
||||
{loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.contry" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/countries'}">{intl l='Countries'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.shipping_zones"}
|
||||
{loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.shipping-zone" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/shipping_zones'}">{intl l='Shipping zones'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.shipping_configuration"}
|
||||
{loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.shipping-configuration" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l='Shipping configuration'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
@@ -116,56 +116,56 @@
|
||||
|
||||
{module_include location='system_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.modules"}
|
||||
{loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.module" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/modules'}">{intl l='Modules activation'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/modules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.variables"}
|
||||
{loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.variable" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.profiles"}
|
||||
{loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.profile" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/profiles'}">{intl l='Administration profiles'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/profiles'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.admin_users"}
|
||||
{loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.administrator" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/administrators'}">{intl l='Administrators'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/administrators'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.languages"}
|
||||
{loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.language" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/languages'}">{intl l='Languages & URLs'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.mailing_system"}
|
||||
{loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/mailing_system'}">{intl l='Mailing system'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc7" roles="ADMIN" permissions="admin.configuration.admin_logs"}
|
||||
{loop type="auth" name="pcc7" role="ADMIN" resource="admin.configuration.admin-logs" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/admin_logs'}">{intl l='Administration logs'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc8" roles="ADMIN" permissions="admin.configuration.system_logs"}
|
||||
{loop type="auth" name="pcc8" role="ADMIN" resource="admin.configuration.system-logs" access="VIEW"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/system_logs'}">{intl l='System logs'}</a></td>
|
||||
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/system_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l='Countries'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.country" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -71,13 +71,13 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.country" access="UPDATE"}
|
||||
<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}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.country" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -45,9 +45,25 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{*<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>*}
|
||||
{*<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />*}
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
|
||||
$(function($){
|
||||
{*$('.datepicker').datepicker({ dateFormat: "{$dateFormat}", defaultDate: +60, minDate: "+0m" });*}
|
||||
});
|
||||
|
||||
@@ -44,9 +44,27 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
|
||||
$(function($){
|
||||
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
||||
// miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
||||
|
||||
// Init Conditions
|
||||
$.couponManager.initConditions = function() {
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
|
||||
{form_field form=$form field='isAvailableOnSpecialOffers'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
{$value|var_dump}
|
||||
<label for="is-available-on-special-offers" class="checkbox control-label">
|
||||
<input id="is-available-on-special-offers" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
@@ -122,7 +121,6 @@
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='amount'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
{$value}
|
||||
<label for="amount" class="control-label">{intl l='Amount :'}</label>
|
||||
<input id="amount" type="text" class="form-control" name="{$name}" value="{$value}" placeholder="{intl l='14.50'}">
|
||||
{if $error}{$message}{/if}
|
||||
@@ -196,13 +194,13 @@
|
||||
</a>
|
||||
|
||||
<div id="condition-add-organizer" class="form-group col-md-2">
|
||||
<label for="type">{intl l='Condition type :'}</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="type" class="form-control" id="type" value="1" checked> {intl l='And'}
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="type" class="form-control" value="2"> {intl l='Or'}
|
||||
</label>
|
||||
{*<label for="type">{intl l='Condition type :'}</label>*}
|
||||
{*<label class="radio">*}
|
||||
{*<input type="radio" name="type" class="form-control" id="type" value="1" checked> {intl l='And'}*}
|
||||
{*</label>*}
|
||||
{*<label class="radio">*}
|
||||
{*<input type="radio" name="type" class="form-control" value="2"> {intl l='Or'}*}
|
||||
{*</label>*}
|
||||
</div>
|
||||
|
||||
<div id="condition-add-type" class="form-group col-md-4">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l='Currencies'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.currency" access="CREATE"}
|
||||
<span class="pull-right">
|
||||
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
|
||||
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#creation_dialog" data-toggle="modal">
|
||||
@@ -122,7 +122,7 @@
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.currency" access="UPDATE"}
|
||||
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id=$ID}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -158,13 +158,13 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.currency" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.currency" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -203,6 +203,45 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="orders for this customer"}
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Order n°"}</th>
|
||||
<th>{intl l="Date & Hour"}</th>
|
||||
<th>{intl l="Amount"}</th>
|
||||
<th>{intl l="Status"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="order" name="order-list" customer="{$customer_id}" backend_context="1" status='*'}
|
||||
{loop type="order-status" name="order-status" id=$STATUS}
|
||||
{assign "orderStatus" $TITLE}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
{/loop}
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td>
|
||||
<span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
{module_include location='customer_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.customer" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -101,13 +101,13 @@
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
|
||||
{loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.customer" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{intl l='Feature values'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"}
|
||||
<span class="pull-right">
|
||||
<a data-toggle="modal" href="#creation_dialog" title="Add a new feature value" class="btn btn-default btn-primary">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<caption>
|
||||
{intl l='Thelia product features'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.feature" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"}
|
||||
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -100,7 +100,7 @@
|
||||
{module_include location='features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-minus"></span>
|
||||
@@ -112,11 +112,11 @@
|
||||
{/loop}
|
||||
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.feature" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.folder.content.delete"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.folder" access="UPDATE"}
|
||||
<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>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</td>*}
|
||||
{module_include location='folder_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.folder" access="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>
|
||||
@@ -118,7 +118,7 @@
|
||||
{module_include location='folder_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.folder" access="UPDATE"}
|
||||
<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>
|
||||
@@ -147,11 +147,11 @@
|
||||
<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>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.folder" access="UPDATE"}
|
||||
<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_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.folder" access="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>
|
||||
@@ -166,7 +166,7 @@
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.folder" access="CREATE"}
|
||||
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
{module_include location='content_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.content" access="UPDATE"}
|
||||
<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>
|
||||
@@ -301,11 +301,11 @@
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.content" access="UPDATE"}
|
||||
<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"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.content" access="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>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.category" access="UPDATE"}
|
||||
<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>
|
||||
|
||||
@@ -15,7 +15,7 @@ A generic modal creation dialog template. Parameters
|
||||
|
||||
ok_button_id (optionnal) = the id of the OK button
|
||||
*}
|
||||
<div class="modal fade" id="{$dialog_id}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal fade {if ! empty($form_error_message)}modal-force-show{/if}" id="{$dialog_id}" tabindex="-1" {if empty($form_error_message)}aria-hidden="true"{else}aria-hidden="false"{/if}>
|
||||
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.modules" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.modules" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.modules" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs module-delete-action" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
<div class="form-container">
|
||||
|
||||
{$has_at_least_one_combination = false}
|
||||
{$default_product_sale_element_id = 0}
|
||||
|
||||
{loop name="product.sales.elements.test" type="product_sale_elements" product=$product_id currency=$edit_currency_id backend_context="1"}
|
||||
{loop name="product.combinations" type="attribute_combination" product_sale_elements="$ID"}
|
||||
{$has_at_least_one_combination = true}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product.combinations"}
|
||||
{$default_product_sale_element_id = $ID}
|
||||
{/elseloop}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product.sales.elements.test"}
|
||||
{form name="thelia.admin.product.details.modification"}
|
||||
{if $has_at_least_one_combination == false}
|
||||
{form name="thelia.admin.product_default_sale_element.update"}
|
||||
<form method="POST" action="{url path='/admin/product/default-price/update'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include
|
||||
@@ -17,15 +27,27 @@
|
||||
}
|
||||
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='product_id'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='product_sale_element_id'}
|
||||
<input type="hidden" name="{$name}" value="{$default_product_sale_element_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isdefault'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='reference'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" />
|
||||
@@ -39,11 +61,41 @@
|
||||
{form_field form=$form field='currency'}
|
||||
<input type="hidden" name="{$name}" value="{$ID}" />
|
||||
{/form_field}
|
||||
|
||||
{$current_currency_is_default = $IS_DEFAULT}
|
||||
{/loop}
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Default pricing'}</p>
|
||||
|
||||
<p>{intl l="The default pricing is used with product that do not have any combinations. It is also used for product with combinations which share the same pricing information"}</p>
|
||||
{if $form_error}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field='tax_rule'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="tax_rule_field" class="control-label">{$label} : </label>
|
||||
<div class="form-group">
|
||||
<select id="tax_rule_field" required="required" name="{$name}" class="form-control">
|
||||
<option value="">{intl l="Select a tax tule"}</option>
|
||||
{loop name="tax" type="tax-rule" backend_context="1"}
|
||||
<option value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Pricing'}</p>
|
||||
|
||||
<p>{intl l="The default pricing is used when no combination is defined."}</p>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -53,49 +105,93 @@
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Pricing'}</p>
|
||||
|
||||
<p></p> <!-- LAME !!! FIXME -->
|
||||
<p></p> <!-- LAME !!! FIXME -->
|
||||
|
||||
{form_field form=$form field='use_exchange_rate'}
|
||||
{if $current_currency_is_default}
|
||||
<input type="hidden" name="{$name}" value="0">
|
||||
{$show_pricing_fields = true}
|
||||
{else}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="use_exchange_rate_box" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{$show_pricing_fields = ($value == 0)}
|
||||
{/if}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='price'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<label for="price_without_tax" class="control-label">{$label} : </label>
|
||||
|
||||
<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='Product price'}">
|
||||
<input {if !$show_pricing_fields}readonly{/if} data-price-type="without-tax" data-rel-price="price_with_tax" type="text" id="price_without_tax" required="required" name="{$name}" class="automatic_price_field form-control" value="{$value}" title="{$label}" placeholder="{intl l='Price excl. taxes'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='tax_rule'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<div class="form-group">
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="">{intl l="Select a tax tule"}</option>
|
||||
{loop name="tax" type="tax-rule" backend_context="1"}
|
||||
<option value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='price_with_tax'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<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='Product price'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
<div class="form-group">
|
||||
<label for="price_with_tax" class="control-label">{intl l="Product price including taxes"} : </label>
|
||||
<div class="input-group">
|
||||
<input {if !$show_pricing_fields}readonly{/if} data-price-type="with-tax" data-rel-price="price_without_tax" type="text" id="price_with_tax" name="price_with_tax" class="automatic_price_field form-control" value="" title="{intl l='Product price including taxes'}" placeholder="{intl l='Price incl. taxes'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='product_details_pricing_form'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Details -------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Details'}</p>
|
||||
|
||||
{form_field form=$form field='ean_code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product EAN Code'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='weight'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<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='Product weight'}">
|
||||
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_shipping_form'}
|
||||
|
||||
{form_field form=$form field='quantity'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Current quantity'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_quantity_form'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Promotion ------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
@@ -104,15 +200,23 @@
|
||||
|
||||
{form_field form=$form field='sale_price'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<label for="sale_price_without_tax" class="control-label">{$label} : </label>
|
||||
|
||||
<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='Product price'}">
|
||||
<input {if !$show_pricing_fields}readonly{/if} data-price-type="without-tax" data-rel-price="sale_price_with_tax" type="text" id="sale_price_without_tax" required="required" name="{$name}" class="automatic_price_field form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product price'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sale_price_with_tax" class="control-label">{intl l="Sale price including taxes"} : </label>
|
||||
<div class="input-group">
|
||||
<input {if !$show_pricing_fields}readonly{/if} data-price-type="with-tax" data-rel-price="sale_price_without_tax" type="text" id="sale_price_with_tax" name="sale_price_with_tax" class="automatic_price_field form-control" value="" title="{intl l='Sale price including taxes'}" placeholder="{intl l='Sale price incl. taxes'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='onsale'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
@@ -138,54 +242,20 @@
|
||||
{module_include location='product_details_promotion_form'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Shipping -------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Shipping'}</p>
|
||||
|
||||
{form_field form=$form field='weight'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<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='Product weight'}">
|
||||
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_shipping_form'}
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Quantity'}</p>
|
||||
|
||||
{form_field form=$form field='quantity'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Current quantity'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_quantity_form'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
{/elseloop}
|
||||
{/if}
|
||||
|
||||
{* -- Attribute combinations -------------------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{if $has_at_least_one_combination}
|
||||
|
||||
{ifloop rel="product.sales.elements"}
|
||||
<form method="POST" action="{url path='/admin/product/combinations/update'}">
|
||||
{form name="thelia.admin.product_sale_element.update"}
|
||||
<form method="POST" action="{url path='/admin/product/combinations/update'}" {form_enctype form=$form}>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
@@ -195,6 +265,26 @@
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field='tax_rule'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="tax_rule_field" class="control-label">{$label} : </label>
|
||||
<div class="form-group">
|
||||
<select id="tax_rule_field" required="required" name="{$name}" class="form-control">
|
||||
<option value="">{intl l="Select a tax tule"}</option>
|
||||
{loop name="tax" type="tax-rule" backend_context="1"}
|
||||
<option value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='product_before_combinations'}
|
||||
|
||||
<table class="table table-striped table-condensed" id="category_list">
|
||||
@@ -203,7 +293,7 @@
|
||||
|
||||
{module_include location='product_combinations_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.products.update"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.product" access="UPDATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new combination'}" href="#combination_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -212,33 +302,38 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='Attributes'}</th>
|
||||
<th class="text-center">{intl l='Quantity'}</th>
|
||||
<th class="text-center">{intl l='Reference'}</th>
|
||||
<th class="text-center">{intl l='EAN Code'}</th>
|
||||
<th class="text-center">{intl l='Quantity'}</th>
|
||||
<th class="text-center">{intl l='Price<br />w/o taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Price<br />w/ taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Weight (Kg)'}</th>
|
||||
<th class="text-center">{intl l='Weight<br />(Kg)'}</th>
|
||||
<th class="text-center">{intl l='Default'}</th>
|
||||
<th class="text-center">{intl l='Is new'}</th>
|
||||
<th class="text-center">{intl l='On sale'}</th>
|
||||
<th class="text-center">{intl l='New'}</th>
|
||||
<th class="text-center">{intl l='Sale'}</th>
|
||||
<th class="text-center">{intl l='Sale price<br />w/o taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Sale price<br />w/ taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
<th class="actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="product.sales.elements" type="product_sale_elements" product=$product_id currency=$edit_currency_id backend_context="1"}
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
{$ID}: {loop name="product.sales.elements.combinations" type="attribute_combination" product_sale_elements=$ID backend_context="1"}
|
||||
{if $LOOP_COUNT > 1} - {/if}{$ATTRIBUTE_TITLE}
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{loop name="product.sales.elements.combinations" type="attribute_combination" product_sale_elements=$ID backend_context="1"}
|
||||
{$ATTRIBUTE_TITLE}
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td><input class="form-control text-right" type="text" name="quantity[{$ID}]" value="{$QUANTITY}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="quantity[{$ID}]" value="{$REF}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="quantity[{$ID}]" value="{$EAN_CODE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="quantity[{$ID}]" value="{$QUANTITY}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="price_wo_taxes[{$ID}]" value="{format_number number=$PRICE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="price_w_taxes[{$ID}]" value="{format_number number=$TAXED_PRICE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="weight[{$ID}]" value="{$WEIGHT}" /></td>
|
||||
<td><input class="form-control text-right col-lg-1" type="text" name="weight[{$ID}]" value="{$WEIGHT}" /></td>
|
||||
|
||||
<td class="text-center">
|
||||
<input class="form-control" type="radio" name="default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
|
||||
@@ -263,26 +358,30 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{module_include location='product_after_combinations'}
|
||||
</form>
|
||||
{module_include location='product_after_combinations'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/ifloop}
|
||||
</form>
|
||||
{/form}
|
||||
{/if}
|
||||
|
||||
{elseloop rel="product.sales.elements"}
|
||||
<p class="title title-without-tabs">{intl l='Attribute Combinations'}</p>
|
||||
{if $has_at_least_one_combination == false}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p class="title title-without-tabs">{intl l='Attribute Combinations'}</p>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{intl
|
||||
l='This product has no combination. The default price is used. <a data-toggle="modal" href="%url">Click here to create a new combination</a>'
|
||||
url='#combination_creation_dialog'
|
||||
}
|
||||
</div>
|
||||
{/elseloop}
|
||||
<div class="alert alert-info">
|
||||
{intl
|
||||
l='This product has no combination. The default price is used. <a data-toggle="modal" href="%url">Click here to create a new combination</a>'
|
||||
url='#combination_creation_dialog'
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{module_include location='product_after_combinations'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{module_include location='product_after_combinations'}
|
||||
</div>
|
||||
|
||||
{* -- Adding a new combination ------------------------------------------------- *}
|
||||
@@ -310,7 +409,7 @@
|
||||
<div class="input-group">
|
||||
{* <label class="control-label">{intl l="Attribute values"} : </label> *}
|
||||
|
||||
<select rname="attribute_value_id" id="attribute_value_id" class="form-control">
|
||||
<select name="attribute_value_id" id="attribute_value_id" class="form-control">
|
||||
<option value="">{intl l='Select an attribute value...'}</option>
|
||||
</select>
|
||||
|
||||
@@ -381,7 +480,7 @@
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "combination_delete_dialog"
|
||||
dialog_title = {intl l="Delete a combunation"}
|
||||
dialog_title = {intl l="Delete a combination"}
|
||||
dialog_message = {intl l="Do you really want to delete this combination ?"}
|
||||
|
||||
form_action = {url path='/admin/product/combination/delete'}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{module_include location='languages_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<form action="" method="">
|
||||
@@ -27,7 +27,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l="Languages management"}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.languages.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.language" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new language'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -38,61 +38,43 @@
|
||||
<tr>
|
||||
<th>{intl l="Language name"}</th>
|
||||
<th>{intl l="ISO 639 Code"}</th>
|
||||
<th>{intl l="Locale"}</th>
|
||||
<th>{intl l="date form"}</th>
|
||||
<th>{intl l="time form"}</th>
|
||||
<th>{intl l="Default"}</th>
|
||||
<th>{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="lang" name="lang.list" backend_context="1"}
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="" value="France"></td>
|
||||
<td><input type="text" class="form-control" name="" value="fr"></td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>{$CODE}</td>
|
||||
<td>{$LOCALE}</td>
|
||||
<td>{$DATE_FORMAT}</td>
|
||||
<td>{$TIME_FORMAT}</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 type="radio" name="" checked>
|
||||
<div class="make-switch switch-small switch-radio lang-default-change" 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="radio" name="is_default" {if $IS_DEFAULT}checked{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="" value="English"></td>
|
||||
<td><input type="text" class="form-control" name="" value="en"></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 type="radio" name="">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="" value="Spanish"></td>
|
||||
<td><input type="text" class="form-control" name="" value="es"></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 type="radio" name="">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.language" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs lang-change" data-id="{$ID}" title="{intl l='Change this language'}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.language" access="DELETE"}
|
||||
<a href="#delete_dialog" data-toggle="modal" data-id="{$ID}" class="btn btn-default btn-xs lang-delete" title="{intl l="Delete this language"}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
@@ -100,78 +82,76 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<div class="title title-without-tabs">{intl l="Parameters"}</div>
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="" class="label-control">{intl l="If a translation is missing or incomplete :"}</label>
|
||||
<div class="title title-without-tabs">{intl l="Parameters"}</div>
|
||||
{form name="thelia.lang.defaultBehavior"}
|
||||
<form action="{url path="/admin/configuration/languages/defaultBehavior"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="behavior"}
|
||||
<div class="form-group {if $error}has-error{/if}" >
|
||||
<label for="{$label_attr.for}" class="label-control">{intl l="If a translation is missing or incomplete :"}</label>
|
||||
<div class="input-group">
|
||||
<select name="" id="" data-toggle="selectpicker">
|
||||
<option value="">Replace by the default language</option>
|
||||
<option value="">Strictly use the requested language</option>
|
||||
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
|
||||
{foreach $choices as $choice}
|
||||
<option value="{$choice->value}" {if $lang_without_translation == $choice->value}selected="selected"{/if}>{$choice->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/form_field}
|
||||
</form>
|
||||
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="general-block-decorator clearfix">
|
||||
|
||||
<div class="title title-without-tabs">{intl l="Association language/URL"}</div>
|
||||
|
||||
<form action="" method="post">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="" class="label-control"><input type="radio" name="" checked> {intl l="Using a same domain for all languages"}</label>
|
||||
<input type="url" class="form-control" name="" placeholder="http://www.domain.com">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="" class="label-control"><input type="radio" name=""> {intl l="Using a domain or subdomain for each language"}</label>
|
||||
</div>
|
||||
<div class="title title-without-tabs">{intl l="Using a domain or subdomain for each language"}</div>
|
||||
{form name="thelia.lang.url"}
|
||||
<form action="{url path="/admin/configuration/languages/updateUrl"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<tbody>
|
||||
{form_tagged_fields form=$form tag='url'}
|
||||
{if $attr_list.url_id}
|
||||
<tr>
|
||||
<th>{$attr_list.url_title}</th>
|
||||
<td>
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<input type="text" class="form-control" name="{$name}" value="{$value}" placeholder="http://www.domain.com" {if $one_domain_per_lang == 0}readonly{/if}>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/form_tagged_fields}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="pull-right">
|
||||
{if $one_domain_per_lang == 0}
|
||||
<a href="{url path="/admin/configuration/languages/domain/activate"}" class="btn btn-default btn-success"><span class="glyphicon glyphicon-ok-sign"></span> {intl l="activate"}</a>
|
||||
{else}
|
||||
<a href="{url path="/admin/configuration/languages/domain/deactivate"}" class="btn btn-default btn-danger"><span class="glyphicon glyphicon-ok-sign"></span> {intl l="deactivate"}</a>
|
||||
{/if}
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="France"}</th>
|
||||
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="English"}</th>
|
||||
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Spanish"}</th>
|
||||
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button type="submit" disabled class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<button type="submit" {if $one_domain_per_lang == 0}disabled{/if} class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,34 +161,43 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.language.creation"}
|
||||
{form name="thelia.lang.create"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the language_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="language_id" value="{$language_id}" />
|
||||
|
||||
{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/configuration/languages/update' language_id='_ID_'}" />
|
||||
{/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>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Language title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
{form_field form=$form field='code'}
|
||||
<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='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='locale'}
|
||||
<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='en_US'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='date_format'}
|
||||
<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='d-m-Y'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='time_format'}
|
||||
<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='H:i:s'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='language_create_form'}
|
||||
|
||||
@@ -223,7 +212,7 @@
|
||||
|
||||
dialog_ok_label = {intl l="Create this language"}
|
||||
|
||||
form_action = {url path='/admin/configuration/languages/create'}
|
||||
form_action = {url path='/admin/configuration/languages/add'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
@@ -232,7 +221,7 @@
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="message_id" id="language_delete_id" value="" />
|
||||
<input type="hidden" name="language_id" id="language_delete_id" value="" />
|
||||
|
||||
{module_include location='languages_delete_form'}
|
||||
|
||||
@@ -247,20 +236,32 @@
|
||||
|
||||
form_action = {url path='/admin/configuration/languages/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
form_error_message = $error_delete_message
|
||||
}
|
||||
|
||||
<div id="lang-update-modal"></div>
|
||||
|
||||
<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">×</button>
|
||||
<h2>{intl l="Error"}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<strong>{intl l="Impossible to change default languages. Please contact your administrator or try later"}</strong>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
|
||||
<script>
|
||||
// Toogle switch on input radio
|
||||
$('.switch-radio').on('switch-change', function () {
|
||||
$('.switch-radio').bootstrapSwitch('toggleRadioState');
|
||||
});
|
||||
</script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/main.js'}
|
||||
@@ -270,4 +271,39 @@
|
||||
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("a.lang-change").click(function(e){
|
||||
var baseUrl = "{url path="/admin/configuration/languages/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();
|
||||
$("#lang-update-modal").html(data);
|
||||
$("#edit_lang_dialog").modal("show");
|
||||
}).fail(function(){
|
||||
$("#loading-event").remove();
|
||||
});
|
||||
});
|
||||
|
||||
$(".lang-default-change").on("switch-change", function(e, data){
|
||||
$('.lang-default-change').bootstrapSwitch('toggleRadioState');
|
||||
var baseUrl = "{url path='/admin/configuration/languages/toggleDefault/'}";
|
||||
if(data.value) {
|
||||
$.ajax({
|
||||
url : baseUrl+$(this).data('id')
|
||||
}).fail(function(){
|
||||
$('#toggle-default-failed').modal('show');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(".lang-delete").click(function(){
|
||||
$("#language_delete_id").val($(this).data("id"));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -26,7 +26,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Thelia mailing templates'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.message" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new mailing template'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
<td>
|
||||
{if ! $SECURED}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.message" access="UPDATE"}
|
||||
<a title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -68,11 +68,11 @@
|
||||
<td class="actions">
|
||||
{if ! $SECURED}
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.message" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs message-change" title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.message" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs message-delete" title="{intl l='Delete this mailing template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/modules'}">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.modules.install"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.module" access="UPDATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Install a new module'}" href="#install_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-import"></span> {intl l="Install a new module"}
|
||||
</a>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.update"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.order" access="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>
|
||||
{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>
|
||||
|
||||
@@ -136,12 +136,16 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/jquery.typewatch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
@@ -270,6 +274,49 @@ $(function() {
|
||||
$('#combination_attributes option').prop('selected', 'selected');
|
||||
});
|
||||
|
||||
// In details tab, process exchange rate usage checkbox changes
|
||||
$('use_exchange_rate_box').change(function(ev) {
|
||||
$('.')
|
||||
});
|
||||
|
||||
// Automatic update of price fields: any change in the taxed (resp. untaxed) price
|
||||
// will update the untaxed (resp. taxed) one
|
||||
$('.automatic_price_field').typeWatch({
|
||||
captureLength: 1,
|
||||
callback: function () {
|
||||
|
||||
var tax_rule_id = $('#tax_rule_field').val();
|
||||
|
||||
if (tax_rule_id != "") {
|
||||
var priceType = $(this).data('price-type');
|
||||
var dest_field_id = $(this).data('rel-price');
|
||||
|
||||
var operation;
|
||||
|
||||
if (priceType == 'with-tax')
|
||||
operation = 'from_tax';
|
||||
else if (priceType == 'without-tax')
|
||||
operation = 'to_tax';
|
||||
else
|
||||
operation = '';
|
||||
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/calculate-price"}',
|
||||
data : {
|
||||
price : $(this).val(),
|
||||
action : operation,
|
||||
tax_rule_id : $('#tax_rule_field').val()
|
||||
},
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#' + dest_field_id).val(json.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
<ul class="nav nav-tabs clearfix">
|
||||
<li {if $oder_tab == 'data'}class="active"{/if}><a href="#data" data-tab-name="cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Description"}</a></li>
|
||||
<li {if $oder_tab == 'permissions'}class="active"{/if}><a href="#permissions" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Permissions"}</a></li>
|
||||
<li {if $oder_tab == 'resources'}class="active"{/if}><a href="#resources" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Resource access rights"}</a></li>
|
||||
<li {if $oder_tab == 'modules'}class="active"{/if}><a href="#modules" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Module access rights"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
@@ -116,113 +117,168 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $oder_tab == 'permissions'}active in{/if}" id="permissions">
|
||||
<div class="tab-pane fade {if $oder_tab == 'resources'}active in{/if}" id="resources">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Manage permissions"}
|
||||
</div>
|
||||
{*
|
||||
<div class="form-group">
|
||||
<label for="" class="label-control">{intl l="Choose a country"} :</label>
|
||||
<form id="country-selector-form" action="{url path="/admin/configuration/profiles/update/$profile_id"}" method="GET">
|
||||
<input type="hidden" name="tab" value="taxes">
|
||||
<select id="country-selector" name="country" data-toggle="selectpicker">
|
||||
{loop type="country" name="country-list"}
|
||||
<option value="{$ID}" {if $ID == $asked_country}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
{form name="thelia.admin.profile.resource-access.modification"}
|
||||
|
||||
<p><strong>{intl l="Countries that have the same profile"} :<strong></p>
|
||||
<p class="lead js-collapse" id="same_countries" data-collapse-height="86">
|
||||
<form method="POST" action="{url path="/admin/configuration/profiles/saveResourceAccess?tab=resources"}" {form_enctype form=$form} >
|
||||
|
||||
{$matchedCountries.first=$asked_country}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{loop type="profile-country" name="same-country-list" profile=$ID ask="countries" country=$asked_country}
|
||||
{$matchedCountries[]=$COUNTRY}
|
||||
<span class="label label-info">{$COUNTRY_TITLE}</span>
|
||||
{/loop}
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="profile_id" value="{$ID}" />
|
||||
|
||||
{elseloop rel="same-country-list"}
|
||||
<span class="label label-danger">{intl l="NONE"}</span>
|
||||
{/elseloop}
|
||||
</p>
|
||||
<button data-collapse-block="same_countries" type="button" class="btn btn-info btn-sm btn-block js-collapse-btn" style="margin-bottom: 15px">See all countries</button>
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l="Manage resource rights"}
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">{intl l="Resource"}</th>
|
||||
<th rowspan="2">{intl l="Title"}</th>
|
||||
<th colspan="4" class="text-center">{intl l="Rights"}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="View"}</th>
|
||||
<th>{intl l="Create"}</th>
|
||||
<th>{intl l="Update"}</th>
|
||||
<th>{intl l="Delete"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<div id="panel" class="panel panel-default place">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{intl l="Manage the profile taxes appliance order"}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{assign lastPosition 0}
|
||||
{loop type="profile-country" name="existing-tax-list" profile=$ID country=$asked_country}
|
||||
{if $POSITION != $lastPosition}
|
||||
{assign lastPosition $POSITION}
|
||||
{if $LOOP_COUNT > 1}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="drop-group droppable add-to-group">
|
||||
<p class="drop-message">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="message">{intl l="Add tax to this group"}</span>
|
||||
</p>
|
||||
{/if}
|
||||
{form_tagged_fields form=$form tag='resources'}
|
||||
|
||||
<div class="drag" data-id="{$TAX}">{$TAX_TITLE}</div>
|
||||
{loop type="resource" name="resource-list" code=$attr_list.resource_code profile=$ID backend_context="1"}
|
||||
|
||||
{if $LOOP_COUNT == $LOOP_TOTAL}
|
||||
</div>
|
||||
{/if}
|
||||
{/loop}
|
||||
<tr>
|
||||
<td>{$CODE}</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="VIEW" type="checkbox" {if $VIEWABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="CREATE" type="checkbox" {if $CREATABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="UPDATE" type="checkbox" {if $UPDATABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="DELETE" type="checkbox" {if $DELETABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{elseloop rel="existing-tax-list"}
|
||||
<div class="drop-group droppable add-to-group">
|
||||
<p class="drop-message">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="message">{intl l="Add tax to this group"}</span>
|
||||
</p>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{/elseloop}
|
||||
{/form_tagged_fields}
|
||||
|
||||
</div>
|
||||
<div class="panel-footer droppable create-group">
|
||||
<p class="drop-message">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="message">{intl l="Drop tax here to create a tax group"}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<a href="#tax_list_update_dialog" data-toggle="modal" id="apply-taxes-rules" class="btn btn-default btn-primary btn-block"><span class="glyphicon glyphicon-check"></span> {intl l="Apply"}</a>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{/form}
|
||||
|
||||
<div id="panel-list" class="panel panel-default take">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Available taxes</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{loop type="tax" name="tax-list" exclude_profile=$ID country=$asked_country}
|
||||
<div class="draggable" data-id="{$ID}">{$TITLE}</div>
|
||||
{/loop}
|
||||
</div>
|
||||
<div class="panel-footer droppable remove-from-group">
|
||||
<p class="drop-message">
|
||||
<span class="glyphicon glyphicon-minus"></span>
|
||||
<span class="message">{intl l="Drop tax here to delete from group"}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade {if $oder_tab == 'modules'}active in{/if}" id="modules">
|
||||
|
||||
{form name="thelia.admin.profile.module-access.modification"}
|
||||
|
||||
<form method="POST" action="{url path="/admin/configuration/profiles/saveModuleAccess?tab=modules"}" {form_enctype form=$form} >
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="profile_id" value="{$ID}" />
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l="Manage module rights"}
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">{intl l="Module"}</th>
|
||||
<th rowspan="2">{intl l="Title"}</th>
|
||||
<th colspan="4" class="text-center">{intl l="Rights"}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="View"}</th>
|
||||
<th>{intl l="Create"}</th>
|
||||
<th>{intl l="Update"}</th>
|
||||
<th>{intl l="Delete"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{form_tagged_fields form=$form tag='modules'}
|
||||
|
||||
{loop type="module" name="module-list" code=$attr_list.module_code profile=$ID backend_context="1"}
|
||||
|
||||
<tr>
|
||||
<td>{$CODE}</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="VIEW" type="checkbox" {if $VIEWABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="CREATE" type="checkbox" {if $CREATABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="UPDATE" type="checkbox" {if $UPDATABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini" 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 name="{$name}" value="DELETE" type="checkbox" {if $DELETABLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{/loop}
|
||||
|
||||
{/form_tagged_fields}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
{/form}
|
||||
|
||||
*}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -235,60 +291,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
{* Confirmation dialog *}
|
||||
{*form name="thelia.admin.profile.taxlistupdate"}
|
||||
|
||||
{if $form_error_message}
|
||||
{$taxUpdateError = true}
|
||||
{else}
|
||||
{$taxUpdateError = false}
|
||||
{/if}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{*capture "tax_list_update_dialog"}
|
||||
|
||||
<input type="hidden" name="profile_id" value="{$profile_id}">
|
||||
<input type="hidden" name="tab" value="taxes">
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='country_list'}
|
||||
|
||||
<p>{intl l="Profile taxes will be update for the following countries :"}</p>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<select id="countries-select" class="" name="{$name}" data-toggle="selectpicker" multiple>
|
||||
{loop type="country" name="country-list"}
|
||||
<option value='{$ID}' {if (!$value AND in_array($ID, $matchedCountries)) OR ($value AND in_array($ID, $value))}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary js-uncheck-all" data-uncheck-select="countries-select">{intl l="uncheck all"}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/form_field}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "tax_list_update_dialog"
|
||||
dialog_title = {intl l="Update profile taxes"}
|
||||
dialog_body = {$smarty.capture.tax_list_update_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Edit profile taxes"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/configuration/profiles/saveTaxes"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form*}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
@@ -297,6 +299,10 @@
|
||||
<script src='{$asset_url}'></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
{javascripts file='assets/js/main.js'}
|
||||
<script src='{$asset_url}'></script>
|
||||
{/javascripts}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Taxes"}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.profile.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.profile" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new profile'}" href="#profile_create_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
@@ -50,13 +50,13 @@
|
||||
<td>{$DESCRIPTION}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.profile.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.profile" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Change this profile'}" href="{url path="/admin/configuration/profiles/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{assign linkedAdminCount {count name="linked-admin" type="admin" profile=$ID}}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.profile.change"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.profile" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs js-delete-profile" title="{intl l='Delete this profile'}" href="#{if $linkedAdminCount > 0}profile_cannot_delete_dialog{else}profile_delete_dialog{/if}" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Thelia Shipping configuration'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.shipping-configuration" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping configuration'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-configuration" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs area-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.shipping-configuration" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs area-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.shipping-zone" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Taxes"}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.taxes.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.tax" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new tax'}" href="#tax_create_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
@@ -70,11 +70,11 @@
|
||||
<td>{$DESCRIPTION}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Change this tax'}" href="{url path="/admin/configuration/taxes/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs js-delete-tax" title="{intl l='Delete this tax'}" href="#tax_delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l="Taxes rules"}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.taxes-rules.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new tax rule'}" href="#tax_rule_create_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
@@ -121,12 +121,12 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Change this tax rule'}" href="{url path="/admin/configuration/taxes_rules/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Set as default tax rule'}" href="{url path="/admin/configuration/taxes_rules/update/set_default/$ID"}" {if $IS_DEFAULT == 1}disabled{/if}><span class="glyphicon glyphicon-star"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.taxes-rules.dele"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs js-delete-tax-rule" title="{intl l='Delete this tax rule'}" href="#tax_rule_delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<caption>
|
||||
{intl l='Thelia product templates'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.template" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
@@ -72,7 +72,7 @@
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -84,11 +84,11 @@
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.template" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Thelia system variables'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.variables.create"}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.configuration.variable" access="CREATE"}
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new variable'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<td>
|
||||
{if ! $SECURED}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.variable" access="UPDATE"}
|
||||
<a title="{intl l='Change this variable'}" href="{url path='/admin/configuration/variables/update' variable_id="$ID"}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
@@ -108,11 +108,11 @@
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs cancel-edit" id="cancel_edit_btn_{$ID}" data-id="{$ID}" title="{intl l='Cancel changes and revert to original value'}" href="#"><i class="glyphicon glyphicon-remove"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.variable" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs config-change" title="{intl l='Change this variable'}" href="{url path='/admin/configuration/variables/update' variable_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.variables.delete"}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.variable" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs config-delete" title="{intl l='Delete this variable'}" href="#delete_variable_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user