Merge pull request #210 from mespeche/master
Structure uniformization for Coupon
This commit is contained in:
@@ -13,10 +13,13 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{$lang_code}">
|
<html lang="{$lang_code}">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
<title>{block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'}</title>
|
<title>{block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'}</title>
|
||||||
|
|
||||||
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" href="{$asset_url}" />{/images}
|
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" href="{$asset_url}" />{/images}
|
||||||
|
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
|
||||||
{block name="meta"}{/block}
|
{block name="meta"}{/block}
|
||||||
|
|||||||
@@ -6,30 +6,34 @@
|
|||||||
{block name="page-title"}{intl l='Coupons'}{/block}
|
{block name="page-title"}{intl l='Coupons'}{/block}
|
||||||
|
|
||||||
{block name="main-content"}
|
{block name="main-content"}
|
||||||
<section id="wrapper" class="container">
|
<div class="coupons">
|
||||||
|
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||||
<li>{intl l='Browse'}</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="row">
|
||||||
<h1>{intl l='Coupons : '}<small>{intl l='List'}</small></h1>
|
<div class="col-md-12">
|
||||||
<a href="{$urlCreateCoupon}" class="btn btn-default btn-primary btn-medium">
|
<div class="general-block-decorator">
|
||||||
<span class="glyphicon glyphicon-add"></span> {intl l='Create a new coupon'}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section class="row">
|
|
||||||
<div class="col-md-12 general-block-decorator">
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped tablesorter">
|
<table class="table table-striped table-condensed" id="folder_list">
|
||||||
<caption>
|
<caption>
|
||||||
{intl l='Enabled coupons'}
|
{intl l='Enabled coupons'}
|
||||||
|
|
||||||
|
{module_include location='coupon_list_caption'}
|
||||||
|
|
||||||
|
{loop type="auth" name="can_create" role="ADMIN" resource="admin.coupon" access="CREATE"}
|
||||||
|
<a class="btn btn-default btn-primary action-btn" title="{intl l='Create a new coupon'}" href="{$urlCreateCoupon}">
|
||||||
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||||
|
</a>
|
||||||
|
{/loop}
|
||||||
</caption>
|
</caption>
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||||
@@ -75,12 +79,14 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<section class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 general-block-decorator">
|
<div class="col-md-12">
|
||||||
|
<div class="general-block-decorator">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped tablesorter">
|
<table class="table table-striped table-condensed" id="folder_list">
|
||||||
<caption>
|
<caption>
|
||||||
{intl l='Disabled coupons'}
|
{intl l='Disabled coupons'}
|
||||||
</caption>
|
</caption>
|
||||||
@@ -96,7 +102,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
|
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
|
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'0':$ID}">{$CODE}</a>{/block}</td>
|
||||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||||
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -129,9 +135,12 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</section> <!-- #wrapper -->
|
</div> <!-- #wrapper -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,10 @@
|
|||||||
{block name="page-title"}{intl l='Coupon'}{/block}
|
{block name="page-title"}{intl l='Coupon'}{/block}
|
||||||
|
|
||||||
{block name="main-content"}
|
{block name="main-content"}
|
||||||
<section id="wrapper" class="container">
|
<div class="coupons">
|
||||||
|
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
{loop type="coupon" name="read_coupon" id={$couponId} backend_context="true"}
|
{loop type="coupon" name="read_coupon" id={$couponId} backend_context="true"}
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
@@ -16,13 +19,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="page-header">
|
<div class="col-md-12">
|
||||||
<h1>{intl l='Coupon : '}<small>{$CODE}</small></h1>
|
<div class="general-block-decorator">
|
||||||
</div>
|
<div class="table-responsive">
|
||||||
|
|
||||||
<section class="row">
|
|
||||||
<div class="col-md-12 general-block-decorator">
|
|
||||||
|
|
||||||
{if !$IS_ENABLED}
|
{if !$IS_ENABLED}
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
@@ -31,7 +31,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -142,8 +141,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
|
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium pull-right">
|
||||||
<span class="icon-edit icon-white"></span> {intl l='Edit'}
|
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -151,9 +150,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
{/loop}
|
{/loop}
|
||||||
</section> <!-- #wrapper -->
|
</div> <!-- #wrapper -->
|
||||||
|
</div>
|
||||||
|
|
||||||
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
||||||
|
|
||||||
|
|||||||
@@ -6,25 +6,22 @@
|
|||||||
{block name="page-title"}{intl l='Update coupon'}{/block}
|
{block name="page-title"}{intl l='Update coupon'}{/block}
|
||||||
|
|
||||||
{block name="main-content"}
|
{block name="main-content"}
|
||||||
<section id="wrapper" class="container">
|
<div class="coupon edit-coupon">
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||||
<li>{intl l='Update'} {$couponCode}</li>
|
<li>{intl l="Editing %title" title="$couponCode"}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>{intl l='Coupons : '}<small>{intl l='Update'} {$couponCode}</small></h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{form name="thelia.admin.coupon.creation"}
|
{form name="thelia.admin.coupon.creation"}
|
||||||
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false}
|
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false}
|
||||||
{/form}
|
{/form}
|
||||||
|
</div> <!-- #wrapper -->
|
||||||
</section> <!-- #wrapper -->
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="javascript-initialization"}
|
{block name="javascript-initialization"}
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
|
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
|
||||||
{include file='includes/notifications.html' message=$general_error}
|
{include file='includes/notifications.html' message=$general_error}
|
||||||
|
|
||||||
<section class="row">
|
<div class="row">
|
||||||
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
|
||||||
|
|
||||||
<div class="col-md-12 general-block-decorator">
|
<div class="col-md-12 general-block-decorator">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-7 title">
|
||||||
|
{intl l='Edit %title' title=$couponCode}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-container">
|
||||||
|
|
||||||
|
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
||||||
|
|
||||||
{form_hidden_fields form=$form}
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
@@ -16,8 +23,6 @@
|
|||||||
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}'}" />
|
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}'}" />
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
<div class="span4">
|
|
||||||
<div class="control-group">
|
|
||||||
{if !$noConditions}
|
{if !$noConditions}
|
||||||
{include
|
{include
|
||||||
file = "includes/inner-form-toolbar.html"
|
file = "includes/inner-form-toolbar.html"
|
||||||
@@ -26,6 +31,8 @@
|
|||||||
page_url = "{url path="{$formAction}"}"
|
page_url = "{url path="{$formAction}"}"
|
||||||
}
|
}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{form_field form=$form field='code'}
|
{form_field form=$form field='code'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
@@ -145,8 +152,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
{form_field form=$form field='description'}
|
{form_field form=$form field='description'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="description" class="control-label">{intl l='Long description :'}</label>
|
<label for="description" class="control-label">{intl l='Long description :'}</label>
|
||||||
@@ -159,17 +166,20 @@
|
|||||||
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{if $noConditions}
|
{if $noConditions}
|
||||||
{include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some conditions'}}
|
{include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some conditions'}}
|
||||||
{else}
|
{else}
|
||||||
<section class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 general-block-decorator">
|
<div class="col-md-12 general-block-decorator">
|
||||||
<table class="table table-striped">
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-condensed" id="folder_list">
|
||||||
<caption class="clearfix">
|
<caption class="clearfix">
|
||||||
{intl l='Conditions'}
|
{intl l='Conditions'}
|
||||||
</caption>
|
</caption>
|
||||||
@@ -184,25 +194,20 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="row">
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 general-block-decorator">
|
||||||
|
|
||||||
|
<div class="form-container">
|
||||||
<form id="condition-form" action="{$urlAjaxSaveConditions}" {form_enctype form=$form} method="POST" >
|
<form id="condition-form" action="{$urlAjaxSaveConditions}" {form_enctype form=$form} method="POST" >
|
||||||
<div class="col-md-12 general-block-decorator clearfix">
|
<div class="well clearfix">
|
||||||
<a id="condition-save-btn" title="{intl l='Save this condition'}" class="btn btn-default btn-primary pull-right" data-toggle="confirm" data-script="">
|
<a id="condition-save-btn" title="{intl l='Save this condition'}" class="btn btn-default btn-primary pull-right" data-toggle="confirm" data-script="">
|
||||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this condition'}
|
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this condition'}
|
||||||
</a>
|
</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>*}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="condition-add-type" class="form-group col-md-4">
|
<div id="condition-add-type" class="form-group col-md-4">
|
||||||
<label for="categoryCondition">{intl l='Condition\'s category :'}</label>
|
<label for="categoryCondition">{intl l='Condition\'s category :'}</label>
|
||||||
<select name="categoryCondition" id="category-condition" class="form-control">
|
<select name="categoryCondition" id="category-condition" class="form-control">
|
||||||
@@ -217,6 +222,9 @@
|
|||||||
<div id="condition-add-operators-values" class="form-group col-md-6"></div>
|
<div id="condition-add-operators-values" class="form-group col-md-6"></div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user