WIP
- Implémentation coupon/list en cours - Implémentation coupon/read OK - Implémentation coupon/edit en cours
This commit is contained in:
@@ -6,17 +6,62 @@
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="coupons">
|
||||
<div id="wrapper" class="container">
|
||||
<section id="wrapper" class="container">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/coupon_breadcrumb.html"}
|
||||
</ul>
|
||||
|
||||
<h1>EDIT</h1>
|
||||
</nav>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Coupons : <small>Add a coupon</small></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="row-fluid">
|
||||
<div class="span12 general-block-decorator">
|
||||
|
||||
<form action="#" method="post">
|
||||
|
||||
<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="cumulative" class="checkbox">
|
||||
<input id="cumulative" type="checkbox" name="cumulative" value="1">
|
||||
Is cumulative ?
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="renoving-shortage" class="checkbox">
|
||||
<input id="renoving-shortage" type="checkbox" name="renoving-shortage" value="1">
|
||||
Is renoving shortage ?
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="expiration-date">Expiration date :</label>
|
||||
<input id="expiration-date" type="text" name="expiration-date" placeholder="29/08/2013" class="datepicker">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</section> <!-- #wrapper -->
|
||||
|
||||
{include file='includes/js.inc.html'}
|
||||
|
||||
|
||||
@@ -6,15 +6,168 @@
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="coupons">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<section id="wrapper" class="container">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/coupon_breadcrumb.html"}
|
||||
</ul>
|
||||
<h1>List</h1>
|
||||
</nav>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Coupons : <small>List of coupons</small></h1>
|
||||
</div>
|
||||
</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>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>XMAS13</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
<td>25/12/2013</td>
|
||||
<td>49 times</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>XMAS14</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
<td>25/12/2013</td>
|
||||
<td>49 times</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>XMAS15</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
<td>25/12/2013</td>
|
||||
<td>49 times</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>XMAS16</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
<td>25/12/2013</td>
|
||||
<td>49 times</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>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>XMAS13</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
<td>18/10/2013</td>
|
||||
<td>49 times</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 €</td>
|
||||
<td>05/09/2013</td>
|
||||
<td>49 times</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 €</td>
|
||||
<td>03/12/2013</td>
|
||||
<td>49 times</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 €</td>
|
||||
<td>25/01/2013</td>
|
||||
<td>49 times</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'}
|
||||
@@ -24,6 +177,33 @@
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
// === Confirm Box === //
|
||||
$('[data-toggle="confirm"]').click(function(e){
|
||||
|
||||
var $link = $(this);
|
||||
var modal = $(this).data('target');
|
||||
|
||||
$(modal).modal('show');
|
||||
|
||||
$(modal).on('shown', function () {
|
||||
$('[data-confirm]').attr('href', $link.attr('href'));
|
||||
});
|
||||
|
||||
if($(modal).is(':hidden')){
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{javascripts file='../assets/js/tablesorter/jquery.tablesorter.min.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
// === Table sorter === //
|
||||
|
||||
$('.tablesorter').tablesorter();
|
||||
</script>
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
|
||||
@@ -6,15 +6,91 @@
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="coupons">
|
||||
<div id="wrapper" class="container">
|
||||
<section id="wrapper" class="container">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/coupon_breadcrumb.html"}
|
||||
</ul>
|
||||
<h1>Read</h1>
|
||||
</nav>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Coupons : <small>Read coupon n°1</small></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="row-fluid">
|
||||
<div class="span12 general-block-decorator">
|
||||
|
||||
<div class="alert alert-info">
|
||||
<span class="icon-question-sign"></span> This coupon is disabled, you can enable to the bottom of this form.
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Code</td>
|
||||
<td>XMAS13</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>Coupon for XMAS -30 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expiration date</td>
|
||||
<td>25/12/2013</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Usage left</td>
|
||||
<td>49 times</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>May be combined</td>
|
||||
<td><span class="label label-success">Yes</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cancel shipping</td>
|
||||
<td><span class="label label-important">No</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Effect</td>
|
||||
<td>Remove 30 € to the cart price</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Conditions of application</td>
|
||||
<td>
|
||||
<ul class="unstyled">
|
||||
<li>Total cart supperior to 400 €</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>
|
||||
|
||||
</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'}
|
||||
@@ -23,7 +99,25 @@
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
|
||||
<script>
|
||||
// === Confirm Box === //
|
||||
$('[data-toggle="confirm"]').click(function(e){
|
||||
|
||||
var $link = $(this);
|
||||
var modal = $(this).data('target');
|
||||
|
||||
$(modal).modal('show');
|
||||
|
||||
$(modal).on('shown', function () {
|
||||
$('[data-confirm]').attr('href', $link.attr('href'));
|
||||
});
|
||||
|
||||
if($(modal).is(':hidden')){
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
|
||||
Reference in New Issue
Block a user