first commit

This commit is contained in:
Konstantin
2026-05-30 09:27:58 +03:00
commit de0344d218
2371 changed files with 661486 additions and 0 deletions
@@ -0,0 +1,265 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button id="button-send" data-loading-text="{{ text_loading }}" data-toggle="tooltip" title="{{ button_send }}" class="btn btn-primary" onclick="send('index.php?route=marketing/contact/send&user_token={{ user_token }}');"><i class="fa fa-envelope"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-envelope"></i> {{ heading_title }}</h3>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label" for="input-store">{{ entry_store }}</label>
<div class="col-sm-10">
<select name="store_id" id="input-store" class="form-control">
<option value="0">{{ text_default }}</option>
{% for store in stores %}
<option value="{{ store.store_id }}">{{ store.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-to">{{ entry_to }}</label>
<div class="col-sm-10">
<select name="to" id="input-to" class="form-control">
<option value="newsletter">{{ text_newsletter }}</option>
<option value="customer_all">{{ text_customer_all }}</option>
<option value="customer_group">{{ text_customer_group }}</option>
<option value="customer">{{ text_customer }}</option>
<option value="affiliate_all">{{ text_affiliate_all }}</option>
<option value="affiliate">{{ text_affiliate }}</option>
<option value="product">{{ text_product }}</option>
</select>
</div>
</div>
<div class="form-group to" id="to-customer-group">
<label class="col-sm-2 control-label" for="input-customer-group">{{ entry_customer_group }}</label>
<div class="col-sm-10">
<select name="customer_group_id" id="input-customer-group" class="form-control">
{% for customer_group in customer_groups %}
<option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group to" id="to-customer">
<label class="col-sm-2 control-label" for="input-customer"><span data-toggle="tooltip" title="{{ help_customer }}">{{ entry_customer }}</span></label>
<div class="col-sm-10">
<input type="text" name="customers" value="" placeholder="{{ entry_customer }}" id="input-customer" class="form-control" />
<div class="well well-sm" style="height: 150px; overflow: auto;"></div>
</div>
</div>
<div class="form-group to" id="to-affiliate">
<label class="col-sm-2 control-label" for="input-affiliate"><span data-toggle="tooltip" title="{{ help_affiliate }}">{{ entry_affiliate }}</span></label>
<div class="col-sm-10">
<input type="text" name="affiliates" value="" placeholder="{{ entry_affiliate }}" id="input-affiliate" class="form-control" />
<div class="well well-sm" style="height: 150px; overflow: auto;"></div>
</div>
</div>
<div class="form-group to" id="to-product">
<label class="col-sm-2 control-label" for="input-product"><span data-toggle="tooltip" title="{{ help_product }}">{{ entry_product }}</span></label>
<div class="col-sm-10">
<input type="text" name="products" value="" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
<div class="well well-sm" style="height: 150px; overflow: auto;"></div>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-subject">{{ entry_subject }}</label>
<div class="col-sm-10">
<input type="text" name="subject" value="" placeholder="{{ entry_subject }}" id="input-subject" class="form-control" />
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-message">{{ entry_message }}</label>
<div class="col-sm-10">
<textarea name="message" placeholder="{{ entry_message }}" id="input-message" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control"></textarea>
</div>
</div>
</form>
</div>
</div>
</div>
<link href="view/javascript/codemirror/lib/codemirror.css" rel="stylesheet" />
<link href="view/javascript/codemirror/theme/monokai.css" rel="stylesheet" />
<script type="text/javascript" src="view/javascript/codemirror/lib/codemirror.js"></script>
<script type="text/javascript" src="view/javascript/codemirror/lib/xml.js"></script>
<script type="text/javascript" src="view/javascript/codemirror/lib/formatting.js"></script>
<script type="text/javascript" src="view/javascript/summernote/summernote.js"></script>
<link href="view/javascript/summernote/summernote.css" rel="stylesheet" />
<script type="text/javascript" src="view/javascript/summernote/summernote-image-attributes.js"></script>
<script type="text/javascript" src="view/javascript/summernote/opencart.js"></script>
<script type="text/javascript"><!--
$('select[name=\'to\']').on('change', function() {
$('.to').hide();
$('#to-' + this.value.replace('_', '-')).show();
});
$('select[name=\'to\']').trigger('change');
//--></script>
<script type="text/javascript"><!--
// Customers
$('input[name=\'customers\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['customer_id']
}
}));
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
},
'select': function(item) {
$('input[name=\'customers\']').val('');
$('#customer' + item['value']).remove();
$('#input-customer').parent().find('.well').append('<div id="customer' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="customer[]" value="' + item['value'] + '" /></div>');
}
});
$('#input-customer').parent().find('.well').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
// Affiliates
$('input[name=\'affiliates\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request) + '&filter_affiliate=1',
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['customer_id']
}
}));
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
},
'select': function(item) {
$('input[name=\'affiliates\']').val('');
$('#affiliate' + item['value']).remove();
$('#input-affiliate').parent().find('.well').append('<div id="affiliate' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="affiliate[]" value="' + item['value'] + '" /></div>');
}
});
$('#input-affiliate').parent().find('.well').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
// Products
$('input[name=\'products\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id']
}
}));
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
},
'select': function(item) {
$('input[name=\'products\']').val('');
$('#product' + item['value']).remove();
$('#input-product').parent().find('.well').append('<div id="product' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product[]" value="' + item['value'] + '" /></div>');
}
});
$('#input-product').parent().find('.well').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
function send(url) {
$.ajax({
url: url,
type: 'post',
data: $('#content select, #content input, #content textarea'),
dataType: 'json',
beforeSend: function() {
$('#button-send').button('loading');
},
success: function(json) {
$('.alert-dismissible, .text-danger').remove();
if (json['error']) {
if (json['error']['warning']) {
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error']['warning'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
if (json['error']['email']) {
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error']['email'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
if (json['error']['subject']) {
$('input[name=\'subject\']').after('<div class="text-danger">' + json['error']['subject'] + '</div>');
}
if (json['error']['message']) {
$('textarea[name=\'message\']').parent().append('<div class="text-danger">' + json['error']['message'] + '</div>');
}
}
if (json['success']) {
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>');
}
if (json['next']) {
send(json['next']);
} else {
$('#button-send').button('reset');
}
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
}
//--></script></div>
{{ footer }}
@@ -0,0 +1,290 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-coupon" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid"> {% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-coupon" class="form-horizontal">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
{% if coupon_id %}
<li><a href="#tab-history" data-toggle="tab">{{ tab_history }}</a></li>
{% endif %}
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab-general">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
<div class="col-sm-10">
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
{% if error_name %}
<div class="text-danger">{{ error_name }}</div>
{% endif %} </div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-code"><span data-toggle="tooltip" title="{{ help_code }}">{{ entry_code }}</span></label>
<div class="col-sm-10">
<input type="text" name="code" value="{{ code }}" placeholder="{{ entry_code }}" id="input-code" class="form-control" />
{% if error_code %}
<div class="text-danger">{{ error_code }}</div>
{% endif %} </div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-type"><span data-toggle="tooltip" title="{{ help_type }}">{{ entry_type }}</span></label>
<div class="col-sm-10">
<select name="type" id="input-type" class="form-control">
{% if type == 'P' %}
<option value="P" selected="selected">{{ text_percent }}</option>
{% else %}
<option value="P">{{ text_percent }}</option>
{% endif %}
{% if type == 'F' %}
<option value="F" selected="selected">{{ text_amount }}</option>
{% else %}
<option value="F">{{ text_amount }}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-discount">{{ entry_discount }}</label>
<div class="col-sm-10">
<input type="text" name="discount" value="{{ discount }}" placeholder="{{ entry_discount }}" id="input-discount" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-total"><span data-toggle="tooltip" title="{{ help_total }}">{{ entry_total }}</span></label>
<div class="col-sm-10">
<input type="text" name="total" value="{{ total }}" placeholder="{{ entry_total }}" id="input-total" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_logged }}">{{ entry_logged }}</span></label>
<div class="col-sm-10">
<label class="radio-inline"> {% if logged %}
<input type="radio" name="logged" value="1" checked="checked" />
{{ text_yes }}
{% else %}
<input type="radio" name="logged" value="1" />
{{ text_yes }}
{% endif %} </label>
<label class="radio-inline"> {% if not logged %}
<input type="radio" name="logged" value="0" checked="checked" />
{{ text_no }}
{% else %}
<input type="radio" name="logged" value="0" />
{{ text_no }}
{% endif %} </label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{ entry_shipping }}</label>
<div class="col-sm-10">
<label class="radio-inline"> {% if shipping %}
<input type="radio" name="shipping" value="1" checked="checked" />
{{ text_yes }}
{% else %}
<input type="radio" name="shipping" value="1" />
{{ text_yes }}
{% endif %} </label>
<label class="radio-inline"> {% if not shipping %}
<input type="radio" name="shipping" value="0" checked="checked" />
{{ text_no }}
{% else %}
<input type="radio" name="shipping" value="0" />
{{ text_no }}
{% endif %} </label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-product"><span data-toggle="tooltip" title="{{ help_product }}">{{ entry_product }}</span></label>
<div class="col-sm-10">
<input type="text" name="product" value="" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
<div id="coupon-product" class="well well-sm" style="height: 150px; overflow: auto;"> {% for coupon_product in coupon_product %}
<div id="coupon-product{{ coupon_product.product_id }}"><i class="fa fa-minus-circle"></i> {{ coupon_product.name }}
<input type="hidden" name="coupon_product[]" value="{{ coupon_product.product_id }}" />
</div>
{% endfor %} </div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-category"><span data-toggle="tooltip" title="{{ help_category }}">{{ entry_category }}</span></label>
<div class="col-sm-10">
<input type="text" name="category" value="" placeholder="{{ entry_category }}" id="input-category" class="form-control" />
<div id="coupon-category" class="well well-sm" style="height: 150px; overflow: auto;"> {% for coupon_category in coupon_category %}
<div id="coupon-category{{ coupon_category.category_id }}"><i class="fa fa-minus-circle"></i> {{ coupon_category.name }}
<input type="hidden" name="coupon_category[]" value="{{ coupon_category.category_id }}" />
</div>
{% endfor %} </div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date-start">{{ entry_date_start }}</label>
<div class="col-sm-3">
<div class="input-group date">
<input type="text" name="date_start" value="{{ date_start }}" placeholder="{{ entry_date_start }}" data-date-format="YYYY-MM-DD" id="input-date-start" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-date-end">{{ entry_date_end }}</label>
<div class="col-sm-3">
<div class="input-group date">
<input type="text" name="date_end" value="{{ date_end }}" placeholder="{{ entry_date_end }}" data-date-format="YYYY-MM-DD" id="input-date-end" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-uses-total"><span data-toggle="tooltip" title="{{ help_uses_total }}">{{ entry_uses_total }}</span></label>
<div class="col-sm-10">
<input type="text" name="uses_total" value="{{ uses_total }}" placeholder="{{ entry_uses_total }}" id="input-uses-total" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-uses-customer"><span data-toggle="tooltip" title="{{ help_uses_customer }}">{{ entry_uses_customer }}</span></label>
<div class="col-sm-10">
<input type="text" name="uses_customer" value="{{ uses_customer }}" placeholder="{{ entry_uses_customer }}" id="input-uses-customer" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
<div class="col-sm-10">
<select name="status" id="input-status" class="form-control">
{% if status %}
<option value="1" selected="selected">{{ text_enabled }}</option>
<option value="0">{{ text_disabled }}</option>
{% else %}
<option value="1">{{ text_enabled }}</option>
<option value="0" selected="selected">{{ text_disabled }}</option>
{% endif %}
</select>
</div>
</div>
</div>
{% if coupon_id %}
<div class="tab-pane" id="tab-history">
<fieldset>
<legend>{{ text_coupon }}</legend>
<div id="history"></div>
</fieldset>
</div>
{% endif %} </div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('input[name=\'product\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['product_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'product\']').val('');
$('#coupon-product' + item['value']).remove();
$('#coupon-product').append('<div id="coupon-product' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="coupon_product[]" value="' + item['value'] + '" /></div>');
}
});
$('#coupon-product').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
// Category
$('input[name=\'category\']').autocomplete({
'source': function(request, response) {
$.ajax({
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
dataType: 'json',
success: function(json) {
response($.map(json, function(item) {
return {
label: item['name'],
value: item['category_id']
}
}));
}
});
},
'select': function(item) {
$('input[name=\'category\']').val('');
$('#coupon-category' + item['value']).remove();
$('#coupon-category').append('<div id="coupon-category' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="coupon_category[]" value="' + item['value'] + '" /></div>');
}
});
$('#coupon-category').delegate('.fa-minus-circle', 'click', function() {
$(this).parent().remove();
});
//--></script>
{% if coupon_id %}
<script type="text/javascript"><!--
$('#history').delegate('.pagination a', 'click', function(e) {
e.preventDefault();
$('#history').load(this.href);
});
$('#history').load('index.php?route=marketing/coupon/history&user_token={{ user_token }}&coupon_id={{ coupon_id }}');
//--></script>
{% endif %}
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
//--></script></div>
{{ footer }}
@@ -0,0 +1,32 @@
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-right">{{ column_order_id }}</td>
<td class="text-left">{{ column_customer }}</td>
<td class="text-right">{{ column_amount }}</td>
<td class="text-left">{{ column_date_added }}</td>
</tr>
</thead>
<tbody>
{% if histories %}
{% for history in histories %}
<tr>
<td class="text-right">{{ history.order_id }}</td>
<td class="text-left">{{ history.customer }}</td>
<td class="text-right">{{ history.amount }}</td>
<td class="text-left">{{ history.date_added }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="4">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
@@ -0,0 +1,106 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"><a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-coupon').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-coupon">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if sort == 'name' %}
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
{% else %}
<a href="{{ sort_name }}">{{ column_name }}</a>
{% endif %}</td>
<td class="text-left">{% if sort == 'code' %}
<a href="{{ sort_code }}" class="{{ order|lower }}">{{ column_code }}</a>
{% else %}
<a href="{{ sort_code }}">{{ column_code }}</a>
{% endif %}</td>
<td class="text-right">{% if sort == 'discount' %}
<a href="{{ sort_discount }}" class="{{ order|lower }}">{{ column_discount }}</a>
{% else %}
<a href="{{ sort_discount }}">{{ column_discount }}</a>
{% endif %}</td>
<td class="text-left">{% if sort == 'date_start' %}
<a href="{{ sort_date_start }}" class="{{ order|lower }}">{{ column_date_start }}</a>
{% else %}
<a href="{{ sort_date_start }}">{{ column_date_start }}</a>
{% endif %}</td>
<td class="text-left">{% if sort == 'date_end' %}
<a href="{{ sort_date_end }}" class="{{ order|lower }}">{{ column_date_end }}</a>
{% else %}
<a href="{{ sort_date_end }}">{{ column_date_end }}</a>
{% endif %}</td>
<td class="text-left">{% if sort == 'status' %}
<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>
{% else %}
<a href="{{ sort_status }}">{{ column_status }}</a>
{% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if coupons %}
{% for coupon in coupons %}
<tr>
<td class="text-center">{% if coupon.coupon_id in selected %}
<input type="checkbox" name="selected[]" value="{{ coupon.coupon_id }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ coupon.coupon_id }}" />
{% endif %}</td>
<td class="text-left">{{ coupon.name }}</td>
<td class="text-left">{{ coupon.code }}</td>
<td class="text-right">{{ coupon.discount }}</td>
<td class="text-left">{{ coupon.date_start }}</td>
<td class="text-left">{{ coupon.date_end }}</td>
<td class="text-left">{{ coupon.status }}</td>
<td class="text-right"><a href="{{ coupon.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="8">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
{{ footer }}
@@ -0,0 +1,72 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-marketing" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">
{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_form }}</h3>
</div>
<div class="panel-body">
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-marketing" class="form-horizontal">
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
<div class="col-sm-10">
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
{% if error_name %}
<div class="text-danger">{{ error_name }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-description">{{ entry_description }}</label>
<div class="col-sm-10">
<textarea name="description" rows="5" placeholder="{{ entry_description }}" id="input-description" class="form-control">{{ description }}</textarea>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-code"><span data-toggle="tooltip" title="{{ help_code }}">{{ entry_code }}</span></label>
<div class="col-sm-10">
<input type="text" name="code" value="{{ code }}" placeholder="{{ entry_code }}" id="input-code" class="form-control" />
{% if error_code %}
<div class="text-danger">{{ error_code }}</div>
{% endif %}
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-example"><span data-toggle="tooltip" title="{{ help_example }}">{{ entry_example }}</span></label>
<div class="col-sm-10">
<input type="text" placeholder="{{ entry_example }}" id="input-example1" class="form-control" />
<br />
<input type="text" placeholder="{{ entry_example }}" id="input-example2" class="form-control" />
</div>
</div>
</form>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#input-code').on('keyup', function() {
$('#input-example1').val('{{ store }}?tracking=' + $('#input-code').val());
$('#input-example2').val('{{ store }}index.php?route=common/home&tracking=' + $('#input-code').val());
});
$('#input-code').trigger('keyup');
//--></script></div>
{{ footer }}
@@ -0,0 +1,146 @@
{{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="button" data-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-marketing').toggleClass('hidden-sm hidden-xs');" class="btn btn-default hidden-md hidden-lg"><i class="fa fa-filter"></i></button>
<a href="{{ add }}" data-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa fa-plus"></i></a>
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-marketing').submit() : false;"><i class="fa fa-trash-o"></i></button>
</div>
<h1>{{ heading_title }}</h1>
<ul class="breadcrumb">
{% for breadcrumb in breadcrumbs %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="container-fluid">{% if error_warning %}
<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
{% if success %}
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
<button type="button" class="close" data-dismiss="alert">&times;</button>
</div>
{% endif %}
<div class="row">
<div id="filter-marketing" class="col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-filter"></i> {{ text_filter }}</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label" for="input-name">{{ entry_name }}</label>
<input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-code">{{ entry_code }}</label>
<input type="text" name="filter_code" value="{{ filter_code }}" placeholder="{{ entry_code }}" id="input-code" class="form-control" />
</div>
<div class="form-group">
<label class="control-label" for="input-date-added">{{ entry_date_added }}</label>
<div class="input-group date">
<input type="text" name="filter_date_added" value="{{ filter_date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
<div class="form-group text-right">
<button type="button" id="button-filter" class="btn btn-default"><i class="fa fa-filter"></i> {{ button_filter }}</button>
</div>
</div>
</div>
</div>
<div class="col-md-9 col-md-pull-3 col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> {{ text_list }}</h3>
</div>
<div class="panel-body">
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-marketing">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td style="width: 1px;" class="text-center"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
<td class="text-left">{% if sort == 'm.name' %} <a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a> {% else %} <a href="{{ sort_name }}">{{ column_name }}</a> {% endif %}</td>
<td class="text-left">{% if sort == 'm.code' %} <a href="{{ sort_code }}" class="{{ order|lower }}">{{ column_code }}</a> {% else %} <a href="{{ sort_code }}">{{ column_code }}</a> {% endif %}</td>
<td class="text-right">{{ column_clicks }}</td>
<td class="text-right">{{ column_orders }}</td>
<td class="text-left">{% if sort == 'm.date_added' %} <a href="{{ sort_date_added }}" class="{{ order|lower }}">{{ column_date_added }}</a> {% else %} <a href="{{ sort_date_added }}">{{ column_date_added }}</a> {% endif %}</td>
<td class="text-right">{{ column_action }}</td>
</tr>
</thead>
<tbody>
{% if marketings %}
{% for marketing in marketings %}
<tr>
<td class="text-center">{% if marketing.marketing_id in selected %}
<input type="checkbox" name="selected[]" value="{{ marketing.marketing_id }}" checked="checked" />
{% else %}
<input type="checkbox" name="selected[]" value="{{ marketing.marketing_id }}" />
{% endif %}</td>
<td class="text-left">{{ marketing.name }}</td>
<td class="text-left">{{ marketing.code }}</td>
<td class="text-right">{{ marketing.clicks }}</td>
<td class="text-right">{{ marketing.orders }}</td>
<td class="text-left">{{ marketing.date_added }}</td>
<td class="text-right"><a href="{{ marketing.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="8">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</form>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
url = 'index.php?route=marketing/marketing&user_token={{ user_token }}';
var filter_name = $('input[name=\'filter_name\']').val();
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
var filter_code = $('input[name=\'filter_code\']').val();
if (filter_code) {
url += '&filter_code=' + encodeURIComponent(filter_code);
}
var filter_date_added = $('input[name=\'filter_date_added\']').val();
if (filter_date_added) {
url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
}
location = url;
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
language: '{{ datepicker }}',
pickTime: false
});
//--></script>
</div>
{{ footer }}