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

# By Manuel Raynaud (8) and franck (2)
# Via franck
* 'master' of https://github.com/thelia/thelia:
  en_EN -> en_UK, the "en_EN" locale does not exists.
  Smarty inheritance in admin template.
  fix typo in phpdoc
  complete test for foramt_number smarty function
  test foramt_date without datetime object
  create foramt_number smarty function
  remove sqlmap file
  add some phpdoc
  complete test for format_date smarty function
  create new smarty function for displaying date in expected format

Conflicts:
	reset_install.sh
This commit is contained in:
gmorel
2013-09-04 12:01:12 +02:00
56 changed files with 3243 additions and 1526 deletions

View File

@@ -1,5 +0,0 @@
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.create" login_tpl="/admin/login"}
{$page_title={intl l='Coupon creation'}}
{include file='coupon/includes/edit.html'}

View File

@@ -0,0 +1,300 @@
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
{include file='includes/notifications.html' message=$general_error}
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
<section class="row-fluid">
<div class="span12 general-block-decorator">
{form_hidden_fields form=$form}
<div class="span4">
<div class="control-group">
<label for="code">Code :</label>
{form_field form=$form field='code'}
<input id="code" type="text" name="{$name}" value="{$value}" placeholder="code">
{if $error}{$message}{/if}
{/form_field}
</div>
<div class="control-group">
<label for="title">Title :</label>
{form_field form=$form field='title'}
<input id="title" type="text" name="{$name}" value="{$value}" placeholder="title">
{if $error}{$message}{/if}
{/form_field}
</div>
<div class="control-group">
<label for="enabled" class="checkbox">
{form_field form=$form field='isEnabled'}
<input id="enabled" type="checkbox" name="{$name}" {if $value}checked{/if} >
{if $error}{$message}{/if}
value = {$value}
{/form_field}
Is enabled ?
</label>
</div>
<div class="control-group">
<label for="available-on-special-offers" class="checkbox">
{form_field form=$form field='isAvailableOnSpecialOffers'}
<input id="available-on-special-offers" type="checkbox" name="{$name}" {if $value}checked{/if} >
{if $error}{$message}{/if}
{/form_field}
Is available on special offers ?
</label>
</div>
<div class="control-group">
<label for="cumulative" class="checkbox">
{form_field form=$form field='isCumulative'}
<input id="cumulative" type="checkbox" name="{$name}" {if $value}checked{/if} >
{if $error}{$message}{/if}
{/form_field}
Is cumulative ?
</label>
</div>
<div class="control-group">
<label for="renoving-postage" class="checkbox">
{form_field form=$form field='isRemovingPostage'}
<input id="renoving-postage" type="checkbox" name="{$name}" {if $value}checked{/if} >
{if $error}{$message}{/if}
{/form_field}
Is removing postage ?
</label>
</div>
<div class="control-group">
<label for="expiration-date">Expiration date :</label>
<div class="input-append date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
{form_field form=$form field='expirationDate'}
<input type="text" id="expiration-date" name="{$name}" value="{$value}">
{if $error}{$message}{/if}
{/form_field}
<span class="add-on"><span class="icon-th"></span></span>
</div>
</div>
<div class="control-group">
<label for="max-usage">Max usage :</label>
<label for="is-unlimited" class="checkbox">
<input id="is-unlimited" type="checkbox" name="{$name}" {if $value}checked{/if} >
Is unlimited ?
</label>
{form_field form=$form field='maxUsage'}
<input id="max-usage" type="text" name="{$name}" value="{$value}" placeholder="max usage">
{if $error}{$message}{/if}
{/form_field}
</div>
</div>
<div class="span8">
<div class="well clearfix">
<div class="span6">
<div class="control-group">
<label for="effect">Effect :</label>
{form_field form=$form field='effect'}
<select name="{$name}" value="{$value}" id="effect" class="span12">
<option value="1" data-description="More description n°1 about item">Remove x percents for category Y</option>
<option value="2" data-description="More description n°2 about item">Remove x percents</option>
<option value="3" data-description="More description n°3 about item">Remove x amount</option>
</select>
{if $error}{$message}{/if}
{/form_field}
<span class="help-block">More description n°1 about item</span>
</div>
</div>
<div class="span6">
<div class="control-group">
<label for="amount">Amount :</label>
{form_field form=$form field='amount'}
<input id="amount" type="text" name="{$name}" value="{$value}" placeholder="amount">
{if $error}{$message}{/if}
{/form_field}
</div>
<div class="control-group">
<label for="category">Category :</label>
{*form_field form=$form field='category'*}
<select name="{$name}" value="{$value}" id="category">
<option value="1">Category 1</option>
<option value="1">Category 2</option>
<option value="1">Category 3</option>
</select>
{*if $error}{$message}{/if}*}
{*/form_field*}
</div>
</div>
</div>
<div class="control-group">
<label for="short-description">Short description :</label>
{form_field form=$form field='shortDescription'}
<textarea id="short-description" name="{$name}" value="{$value}" placeholder="short description" class="span12" rows="5"></textarea>
{if $error}{$message}{/if}
{/form_field}
</div>
</div>
<div class="clearfix"></div>
<div class="control-group">
<label for="description">Long description :</label>
{form_field form=$form field='description'}
<textarea id="description" name="{$name}" placeholder="long description" class="span12 wysiwyg" rows="10">{$value nofilter}</textarea>
{if $error}{$message}{/if}
{/form_field}
</div>
<button type="submit" class="btn btn-primary">Save</button>
</div>
</section>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<table class="table table-striped">
<caption class="clearfix">
Rules
<a class="btn btn-primary pull-right" title="Add a new rule">
<span class="icon-plus-sign icon-white"></span>
</a>
</caption>
<thead>
<tr>
<th>Conditions</th>
<th>Operator</th>
<th>Value</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total Amount</td>
<td><span class="label">is superior or equals to</span></td>
<td>300 &euro;</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
<tr>
<td><span class="label">AND</span> NbArticleFromCategory</td>
<td><span class="label">is equals to</span></td>
<td>12 - <a href="#" target="_blank">Chaussettes rouges</a></td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
<tr>
<td><span class="label label-info">OR</span> Date</td>
<td><span class="label">is inferior or equals to</span></td>
<td>12/02/2014</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<div class="control-group span2">
<label for="type">Condition type :</label>
<label class="radio">
<input type="radio" name="type" id="type" value="1" checked> And
</label>
<label class="radio">
<input type="radio" name="type" value="2"> Or
</label>
</div>
<div class="control-group span4">
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1" selected>Total amount</option>
<option value="2">Date</option>
<option value="3">NbArtFromCategory</option>
</select>
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1">Total amount</option>
<option value="2" selected>Date</option>
<option value="3">NbArtFromCategory</option>
</select>
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1">Total amount</option>
<option value="2">Date</option>
<option value="3" selected>NbArtFromCategory</option>
</select>
</div>
<div class="control-group span6">
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<div class="input-append input-prepend">
<span class="add-on">&euro;</span>
<input type="text" name="value" class="input-mini">
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
</div>
</div>
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<div class="input-append input-prepend date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
<span class="add-on"><span class="icon-th"></span></span>
<input type="text" name="value" class="input-mini">
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
</div>
</div>
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<input type="text" name="value" class="input-mini">
<table class="table table-bordered">
<tr>
<td id="minibrowser-breadcrumb"></td>
</tr>
<tr>
<th><span class="icon-th-list"></span> Categories list</th>
</tr>
<tr>
<td id="minibrowser-categories"></td>
</tr>
</table>
</div>
</div>
</div>
</section>
</form>

View File

@@ -1,311 +0,0 @@
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
{include file='includes/header.inc.html'}
<section id="wrapper" class="container">
<nav>
<ul class="breadcrumb">
{include file="includes/coupon_breadcrumb.html"}
</ul>
</nav>
<div class="page-header">
<h1>Coupons : <small>Add a coupon</small></h1>
</div>
<form action="#" method="post">
<section class="row-fluid">
<div class="span12 general-block-decorator">
<div class="span4">
<div class="control-group">
<label for="code">Code :</label>
<input id="code" type="text" name="code" placeholder="code">
</div>
<div class="control-group">
<label for="title">Title :</label>
<input id="title" type="text" name="title" placeholder="title">
</div>
<div class="control-group">
<label for="enabled" class="checkbox">
<input id="enabled" type="checkbox" name="isEnabled" value="1" checked>
Is enabled ?
</label>
</div>
<div class="control-group">
<label for="available-on-special-offers" class="checkbox">
<input id="available-on-special-offers" type="checkbox" name="isAvailableOnSpecialOffers" value="1">
Is available on special offers ?
</label>
</div>
<div class="control-group">
<label for="cumulative" class="checkbox">
<input id="cumulative" type="checkbox" name="isCumulative" value="1">
Is cumulative ?
</label>
</div>
<div class="control-group">
<label for="renoving-postage" class="checkbox">
<input id="renoving-postage" type="checkbox" name="isRemovingPostage" value="1">
Is renoving postage ?
</label>
</div>
<div class="control-group">
<label for="expiration-date">Expiration date :</label>
<div class="input-append date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
<input type="text" id="expiration-date" name="expirationDate" value="12/02/2012">
<span class="add-on"><span class="icon-th"></span></span>
</div>
</div>
<div class="control-group">
<label for="max-usage">Max usage :</label>
<label for="is-unlimited" class="checkbox">
<input id="is-unlimited" type="checkbox" name="isUnlimited" value="1" checked>
Is unlimited ?
</label>
<input id="max-usage" type="text" name="maxUsage" placeholder="max usage">
</div>
</div>
<div class="span8">
<div class="well clearfix">
<div class="span6">
<div class="control-group">
<label for="effect">Effect :</label>
<select name="effect" id="effect" class="span12">
<option value="1" data-description="More description n°1 about item">Remove x percents for category Y</option>
<option value="2" data-description="More description n°2 about item">Remove x percents</option>
<option value="3" data-description="More description n°3 about item">Remove x amount</option>
</select>
<span class="help-block">More description n°1 about item</span>
</div>
</div>
<div class="span6">
<div class="control-group">
<label for="amount">Amount :</label>
<input id="amount" type="text" name="amount" placeholder="amount">
</div>
<div class="control-group">
<label for="category">Category :</label>
<select name="category" id="category">
<option value="1">Category 1</option>
<option value="1">Category 2</option>
<option value="1">Category 3</option>
</select>
</div>
</div>
</div>
<div class="control-group">
<label for="short-description">Short description :</label>
<textarea id="short-description" name="shortDescription" placeholder="short description" class="span12" rows="5"></textarea>
</div>
</div>
<div class="clearfix"></div>
<div class="control-group">
<label for="long-description">Long description :</label>
<textarea id="long-description" name="longDescription" placeholder="long description" class="span12 wysiwyg" rows="10"></textarea>
</div>
<button type="submit" class="btn btn-primary">Save</button>
</div>
</section>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<table class="table table-striped">
<caption class="clearfix">
Rules
<a class="btn btn-primary pull-right" title="Add a new rule">
<span class="icon-plus-sign icon-white"></span>
</a>
</caption>
<thead>
<tr>
<th>Conditions</th>
<th>Operator</th>
<th>Value</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total Amount</td>
<td><span class="label">is superior or equals to</span></td>
<td>300 &euro;</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
<tr>
<td><span class="label">AND</span> NbArticleFromCategory</td>
<td><span class="label">is equals to</span></td>
<td>12 - <a href="#" target="_blank">Chaussettes rouges</a></td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
<tr>
<td><span class="label label-info">OR</span> Date</td>
<td><span class="label">is inferior or equals to</span></td>
<td>12/02/2014</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<div class="control-group span2">
<label for="type">Condition type :</label>
<label class="radio">
<input type="radio" name="type" id="type" value="1" checked> And
</label>
<label class="radio">
<input type="radio" name="type" value="2"> Or
</label>
</div>
<div class="control-group span4">
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1" selected>Total amount</option>
<option value="2">Date</option>
<option value="3">NbArtFromCategory</option>
</select>
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1">Total amount</option>
<option value="2" selected>Date</option>
<option value="3">NbArtFromCategory</option>
</select>
<label for="category-rule">Rule's category :</label>
<select name="categoryRule" id="category-rule">
<option value="1">Total amount</option>
<option value="2">Date</option>
<option value="3" selected>NbArtFromCategory</option>
</select>
</div>
<div class="control-group span6">
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<div class="input-append input-prepend">
<span class="add-on">&euro;</span>
<input type="text" name="value" class="input-mini">
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
</div>
</div>
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<div class="input-append input-prepend date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
<span class="add-on"><span class="icon-th"></span></span>
<input type="text" name="value" class="input-mini">
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
</div>
</div>
<label for="operator">Operator :</label>
<div class="controls">
<select name="operator" id="operator">
<option value="1">is superior to</option>
<option value="2">equals to</option>
<option value="3">is inferior to</option>
<option value="4">is inferior or equals to</option>
<option value="5">is superior or equals to</option>
</select>
<input type="text" name="value" class="input-mini">
<table class="table table-bordered">
<tr>
<td id="minibrowser-breadcrumb"></td>
</tr>
<tr>
<th><span class="icon-th-list"></span> Categories list</th>
</tr>
<tr>
<td id="minibrowser-categories"></td>
</tr>
</table>
</div>
</div>
</div>
</section>
</form>
</section> <!-- #wrapper -->
<aside id="delete" class="modal hide fade" role="dialog">
<div class="modal-header">
<h3>Confirmation</h3>
</div>
<div class="modal-body">
<p>Do you really want to delete this element?</p>
</div>
<div class="modal-footer">
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
</div>
</aside> <!-- #delete / Delete confirmation -->
{include file='includes/js.inc.html'}
{javascripts file='../../assets/bootstrap-datepicker/js/bootstrap-datepicker.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../../assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
$(function($){
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
});
</script>
{include file='includes/footer.inc.html'}

View File

@@ -1,205 +0,0 @@
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.view" login_tpl="/admin/login"}
{$page_title={intl l='Coupon'}}
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
{include file='includes/header.inc.html'}
<section id="wrapper" class="container">
<nav>
<ul class="breadcrumb">
{include file="includes/coupon_breadcrumb.html"}
</ul>
</nav>
<div class="page-header">
<h1>Coupons : <small>List of coupons</small></h1>
</div>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
List of enabled coupons
</caption>
<thead>
<tr>
<th>Code</th>
<th>Title</th>
<th>Expiration date</th>
<th>Usage left</th>
<th class="sorter-false filter-false">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">XMAS13</a></td>
<td>Coupon for XMAS -30 &euro;</td>
<td>18/10/2013</td>
<td>49</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#disable"><span class="icon-off icon-white"></span> Disable</a>
</td>
</tr>
<tr>
<td><a href="#">XMAS13</a></td>
<td>Coupon for XMAS -30 &euro;</td>
<td>05/09/2013</td>
<td>20</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#disable"><span class="icon-off icon-white"></span> Disable</a>
</td>
</tr>
<tr>
<td><a href="#">XMAS13</a></td>
<td>Coupon for XMAS -30 &euro;</td>
<td>03/12/2013</td>
<td>9</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#disable"><span class="icon-off icon-white"></span> Disable</a>
</td>
</tr>
<tr>
<td><a href="#">XMAS13</a></td>
<td>Coupon for XMAS -30 &euro;</td>
<td>25/01/2013</td>
<td>4</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#disable"><span class="icon-off icon-white"></span> Disable</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="row-fluid">
<div class="span12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
List of disabled coupons
</caption>
<thead>
<tr>
<th>Code</th>
<th>Title</th>
<th>Expiration date</th>
<th>Usage left</th>
<th class="sorter-false filter-false">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>XMAS13</td>
<td>Coupon for XMAS -30 &euro;</td>
<td>18/10/2013</td>
<td>49</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="icon-ok icon-white"></span> Enabled</a>
</td>
</tr>
<tr>
<td>XMAS13</td>
<td>Coupon for XMAS -20 &euro;</td>
<td>05/09/2013</td>
<td>49</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="icon-ok icon-white"></span> Enabled</a>
</td>
</tr>
<tr>
<td>XMAS13</td>
<td>Coupon for XMAS -50 &euro;</td>
<td>03/12/2013</td>
<td>49</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="icon-ok icon-white"></span> Enabled</a>
</td>
</tr>
<tr>
<td>XMAS13</td>
<td>Coupon for XMAS -5 &euro;</td>
<td>25/01/2013</td>
<td>49</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="icon-ok icon-white"></span> Enabled</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</section> <!-- #wrapper -->
<aside id="disable" class="modal hide fade" role="dialog">
<div class="modal-header">
<h3>Confirmation</h3>
</div>
<div class="modal-body">
<p>Do you really want to disable this element?</p>
</div>
<div class="modal-footer">
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
</div>
</aside> <!-- #disable / Disable confirmation -->
<aside id="enable" class="modal hide fade" role="dialog">
<div class="modal-header">
<h3>Confirmation</h3>
</div>
<div class="modal-body">
<p>Do you really want to enable this element?</p>
</div>
<div class="modal-footer">
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
</div>
</aside> <!-- #enable / Enable confirmation -->
{include file='includes/js.inc.html'}
{stylesheets file='../assets/css/jqueryui/custom-theme/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
{javascripts file='../assets/bootstrap-editable/js/bootstrap-editable.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/tablesorter/jquery.tablesorter.min.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/tablesorter/jquery.metadata.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/tablesorter/jquery.tablesorter.widgets.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/tablesorter/jquery.tablesorter.widgets-filter-formatter.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{include file='includes/footer.inc.html'}

View File

@@ -1,143 +0,0 @@
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.view" login_tpl="/admin/login"}
{$page_title={intl l='Coupon'}}
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
{include file='includes/header.inc.html'}
<section id="wrapper" class="container">
<nav>
<ul class="breadcrumb">
{include file="includes/coupon_breadcrumb.html"}
</ul>
</nav>
<div class="page-header">
<h1>Coupons : <small>Read coupon n°1</small></h1>
</div>
<section class="row-fluid">
<div class="span12 general-block-decorator">
{loop type="coupon" name="read_coupon" id=1 backend_context="true"}
<div class="alert alert-info">
<span class="icon-question-sign"></span>
{if #IS_ENABLED}{else}This coupon is disabled, you can enable to the bottom of this form.{/if}
</div>
<table class="table table-striped">
<tbody>
<tr>
<td>Code</td>
<td>#CODE</td>
</tr>
<tr>
<td>Title</td>
<td>#TITLE</td>
</tr>
<tr>
<td>Expiration date</td>
<td>EXPIRATION_DATE</td>
</tr>
<tr>
<td>Usage left</td>
<td>
{if #USAGE_LEFT}
<span class="label label-success">
#USAGE_LEFT
</span>
{else}
<span class="label label-important">
0
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">#SHORT_DESCRIPTION</td>
</tr>
<tr>
<td colspan="2">#DESCRIPTION</td>
</tr>
<tr>
<td colspan="2">
{if #IS_CUMULATIVE}
<span class="label label-success">
{intl l="May be cumulative"}
</span>
{else}
<span class="label label-important">
{intl l="Can't be cumulative"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if #IS_REMOVING_POSTAGE}
<span class="label label-important">
{intl l="Will remove postage"}
</span>
{else}
<span class="label label-success">
{intl l="Won't remove postage"}
</span>
{/if}
</td>
</tr>
<tr>
<td>Amount</td>
<td>#AMOUNT</td>
</tr>
<tr>
<td>Conditions of application</td>
<td>
<ul class="unstyled">
<li>Total cart supperior to 400 &euro;</li>
<li><span class="label label-info">OR</span></li>
<li>At least 4 products</li>
</ul>
</td>
</tr>
<tr>
<td>Actions</td>
<td>
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
<a href="#url" class="btn btn-success btn-medium" data-toggle="confirm" data-target="#enable"><span class="icon-ok icon-white"></span> Enabled</a>
</td>
</tr>
</tbody>
</table>
{/loop}
</div>
</section>
</section> <!-- #wrapper -->
<aside id="enable" class="modal hide fade" role="dialog">
<div class="modal-header">
<h3>Confirmation</h3>
</div>
<div class="modal-body">
<p>Do you really want to enable this element?</p>
</div>
<div class="modal-footer">
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
</div>
</aside> <!-- #enable / Enable confirmation -->
{include file='includes/js.inc.html'}
{javascripts file='../assets/bootstrap-editable/js/bootstrap-editable.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='../assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{include file='includes/footer.inc.html'}

View File

@@ -1,5 +0,0 @@
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.edit" login_tpl="/admin/login"}
{$page_title={intl l='Coupon edition'}}
{include file='coupon/includes/edit.html'}