first commit
This commit is contained in:
@@ -0,0 +1,459 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-article" 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">×</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-article" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-links" data-toggle="tab">{{ tab_links }}</a></li>
|
||||
<li><a href="#tab-image" data-toggle="tab">{{ tab_image }}</a></li>
|
||||
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
|
||||
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name{{ language.language_id }}">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_description[{{ language.language_id }}][name]" value="{{ article_description[language.language_id] ? article_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name{{ language.language_id }}" class="form-control" />
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_description[{{ language.language_id }}][meta_h1]" value="{{ article_description[language.language_id] ? article_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title{{ language.language_id }}">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_description[{{ language.language_id }}][meta_title]" value="{{ article_description[language.language_id] ? article_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description{{ language.language_id }}">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="article_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language.language_id }}" class="form-control">{{ article_description[language.language_id] ? article_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language.language_id }}">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="article_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language.language_id }}" class="form-control">{{ article_description[language.language_id] ? article_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="article_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ article_description[language.language_id] ? article_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-links">
|
||||
<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="article-category" class="well well-sm" style="height: 150px; overflow: auto;"> {% for article_category in article_categories %}
|
||||
<div id="article-category{{ article_category.blog_category_id }}"><i class="fa fa-minus-circle"></i> {{ article_category.name }}
|
||||
<input type="hidden" name="article_category[]" value="{{ article_category.blog_category_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="select-main_category_id"><span data-toggle="tooltip" title="{{ help_main_category }}">{{ entry_main_category }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select name="main_blog_category_id" class="form-control">
|
||||
<option value="0" selected="selected">{{ text_none }}</option>
|
||||
{% for category in categories %}
|
||||
{% if category.blog_category_id == main_blog_category_id %}
|
||||
<option value="{{ category.blog_category_id }}" selected="selected">{{ category.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ category.blog_category_id }}">{{ category.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;"> {% for store in stores %}
|
||||
<div class="checkbox">
|
||||
<label> {% if store.store_id in article_store %}
|
||||
<input type="checkbox" name="article_store[]" value="{{ store.store_id }}" checked="checked" />
|
||||
{{ store.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="article_store[]" value="{{ store.store_id }}" />
|
||||
{{ store.name }}
|
||||
{% endif %} </label>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-download"><span data-toggle="tooltip" title="{{ help_download }}">{{ entry_download }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="download" value="" placeholder="{{ entry_download }}" id="input-download" class="form-control" />
|
||||
<div id="article-download" class="well well-sm" style="height: 150px; overflow: auto;"> {% for article_download in article_downloads %}
|
||||
<div id="article-download{{ article_download.download_id }}"><i class="fa fa-minus-circle"></i> {{ article_download.name }}
|
||||
<input type="hidden" name="article_download[]" value="{{ article_download.download_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="related" value="" placeholder="{{ entry_related }}" id="input-related" class="form-control" />
|
||||
<div id="article-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for article_related in article_relateds %}
|
||||
<div id="article-related{{ article_related.article_id }}"><i class="fa fa-minus-circle"></i> {{ article_related.name }}
|
||||
<input type="hidden" name="article_related[]" value="{{ article_related.article_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-related-product"><span data-toggle="tooltip" title="{{ help_related_product }}">{{ entry_related_product }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="relatedproduct" value="" placeholder="{{ entry_related_product }}" id="input-related-product" class="form-control" />
|
||||
<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for product_related in product_relateds %}
|
||||
<div id="product-related{{ product_related.product_id }}"><i class="fa fa-minus-circle"></i> {{ product_related.name }}
|
||||
<input type="hidden" name="product_related[]" value="{{ product_related.product_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-image">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_image }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="images" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_additional_image }}</td>
|
||||
<td class="text-right">{{ entry_sort_order }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-seo">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="article_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if article_seo_url[store.store_id][language.language_id] %}{{ article_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_keyword[store.store_id][language.language_id] %}
|
||||
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noindex" id="input-noindex" class="form-control">
|
||||
{% if noindex %}
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-design">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left"><select name="article_layout[{{ store.store_id }}]" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
{% for layout in layouts %}
|
||||
{% if article_layout[store.store_id] and article_layout[store.store_id] == layout.layout_id %}
|
||||
|
||||
|
||||
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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"><!--
|
||||
// Category
|
||||
$('input[name=\'category\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/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['blog_category_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'category\']').val('');
|
||||
|
||||
$('#article-category' + item['value']).remove();
|
||||
|
||||
$('#article-category').append('<div id="article-category' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="article_category[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#article-category').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
// Downloads
|
||||
$('input[name=\'download\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/download/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['download_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'download\']').val('');
|
||||
|
||||
$('#article-download' + item['value']).remove();
|
||||
|
||||
$('#article-download').append('<div id="article-download' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="article_download[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#article-download').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
// Related
|
||||
$('input[name=\'related\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/article/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['article_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'related\']').val('');
|
||||
|
||||
$('#article-related' + item['value']).remove();
|
||||
|
||||
$('#article-related').append('<div id="article-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="article_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#article-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
// Related Product
|
||||
$('input[name=\'relatedproduct\']').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=\'relatedproduct\']').val('');
|
||||
|
||||
$('#product-related' + item['value']).remove();
|
||||
|
||||
$('#product-related').append('<div id="product-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
$('.date').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickTime: false
|
||||
});
|
||||
|
||||
$('.time').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: false
|
||||
});
|
||||
|
||||
$('.datetime').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: true,
|
||||
pickTime: true
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#language a:first').tab('show');
|
||||
$('#option a:first').tab('show');
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,207 @@
|
||||
{{ 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-article').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="submit" form="form-article" formaction="{{ copy }}" data-toggle="tooltip" title="{{ button_copy }}" class="btn btn-default"><i class="fa fa-copy"></i></button>
|
||||
<button type="submit" form="form-article" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-article" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" form="form-article" formaction="{{ delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-article').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-article" 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>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-name" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
{% if filter_status == '1' %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<select name="filter_noindex" id="input-noindex" class="form-control">
|
||||
<option value=""></option>
|
||||
{% if filter_noindex == '1' %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
{% if filter_noindex == '0' %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</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>
|
||||
<button type="button" id="button-clear-filter" class="btn btn-default"><i class="fa fa-times"></i><span class="hidden-sm"> {{ button_clear }}</span></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-article">
|
||||
<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-center">{{ column_image }}</td>
|
||||
<td class="text-left">{% if sort == 'pd.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 == 'p.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'p.noindex' %} <a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a> {% else %} <a href="{{ sort_noindex }}">{{ column_noindex }}</a> {% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if articles %}
|
||||
{% for article in articles %}
|
||||
<tr>
|
||||
<td class="text-center">{% if article.article_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ article.article_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ article.article_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-center">{% if article.image %} <img src="{{ article.image }}" alt="{{ article.name }}" class="img-thumbnail" /> {% else %} <span class="img-thumbnail list"><i class="fa fa-camera fa-2x"></i></span> {% endif %}</td>
|
||||
<td class="text-left">{{ article.name }}</td>
|
||||
<td class="text-left">{{ article.status }}</td>
|
||||
<td class="text-left">{{ article.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ article.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ article.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="9">{{ 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() {
|
||||
var url = '';
|
||||
|
||||
var filter_name = $('input[name=\'filter_name\']').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
var filter_status = $('select[name=\'filter_status\']').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
|
||||
var filter_noindex = $('select[name=\'filter_noindex\']').val();
|
||||
|
||||
if (filter_noindex !== '') {
|
||||
url += '&filter_noindex=' + encodeURIComponent(filter_noindex);
|
||||
}
|
||||
|
||||
location = 'index.php?route=blog/article&user_token={{ user_token }}' + url;
|
||||
});
|
||||
$('#button-clear-filter').on('click', function() {
|
||||
location = 'index.php?route=blog/article&user_token={{ user_token }}';
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
// IE and Edge fix!
|
||||
$('button[form=\'form-article\']').on('click', function(e) {
|
||||
$('#form-article').attr('action', $(this).attr('formaction'));
|
||||
});
|
||||
|
||||
$('input[name=\'filter_name\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/article/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['article_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_name\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
$('#button-clear-input-name').on('click',function(){
|
||||
$('input[name=\'filter_name\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('#filter-article').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#button-filter').trigger('click')
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,278 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-category" 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">×</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-category" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
|
||||
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name{{ language.language_id }}">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][name]" value="{{ category_description[language.language_id] ? category_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name{{ language.language_id }}" class="form-control" />
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][meta_h1]" value="{{ category_description[language.language_id] ? category_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title{{ language.language_id }}">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][meta_title]" value="{{ category_description[language.language_id] ? category_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description{{ language.language_id }}">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language.language_id }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language.language_id }}">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language.language_id }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-parent">{{ entry_parent }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="path" value="{{ path }}" placeholder="{{ entry_parent }}" id="input-parent" class="form-control" />
|
||||
<input type="hidden" name="parent_id" value="{{ parent_id }}" />
|
||||
{% if error_parent %}
|
||||
<div class="text-danger">{{ error_parent }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if store.store_id in category_store %}
|
||||
<input type="checkbox" name="category_store[]" value="{{ store.store_id }}" checked="checked" />
|
||||
{{ store.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="category_store[]" value="{{ store.store_id }}" />
|
||||
{{ store.name }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-top"><span data-toggle="tooltip" title="{{ help_top }}">{{ entry_top }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if top %}
|
||||
<input type="checkbox" name="top" value="1" checked="checked" id="input-top" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="top" value="1" id="input-top" />
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" 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>
|
||||
<div class="tab-pane" id="tab-seo">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="category_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if category_seo_url[store.store_id][language.language_id] %}{{ category_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_keyword[store.store_id][language.language_id] %}
|
||||
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noindex" id="input-noindex" class="form-control">
|
||||
{% if noindex %}
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-design">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left"><select name="category_layout[{{ store.store_id }}]" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
{% if category_layout[store.store_id] and category_layout[store.store_id] == layout.layout_id %}
|
||||
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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"><!--
|
||||
$('input[name=\'path\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
json.unshift({
|
||||
blog_category_id: 0,
|
||||
name: '{{ text_none }}'
|
||||
});
|
||||
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['blog_category_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'path\']').val(item['label']);
|
||||
$('input[name=\'parent_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,96 @@
|
||||
{{ 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>
|
||||
<a href="{{ repair }}" data-toggle="tooltip" title="{{ button_rebuild }}" class="btn btn-default"><i class="fa fa-refresh"></i></a>
|
||||
<button type="submit" form="form-category" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-category" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" form="form-category" formaction="{{ delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-category').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">×</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">×</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-category">
|
||||
<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">{{ column_name }}</td>
|
||||
<td class="text-right">{{ column_sort_order }}</td>
|
||||
<td class="text-right">{% if sort == 'noindex' %}
|
||||
<a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_noindex }}">{{ column_noindex }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td class="text-center">{% if category.blog_category_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ category.blog_category_id }}" />
|
||||
{% endif %}</td>
|
||||
{% if category.href %}
|
||||
<td class="left">{{ category.indent }}<a href="{{ category.href }}">{{ category.name }}</a> <i class="fa fa-sort-desc"></i></td>
|
||||
{% else %}
|
||||
<td class="left">{{ category.indent }}{{ category.name }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right">{{ category.sort_order }}</td>
|
||||
<td class="text-right">{{ category.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ category.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ category.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="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">{{ results }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
// IE and Edge fix!
|
||||
$('button[form=\'form-category\']').on('click', function(e) {
|
||||
$('#form-category').attr('action', $(this).attr('formaction'));
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,157 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-review" 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">×</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-review" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-author">{{ entry_author }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
|
||||
{% if error_author %}
|
||||
<div class="text-danger">{{ error_author }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-article"><span data-toggle="tooltip" title="{{ help_article }}">{{ entry_article }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article" value="{{ article }}" placeholder="{{ entry_article }}" id="input-article" class="form-control" />
|
||||
<input type="hidden" name="article_id" value="{{ article_id }}" />
|
||||
{% if error_article %}
|
||||
<div class="text-danger">{{ error_article }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-text">{{ entry_text }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="text" cols="60" rows="8" placeholder="{{ entry_text }}" id="input-text" class="form-control">{{ text }}</textarea>
|
||||
{% if error_text %}
|
||||
<div class="text-danger">{{ error_text }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name">{{ entry_rating }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline"> {% if rating == 1 %}
|
||||
<input type="radio" name="rating" value="1" checked="checked" />
|
||||
1
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="1" />
|
||||
1
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 2 %}
|
||||
<input type="radio" name="rating" value="2" checked="checked" />
|
||||
2
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="2" />
|
||||
2
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 3 %}
|
||||
<input type="radio" name="rating" value="3" checked="checked" />
|
||||
3
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="3" />
|
||||
3
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 4 %}
|
||||
<input type="radio" name="rating" value="4" checked="checked" />
|
||||
4
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="4" />
|
||||
4
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 5 %}
|
||||
<input type="radio" name="rating" value="5" checked="checked" />
|
||||
5
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="5" />
|
||||
5
|
||||
{% endif %} </label>
|
||||
{% if error_rating %}
|
||||
<div class="text-danger">{{ error_rating }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-date-added">{{ entry_date_added }}</label>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group datetime">
|
||||
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD HH:mm:ss" id="input-date-added" 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-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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('.datetime').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: true,
|
||||
pickTime: true
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'article\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/article/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['article_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'article\']').val(item['label']);
|
||||
$('input[name=\'article_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,243 @@
|
||||
{{ 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-review').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="submit" form="form-review" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-review" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-review').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-review" 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-article">{{ entry_article }}</label>
|
||||
<input type="text" name="filter_article" value="{{ filter_article }}" placeholder="{{ entry_article }}" id="input-article" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-author">{{ entry_author }}</label>
|
||||
<input type="text" name="filter_author" value="{{ filter_author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% if filter_status == '1' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</select>
|
||||
</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" id="input-date-added" 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-review">
|
||||
<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 == 'pd.name' %} <a href="{{ sort_article }}" class="{{ order|lower }}">{{ column_article }}</a> {% else %} <a href="{{ sort_article }}">{{ column_article }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.author' %} <a href="{{ sort_author }}" class="{{ order|lower }}">{{ column_author }}</a> {% else %} <a href="{{ sort_author }}">{{ column_author }}</a> {% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'r.rating' %} <a href="{{ sort_rating }}" class="{{ order|lower }}">{{ column_rating }}</a> {% else %} <a href="{{ sort_rating }}">{{ column_rating }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.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 reviews %}
|
||||
{% for review in reviews %}
|
||||
<tr>
|
||||
<td class="text-center">{% if review.review_article_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ review.review_article_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ review.review_article_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ review.name }}</td>
|
||||
<td class="text-left">{{ review.author }}</td>
|
||||
<td class="text-right">{{ review.rating }}</td>
|
||||
<td class="text-left">{{ review.status }}</td>
|
||||
<td class="text-left">{{ review.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ review.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="7">{{ 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=blog/review&user_token={{ user_token }}';
|
||||
|
||||
var filter_article = $('input[name=\'filter_article\']').val();
|
||||
|
||||
if (filter_article) {
|
||||
url += '&filter_article=' + encodeURIComponent(filter_article);
|
||||
}
|
||||
|
||||
var filter_author = $('input[name=\'filter_author\']').val();
|
||||
|
||||
if (filter_author) {
|
||||
url += '&filter_author=' + encodeURIComponent(filter_author);
|
||||
}
|
||||
|
||||
var filter_status = $('select[name=\'filter_status\']').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
|
||||
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 }}
|
||||
@@ -0,0 +1,299 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-setting" 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"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-setting" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-option" data-toggle="tab">{{ tab_option }}</a></li>
|
||||
<li><a href="#tab-image" data-toggle="tab">{{ tab_image }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-name">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_name" value="{{ configblog_name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-h1">{{ entry_html_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_html_h1" value="{{ configblog_html_h1 }}" placeholder="{{ entry_html_h1 }}" id="input-h1" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_meta_title" value="{{ configblog_meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="configblog_meta_description" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description" class="form-control">{{ configblog_meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="configblog_meta_keyword" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword" class="form-control">{{ configblog_meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-option">
|
||||
<fieldset>
|
||||
<legend>{{ text_article }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_article_count }}">{{ entry_article_count }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_article_count %}
|
||||
<input type="radio" name="configblog_article_count" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_article_count" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_article_count %}
|
||||
<input type="radio" name="configblog_article_count" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_article_count" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-catalog-limit"><span data-toggle="tooltip" title="{{ help_article_limit }}">{{ entry_article_limit }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_article_limit" value="{{ configblog_article_limit }}" placeholder="{{ entry_article_limit }}" id="input-catalog-limit" class="form-control" />
|
||||
{% if error_article_limit %}
|
||||
<div class="text-danger">{{ error_article_limit }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-list-description-limit"><span data-toggle="tooltip" title="{{ help_article_description_length }}">{{ entry_article_description_length }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_article_description_length" value="{{ configblog_article_description_length }}" placeholder="{{ entry_article_description_length }}" id="input-list-description-limit" class="form-control" />
|
||||
{% if error_article_description_length %}
|
||||
<div class="text-danger">{{ error_article_description_length }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-admin-limit"><span data-toggle="tooltip" title="{{ help_limit_admin }}">{{ entry_limit_admin }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="configblog_limit_admin" value="{{ configblog_limit_admin }}" placeholder="{{ entry_limit_admin }}" id="input-admin-limit" class="form-control" />
|
||||
{% if error_limit_admin %}
|
||||
<div class="text-danger">{{ error_limit_admin }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_blog_menu }}">{{ entry_blog_menu }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_blog_menu %}
|
||||
<input type="radio" name="configblog_blog_menu" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_blog_menu" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_blog_menu %}
|
||||
<input type="radio" name="configblog_blog_menu" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_blog_menu" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_article_download }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_article_download %}
|
||||
<input type="radio" name="configblog_article_download" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_article_download" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_article_download %}
|
||||
<input type="radio" name="configblog_article_download" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_article_download" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_review }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_review }}">{{ entry_review }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_review_status %}
|
||||
<input type="radio" name="configblog_review_status" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_status" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_review_status %}
|
||||
<input type="radio" name="configblog_review_status" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_status" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_review_guest }}">{{ entry_review_guest }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_review_guest %}
|
||||
<input type="radio" name="configblog_review_guest" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_guest" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_review_guest %}
|
||||
<input type="radio" name="configblog_review_guest" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_guest" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_review_mail }}">{{ entry_review_mail }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if configblog_review_mail %}
|
||||
<input type="radio" name="configblog_review_mail" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_mail" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not configblog_review_mail %}
|
||||
<input type="radio" name="configblog_review_mail" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="configblog_review_mail" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-image">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-image-category-width">{{ entry_image_category }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_category_width" value="{{ configblog_image_category_width }}" placeholder="{{ entry_width }}" id="input-image-category-width" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_category_height" value="{{ configblog_image_category_height }}" placeholder="{{ entry_height }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% if error_image_category %}
|
||||
<div class="text-danger">{{ error_image_category }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-image-article-width">{{ entry_image_article }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_article_width" value="{{ configblog_image_article_width }}" placeholder="{{ entry_width }}" id="input-image-article-width" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_article_height" value="{{ configblog_image_article_height }}" placeholder="{{ entry_height }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% if error_image_article %}
|
||||
<div class="text-danger">{{ error_image_article }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-image-related">{{ entry_image_related }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_related_width" value="{{ configblog_image_related_width }}" placeholder="{{ entry_width }}" id="input-image-related" class="form-control" />
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="configblog_image_related_height" value="{{ configblog_image_related_height }}" placeholder="{{ entry_height }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% if error_image_related %}
|
||||
<div class="text-danger">{{ error_image_related }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,69 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-attribute" 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">×</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-attribute" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="attribute_description[{{ language.language_id }}][name]" value="{{ attribute_description[language.language_id] ? attribute_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-attribute-group">{{ entry_attribute_group }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="attribute_group_id" id="input-attribute-group" class="form-control">
|
||||
<option value="0"></option>
|
||||
{% for attribute_group in attribute_groups %}
|
||||
{% if attribute_group.attribute_group_id == attribute_group_id %}
|
||||
<option value="{{ attribute_group.attribute_group_id }}" selected="selected">{{ attribute_group.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ attribute_group.attribute_group_id }}">{{ attribute_group.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_attribute_group %}
|
||||
<div class="text-danger">{{ error_attribute_group }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,52 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-attribute-group" 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">×</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-attribute-group" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="attribute_group_description[{{ language.language_id }}][name]" value="{{ attribute_group_description[language.language_id] ? attribute_group_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-attribute-group').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">×</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">×</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-attribute-group">
|
||||
<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 == 'agd.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'ag.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if attribute_groups %}
|
||||
{% for attribute_group in attribute_groups %}
|
||||
<tr>
|
||||
<td class="text-center">{% if attribute_group.attribute_group_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ attribute_group.attribute_group_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ attribute_group.attribute_group_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ attribute_group.name }}</td>
|
||||
<td class="text-right">{{ attribute_group.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ attribute_group.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="4">{{ 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,88 @@
|
||||
{{ 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-attribute').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">×</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">×</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-attribute">
|
||||
<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 == 'ad.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 == 'attribute_group' %}
|
||||
<a href="{{ sort_attribute_group }}" class="{{ order|lower }}">{{ column_attribute_group }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_attribute_group }}">{{ column_attribute_group }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'a.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if attributes %}
|
||||
{% for attribute in attributes %}
|
||||
<tr>
|
||||
<td class="text-center">{% if attribute.attribute_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ attribute.attribute_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ attribute.attribute_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ attribute.name }}</td>
|
||||
<td class="text-left">{{ attribute.attribute_group }}</td>
|
||||
<td class="text-right">{{ attribute.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ attribute.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="5">{{ 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,410 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-category" 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">×</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-category" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
|
||||
<li><a href="#tab-related" data-toggle="tab">{{ tab_related }}</a></li>
|
||||
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name{{ language.language_id }}">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][name]" value="{{ category_description[language.language_id] ? category_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name{{ language.language_id }}" class="form-control" />
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][meta_h1]" value="{{ category_description[language.language_id] ? category_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title{{ language.language_id }}">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="category_description[{{ language.language_id }}][meta_title]" value="{{ category_description[language.language_id] ? category_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description{{ language.language_id }}">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language.language_id }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language.language_id }}">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language.language_id }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="category_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-parent">{{ entry_parent }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="path" value="{{ path }}" placeholder="{{ entry_parent }}" id="input-parent" class="form-control" />
|
||||
<input type="hidden" name="parent_id" value="{{ parent_id }}" />
|
||||
{% if error_parent %}
|
||||
<div class="text-danger">{{ error_parent }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-filter"><span data-toggle="tooltip" title="{{ help_filter }}">{{ entry_filter }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="filter" value="" placeholder="{{ entry_filter }}" id="input-filter" class="form-control" />
|
||||
<div id="category-filter" class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for category_filter in category_filters %}
|
||||
<div id="category-filter{{ category_filter.filter_id }}"><i class="fa fa-minus-circle"></i> {{ category_filter.name }}
|
||||
<input type="hidden" name="category_filter[]" value="{{ category_filter.filter_id }}" />
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if store.store_id in category_store %}
|
||||
<input type="checkbox" name="category_store[]" value="{{ store.store_id }}" checked="checked" />
|
||||
{{ store.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="category_store[]" value="{{ store.store_id }}" />
|
||||
{{ store.name }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-top"><span data-toggle="tooltip" title="{{ help_top }}">{{ entry_top }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
{% if top %}
|
||||
<input type="checkbox" name="top" value="1" checked="checked" id="input-top" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="top" value="1" id="input-top" />
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-column"><span data-toggle="tooltip" title="{{ help_column }}">{{ entry_column }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="column" value="{{ column }}" placeholder="{{ entry_column }}" id="input-column" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" 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>
|
||||
<div class="tab-pane" id="tab-seo">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="category_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if category_seo_url[store.store_id][language.language_id] %}{{ category_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_keyword[store.store_id][language.language_id] %}
|
||||
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noindex" id="input-noindex" class="form-control">
|
||||
{% if noindex %}
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-related">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-product-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related_wb }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="product_related_input" value="" placeholder="{{ entry_related_wb }}" id="input-product-related" class="form-control" />
|
||||
<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for product_related in product_related %}
|
||||
<div id="product-related{{ product_related.product_id }}"><i class="fa fa-minus-circle"></i> {{ product_related.name }}
|
||||
<input type="hidden" name="product_related[]" value="{{ product_related.product_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-article-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related_article }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_related_input" value="" placeholder="{{ entry_related_article }}" id="input-article-related" class="form-control" />
|
||||
<div id="article-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for article_related in article_related %}
|
||||
<div id="article-related{{ article_related.article_id }}"><i class="fa fa-minus-circle"></i> {{ article_related.name }}
|
||||
<input type="hidden" name="article_related[]" value="{{ article_related.article_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-design">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left"><select name="category_layout[{{ store.store_id }}]" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
{% if category_layout[store.store_id] and category_layout[store.store_id] == layout.layout_id %}
|
||||
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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"><!--
|
||||
$('input[name=\'path\']').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) {
|
||||
json.unshift({
|
||||
category_id: 0,
|
||||
name: '{{ text_none }}'
|
||||
});
|
||||
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['category_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'path\']').val(item['label']);
|
||||
$('input[name=\'parent_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'filter\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/filter/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['filter_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter\']').val('');
|
||||
|
||||
$('#category-filter' + item['value']).remove();
|
||||
|
||||
$('#category-filter').append('<div id="category-filter' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="category_filter[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#category-filter').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'product_related_input\']').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('');
|
||||
|
||||
$('#product-related' + item['value']).remove();
|
||||
|
||||
$('#product-related').append('<div id="product-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'article_related_input\']').autocomplete({
|
||||
source: function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/article/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['article_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(item) {
|
||||
$('input[name=\'product\']').val('');
|
||||
|
||||
$('#article-related' + item['value']).remove();
|
||||
|
||||
$('#article-related').append('<div id="article-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="article_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#article-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,97 @@
|
||||
{{ 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>
|
||||
<a href="{{ repair }}" data-toggle="tooltip" title="{{ button_rebuild }}" class="btn btn-default"><i class="fa fa-refresh"></i></a>
|
||||
<button type="submit" form="form-category" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-category" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" form="form-category" formaction="{{ delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-category').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">×</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">×</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-category">
|
||||
<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">{{ column_name }}</td>
|
||||
<td class="text-right">{{ column_sort_order }}</td>
|
||||
<td class="text-right">{% if sort == 'noindex' %}
|
||||
<a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_noindex }}">{{ column_noindex }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td class="text-center">{% if category.category_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ category.category_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ category.category_id }}" />
|
||||
{% endif %}</td>
|
||||
{% if category.href %}
|
||||
<td class="left">{{ category.indent }}<a href="{{ category.href }}">{{ category.name }}</a> <i class="fa fa-sort-desc"></i></td>
|
||||
{% else %}
|
||||
<td class="left">{{ category.indent }}{{ category.name }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right">{{ category.sort_order }}</td>
|
||||
<td class="text-right">{{ category.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ category.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ category.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="4">{{ 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>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
// IE and Edge fix!
|
||||
$('button[form=\'form-category\']').on('click', function(e) {
|
||||
$('#form-category').attr('action', $(this).attr('formaction'));
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,117 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-download" 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">×</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-download" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group"> <span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="download_description[{{ language.language_id }}][name]" value="{{ download_description[language.language_id] ? download_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-filename"><span data-toggle="tooltip" title="{{ help_filename }}">{{ entry_filename }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filename" value="{{ filename }}" placeholder="{{ entry_filename }}" id="input-filename" class="form-control" />
|
||||
<span class="input-group-btn">
|
||||
<button type="button" id="button-upload" data-loading-text="{{ text_loading }}" class="btn btn-primary"><i class="fa fa-upload"></i> {{ button_upload }}</button>
|
||||
</span> </div>
|
||||
{% if error_filename %}
|
||||
<div class="text-danger">{{ error_filename }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-mask"><span data-toggle="tooltip" title="{{ help_mask }}">{{ entry_mask }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="mask" value="{{ mask }}" placeholder="{{ entry_mask }}" id="input-mask" class="form-control" />
|
||||
{% if error_mask %}
|
||||
<div class="text-danger">{{ error_mask }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');
|
||||
|
||||
$('#form-upload input[name=\'file\']').trigger('click');
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/download/upload&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-upload').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-upload').button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('input[name=\'filename\']').val(json['filename']);
|
||||
$('input[name=\'mask\']').val(json['mask']);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-download').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">×</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">×</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-download">
|
||||
<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 == 'dd.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'd.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 downloads %}
|
||||
{% for download in downloads %}
|
||||
<tr>
|
||||
<td class="text-center">{% if download.download_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ download.download_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ download.download_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ download.name }}</td>
|
||||
<td class="text-right">{{ download.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ download.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="6">{{ 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,111 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-filter" 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">×</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-filter" class="form-horizontal">
|
||||
<fieldset id="option-value">
|
||||
<legend>{{ text_group }}</legend>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_group }}</label>
|
||||
<div class="col-sm-10"> {% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="filter_group_description[{{ language.language_id }}][name]" value="{{ filter_group_description[language.language_id] ? filter_group_description[language.language_id].name }}" placeholder="{{ entry_group }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_group[language.language_id] %}
|
||||
<div class="text-danger">{{ error_group[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="option-value">
|
||||
<legend>{{ text_value }}</legend>
|
||||
<table id="filter" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left required">{{ entry_name }}</td>
|
||||
<td class="text-right">{{ entry_sort_order }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% set filter_row = 0 %}
|
||||
{% for filter in filters %}
|
||||
<tr id="filter-row{{ filter_row }}">
|
||||
<td class="text-left" style="width: 70%;"><input type="hidden" name="filter[{{ filter_row }}][filter_id]" value="{{ filter.filter_id }}" />
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="filter[{{ filter_row }}][filter_description][{{ language.language_id }}][name]" value="{{ filter.filter_description[language.language_id] ? filter.filter_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_filter[filter_row][language.language_id] %}
|
||||
<div class="text-danger">{{ error_filter[filter_row][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
<td class="text-right"><input type="text" name="filter[{{ filter_row }}][sort_order]" value="{{ filter.sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" /></td>
|
||||
<td class="text-right"><button type="button" onclick="$('#filter-row{{ filter_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set filter_row = filter_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td class="text-right"><button type="button" onclick="addFilterRow();" data-toggle="tooltip" title="{{ button_filter_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
var filter_row = {{ filter_row }};
|
||||
|
||||
function addFilterRow() {
|
||||
html = '<tr id="filter-row' + filter_row + '">';
|
||||
html += ' <td class="text-left" style="width: 70%;"><input type="hidden" name="filter[' + filter_row + '][filter_id]" value="" />';
|
||||
{% for language in languages %}
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span><input type="text" name="filter[' + filter_row + '][filter_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_name }}" class="form-control" />';
|
||||
html += ' </div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right"><input type="text" name="filter[' + filter_row + '][sort_order]" value="" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" /></td>';
|
||||
html += ' <td class="text-right"><button type="button" onclick="$(\'#filter-row' + filter_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#filter tbody').append(html);
|
||||
|
||||
filter_row++;
|
||||
}
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-filter').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">×</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">×</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-filter">
|
||||
<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 == 'fgd.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_group }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_group }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'fg.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if filters %}
|
||||
{% for filter in filters %}
|
||||
<tr>
|
||||
<td class="text-center">{% if filter.filter_group_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ filter.filter_group_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ filter.filter_group_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ filter.name }}</td>
|
||||
<td class="text-right">{{ filter.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ filter.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="4">{{ 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,226 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-information" 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">×</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-information" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
|
||||
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-general">
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-title{{ language.language_id }}">{{ entry_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="information_description[{{ language.language_id }}][title]" value="{{ information_description[language.language_id] ? information_description[language.language_id].title }}" placeholder="{{ entry_title }}" id="input-title{{ language.language_id }}" class="form-control" />
|
||||
{% if error_title[language.language_id] %}
|
||||
<div class="text-danger">{{ error_title[language.language_id] }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="information_description[{{ language.language_id }}][meta_h1]" value="{{ information_description[language.language_id] ? information_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title{{ language.language_id }}">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="information_description[{{ language.language_id }}][meta_title]" value="{{ information_description[language.language_id] ? information_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description{{ language.language_id }}">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="information_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language.language_id }}" class="form-control">{{ information_description[language.language_id] ? information_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language.language_id }}">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="information_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language.language_id }}" class="form-control">{{ information_description[language.language_id] ? information_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="information_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ information_description[language.language_id] ? information_description[language.language_id].description }}</textarea>
|
||||
{% if error_description[language.language_id] %}
|
||||
<div class="text-danger">{{ error_description[language.language_id] }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;"> {% for store in stores %}
|
||||
<div class="checkbox">
|
||||
<label> {% if store.store_id in information_store %}
|
||||
<input type="checkbox" name="information_store[]" value="{{ store.store_id }}" checked="checked" />
|
||||
{{ store.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="information_store[]" value="{{ store.store_id }}" />
|
||||
{{ store.name }}
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-bottom"><span data-toggle="tooltip" title="{{ help_bottom }}">{{ entry_bottom }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>{% if bottom %}
|
||||
<input type="checkbox" name="bottom" value="1" checked="checked" id="input-bottom" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="bottom" value="1" id="input-bottom" />
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-seo">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="information_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if information_seo_url[store.store_id][language.language_id] %}{{ information_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_keyword[store.store_id][language.language_id] %}
|
||||
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noindex" id="input-noindex" class="form-control">
|
||||
{% if noindex %}
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-design">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left"><select name="information_layout[{{ store.store_id }}]" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
{% if information_layout[store.store_id] and information_layout[store.store_id] == layout.layout_id %}
|
||||
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</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"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,93 @@
|
||||
{{ 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="submit" form="form-information" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-information" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-information').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">×</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">×</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-information">
|
||||
<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 == 'id.title' %}
|
||||
<a href="{{ sort_title }}" class="{{ order|lower }}">{{ column_title }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_title }}">{{ column_title }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'i.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'i.noindex' %}
|
||||
<a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_noindex }}">{{ column_noindex }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if informations %}
|
||||
{% for information in informations %}
|
||||
<tr>
|
||||
<td class="text-center">{% if information.information_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ information.information_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ information.information_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ information.title }}</td>
|
||||
<td class="text-right">{{ information.sort_order }}</td>
|
||||
<td class="text-right">{{ information.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ information.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ information.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="4">{{ 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,284 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-manufacturer" 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">×</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-manufacturer" class="form-horizontal">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-general" data-toggle="tab">{{ tab_general }}</a></li>
|
||||
<li><a href="#tab-data" data-toggle="tab">{{ tab_data }}</a></li>
|
||||
<li><a href="#tab-seo" data-toggle="tab">{{ tab_seo }}</a></li>
|
||||
<li><a href="#tab-related" data-toggle="tab">{{ tab_related }}</a></li>
|
||||
<li><a href="#tab-design" data-toggle="tab">{{ tab_design }}</a></li>
|
||||
</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>
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-h1{{ language.language_id }}">{{ entry_meta_h1 }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="manufacturer_description[{{ language.language_id }}][meta_h1]" value="{{ manufacturer_description[language.language_id] ? manufacturer_description[language.language_id].meta_h1 }}" placeholder="{{ entry_meta_h1 }}" id="input-meta-h1{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-title{{ language.language_id }}">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="manufacturer_description[{{ language.language_id }}][meta_title]" value="{{ manufacturer_description[language.language_id] ? manufacturer_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title{{ language.language_id }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-description{{ language.language_id }}">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="manufacturer_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description{{ language.language_id }}" class="form-control">{{ manufacturer_description[language.language_id] ? manufacturer_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-meta-keyword{{ language.language_id }}">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="manufacturer_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword{{ language.language_id }}" class="form-control">{{ manufacturer_description[language.language_id] ? manufacturer_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="manufacturer_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ manufacturer_description[language.language_id] ? manufacturer_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-data">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="well well-sm" style="height: 150px; overflow: auto;"> {% for store in stores %}
|
||||
<div class="checkbox">
|
||||
<label>{% if store.store_id in manufacturer_store %}
|
||||
<input type="checkbox" name="manufacturer_store[]" value="{{ store.store_id }}" checked="checked" />
|
||||
{{ store.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="manufacturer_store[]" value="{{ store.store_id }}" />
|
||||
{{ store.name }}
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-image">{{ entry_image }}</label>
|
||||
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-seo">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left">{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="manufacturer_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if manufacturer_seo_url[store.store_id][language.language_id] %}{{ manufacturer_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_keyword[store.store_id][language.language_id] %}
|
||||
<div class="text-danger">{{ error_keyword[store.store_id][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="noindex" id="input-noindex" class="form-control">
|
||||
{% if noindex %}
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-related">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-product-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related_mn }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="product_related_input" value="" placeholder="{{ entry_related_mn }}" id="input-product-related" class="form-control" />
|
||||
<div id="product-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for product_related in product_related %}
|
||||
<div id="product-related{{ product_related.product_id }}"><i class="fa fa-minus-circle"></i> {{ product_related.name }}
|
||||
<input type="hidden" name="product_related[]" value="{{ product_related.product_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-article-related"><span data-toggle="tooltip" title="{{ help_related }}">{{ entry_related_article }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_related_input" value="" placeholder="{{ entry_related_article }}" id="input-article-related" class="form-control" />
|
||||
<div id="article-related" class="well well-sm" style="height: 150px; overflow: auto;"> {% for article_related in article_related %}
|
||||
<div id="article-related{{ article_related.article_id }}"><i class="fa fa-minus-circle"></i> {{ article_related.name }}
|
||||
<input type="hidden" name="article_related[]" value="{{ article_related.article_id }}" />
|
||||
</div>
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-design">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-left">{{ store.name }}</td>
|
||||
<td class="text-left"><select name="manufacturer_layout[{{ store.store_id }}]" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
{% if manufacturer_layout[store.store_id] and manufacturer_layout[store.store_id] == layout.layout_id %}
|
||||
<option value="{{ layout.layout_id }}" selected="selected">{{ layout.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ layout.layout_id }}">{{ layout.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'product_related_input\']').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('');
|
||||
|
||||
$('#product-related' + item['value']).remove();
|
||||
|
||||
$('#product-related').append('<div id="product-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="product_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#product-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'article_related_input\']').autocomplete({
|
||||
source: function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=blog/article/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['article_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(item) {
|
||||
$('input[name=\'product\']').val('');
|
||||
|
||||
$('#article-related' + item['value']).remove();
|
||||
|
||||
$('#article-related').append('<div id="article-related' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="article_related[]" value="' + item['value'] + '" /></div>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#article-related').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,91 @@
|
||||
{{ 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-manufacturer').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">×</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">×</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-manufacturer">
|
||||
<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-right">{% if sort == 'sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'noindex' %}
|
||||
<a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_noindex }}">{{ column_noindex }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if manufacturers %}
|
||||
{% for manufacturer in manufacturers %}
|
||||
<tr>
|
||||
<td class="text-center">{% if manufacturer.manufacturer_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ manufacturer.name }}</td>
|
||||
<td class="text-right">{{ manufacturer.sort_order }}</td>
|
||||
<td class="text-right">{{ manufacturer.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ manufacturer.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ manufacturer.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="4">{{ 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,257 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-option" 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">×</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-option" class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_option }}</legend>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10"> {% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="option_description[{{ language.language_id }}][name]" value="{{ option_description[language.language_id] ? option_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-type">{{ entry_type }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="type" id="input-type" class="form-control">
|
||||
<optgroup label="{{ text_choose }}">
|
||||
{% if type == 'select' %}
|
||||
|
||||
|
||||
<option value="select" selected="selected">{{ text_select }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="select">{{ text_select }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'radio' %}
|
||||
|
||||
|
||||
<option value="radio" selected="selected">{{ text_radio }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="radio">{{ text_radio }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'checkbox' %}
|
||||
|
||||
|
||||
<option value="checkbox" selected="selected">{{ text_checkbox }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="checkbox">{{ text_checkbox }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_input }}">
|
||||
{% if type == 'text' %}
|
||||
|
||||
|
||||
<option value="text" selected="selected">{{ text_text }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="text">{{ text_text }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'textarea' %}
|
||||
|
||||
|
||||
<option value="textarea" selected="selected">{{ text_textarea }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="textarea">{{ text_textarea }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_file }}">
|
||||
{% if type == 'file' %}
|
||||
|
||||
|
||||
<option value="file" selected="selected">{{ text_file }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="file">{{ text_file }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_date }}">
|
||||
{% if type == 'date' %}
|
||||
|
||||
|
||||
<option value="date" selected="selected">{{ text_date }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="date">{{ text_date }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'time' %}
|
||||
|
||||
|
||||
<option value="time" selected="selected">{{ text_time }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="time">{{ text_time }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'datetime' %}
|
||||
|
||||
|
||||
<option value="datetime" selected="selected">{{ text_datetime }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="datetime">{{ text_datetime }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_value }}</legend>
|
||||
<table id="option-value" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left required">{{ entry_option_value }}</td>
|
||||
<td class="text-center">{{ entry_image }}</td>
|
||||
<td class="text-right">{{ entry_sort_order }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% set option_value_row = 0 %}
|
||||
{% for option_value in option_values %}
|
||||
<tr id="option-value-row{{ option_value_row }}">
|
||||
<td class="text-center"><input type="hidden" name="option_value[{{ option_value_row }}][option_value_id]" value="{{ option_value.option_value_id }}" />
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="option_value[{{ option_value_row }}][option_value_description][{{ language.language_id }}][name]" value="{{ option_value.option_value_description[language.language_id] ? option_value.option_value_description[language.language_id].name }}" placeholder="{{ entry_option_value }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_option_value[option_value_row][language.language_id] %}
|
||||
<div class="text-danger">{{ error_option_value[option_value_row][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
<td class="text-left"><a href="" id="thumb-image{{ option_value_row }}" data-toggle="image" class="img-thumbnail"><img src="{{ option_value.thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="option_value[{{ option_value_row }}][image]" value="{{ option_value.image }}" id="input-image{{ option_value_row }}" /></td>
|
||||
<td class="text-right"><input type="text" name="option_value[{{ option_value_row }}][sort_order]" value="{{ option_value.sort_order }}" class="form-control" /></td>
|
||||
<td class="text-right"><button type="button" onclick="$('#option-value-row{{ option_value_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set option_value_row = option_value_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td class="text-right"><button type="button" onclick="addOptionValue();" data-toggle="tooltip" title="{{ button_option_value_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('select[name=\'type\']').on('change', function() {
|
||||
if (this.value == 'select' || this.value == 'radio' || this.value == 'checkbox' || this.value == 'image') {
|
||||
$('#option-value').parent().show();
|
||||
} else {
|
||||
$('#option-value').parent().hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=\'type\']').trigger('change');
|
||||
|
||||
var option_value_row = {{ option_value_row }};
|
||||
|
||||
function addOptionValue() {
|
||||
html = '<tr id="option-value-row' + option_value_row + '">';
|
||||
html += ' <td class="text-left"><input type="hidden" name="option_value[' + option_value_row + '][option_value_id]" value="" />';
|
||||
{% for language in languages %}
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span><input type="text" name="option_value[' + option_value_row + '][option_value_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_option_value }}" class="form-control" />';
|
||||
html += ' </div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-center"><a href="" id="thumb-image' + option_value_row + '" data-toggle="image" class="img-thumbnail"><img src="{{ placeholder }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a><input type="hidden" name="option_value[' + option_value_row + '][image]" value="" id="input-image' + option_value_row + '" /></td>';
|
||||
html += ' <td class="text-right"><input type="text" name="option_value[' + option_value_row + '][sort_order]" value="" placeholder="{{ entry_sort_order }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-right"><button type="button" onclick="$(\'#option-value-row' + option_value_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#option-value tbody').append(html);
|
||||
|
||||
option_value_row++;
|
||||
}
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-option').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">×</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">×</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-option">
|
||||
<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 == 'od.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'o.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if options %}
|
||||
{% for option in options %}
|
||||
<tr>
|
||||
<td class="text-center">{% if option.option_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ option.option_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ option.option_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ option.name }}</td>
|
||||
<td class="text-right">{{ option.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ option.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="4">{{ 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 }}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,515 @@
|
||||
{{ 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-product').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="submit" form="form-product" formaction="{{ copy }}" data-toggle="tooltip" title="{{ button_copy }}" class="btn btn-default"><i class="fa fa-copy"></i></button>
|
||||
<button type="submit" form="form-product" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-product" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" form="form-product" formaction="{{ delete }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-product').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-product" 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>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-name" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-model">{{ entry_model }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_model" value="{{ filter_model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-model" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-category-name">{{ entry_category }}</label> <label class="control-label pull-right" for="input-sub-category">{{ entry_sub_category }} <input type="checkbox" class="checkbox-inline" name="filter_sub_category" id="input-sub-category" class="form-control"{{ filter_sub_category}} {% if filter_sub_category %} checked="checked" {% endif %} /></label>
|
||||
<div class="clearfix"></div>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_category_name" value="{{ filter_category_name }}" placeholder="{{ entry_category }}" id="input-category-name" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-category-name" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="filter_category" value="{{ filter_category }}" id="input-category" class="form-control" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-manufacturer-name">{{ entry_manufacturer }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_manufacturer_name" value="{{ filter_manufacturer_name }}" placeholder="{{ entry_manufacturer }}" id="input-manufacturer" class="form-control" />
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-manufacturer" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<input type="hidden" name="filter_manufacturer_id" value="{{ filter_manufacturer_id }}" id="input-manufacturer-id" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-manufacturer-name">{{ entry_manufacturer }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_manufacturer_name" value="{{ filter_manufacturer_name }}" placeholder="{{ entry_manufacturer }}" id="input-manufacturer-name" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-manufacturer-name" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="filter_manufacturer" value="{{ filter_manufacturer_name }}" id="input-manufacturer" class="form-control" />
|
||||
</div>
|
||||
-->
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-price">{{ entry_price }}</label>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_price_min" value="{{ filter_price_min }}" placeholder="{{ entry_min }}" id="input-price-min" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-price-min" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 pull-right">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_price_max" value="{{ filter_price_max }}" placeholder="{{ entry_max }}" id="input-price-max" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-price-max" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-quantity">{{ entry_quantity }}</label>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_quantity_min" value="{{ filter_quantity_min }}" placeholder="{{ entry_min }}" id="input-quantity-min" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-quantity-min" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 pull-right">
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_quantity_max" value="{{ filter_quantity_max }}" placeholder="{{ entry_max }}" id="input-quantity-max" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-clear-input-quantity-max" class="btn btn-default"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% if filter_status == '1' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-noindex">{{ entry_noindex }}</label>
|
||||
<select name="filter_noindex" id="input-noindex" class="form-control">
|
||||
<option value=""></option>
|
||||
{% if filter_noindex == '1' %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
{% if filter_noindex == '0' %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</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>
|
||||
<button type="button" id="button-clear-filter" class="btn btn-default"><i class="fa fa-times"></i><span class="hidden-sm"> {{ button_clear }}</span></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-product">
|
||||
<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-center">{{ column_image }}</td>
|
||||
<td class="text-left">{% if sort == 'pd.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 == 'p.model' %} <a href="{{ sort_model }}" class="{{ order|lower }}">{{ column_model }}</a> {% else %} <a href="{{ sort_model }}">{{ column_model }}</a> {% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'p.price' %} <a href="{{ sort_price }}" class="{{ order|lower }}">{{ column_price }}</a> {% else %} <a href="{{ sort_price }}">{{ column_price }}</a> {% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'p.quantity' %} <a href="{{ sort_quantity }}" class="{{ order|lower }}">{{ column_quantity }}</a> {% else %} <a href="{{ sort_quantity }}">{{ column_quantity }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'p.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'p.noindex' %} <a href="{{ sort_noindex }}" class="{{ order|lower }}">{{ column_noindex }}</a> {% else %} <a href="{{ sort_noindex }}">{{ column_noindex }}</a> {% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if products %}
|
||||
{% for product in products %}
|
||||
<tr>
|
||||
<td class="text-center">{% if product.product_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ product.product_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ product.product_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-center">{% if product.image %} <img src="{{ product.image }}" alt="{{ product.name }}" class="img-thumbnail" /> {% else %} <span class="img-thumbnail list"><i class="fa fa-camera fa-2x"></i></span> {% endif %}</td>
|
||||
<td class="text-left">{{ product.name }}</td>
|
||||
<td class="text-left">{{ product.model }}</td>
|
||||
<td class="text-right">{% if product.special %} <span style="text-decoration: line-through;">{{ product.price }}</span><br/>
|
||||
<div class="text-danger">{{ product.special }}</div>
|
||||
{% else %}
|
||||
{{ product.price }}
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if product.quantity <= 0 %} <span class="label label-warning">{{ product.quantity }}</span> {% elseif product.quantity <= 5 %} <span class="label label-danger">{{ product.quantity }}</span> {% else %} <span class="label label-success">{{ product.quantity }}</span> {% endif %}</td>
|
||||
<td class="text-left">{{ product.status }}</td>
|
||||
<td class="text-left">{{ product.noindex }}</td>
|
||||
<td class="text-right">
|
||||
<a target="_blank" href="{{ product.href_shop }}" data-toggle="tooltip" title="{{ button_shop }}" class="btn btn-success"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{ product.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="9">{{ 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() {
|
||||
var url = '';
|
||||
|
||||
var filter_name = $('input[name=\'filter_name\']').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
var filter_model = $('input[name=\'filter_model\']').val();
|
||||
|
||||
if (filter_model) {
|
||||
url += '&filter_model=' + encodeURIComponent(filter_model);
|
||||
}
|
||||
|
||||
var filter_price_min = $('input[name=\'filter_price_min\']').val();
|
||||
if (filter_price_min) {
|
||||
url += '&filter_price_min=' + encodeURIComponent(filter_price_min);
|
||||
}
|
||||
|
||||
var filter_price_max = $('input[name=\'filter_price_max\']').val();
|
||||
if (filter_price_max) {
|
||||
url += '&filter_price_max=' + encodeURIComponent(filter_price_max);
|
||||
}
|
||||
|
||||
var filter_quantity_min = $('input[name=\'filter_quantity_min\']').val();
|
||||
if (filter_quantity_min) {
|
||||
url += '&filter_quantity_min=' + encodeURIComponent(filter_quantity_min);
|
||||
}
|
||||
|
||||
var filter_quantity_max = $('input[name=\'filter_quantity_max\']').val();
|
||||
if (filter_quantity_max) {
|
||||
url += '&filter_quantity_max=' + encodeURIComponent(filter_quantity_max);
|
||||
}
|
||||
|
||||
var filter_status = $('select[name=\'filter_status\']').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
|
||||
var filter_category = $('input[name=\'filter_category\']').val();
|
||||
if (filter_category) {
|
||||
url += '&filter_category=' + encodeURIComponent(filter_category);
|
||||
}
|
||||
|
||||
var filter_sub_category = $('input[name=\'filter_sub_category\']');
|
||||
if (filter_sub_category.prop('checked')) {
|
||||
url += '&filter_sub_category';
|
||||
}
|
||||
|
||||
var filter_manufacturer_id = $('input[name=\'filter_manufacturer_id\']').val();
|
||||
if (filter_manufacturer_id) {
|
||||
url += '&filter_manufacturer_id=' + encodeURIComponent(filter_manufacturer_id);
|
||||
}
|
||||
|
||||
var filter_noindex = $('select[name=\'filter_noindex\']').val();
|
||||
if (filter_noindex !== '') {
|
||||
url += '&filter_noindex=' + encodeURIComponent(filter_noindex);
|
||||
}
|
||||
|
||||
location = 'index.php?route=catalog/product&user_token={{ user_token }}' + url;
|
||||
});
|
||||
$('#button-clear-filter').on('click', function() {
|
||||
location = 'index.php?route=catalog/product&user_token={{ user_token }}';
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
// IE and Edge fix!
|
||||
$('button[form=\'form-product\']').on('click', function(e) {
|
||||
$('#form-product').attr('action', $(this).attr('formaction'));
|
||||
});
|
||||
|
||||
$('input[name=\'filter_name\']').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=\'filter_name\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
$('#button-clear-input-name').on('click',function(){
|
||||
$('input[name=\'filter_name\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
|
||||
$('input[name=\'filter_model\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_model=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['model'],
|
||||
value: item['product_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_model\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
$('#button-clear-input-model').on('click',function(){
|
||||
$('input[name=\'filter_model\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('input[name=\'filter_category_name\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
if ($('input[name=\'filter_category_name\']').val().length==0) {
|
||||
$('input[name=\'filter_category\']').val(null);
|
||||
}
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
if (json.length>0) {
|
||||
json.unshift({'category_id':null,'name':'{{ text_all }}'},{'category_id':0,'name':'{{ text_none_category }}'});
|
||||
}
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['category_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
if (item['label']!='{{ text_all }}') {
|
||||
$('input[name=\'filter_category_name\']').val(item['label']);
|
||||
} else {
|
||||
$('input[name=\'filter_category_name\']').val('');
|
||||
}
|
||||
$('input[name=\'filter_category\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
$('#button-clear-input-category-name').on('click',function(){
|
||||
$('input[name=\'filter_category_name\']').val('');
|
||||
$('input[name=\'filter_category\']').val(null);
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
|
||||
// Manufacturer
|
||||
$('input[name=\'filter_manufacturer_name\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
if ($('input[name=\'filter_manufacturer_name\']').val().length==0) {
|
||||
$('input[name=\'filter_manufacturer_id\']').val(null);
|
||||
}
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/manufacturer/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
if (json.length>0) {
|
||||
json.unshift({'manufacturer_id':null,'name':'{{ text_all }}'},{'manufacturer_id':0,'name':'{{ text_none_manufacturer }}'});
|
||||
}
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['manufacturer_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_manufacturer_name\']').val(item['label']);
|
||||
$('input[name=\'filter_manufacturer_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-clear-input-manufacturer').on('click',function(){
|
||||
$('input[name=\'filter_manufacturer_name\']').val('');
|
||||
$('input[name=\'filter_manufacturer_id\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('#button-clear-input-price-min').on('click',function(){
|
||||
$('input[name=\'filter_price_min\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('#button-clear-input-price-max').on('click',function(){
|
||||
$('input[name=\'filter_price_max\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('#button-clear-input-quantity-min').on('click',function(){
|
||||
$('input[name=\'filter_quantity_min\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('#button-clear-input-quantity-max').on('click',function(){
|
||||
$('input[name=\'filter_quantity_max\']').val('');
|
||||
$('#button-filter').trigger('click');
|
||||
});
|
||||
$('input[name=\'filter_name\'], input[name=\'filter_model\'], input[name=\'filter_category_name\'], input[name=\'filter_manufacturer_id\'], input[name=\'filter_price_min\'], input[name=\'filter_price_max\'], input[name=\'filter_quantity_min\'], input[name=\'filter_quantity_max\']').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('#button-filter').trigger('click');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,153 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-recurring" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="alert alert-info">{{ text_recurring }}</div>
|
||||
<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-recurring" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="recurring_description[{{ language.language_id }}][name]" value="{{ recurring_description[language.language_id] ? recurring_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>{{ text_profile }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-price">{{ entry_price }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="price" value="{{ price }}" placeholder="{{ entry_price }}" id="input-price" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-duration">{{ entry_duration }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="duration" value="{{ duration }}" placeholder="{{ entry_duration }}" id="input-duration" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-cycle">{{ entry_cycle }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="cycle" value="{{ cycle }}" placeholder="{{ entry_cycle }}" id="input-cycle" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-frequency">{{ entry_frequency }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="frequency" id="input-frequency" class="form-control">
|
||||
{% for frequency_option in frequencies %}
|
||||
{% if frequency == frequency_option.value %}
|
||||
<option value="{{ frequency_option.value }}" selected="selected">{{ frequency_option.text }}</option>
|
||||
{% else %}
|
||||
<option value="{{ frequency_option.value }}">{{ frequency_option.text }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_trial }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-trial-price">{{ entry_trial_price }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="trial_price" value="{{ trial_price }}" placeholder="{{ entry_trial_price }}" id="input-trial-price" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-trial-duration">{{ entry_trial_duration }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="trial_duration" value="{{ trial_duration }}" placeholder="{{ entry_trial_duration }}" id="input-trial-duration" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-trial-cycle">{{ entry_trial_cycle }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="trial_cycle" value="{{ trial_cycle }}" placeholder="{{ entry_trial_cycle }}" id="input-trial-cycle" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-trial-frequency">{{ entry_trial_frequency }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="trial_frequency" id="input-trial-frequency" class="form-control">
|
||||
{% for frequency_option in frequencies %}
|
||||
{% if trial_frequency == frequency_option.value %}
|
||||
<option value="{{ frequency_option.value }}" selected="selected">{{ frequency_option.text }}</option>
|
||||
{% else %}
|
||||
<option value="{{ frequency_option.value }}">{{ frequency_option.text }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-trial-status">{{ entry_trial_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="trial_status" id="input-trial-status" class="form-control">
|
||||
{% if trial_status %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,83 @@
|
||||
{{ 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="submit" form="form-recurring" formaction="{{ copy }}" data-toggle="tooltip" title="{{ button_copy }}" class="btn btn-default"><i class="fa fa-copy"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-recurring').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">×</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">×</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-recurring">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" width="1"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);" /></td>
|
||||
<td class="text-left">{% if sort == 'pd.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'p.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if recurrings %}
|
||||
{% for recurring in recurrings %}
|
||||
<tr>
|
||||
<td class="text-center">{% if recurring.recurring_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ recurring.recurring_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ recurring.recurring_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ recurring.name }}</td>
|
||||
<td class="text-right">{{ recurring.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ recurring.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="4">{{ 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,157 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-review" 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">×</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-review" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-author">{{ entry_author }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
|
||||
{% if error_author %}
|
||||
<div class="text-danger">{{ error_author }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<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="{{ product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
|
||||
<input type="hidden" name="product_id" value="{{ product_id }}" />
|
||||
{% if error_product %}
|
||||
<div class="text-danger">{{ error_product }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-text">{{ entry_text }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="text" cols="60" rows="8" placeholder="{{ entry_text }}" id="input-text" class="form-control">{{ text }}</textarea>
|
||||
{% if error_text %}
|
||||
<div class="text-danger">{{ error_text }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-name">{{ entry_rating }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline"> {% if rating == 1 %}
|
||||
<input type="radio" name="rating" value="1" checked="checked" />
|
||||
1
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="1" />
|
||||
1
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 2 %}
|
||||
<input type="radio" name="rating" value="2" checked="checked" />
|
||||
2
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="2" />
|
||||
2
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 3 %}
|
||||
<input type="radio" name="rating" value="3" checked="checked" />
|
||||
3
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="3" />
|
||||
3
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 4 %}
|
||||
<input type="radio" name="rating" value="4" checked="checked" />
|
||||
4
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="4" />
|
||||
4
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if rating == 5 %}
|
||||
<input type="radio" name="rating" value="5" checked="checked" />
|
||||
5
|
||||
{% else %}
|
||||
<input type="radio" name="rating" value="5" />
|
||||
5
|
||||
{% endif %} </label>
|
||||
{% if error_rating %}
|
||||
<div class="text-danger">{{ error_rating }}</div>
|
||||
{% endif %} </div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-date-added">{{ entry_date_added }}</label>
|
||||
<div class="col-sm-3">
|
||||
<div class="input-group datetime">
|
||||
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" data-date-format="YYYY-MM-DD HH:mm:ss" id="input-date-added" 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-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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('.datetime').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: true,
|
||||
pickTime: true
|
||||
});
|
||||
//--></script>
|
||||
<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(item['label']);
|
||||
$('input[name=\'product_id\']').val(item['value']);
|
||||
}
|
||||
});
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,243 @@
|
||||
{{ 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-review').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="submit" form="form-review" formaction="{{ enabled }}" data-toggle="tooltip" title="{{ button_enable }}" class="btn btn-default"><i class="fa fa-play"></i></button>
|
||||
<button type="submit" form="form-review" formaction="{{ disabled }}" data-toggle="tooltip" title="{{ button_disable }}" class="btn btn-default"><i class="fa fa-pause"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger" onclick="confirm('{{ text_confirm }}') ? $('#form-review').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-review" 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-product">{{ entry_product }}</label>
|
||||
<input type="text" name="filter_product" value="{{ filter_product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-author">{{ entry_author }}</label>
|
||||
<input type="text" name="filter_author" value="{{ filter_author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% if filter_status == '1' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</select>
|
||||
</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" id="input-date-added" 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-review">
|
||||
<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 == 'pd.name' %} <a href="{{ sort_product }}" class="{{ order|lower }}">{{ column_product }}</a> {% else %} <a href="{{ sort_product }}">{{ column_product }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.author' %} <a href="{{ sort_author }}" class="{{ order|lower }}">{{ column_author }}</a> {% else %} <a href="{{ sort_author }}">{{ column_author }}</a> {% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'r.rating' %} <a href="{{ sort_rating }}" class="{{ order|lower }}">{{ column_rating }}</a> {% else %} <a href="{{ sort_rating }}">{{ column_rating }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.status' %} <a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a> {% else %} <a href="{{ sort_status }}">{{ column_status }}</a> {% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'r.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 reviews %}
|
||||
{% for review in reviews %}
|
||||
<tr>
|
||||
<td class="text-center">{% if review.review_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ review.review_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ review.review_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ review.name }}</td>
|
||||
<td class="text-left">{{ review.author }}</td>
|
||||
<td class="text-right">{{ review.rating }}</td>
|
||||
<td class="text-left">{{ review.status }}</td>
|
||||
<td class="text-left">{{ review.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ review.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="7">{{ 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=catalog/review&user_token={{ user_token }}';
|
||||
|
||||
var filter_product = $('input[name=\'filter_product\']').val();
|
||||
|
||||
if (filter_product) {
|
||||
url += '&filter_product=' + encodeURIComponent(filter_product);
|
||||
}
|
||||
|
||||
var filter_author = $('input[name=\'filter_author\']').val();
|
||||
|
||||
if (filter_author) {
|
||||
url += '&filter_author=' + encodeURIComponent(filter_author);
|
||||
}
|
||||
|
||||
var filter_status = $('select[name=\'filter_status\']').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
|
||||
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 }}
|
||||
@@ -0,0 +1,68 @@
|
||||
<nav id="column-left">
|
||||
<div id="navigation"><span class="fa fa-bars"></span> {{ text_navigation }}</div>
|
||||
<ul id="menu">
|
||||
{% set i = 0 %}
|
||||
{% for menu in menus %}
|
||||
<li id="{{ menu.id }}">
|
||||
{% if menu.href %}<a href="{{ menu.href }}"><i class="fa {{ menu.icon }} fw"></i> {{ menu.name }}</a>{% else %}<a href="#collapse{{ i }}" data-toggle="collapse" class="parent collapsed"><i class="fa {{ menu.icon }} fw"></i> {{ menu.name }}</a>{% endif %}
|
||||
{% if menu.children %}
|
||||
<ul id="collapse{{ i }}" class="collapse">
|
||||
{% set j = 0 %}
|
||||
{% for children_1 in menu.children %}
|
||||
<li>{% if children_1.href %}
|
||||
<a href="{{ children_1.href }}">{{ children_1.name }}</a>
|
||||
{% else %}
|
||||
<a href="#collapse{{ i }}-{{ j }}" data-toggle="collapse" class="parent collapsed">{{ children_1.name }}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if children_1.children %}
|
||||
<ul id="collapse{{ i }}-{{ j }}" class="collapse">
|
||||
{% set k = 0 %}
|
||||
{% for children_2 in children_1.children %}
|
||||
<li>{% if children_2.href %}
|
||||
<a href="{{ children_2.href }}">{{ children_2.name }}</a>
|
||||
{% else %}
|
||||
<a href="#collapse-{{ i }}-{{ j }}-{{ k }}" data-toggle="collapse" class="parent collapsed">{{ children_2.name }}</a>
|
||||
{% endif %}
|
||||
{% if children_2.children %}
|
||||
<ul id="collapse-{{ i }}-{{ j }}-{{ k }}" class="collapse">
|
||||
{% for children_3 in children_2.children %}
|
||||
<li><a href="{{ children_3.href }}">{{ children_3.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}</li>
|
||||
{% set k = k + 1 %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %} </li>
|
||||
{% set j = j + 1 %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% set i = i + 1 %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div id="stats">
|
||||
<ul>
|
||||
<li>
|
||||
<div>{{ text_complete_status }} <span class="pull-right">{{ complete_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ complete_status }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ complete_status }}%"> <span class="sr-only">{{ complete_status }}%</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>{{ text_processing_status }} <span class="pull-right">{{ processing_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{{ processing_status }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ processing_status }}%"> <span class="sr-only">{{ processing_status }}%</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>{{ text_other_status }} <span class="pull-right">{{ other_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{ other_status }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ other_status }}%"> <span class="sr-only">{{ other_status }}%</span></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,58 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="button" id="button-developer" title="{{ button_developer }}" data-loading-text="{{ text_loading }}" class="btn btn-info"><i class="fa fa-cog"></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_install %}
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close pull-right" data-dismiss="alert">×</button>
|
||||
<i class="fa fa-exclamation-circle"></i> {{ error_install }}</div>
|
||||
{% endif %}
|
||||
{% for row in rows %}
|
||||
<div class="row">{% for dashboard_1 in row %}
|
||||
{% set class = 'col-lg-%s %s'|format(dashboard_1.width, 'col-md-3 col-sm-6') %}
|
||||
{% for dashboard_2 in row %}
|
||||
{% if dashboard_2.width > 3 %}
|
||||
{% set class = 'col-lg-%s %s'|format(dashboard_1.width, 'col-md-12 col-sm-12') %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="{{ class }}">{{ dashboard_1.output }}</div>
|
||||
{% endfor %}</div>
|
||||
{% endfor %}</div>
|
||||
{{ security }}
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-developer').on('click', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer&user_token={{ user_token }}',
|
||||
dataType: 'html',
|
||||
beforeSend: function() {
|
||||
$('#button-developer').button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-developer').button('reset');
|
||||
},
|
||||
success: function(html) {
|
||||
$('#modal-developer').remove();
|
||||
|
||||
$('body').prepend('<div id="modal-developer" class="modal">' + html + '</div>');
|
||||
|
||||
$('#modal-developer').modal('show');
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,117 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><i class="fa fa-cog"></i> {{ heading_title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ column_component }}</td>
|
||||
<td style="width: 150px;">{{ entry_cache }}</td>
|
||||
<td class="text-right" style="width: 1px;">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>{{ entry_theme }}</td>
|
||||
<td ><div class="btn-group" data-toggle="buttons">{% if developer_theme %}
|
||||
<label class="btn btn-success active" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="1" autocomplete="off" {% if not eval %}disabled="disabled"{% endif %} checked/>
|
||||
{{ button_on }}
|
||||
</label>
|
||||
{% else %}
|
||||
<label class="btn btn-success" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="1" autocomplete="off" {% if not eval %}disabled="disabled"{% endif %}/>
|
||||
{{ button_on }}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if not developer_theme %}
|
||||
<label class="btn btn-danger active" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="0" autocomplete="off" {% if not eval %}disabled="disabled"{% endif %} checked/>
|
||||
{{ button_off }}
|
||||
</label>
|
||||
{% else %}
|
||||
<label class="btn btn-danger" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="0" autocomplete="off" {% if not eval %}disabled="disabled"{% endif %}/>
|
||||
{{ button_off }}
|
||||
</label>
|
||||
{% endif %}</div></td>
|
||||
<td class="text-right"><button type="button" value="theme" data-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa fa-refresh"></i></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{{ entry_systemcache }}</td>
|
||||
<td class="text-right"><button type="button" value="systemcache" data-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa fa-refresh"></i></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{{ entry_imgcache }}</td>
|
||||
<td class="text-right"><button type="button" value="imgcache" data-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa fa-refresh"></i></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{{ entry_allcache }}</td>
|
||||
<td class="text-right"><button type="button" value="allcache" data-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa fa-refresh"></i></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'developer_theme\']').on('change', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer/edit&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'developer_theme\']:checked'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$('input[name=\'developer_theme\']').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('input[name=\'developer_theme\']').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#modal-developer .modal-body').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">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#modal-developer .modal-body').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">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#modal-developer table button').on('click', function() {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer/' + $(element).attr('value') + '&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#modal-developer .modal-body').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">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#modal-developer .modal-body').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">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
@@ -0,0 +1,240 @@
|
||||
<div id="filemanager" class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">{{ heading_title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-5"><a href="{{ parent }}" data-toggle="tooltip" title="{{ button_parent }}" id="button-parent" class="btn btn-default"><i class="fa fa-level-up"></i></a> <a href="{{ refresh }}" data-toggle="tooltip" title="{{ button_refresh }}" id="button-refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_upload }}" id="button-upload" class="btn btn-primary"><i class="fa fa-upload"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_folder }}" id="button-folder" class="btn btn-default"><i class="fa fa-folder"></i></button>
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_delete }}" id="button-delete" class="btn btn-danger"><i class="fa fa-trash-o"></i></button>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="input-group">
|
||||
<input type="text" name="search" value="{{ filter_name }}" placeholder="{{ entry_search }}" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" data-toggle="tooltip" title="{{ button_search }}" id="button-search" class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||
</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
{% for image in images|batch(4) %}
|
||||
<div class="row">
|
||||
{% for image in image %}
|
||||
<div class="col-sm-3 col-xs-6 text-center">
|
||||
{% if image.type == 'directory' %}
|
||||
<div class="text-center"><a href="{{ image.href }}" class="directory" style="vertical-align: middle;"><i class="fa fa-folder fa-5x"></i></a></div>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="{{ image.path }}" />
|
||||
{{ image.name }}</label>
|
||||
{% endif %}
|
||||
{% if image.type == 'image' %}
|
||||
<a href="{{ image.href }}" class="thumbnail"><img src="{{ image.thumb }}" alt="{{ image.name }}" title="{{ image.name }}" /></a>
|
||||
<label>
|
||||
<input type="checkbox" name="path[]" value="{{ image.path }}" />
|
||||
{{ image.name }}</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br />
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="modal-footer">{{ pagination }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
{% if target %}
|
||||
$('a.thumbnail').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
{% if thumb %}
|
||||
$('#{{ thumb|escape('js') }}').find('img').attr('src', $(this).find('img').attr('src'));
|
||||
{% endif %}
|
||||
|
||||
$('#{{ target|escape('js') }}').val($(this).parent().find('input').val());
|
||||
|
||||
$('#modal-image').modal('hide');
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
$('a.directory').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('.pagination a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#button-parent').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#button-refresh').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('input[name=\'search\']').on('keydown', function(e) {
|
||||
if (e.which == 13) {
|
||||
$('#button-search').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-search').on('click', function(e) {
|
||||
var url = 'index.php?route=common/filemanager&user_token={{ user_token }}&directory={{ directory }}';
|
||||
|
||||
var filter_name = $('input[name=\'search\']').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
{% if thumb %}
|
||||
url += '&thumb=' + '{{ thumb|escape('js') }}';
|
||||
{% endif %}
|
||||
|
||||
{% if target %}
|
||||
url += '&target=' + '{{ target|escape('js') }}';
|
||||
{% endif %}
|
||||
|
||||
$('#modal-image').load(url);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-upload').on('click', function() {
|
||||
$('#form-upload').remove();
|
||||
|
||||
$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file[]" value="" multiple="multiple" /></form>');
|
||||
|
||||
$('#form-upload input[name=\'file[]\']').trigger('click');
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function() {
|
||||
if ($('#form-upload input[name=\'file[]\']').val() != '') {
|
||||
clearInterval(timer);
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/filemanager/upload&user_token={{ user_token }}&directory={{ directory }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: new FormData($('#form-upload')[0]),
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
beforeSend: function() {
|
||||
$('#button-upload i').replaceWith('<i class="fa fa-circle-o-notch fa-spin"></i>');
|
||||
$('#button-upload').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-upload i').replaceWith('<i class="fa fa-upload"></i>');
|
||||
$('#button-upload').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$('#button-folder').popover({
|
||||
html: true,
|
||||
placement: 'bottom',
|
||||
trigger: 'click',
|
||||
title: '{{ entry_folder }}',
|
||||
content: function() {
|
||||
html = '<div class="input-group">';
|
||||
html += ' <input type="text" name="folder" value="" placeholder="{{ entry_folder }}" class="form-control">';
|
||||
html += ' <span class="input-group-btn"><button type="button" title="{{ button_folder }}" id="button-create" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></span>';
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-folder').on('shown.bs.popover', function() {
|
||||
$('#button-create').on('click', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/filemanager/folder&user_token={{ user_token }}&directory={{ directory }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'folder=' + encodeURIComponent($('input[name=\'folder\']').val()),
|
||||
beforeSend: function() {
|
||||
$('#button-create').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-create').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#modal-image #button-delete').on('click', function(e) {
|
||||
if (confirm('{{ text_confirm }}')) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/filemanager/delete&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: $('input[name^=\'path\']:checked'),
|
||||
beforeSend: function() {
|
||||
$('#button-delete').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('#button-delete').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
@@ -0,0 +1,2 @@
|
||||
<footer id="footer">{{ text_footer }}<br />{{ text_version }}</footer></div>
|
||||
</body></html>
|
||||
@@ -0,0 +1,35 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid"><br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-4 col-sm-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h1 class="panel-title"><i class="fa fa-repeat"></i> {{ heading_title }}</h1>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="input-email">{{ entry_email }}</label>
|
||||
<div class="input-group"><span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> {{ button_reset }}</button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="{{ direction }}" lang="{{ lang }}">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>{{ title }}</title>
|
||||
<base href="{{ base }}" />
|
||||
{% if description %}
|
||||
<meta name="description" content="{{ description }}" />
|
||||
{% endif %}
|
||||
{% if keywords %}
|
||||
<meta name="keywords" content="{{ keywords }}" />
|
||||
{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<script type="text/javascript" src="view/javascript/jquery/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/bootstrap/js/bootstrap.min.js"></script>
|
||||
<link href="view/stylesheet/bootstrap.css" type="text/css" rel="stylesheet" />
|
||||
<link href="view/javascript/font-awesome/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
|
||||
<script src="view/javascript/jquery/datetimepicker/moment/moment.min.js" type="text/javascript"></script>
|
||||
<script src="view/javascript/jquery/datetimepicker/moment/moment-with-locales.min.js" type="text/javascript"></script>
|
||||
<script src="view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
|
||||
<link href="view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" media="screen" />
|
||||
<link type="text/css" href="view/stylesheet/stylesheet.css" rel="stylesheet" media="screen" />
|
||||
{% for style in styles %}
|
||||
<link type="text/css" href="{{ style.href }}" rel="{{ style.rel }}" media="{{ style.media }}" />
|
||||
{% endfor %}
|
||||
{% for link in links %}
|
||||
<link href="{{ link.href }}" rel="{{ link.rel }}" />
|
||||
{% endfor %}
|
||||
<script src="view/javascript/common.js" type="text/javascript"></script>
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{ script }}"></script>
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<header id="header" class="navbar navbar-static-top">
|
||||
<div class="container-fluid">
|
||||
<div id="header-logo" class="navbar-header"><a href="{{ home }}" class="navbar-brand"><img src="view/image/logo.png" alt="{{ heading_title }}" title="{{ heading_title }}" /></a></div>
|
||||
{% if logged %}<a href="#" id="button-menu" class="hidden-md hidden-lg"><span class="fa fa-bars"></span></a>
|
||||
<ul class="nav pull-left">
|
||||
<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" title="{{ text_new }}"><i class="fa fa-plus fa-lg"></i> <span class="header-item">{{ text_new }}</span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-left alerts-dropdown">
|
||||
<li><a href="{{ new_product }}" style="display: block; overflow: auto;">{{ text_new_product }}</a></li>
|
||||
<li><a href="{{ new_category }}" style="display: block; overflow: auto;">{{ text_new_category }}</a></li>
|
||||
<li><a href="{{ new_manufacturer }}" style="display: block; overflow: auto;">{{ text_new_manufacturer }}</a></li>
|
||||
<li><a href="{{ new_customer }}" style="display: block; overflow: auto;">{{ text_new_customer }}</a></li>
|
||||
<li><a href="{{ new_download }}" style="display: block; overflow: auto;">{{ text_new_download }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="oc-search-div" class="col-sm-3 col-md-3 pull-left">
|
||||
{{ search }}
|
||||
</div>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="{{ image }}" alt="{{ firstname }} {{ lastname }}" title="{{ username }}" id="user-profile" class="img-circle" />{{ firstname }} {{ lastname }} <i class="fa fa-caret-down fa-fw"></i></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ profile }}"><i class="fa fa-user-circle-o fa-fw"></i> {{ text_profile }}</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="dropdown-header">{{ text_store }}</li>
|
||||
{% for store in stores %}
|
||||
<li><a href="{{ store.href }}" target="_blank">{{ store.name }}</a></li>
|
||||
{% endfor %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="dropdown-header">{{ text_help }}</li>
|
||||
<li><a href="https://ocstore.com/?utm_source=ocstore3" target="_blank"><i class="fa fa-opencart fa-fw"></i> {{ text_homepage }}</a></li>
|
||||
<li><a href="https://docs.ocstore.com/?utm_source=ocstore3" target="_blank"><i class="fa fa-file-text-o fa-fw"></i> {{ text_documentation }}</a></li>
|
||||
<li><a href="https://opencartforum.com/?utm_source=ocstore3" target="_blank"><i class="fa fa-comments-o fa-fw"></i> {{ text_support }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="{{ logout }}"><i class="fa fa-sign-out"></i> <span class="hidden-xs hidden-sm hidden-md">{{ text_logout }}</span></a></li>
|
||||
</ul>
|
||||
{% endif %}</div>
|
||||
</header>
|
||||
@@ -0,0 +1,51 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid"><br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-4 col-sm-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h1 class="panel-title"><i class="fa fa-lock"></i> {{ text_login }}</h1>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label for="input-username">{{ entry_username }}</label>
|
||||
<div class="input-group"><span class="input-group-addon"><i class="fa fa-user"></i></span>
|
||||
<input type="text" name="username" value="{{ username }}" placeholder="{{ entry_username }}" id="input-username" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="input-password">{{ entry_password }}</label>
|
||||
<div class="input-group"><span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
|
||||
</div>
|
||||
{% if forgotten %}
|
||||
<span class="help-block"><a href="{{ forgotten }}">{{ text_forgotten }}</a></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-key"></i> {{ button_login }}</button>
|
||||
</div>
|
||||
{% if redirect %}
|
||||
<input type="hidden" name="redirect" value="{{ redirect }}" />
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,99 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-user" 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 success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-user" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-username">{{ entry_username }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="username" value="{{ username }}" placeholder="{{ entry_username }}" id="input-username" class="form-control" />
|
||||
{% if error_username %}
|
||||
<div class="text-danger">{{ error_username }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
|
||||
{% if error_firstname %}
|
||||
<div class="text-danger">{{ error_firstname }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
|
||||
{% if error_lastname %}
|
||||
<div class="text-danger">{{ error_lastname }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
|
||||
{% if error_email %}
|
||||
<div class="text-danger">{{ error_email }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-image">{{ entry_image }}</label>
|
||||
<div class="col-sm-10"><a href="" id="thumb-image" data-toggle="image" class="img-thumbnail"><img src="{{ thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="image" value="{{ image }}" id="input-image" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-password">{{ entry_password }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" autocomplete="off" />
|
||||
{% if error_password %}
|
||||
<div class="text-danger">{{ error_password }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-confirm">{{ entry_confirm }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control" />
|
||||
{% if error_confirm %}
|
||||
<div class="text-danger">{{ error_confirm }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,39 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid"><br />
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-4 col-sm-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h1 class="panel-title"><i class="fa fa-repeat"></i> {{ heading_title }}</h1>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data">
|
||||
<p>{{ text_password }}</p>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-password">{{ entry_password }}</label>
|
||||
<input type="password" name="password" value="{{ password }}" id="input-password" class="form-control" />
|
||||
{% if error_password %}
|
||||
<div class="text-danger">{{ error_password }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-confirm">{{ entry_confirm }}</label>
|
||||
<input type="password" name="confirm" value="{{ confirm }}" id="input-confirm" class="form-control" />
|
||||
{% if error_confirm %}
|
||||
<div class="text-danger">{{ error_confirm }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> {{ button_save }}</button>
|
||||
<a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,139 @@
|
||||
<div id="modal-security" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title text-danger"><i class="fa fa-exclamation-triangle"></i> {{ heading_title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info"><i class="fa fa-exclamation-circle"></i> {{text_security }}</div>
|
||||
<form class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_choose }}</legend>
|
||||
<div class="form-group">
|
||||
<select name="type" id="input-type" class="form-control">
|
||||
<option value="automatic">{{ text_automatic }}</option>
|
||||
<option value="manual">{{ text_manual }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="collapse-automatic" class="collapse">
|
||||
<legend>{{ text_automatic }}</legend>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn dropdown">
|
||||
<button type="button" id="button-path" data-toggle="dropdown" class="btn btn-default">{{ document_root }} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for path in paths %}
|
||||
{% if path|length > document_root|length %}
|
||||
<li><a href="{{ path }}"><i class="fa fa-exclamation-triangle fa-fw text-danger"></i> {{ path }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ path }}"><i class="fa fa-check-circle fa-fw text-success"></i> {{ path }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<input type="text" name="directory" value="storage" placeholder="{{ entry_directory }}" class="form-control" />
|
||||
<div class="input-group-btn">
|
||||
<button type="button" id="button-move" data-loading-text="{{ text_loading }}" class="btn btn-danger"><i class="fa fa-exclamation-triangle"></i> {{ button_move }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="path" value="{{ document_root }}" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset id="collapse-manual" class="collapse">
|
||||
<legend>{{ text_manual }}</legend>
|
||||
<div class="form-group">
|
||||
<div style="height: 300px; overflow-y: scroll;" class="form-control" disabled="disabled"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function() {
|
||||
$('#modal-security').modal('show');
|
||||
});
|
||||
|
||||
$('#modal-security select[name=\'type\']').on('change', function() {
|
||||
$('#modal-security fieldset.collapse').removeClass('in');
|
||||
|
||||
$('#modal-security #collapse-' + $(this).val()).addClass('in');
|
||||
});
|
||||
|
||||
$('#modal-security select[name=\'type\']').trigger('change');
|
||||
|
||||
$('#modal-security .dropdown-menu a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-security #button-path').html($(this).html() + ' <span class="caret"></span>');
|
||||
|
||||
$('#modal-security input[name=\'path\']').val($(this).attr('href'));
|
||||
});
|
||||
|
||||
|
||||
$('#modal-security .dropdown-menu a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#button-path').html($(this).text() + ' <span class="caret"></span>');
|
||||
|
||||
$('input[name=\'path\']').val($(this).attr('href'));
|
||||
|
||||
$('input[name=\'path\']').trigger('change');
|
||||
});
|
||||
|
||||
$('#button-move').on('click', function() {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/security/move&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'path\'], input[name=\'directory\']'),
|
||||
dataType: 'json',
|
||||
crossDomain: true,
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#modal-security .modal-body').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#modal-security .modal-body').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">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#modal-security select[name=\'type\']').on('change', function () {
|
||||
html = '<ol>';
|
||||
html += '<li><p>{{ text_move }}</p>';
|
||||
html += '<p><strong>{{ storage }}</strong></p>';
|
||||
html += '<p>{{ text_to }}</p>';
|
||||
html += '<p><strong>' + $('#modal-security input[name=\'path\']').val() + $('#modal-security input[name=\'directory\']').val() + '/</strong></p></li>';
|
||||
html += '<li><p>{{ text_config }}</p>';
|
||||
html += '<p><strong>define(\'DIR_STORAGE\', DIR_SYSTEM . \'storage/\');</strong></p>';
|
||||
html += '<p>to</p>';
|
||||
html += '<p><strong>define(\'DIR_STORAGE\', \'' + $('#modal-security input[name=\'path\']').val() + $('#modal-security input[name=\'directory\']').val() + '/\');</strong></p></li>';
|
||||
html += '<li><p>{{ text_admin }}</p>';
|
||||
html += '<p><strong>define(\'DIR_STORAGE\', DIR_SYSTEM . \'storage/\');</strong></p>';
|
||||
html += '<p>to</p>';
|
||||
html += '<p><strong>define(\'DIR_STORAGE\', \'' + $('#modal-security input[name=\'path\']').val() + $('#modal-security input[name=\'directory\']').val() + '/\');</strong></p></li>';
|
||||
html += '</ol>';
|
||||
|
||||
$('#collapse-manual .form-control').html(html);
|
||||
});
|
||||
|
||||
$('input[name=\'path\']').trigger('change');
|
||||
//--></script>
|
||||
@@ -0,0 +1,467 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-custom-field" 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">×</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-custom-field" class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_custom_field }}</legend>
|
||||
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10"> {% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="custom_field_description[{{ language.language_id }}][name]" value="{{ custom_field_description[language.language_id] ? custom_field_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-location">{{ entry_location }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="location" id="input-location" class="form-control">
|
||||
|
||||
|
||||
|
||||
{% if location == 'account' %}
|
||||
|
||||
|
||||
|
||||
<option value="account" selected="selected">{{ text_account }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="account">{{ text_account }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if location == 'address' %}
|
||||
|
||||
|
||||
|
||||
<option value="address" selected="selected">{{ text_address }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="address">{{ text_address }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if location == 'affiliate' %}
|
||||
|
||||
|
||||
|
||||
<option value="affiliate" selected="selected">{{ text_affiliate }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="affiliate">{{ text_affiliate }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-type">{{ entry_type }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="type" id="input-type" class="form-control">
|
||||
<optgroup label="{{ text_choose }}">
|
||||
{% if type == 'select' %}
|
||||
|
||||
|
||||
|
||||
<option value="select" selected="selected">{{ text_select }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="select">{{ text_select }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'radio' %}
|
||||
|
||||
|
||||
|
||||
<option value="radio" selected="selected">{{ text_radio }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="radio">{{ text_radio }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'checkbox' %}
|
||||
|
||||
|
||||
|
||||
<option value="checkbox" selected="selected">{{ text_checkbox }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="checkbox">{{ text_checkbox }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_input }}">
|
||||
{% if type == 'text' %}
|
||||
|
||||
|
||||
|
||||
<option value="text" selected="selected">{{ text_text }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="text">{{ text_text }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'textarea' %}
|
||||
|
||||
|
||||
|
||||
<option value="textarea" selected="selected">{{ text_textarea }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="textarea">{{ text_textarea }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_file }}">
|
||||
{% if type == 'file' %}
|
||||
|
||||
|
||||
|
||||
<option value="file" selected="selected">{{ text_file }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="file">{{ text_file }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_date }}">
|
||||
{% if type == 'date' %}
|
||||
|
||||
|
||||
|
||||
<option value="date" selected="selected">{{ text_date }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="date">{{ text_date }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'time' %}
|
||||
|
||||
|
||||
|
||||
<option value="time" selected="selected">{{ text_time }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="time">{{ text_time }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if type == 'datetime' %}
|
||||
|
||||
|
||||
|
||||
<option value="datetime" selected="selected">{{ text_datetime }}</option>
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
<option value="datetime">{{ text_datetime }}</option>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="display-value">
|
||||
<label class="col-sm-2 control-label" for="input-value">{{ entry_value }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="value" value="{{ value }}" placeholder="{{ entry_value }}" id="input-value" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="display-validation">
|
||||
<label class="col-sm-2 control-label" for="input-validation"><span data-toggle="tooltip" title="{{ help_regex }}">{{ entry_validation }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="validation" id="input-validation" value="{{ validation }}" placeholder="{{ text_regex }}" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_customer_group }}</label>
|
||||
<div class="col-sm-10">{% set customer_group_row = 0 %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<div class="checkbox">
|
||||
<label> {% if customer_group.customer_group_id in custom_field_customer_group %}
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][customer_group_id]" value="{{ customer_group.customer_group_id }}" checked="checked" />
|
||||
{{ customer_group.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][customer_group_id]" value="{{ customer_group.customer_group_id }}" />
|
||||
{{ customer_group.name }}
|
||||
{% endif %} </label>
|
||||
</div>
|
||||
{% set customer_group_row = customer_group_row + 1 %}
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_required }}</label>
|
||||
<div class="col-sm-10">{% set customer_group_row = 0 %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<div class="checkbox">
|
||||
<label> {% if customer_group.customer_group_id in custom_field_required %}
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][required]" value="{{ customer_group.customer_group_id }}" checked="checked" />
|
||||
{{ customer_group.name }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][required]" value="{{ customer_group.customer_group_id }}" />
|
||||
{{ customer_group.name }}
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
{% set customer_group_row = customer_group_row + 1 %}
|
||||
{% endfor %}</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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order"><span data-toggle="tooltip" title="{{ help_sort_order }}">{{ entry_sort_order }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br />
|
||||
<div id="custom-field-value">
|
||||
<fieldset>
|
||||
<legend>{{ text_value }}</legend>
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left required">{{ entry_custom_value }}</td>
|
||||
<td class="text-right">{{ entry_sort_order }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% set custom_field_value_row = 0 %}
|
||||
{% for custom_field_value in custom_field_values %}
|
||||
<tr id="custom-field-value-row{{ custom_field_value_row }}">
|
||||
<td class="text-left" style="width: 70%;"><input type="hidden" name="custom_field_value[{{ custom_field_value_row }}][custom_field_value_id]" value="{{ custom_field_value.custom_field_value_id }}" />
|
||||
{% for language in languages %}
|
||||
<div class="input-group"> <span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="custom_field_value[{{ custom_field_value_row }}][custom_field_value_description][{{ language.language_id }}][name]" value="{{ custom_field_value.custom_field_value_description[language.language_id] ? custom_field_value.custom_field_value_description[language.language_id].name }}" placeholder="{{ entry_custom_value }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_custom_field_value[custom_field_value_row][language.language_id] %}
|
||||
<div class="text-danger">{{ error_custom_field_value[custom_field_value_row][language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}</td>
|
||||
<td class="text-right"><input type="text" name="custom_field_value[{{ custom_field_value_row }}][sort_order]" value="{{ custom_field_value.sort_order }}" placeholder="{{ entry_sort_order }}" class="form-control" /></td>
|
||||
<td class="text-left"><button onclick="$('#custom-field-value-row{{ custom_field_value_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set custom_field_value_row = custom_field_value_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td class="text-left"><button type="button" onclick="addCustomFieldValue();" data-toggle="tooltip" title="{{ button_custom_field_value_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('select[name=\'type\']').on('change', function() {
|
||||
if (this.value == 'select' || this.value == 'radio' || this.value == 'checkbox') {
|
||||
$('#custom-field-value').show();
|
||||
$('#display-value, #display-validation').hide();
|
||||
} else {
|
||||
$('#custom-field-value').hide();
|
||||
$('#display-value, #display-validation').show();
|
||||
}
|
||||
|
||||
if (this.value == 'date') {
|
||||
$('#display-value > div').html('<div class="input-group date"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value }}" data-date-format="YYYY-MM-DD" id="input-value" class="form-control" /><span class="input-group-btn"><button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button></span></div>');
|
||||
} else if (this.value == 'time') {
|
||||
$('#display-value > div').html('<div class="input-group time"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value }}" data-date-format="HH:mm" id="input-value" class="form-control" /><span class="input-group-btn"><button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button></span></div>');
|
||||
} else if (this.value == 'datetime') {
|
||||
$('#display-value > div').html('<div class="input-group datetime"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value }}" data-date-format="YYYY-MM-DD HH:mm" id="input-value" class="form-control" /><span class="input-group-btn"><button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button></span></div>');
|
||||
} else if (this.value == 'textarea') {
|
||||
$('#display-value > div').html('<textarea name="value" placeholder="{{ entry_value }}" id="input-value" class="form-control">' + $('#input-value').val() + '</textarea>');
|
||||
} else {
|
||||
$('#display-value > div').html('<input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value }}" id="input-value" class="form-control" />');
|
||||
}
|
||||
|
||||
$('.date').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickTime: false
|
||||
});
|
||||
|
||||
$('.time').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: false
|
||||
});
|
||||
|
||||
$('.datetime').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickDate: true,
|
||||
pickTime: true
|
||||
});
|
||||
});
|
||||
|
||||
$('select[name=\'type\']').trigger('change');
|
||||
|
||||
var custom_field_value_row = {{ custom_field_value_row }};
|
||||
|
||||
function addCustomFieldValue() {
|
||||
html = '<tr id="custom-field-value-row' + custom_field_value_row + '">';
|
||||
html += ' <td class="text-left" style="width: 70%;"><input type="hidden" name="custom_field_value[' + custom_field_value_row + '][custom_field_value_id]" value="" />';
|
||||
{% for language in languages %}
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span><input type="text" name="custom_field_value[' + custom_field_value_row + '][custom_field_value_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_custom_value }}" class="form-control" />';
|
||||
html += ' </div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right"><input type="text" name="custom_field_value[' + custom_field_value_row + '][sort_order]" value="" placeholder="{{ entry_sort_order }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#custom-field-value-row' + custom_field_value_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#custom-field-value tbody').append(html);
|
||||
|
||||
custom_field_value_row++;
|
||||
}
|
||||
//--></script></div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,94 @@
|
||||
{{ 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-custom-field').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">×</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">×</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-custom-field">
|
||||
<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 == 'cfd.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 == 'cf.location' %}
|
||||
<a href="{{ sort_location }}" class="{{ order|lower }}">{{ column_location }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_location }}">{{ column_location }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'cf.type' %}
|
||||
<a href="{{ sort_type }}" class="{{ order|lower }}">{{ column_type }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_type }}">{{ column_type }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'cf.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if custom_fields %}
|
||||
{% for custom_field in custom_fields %}
|
||||
<tr>
|
||||
<td class="text-center">{% if custom_field.custom_field_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ custom_field.custom_field_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ custom_field.custom_field_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ custom_field.name }}</td>
|
||||
<td class="text-left">{{ custom_field.location }}</td>
|
||||
<td class="text-left">{{ custom_field.type }}</td>
|
||||
<td class="text-right">{{ custom_field.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ custom_field.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="6">{{ 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,257 @@
|
||||
{{ 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-customer').toggleClass('hidden-sm hidden-xs');" class="btn btn-default hidden-md hidden-lg"><i class="fa fa-filter"></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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-customer" 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-email">{{ entry_email }}</label>
|
||||
<input type="text" name="filter_email" value="{{ filter_email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-customer-group">{{ entry_customer_group }}</label>
|
||||
<select name="filter_customer_group_id" id="input-customer-group" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
{% for customer_group in customer_groups %}
|
||||
{% if customer_group.customer_group_id == filter_customer_group_id %}
|
||||
|
||||
|
||||
<option value="{{ customer_group.customer_group_id }}" selected="selected">{{ customer_group.name }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-type">{{ entry_type }}</label>
|
||||
<select name="filter_type" id="input-type" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
{% if filter_type == 'customer' %}
|
||||
|
||||
|
||||
<option value="customer" selected="selected">{{ text_customer }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="customer">{{ text_customer }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if filter_type == 'affiliate' %}
|
||||
|
||||
|
||||
<option value="affiliate" selected="selected">{{ text_affiliate }}</option>
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
<option value="affiliate">{{ text_affiliate }}</option>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
</select>
|
||||
</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" id="input-date-added" 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">
|
||||
<div id="customer-approval"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#customer-approval').delegate('.pagination a', 'click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#customer-approval').load(this.href);
|
||||
});
|
||||
|
||||
$('#customer-approval').load('index.php?route=customer/customer_approval/customer_approval&user_token={{ user_token }}');
|
||||
|
||||
$('#customer-approval').on('click', '.btn-success, .btn-danger', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#customer-approval').before('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#customer-approval').load('index.php?route=customer/customer_approval/customer_approval&user_token={{ user_token }}');
|
||||
|
||||
$('#customer-approval').before('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function() {
|
||||
url = '';
|
||||
|
||||
var filter_name = $('input[name=\'filter_name\']').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
var filter_email = $('input[name=\'filter_email\']').val();
|
||||
|
||||
if (filter_email) {
|
||||
url += '&filter_email=' + encodeURIComponent(filter_email);
|
||||
}
|
||||
|
||||
var filter_customer_group_id = $('select[name=\'filter_customer_group_id\']').val();
|
||||
|
||||
if (filter_customer_group_id !== '') {
|
||||
url += '&filter_customer_group_id=' + encodeURIComponent(filter_customer_group_id);
|
||||
}
|
||||
|
||||
var filter_type = $('select[name=\'filter_type\']').val();
|
||||
|
||||
if (filter_type !== '') {
|
||||
url += '&filter_type=' + filter_type;
|
||||
}
|
||||
|
||||
var filter_date_added = $('input[name=\'filter_date_added\']').val();
|
||||
|
||||
if (filter_date_added) {
|
||||
url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
|
||||
}
|
||||
|
||||
$('#customer-approval').load('index.php?route=customer/customer_approval/customer_approval&user_token={{ user_token }}' + url);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'filter_name\']').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']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_name\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=\'filter_email\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_email=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['email'],
|
||||
value: item['customer_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_email\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
$('#filter-customer').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#button-filter').trigger('click')
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('.date').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickTime: false
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_name }}</td>
|
||||
<td class="text-left">{{ column_email }}</td>
|
||||
<td class="text-left">{{ column_customer_group }}</td>
|
||||
<td class="text-left">{{ column_type }}</td>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if customer_approvals %}
|
||||
{% for customer_approval in customer_approvals %}
|
||||
<tr>
|
||||
<td class="text-left">{{ customer_approval.name }}</td>
|
||||
<td class="text-left">{{ customer_approval.email }}</td>
|
||||
<td class="text-left">{{ customer_approval.customer_group }}</td>
|
||||
<td class="text-left">{{ customer_approval.type }}</td>
|
||||
<td class="text-left">{{ customer_approval.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ customer_approval.approve }}" data-toggle="tooltip" title="{{ button_approve }}" class="btn btn-success"><i class="fa fa-thumbs-o-up"></i></a> <a href="{{ customer_approval.deny }}" data-toggle="tooltip" title="{{ button_deny }}" class="btn btn-danger"><i class="fa fa-thumbs-o-down"></i></a> <a href="{{ customer_approval.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="6">{{ 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>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,85 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-customer-group" 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">×</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-customer-group" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<input type="text" name="customer_group_description[{{ language.language_id }}][name]" value="{{ customer_group_description[language.language_id] ? customer_group_description[language.language_id].name }}" placeholder="{{ entry_name }}" class="form-control" />
|
||||
</div>
|
||||
{% if error_name[language.language_id] %}
|
||||
<div class="text-danger">{{ error_name[language.language_id] }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% for language in languages %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /></span>
|
||||
<textarea name="customer_group_description[{{ language.language_id }}][description]" rows="5" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" class="form-control">{{ customer_group_description[language.language_id] ? customer_group_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="{{ help_approval }}">{{ entry_approval }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
{% if approval %}
|
||||
<input type="radio" name="approval" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="approval" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
{% if not approval %}
|
||||
<input type="radio" name="approval" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="approval" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-customer-group').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">×</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">×</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-customer-group">
|
||||
<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 == 'cgd.name' %}
|
||||
<a href="{{ sort_name }}" class="{{ order|lower }}">{{ column_name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_name }}">{{ column_name }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{% if sort == 'cg.sort_order' %}
|
||||
<a href="{{ sort_sort_order }}" class="{{ order|lower }}">{{ column_sort_order }}</a>
|
||||
{% else %}
|
||||
<a href="{{ sort_sort_order }}">{{ column_sort_order }}</a>
|
||||
{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if customer_groups %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<tr>
|
||||
<td class="text-center">{% if customer_group.customer_group_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ customer_group.customer_group_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ customer_group.customer_group_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ customer_group.name }}</td>
|
||||
<td class="text-right">{{ customer_group.sort_order }}</td>
|
||||
<td class="text-right"><a href="{{ customer_group.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="4">{{ 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,28 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-left">{{ column_comment }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if histories %}
|
||||
{% for history in histories %}
|
||||
<tr>
|
||||
<td class="text-left">{{ history.date_added }}</td>
|
||||
<td class="text-left">{{ history.comment }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="2">{{ 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,29 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_ip }}</td>
|
||||
<td class="text-right">{{ column_total }}</td>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if ips %}
|
||||
{% for ip in ips %}
|
||||
<tr>
|
||||
<td class="text-left"><a href="//whatismyipaddress.com/ip/{{ ip.ip }}" target="_blank">{{ ip.ip }}</a></td>
|
||||
<td class="text-right"><a href="{{ ip.filter_ip }}" target="_blank">{{ ip.total }}</a></td>
|
||||
<td class="text-left">{{ ip.date_added }}</td> </tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ 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,269 @@
|
||||
{{ 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-customer').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-customer').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-customer" 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-email">{{ entry_email }}</label>
|
||||
<input type="text" name="filter_email" value="{{ filter_email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-customer-group">{{ entry_customer_group }}</label>
|
||||
<select name="filter_customer_group_id" id="input-customer-group" class="form-control">
|
||||
<option value=""></option>
|
||||
{% for customer_group in customer_groups %}
|
||||
{% if customer_group.customer_group_id == filter_customer_group_id %}
|
||||
<option value="{{ customer_group.customer_group_id }}" selected="selected">{{ customer_group.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-status">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-control">
|
||||
<option value=""></option>
|
||||
{% if filter_status == '1' %}
|
||||
<option value="1" selected="selected">{{ text_enabled }}</option>
|
||||
{% else %}
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
{% endif %}
|
||||
{% if filter_status == '0' %}
|
||||
<option value="0" selected="selected">{{ text_disabled }}</option>
|
||||
{% else %}
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-ip">{{ entry_ip }}</label>
|
||||
<input type="text" name="filter_ip" value="{{ filter_ip }}" placeholder="{{ entry_ip }}" id="input-ip" 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" id="input-date-added" 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">
|
||||
<div class="table-responsive">
|
||||
<form action="{{ delete }}" method="post" enctype="multipart/form-data" id="form-customer">
|
||||
<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 == 'c.email' %}<a href="{{ sort_email }}" class="{{ order|lower }}">{{ column_email }}</a>{% else %}<a href="{{ sort_email }}">{{ column_email }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'customer_group' %}<a href="{{ sort_customer_group }}" class="{{ order|lower }}">{{ column_customer_group }}</a> {% else %} <a href="{{ sort_customer_group }}">{{ column_customer_group }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'c.status' %}<a href="{{ sort_status }}" class="{{ order|lower }}">{{ column_status }}</a>{% else %}<a href="{{ sort_status }}">{{ column_status }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'c.ip' %}<a href="{{ sort_ip }}" class="{{ order|lower }}">{{ column_ip }}</a>{% else %}<a href="{{ sort_ip }}">{{ column_ip }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'c.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 customers %}
|
||||
{% for customer in customers %}
|
||||
<tr>
|
||||
<td class="text-center">{% if customer.customer_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ customer.customer_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ customer.customer_id }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-left">{{ customer.name }}</td>
|
||||
<td class="text-left">{{ customer.email }}</td>
|
||||
<td class="text-left">{{ customer.customer_group }}</td>
|
||||
<td class="text-left">{{ customer.status }}</td>
|
||||
<td class="text-left">{{ customer.ip }}</td>
|
||||
<td class="text-left">{{ customer.date_added }}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group" style="min-width: 65px;">
|
||||
<a href="{{ customer.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a>
|
||||
<button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li class="dropdown-header">{{ text_option }}</li>
|
||||
{% if customer.unlock %}
|
||||
<li><a href="{{ customer.unlock }}"><i class="fa fa-unlock"></i> {{ text_unlock }}</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><a><i class="fa fa-unlock"></i> {{ text_unlock }}</a></li>
|
||||
{% endif %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="dropdown-header">{{ text_login }}</li>
|
||||
{% for store in customer.store %}
|
||||
<li><a href="{{ store.href }}" target="_blank"><i class="fa fa-lock"></i> {{ store.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</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"><!--
|
||||
$('.table-responsive').on('shown.bs.dropdown', function (e) {
|
||||
var t = $(this),
|
||||
m = $(e.target).find('.dropdown-menu'),
|
||||
tb = t.offset().top + t.height(),
|
||||
mb = m.offset().top + m.outerHeight(true),
|
||||
d = 20;
|
||||
if (t[0].scrollWidth > t.innerWidth()) {
|
||||
if (mb + d > tb) {
|
||||
t.css('padding-bottom', ((mb + d) - tb));
|
||||
}
|
||||
} else {
|
||||
t.css('overflow', 'visible');
|
||||
}
|
||||
}).on('hidden.bs.dropdown', function () {
|
||||
$(this).css({'padding-bottom': '', 'overflow': ''});
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-filter').on('click', function() {
|
||||
url = 'index.php?route=customer/customer&user_token={{ user_token }}';
|
||||
var filter_name = $('input[name=\'filter_name\']').val();
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
var filter_email = $('input[name=\'filter_email\']').val();
|
||||
if (filter_email) {
|
||||
url += '&filter_email=' + encodeURIComponent(filter_email);
|
||||
}
|
||||
var filter_customer_group_id = $('select[name=\'filter_customer_group_id\']').val();
|
||||
if (filter_customer_group_id !== '') {
|
||||
url += '&filter_customer_group_id=' + encodeURIComponent(filter_customer_group_id);
|
||||
}
|
||||
var filter_status = $('select[name=\'filter_status\']').val();
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + encodeURIComponent(filter_status);
|
||||
}
|
||||
var filter_ip = $('input[name=\'filter_ip\']').val();
|
||||
if (filter_ip) {
|
||||
url += '&filter_ip=' + encodeURIComponent(filter_ip);
|
||||
}
|
||||
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"><!--
|
||||
$('input[name=\'filter_name\']').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']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_name\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
$('input[name=\'filter_email\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=customer/customer/autocomplete&user_token={{ user_token }}&filter_email=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['email'],
|
||||
value: item['customer_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'filter_email\']').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('.date').datetimepicker({
|
||||
language: '{{ datepicker }}',
|
||||
pickTime: false
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#filter-customer').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#button-filter').trigger('click')
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-left">{{ column_description }}</td>
|
||||
<td class="text-right">{{ column_points }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if rewards %}
|
||||
{% for reward in rewards %}
|
||||
<tr>
|
||||
<td class="text-left">{{ reward.date_added }}</td>
|
||||
<td class="text-left">{{ reward.description }}</td>
|
||||
<td class="text-right">{{ reward.points }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-right"><b>{{ text_balance }}</b></td>
|
||||
<td class="text-right">{{ balance }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ 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,35 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-left">{{ column_description }}</td>
|
||||
<td class="text-right">{{ column_amount }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if transactions %}
|
||||
{% for transaction in transactions %}
|
||||
<tr>
|
||||
<td class="text-left">{{ transaction.date_added }}</td>
|
||||
<td class="text-left">{{ transaction.description }}</td>
|
||||
<td class="text-right">{{ transaction.amount }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="text-right"><b>{{ text_balance }}</b></td>
|
||||
<td class="text-right">{{ balance }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ 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,134 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-banner" 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">×</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-banner" 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-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>
|
||||
<br />
|
||||
<ul class="nav nav-tabs" id="language">
|
||||
{% for language in languages %}
|
||||
<li><a href="#language{{ language.language_id }}" data-toggle="tab"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}" /> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% set image_row = 0 %}
|
||||
{% for language in languages %}
|
||||
<div class="tab-pane" id="language{{ language.language_id }}">
|
||||
<table id="images{{ language.language_id }}" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_title }}</td>
|
||||
<td class="text-left">{{ entry_link }}</td>
|
||||
<td class="text-left">{{ entry_description }}</td>
|
||||
<td class="text-left">{{ entry_button_text }}</td>
|
||||
<td class="text-center">{{ entry_image }}</td>
|
||||
<td class="text-center">{{ entry_image_mobile }}</td>
|
||||
<td class="text-right">{{ entry_sort_order }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if banner_images[language.language_id] %}
|
||||
{% for banner_image in banner_images[language.language_id] %}
|
||||
<tr id="image-row{{ image_row }}">
|
||||
<td class="text-left" style="width: 15%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][title]" value="{{ banner_image.title }}" placeholder="{{ entry_title }}" class="form-control" />
|
||||
{% if error_banner_image[language.language_id][image_row] %}
|
||||
<div class="text-danger">{{ error_banner_image[language.language_id][image_row] }}</div>
|
||||
{% endif %}</td>
|
||||
<td class="text-left" style="width: 15%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][link]" value="{{ banner_image.link }}" placeholder="{{ entry_link }}" class="form-control" /></td>
|
||||
<td class="text-left"><textarea name="banner_image[{{ language.language_id }}][{{ image_row }}][description]" rows="2" placeholder="{{ entry_description }}" class="form-control">{{ banner_image.description }}</textarea></td>
|
||||
<td class="text-left" style="width: 10%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][button_text]" value="{{ banner_image.button_text }}" placeholder="{{ entry_button_text }}" class="form-control" /></td>
|
||||
<td class="text-center"><a href="" id="thumb-image{{ image_row }}" data-toggle="image" class="img-thumbnail"><img src="{{ banner_image.thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="banner_image[{{ language.language_id }}][{{ image_row }}][image]" value="{{ banner_image.image }}" id="input-image{{ image_row }}" /></td>
|
||||
<td class="text-center"><a href="" id="thumb-mobile{{ image_row }}" data-toggle="image" class="img-thumbnail"><img src="{{ banner_image.mobile_thumb }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a>
|
||||
<input type="hidden" name="banner_image[{{ language.language_id }}][{{ image_row }}][image_mobile]" value="{{ banner_image.image_mobile }}" id="input-image-mobile{{ image_row }}" /></td>
|
||||
<td class="text-right" style="width: 8%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][sort_order]" value="{{ banner_image.sort_order }}" placeholder="{{ entry_sort_order }}" class="form-control" /></td>
|
||||
<td class="text-left"><button type="button" onclick="$('#image-row{{ image_row }}, .tooltip').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set image_row = image_row + 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7"></td>
|
||||
<td class="text-left"><button type="button" onclick="addImage('{{ language.language_id }}');" data-toggle="tooltip" title="{{ button_banner_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
var image_row = {{ image_row }};
|
||||
|
||||
function addImage(language_id) {
|
||||
html = '<tr id="image-row' + image_row + '">';
|
||||
html += ' <td class="text-left" style="width: 15%;"><input type="text" name="banner_image[' + language_id + '][' + image_row + '][title]" value="" placeholder="{{ entry_title }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left" style="width: 15%;"><input type="text" name="banner_image[' + language_id + '][' + image_row + '][link]" value="" placeholder="{{ entry_link }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left"><textarea name="banner_image[' + language_id + '][' + image_row + '][description]" rows="2" placeholder="{{ entry_description }}" class="form-control"></textarea></td>';
|
||||
html += ' <td class="text-left" style="width: 10%;"><input type="text" name="banner_image[' + language_id + '][' + image_row + '][button_text]" value="" placeholder="{{ entry_button_text }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-center"><a href="" id="thumb-image' + image_row + '" data-toggle="image" class="img-thumbnail"><img src="{{ placeholder }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a><input type="hidden" name="banner_image[' + language_id + '][' + image_row + '][image]" value="" id="input-image' + image_row + '" /></td>';
|
||||
html += ' <td class="text-center"><a href="" id="thumb-mobile' + image_row + '" data-toggle="image" class="img-thumbnail"><img src="{{ placeholder }}" alt="" title="" data-placeholder="{{ placeholder }}" /></a><input type="hidden" name="banner_image[' + language_id + '][' + image_row + '][image_mobile]" value="" id="input-image-mobile' + image_row + '" /></td>';
|
||||
html += ' <td class="text-right" style="width: 8%;"><input type="text" name="banner_image[' + language_id + '][' + image_row + '][sort_order]" value="" placeholder="{{ entry_sort_order }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#image-row' + image_row + ', .tooltip\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#images' + language_id + ' tbody').append(html);
|
||||
|
||||
image_row++;
|
||||
}
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#language a:first').tab('show');
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,82 @@
|
||||
{{ 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-banner').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">×</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">×</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-banner">
|
||||
<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 == '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 banners %}
|
||||
{% for banner in banners %}
|
||||
<tr>
|
||||
<td class="text-center">{% if banner.banner_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ banner.banner_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ banner.banner_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ banner.name }}</td>
|
||||
<td class="text-left">{{ banner.status }}</td>
|
||||
<td class="text-right"><a href="{{ banner.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="4">{{ 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,440 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-layout" 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">×</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-layout" class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_route }}</legend>
|
||||
<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>
|
||||
<table id="route" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ entry_store }}</td>
|
||||
<td class="text-left">{{ entry_route }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set route_row = 0 %}
|
||||
{% for layout_route in layout_routes %}
|
||||
<tr id="route-row{{ route_row }}">
|
||||
<td class="text-left"><select name="layout_route[{{ route_row }}][store_id]" class="form-control">
|
||||
<option value="0">{{ text_default }}</option>
|
||||
{% for store in stores %}
|
||||
{% if store.store_id == layout_route.store_id %}
|
||||
<option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ store.store_id }}">{{ store.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
<td class="text-left"><input type="text" name="layout_route[{{ route_row }}][route]" value="{{ layout_route.route }}" placeholder="{{ entry_route }}" class="form-control" /></td>
|
||||
<td class="text-left"><button type="button" onclick="$('#route-row{{ route_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set route_row = route_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td class="text-left"><button type="button" onclick="addRoute();" data-toggle="tooltip" title="{{ button_route_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_module }}</legend>
|
||||
{% set module_row = 0 %}
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-4 col-sm-12">
|
||||
<table id="module-column-left" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">{{ text_column_left }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for layout_module in layout_modules %}
|
||||
{% if layout_module.position == 'column_left' %}
|
||||
<tr id="module-row{{ module_row }}">
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-control input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
{% if extension.code == layout_module.code %}
|
||||
<option value="{{ extension.code }}" selected="selected">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
{% if module.code == layout_module.code %}
|
||||
<option value="{{ module.code }}" selected="selected">{{ module.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][position]" value="{{ layout_module.position }}" />
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][sort_order]" value="{{ layout_module.sort_order }}" />
|
||||
<div class="input-group-btn"><a href="{{ layout_module.edit }}" type="button" data-toggle="tooltip" title="{{ button_edit }}" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a>
|
||||
<button type="button" onclick="$('#module-row{{ module_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa fa fa-minus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select class="form-control input-sm">
|
||||
<option value=""></option>
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" onclick="addModule('column-left');" data-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-4 col-sm-12">
|
||||
<table id="module-content-top" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">{{ text_content_top }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for layout_module in layout_modules %}
|
||||
{% if layout_module.position == 'content_top' %}
|
||||
<tr id="module-row{{ module_row }}">
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-control input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
{% if extension.code == layout_module.code %}
|
||||
<option value="{{ extension.code }}" selected="selected">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
{% if module.code == layout_module.code %}
|
||||
<option value="{{ module.code }}" selected="selected">{{ module.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][position]" value="{{ layout_module.position }}" />
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][sort_order]" value="{{ layout_module.sort_order }}" />
|
||||
<div class="input-group-btn"> <a href="{{ layout_module.edit }}" type="button" data-toggle="tooltip" title="{{ button_edit }}" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a>
|
||||
<button type="button" onclick="$('#module-row{{ module_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa fa fa-minus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select class="form-control input-sm">
|
||||
<option value=""></option>
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" onclick="addModule('content-top');" data-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<table id="module-content-bottom" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">{{ text_content_bottom }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for layout_module in layout_modules %}
|
||||
{% if layout_module.position == 'content_bottom' %}
|
||||
<tr id="module-row{{ module_row }}">
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-control input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
{% if extension.code == layout_module.code %}
|
||||
<option value="{{ extension.code }}" selected="selected">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
{% if module.code == layout_module.code %}
|
||||
<option value="{{ module.code }}" selected="selected">{{ module.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][position]" value="{{ layout_module.position }}" />
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][sort_order]" value="{{ layout_module.sort_order }}" />
|
||||
<div class="input-group-btn"><a href="{{ layout_module.edit }}" type="button" data-toggle="tooltip" title="{{ button_edit }}" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a>
|
||||
<button type="button" onclick="$('#module-row{{ module_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa fa fa-minus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select class="form-control input-sm">
|
||||
<option value=""></option>
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" onclick="addModule('content-bottom');" data-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-4 col-sm-12">
|
||||
<table id="module-column-right" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center">{{ text_column_right }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for layout_module in layout_modules %}
|
||||
{% if layout_module.position == 'column_right' %}
|
||||
<tr id="module-row{{ module_row }}">
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-control input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
{% if extension.code == layout_module.code %}
|
||||
<option value="{{ extension.code }}" selected="selected">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
{% if module.code == layout_module.code %}
|
||||
<option value="{{ module.code }}" selected="selected">{{ module.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][position]" value="{{ layout_module.position }}" />
|
||||
<input type="hidden" name="layout_module[{{ module_row }}][sort_order]" value="{{ layout_module.sort_order }}" />
|
||||
<div class="input-group-btn"><a href="{{ layout_module.edit }}" data-toggle="tooltip" title="{{ button_edit }}" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a>
|
||||
<button type="button" onclick="$('#module-row{{ module_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa fa fa-minus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-left"><div class="input-group">
|
||||
<select class="form-control input-sm">
|
||||
<option value=""></option>
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}">{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}">{{ module.name }}</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" onclick="addModule('column-right');" data-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa fa-plus-circle"></i></button>
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
// Reorderable drag-and-drop lists
|
||||
$('.row table tbody .input-group-btn').prepend('<span data-toggle="tooltip" title="{{ text_move }}" class="btn btn-success btn-sm handle"><i class="fa fa-hand-grab-o"></i></span>');
|
||||
$('.row table tbody').sortable({
|
||||
handle: '.handle',
|
||||
chosenClass: 'handle-active',
|
||||
onEnd: function (evt) {
|
||||
var orderIndex = 1;
|
||||
$($(evt.item).parent().find('input[name*="sort_order"]')).each(function() {
|
||||
$(this).val(orderIndex);
|
||||
orderIndex++;
|
||||
});
|
||||
}
|
||||
});
|
||||
var route_row = {{ route_row }};
|
||||
|
||||
function addRoute() {
|
||||
html = '<tr id="route-row' + route_row + '">';
|
||||
html += ' <td class="text-left"><select name="layout_route[' + route_row + '][store_id]" class="form-control">';
|
||||
html += ' <option value="0">{{ text_default }}</option>';
|
||||
{% for store in stores %}
|
||||
html += '<option value="{{ store.store_id }}">{{ store.name|escape('js') }}</option>';
|
||||
{% endfor %}
|
||||
html += ' </select></td>';
|
||||
html += ' <td class="text-left"><input type="text" name="layout_route[' + route_row + '][route]" value="" placeholder="{{ entry_route }}" class="form-control" /></td>';
|
||||
html += ' <td class="text-left"><button type="button" onclick="$(\'#route-row' + route_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#route tbody').append(html);
|
||||
|
||||
route_row++;
|
||||
}
|
||||
|
||||
var module_row = {{ module_row }};
|
||||
|
||||
function addModule(type) {
|
||||
html = '<tr id="module-row' + module_row + '">';
|
||||
html += ' <td class="text-left"><div class="input-group"><select name="layout_module[' + module_row + '][code]" class="form-control input-sm">';
|
||||
{% for extension in extensions %}
|
||||
html += ' <optgroup label="{{ extension.name|escape('js') }}">';
|
||||
{% if not extension.module %}
|
||||
html += ' <option value="{{ extension.code }}">{{ extension.name|escape('js') }}</option>';
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
html += ' <option value="{{ module.code }}">{{ module.name|escape('js') }}</option>';
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
html += ' </optgroup>';
|
||||
{% endfor %}
|
||||
html += ' </select>';
|
||||
html += ' <input type="hidden" name="layout_module[' + module_row + '][position]" value="' + type.replace('-', '_') + '" />';
|
||||
html += ' <input type="hidden" name="layout_module[' + module_row + '][sort_order]" value="" />';
|
||||
html += ' <div class="input-group-btn"><span data-toggle="tooltip" title="<?php echo $text_move; ?>" class="btn btn-success btn-sm handle"><i class="fa fa-hand-grab-o"></i></span><a href="" target="_blank" type="button" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa fa-pencil"></i></a><button type="button" onclick="$(\'#module-row' + module_row + '\').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa fa fa-minus-circle"></i></button></div></div></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#module-' + type + ' tbody').append(html);
|
||||
|
||||
$('#module-' + type + ' tbody select[name=\'layout_module[' + module_row + '][code]\']').val($('#module-' + type + ' tfoot select').val());
|
||||
|
||||
$('#module-' + type + ' select[name*=\'code\']').trigger('change');
|
||||
|
||||
$('#module-' + type + ' tbody input[name*=\'sort_order\']').each(function(i, element) {
|
||||
$(element).val(i);
|
||||
});
|
||||
|
||||
module_row++;
|
||||
}
|
||||
|
||||
$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom').delegate('select[name*=\'code\']', 'change', function() {
|
||||
var part = this.value.split('.');
|
||||
|
||||
if (!part[1]) {
|
||||
$(this).parent().find('a').attr('href', 'index.php?route=extension/module/' + part[0] + '&user_token={{ user_token }}');
|
||||
} else {
|
||||
$(this).parent().find('a').attr('href', 'index.php?route=extension/module/' + part[0] + '&user_token={{ user_token }}&module_id=' + part[1]);
|
||||
}
|
||||
});
|
||||
|
||||
$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom').trigger('change');
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,76 @@
|
||||
{{ 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-layout').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">×</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">×</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-layout">
|
||||
<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-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if layouts %}
|
||||
{% for layout in layouts %}
|
||||
<tr>
|
||||
<td class="text-center">{% if layout.layout_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ layout.layout_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ layout.layout_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ layout.name }}</td>
|
||||
<td class="text-right"><a href="{{ layout.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="3">{{ 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,79 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-seo-url" 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">×</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-seo-url" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-query">{{ entry_query }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="query" value="{{ query }}" placeholder="{{ entry_query }}" id="input-query" class="form-control" />
|
||||
{% if error_query %}
|
||||
<div class="text-danger">{{ error_query }}</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-keyword">{{ entry_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="keyword" value="{{ keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control" />
|
||||
{% if error_keyword %}
|
||||
<div class="text-danger">{{ error_keyword }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
{% for store in stores %}
|
||||
{% if store.store_id == store_id %}
|
||||
<option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ store.store_id }}">{{ store.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-language">{{ entry_language }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="language_id" id="input-language" class="form-control">
|
||||
{% for language in languages %}
|
||||
{% if language.language_id == language_id %}
|
||||
<option value="{{ language.language_id }}" selected="selected">{{ language.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ language.language_id }}">{{ language.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,227 @@
|
||||
{{ 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-seo').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-url-alias').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">×</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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div id="filter-seo" 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-query">{{ entry_query }}</label>
|
||||
<input type="text" name="filter_query" value="{{ filter_query }}" placeholder="{{ entry_query }}" id="input-query" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-keyword">{{ entry_keyword }}</label>
|
||||
<input type="text" name="filter_keyword" value="{{ filter_keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-store">{{ entry_store }}</label>
|
||||
<select name="filter_store_id" id="input-store" class="form-control">
|
||||
<option value=""></option>
|
||||
{% if filter_store_id == '0' %}
|
||||
<option value="0" selected="selected">{{ text_default }}</option>
|
||||
{% else %}
|
||||
<option value="0">{{ text_default }}</option>
|
||||
{% endif %}
|
||||
{% for store in stores %}
|
||||
{% if store.store_id == filter_store_id %}
|
||||
<option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ store.store_id }}">{{ store.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-language">{{ entry_language }}</label>
|
||||
<select name="filter_language_id" id="input-language" class="form-control">
|
||||
<option value=""></option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% for language in languages %}
|
||||
{% if language.language_id == filter_language_id %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ language.language_id }}" selected="selected">{{ language.name }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<option value="{{ language.language_id }}">{{ language.name }}</option>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="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-url-alias">
|
||||
<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 == 'query' %}<a href="{{ sort_query }}" class="{{ order|lower }}">{{ column_query }}</a>{% else %}<a href="{{ sort_query }}">{{ column_query }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'keyword' %}<a href="{{ sort_keyword }}" class="{{ order|lower }}">{{ column_keyword }}</a> {% else %}<a href="{{ sort_keyword }}">{{ column_keyword }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'store' %}<a href="{{ sort_store }}" class="{{ order|lower }}">{{ column_store }}</a>{% else %}<a href="{{ sort_store }}">{{ column_store }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'language' %}<a href="{{ sort_language }}" class="{{ order|lower }}">{{ column_language }}</a>{% else %}<a href="{{ sort_language }}">{{ column_language }}</a>{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% if seo_urls %}
|
||||
{% for seo_url in seo_urls %}
|
||||
<tr>
|
||||
<td class="text-center">{% if seo_url.seo_url_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ seo_url.seo_url_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ seo_url.seo_url_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ seo_url.query }}</td>
|
||||
<td class="text-left">{{ seo_url.keyword }}</td>
|
||||
<td class="text-left">{{ seo_url.store }}</td>
|
||||
<td class="text-left">{{ seo_url.language }}</td>
|
||||
<td class="text-right"><a href="{{ seo_url.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="6">{{ 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() {
|
||||
var url = 'index.php?route=design/seo_url&user_token={{ user_token }}';
|
||||
|
||||
var filter_query = $('input[name=\'filter_query\']').val();
|
||||
|
||||
if (filter_query) {
|
||||
url += '&filter_query=' + encodeURIComponent(filter_query);
|
||||
}
|
||||
|
||||
var filter_keyword = $('input[name=\'filter_keyword\']').val();
|
||||
|
||||
if (filter_keyword) {
|
||||
url += '&filter_keyword=' + encodeURIComponent(filter_keyword);
|
||||
}
|
||||
|
||||
var filter_store_id = $('select[name=\'filter_store_id\']').val();
|
||||
|
||||
if (filter_store_id) {
|
||||
url += '&filter_store_id=' + encodeURIComponent(filter_store_id);
|
||||
}
|
||||
|
||||
var filter_language_id = $('select[name=\'filter_language_id\']').val();
|
||||
|
||||
if (filter_language_id) {
|
||||
url += '&filter_language_id=' + encodeURIComponent(filter_language_id);
|
||||
}
|
||||
|
||||
location = url;
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,412 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<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-list"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-12">
|
||||
<div class="list-group">
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{{ text_store }}</h4>
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<select name="store_id" 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="list-group">
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{{ text_template }}</h4>
|
||||
</div>
|
||||
<div id="path"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-9 col-sm-12">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_twig }}</div>
|
||||
<div id="recent">
|
||||
<fieldset>
|
||||
<legend>{{ text_history }}</legend>
|
||||
<div id="history"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="code" style="display: none;">
|
||||
<ul class="nav nav-tabs">
|
||||
</ul>
|
||||
<div class="tab-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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"><!--
|
||||
$('select[name="store_id"]').on('change', function(e) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/path&user_token={{ user_token }}&store_id=' + $('select[name="store_id"]').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$('select[name="store_id"]').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('select[name="store_id"]').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
html = '';
|
||||
|
||||
if (json['directory']) {
|
||||
for (i = 0; i < json['directory'].length; i++) {
|
||||
html += '<a href="' + json['directory'][i]['path'] + '" class="list-group-item directory">' + json['directory'][i]['name'] + ' <i class="fa fa-arrow-right fa-fw pull-right"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['file']) {
|
||||
for (i = 0; i < json['file'].length; i++) {
|
||||
html += '<a href="' + json['file'][i]['path'] + '" class="list-group-item file">' + json['file'][i]['name'] + ' <i class="fa fa-arrow-right fa-fw pull-right"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#path').html(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('select[name="store_id"]').trigger('change');
|
||||
|
||||
$('#path').on('click', 'a.directory', function(e) {
|
||||
console.log($(node).attr('href'));
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var node = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/path&user_token={{ user_token }}&store_id=' + $('select[name="store_id"]').val() + '&path=' + $(node).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).find('i').removeClass('fa-arrow-right');
|
||||
$(node).find('i').addClass('fa-circle-o-notch fa-spin');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).find('i').removeClass('fa-circle-o-notch fa-spin');
|
||||
$(node).find('i').addClass('fa-arrow-right');
|
||||
},
|
||||
success: function(json) {
|
||||
html = '';
|
||||
|
||||
if (json['directory']) {
|
||||
for (i = 0; i < json['directory'].length; i++) {
|
||||
html += '<a href="' + json['directory'][i]['path'] + '" class="list-group-item directory">' + json['directory'][i]['name'] + ' <i class="fa fa-arrow-right fa-fw pull-right"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['file']) {
|
||||
for (i = 0; i < json['file'].length; i++) {
|
||||
html += '<a href="' + json['file'][i]['path'] + '" class="list-group-item file">' + json['file'][i]['name'] + ' <i class="fa fa-arrow-right fa-fw pull-right"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['back']) {
|
||||
html += '<a href="' + json['back']['path'] + '" class="list-group-item directory">' + json['back']['name'] + ' <i class="fa fa-arrow-left fa-fw pull-right"></i></a>';
|
||||
}
|
||||
|
||||
$('#path').html(html);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#path').on('click', 'a.file', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var node = this;
|
||||
|
||||
// Check if the file has an extension
|
||||
var pos = $(node).attr('href').lastIndexOf('.');
|
||||
|
||||
if (pos != -1) {
|
||||
var tab_id = $('select[name="store_id"]').val() + '-' + $(node).attr('href').slice(0, pos).replace(/\//g, '-').replace(/_/g, '-');
|
||||
} else {
|
||||
var tab_id = $('select[name="store_id"]').val() + '-' + $(node).attr('href').replace(/\//g, '-').replace(/_/g, '-');
|
||||
}
|
||||
|
||||
if (!$('#tab-' + tab_id).length) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/template&user_token={{ user_token }}&store_id=' + $('select[name="store_id"]').val() + '&path=' + $(node).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).find('i').removeClass('fa-arrow-right');
|
||||
$(node).find('i').addClass('fa-circle-o-notch fa-spin');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).find('i').removeClass('fa-circle-o-notch fa-spin');
|
||||
$(node).find('i').addClass('fa-arrow-right');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['code']) {
|
||||
$('#code').show();
|
||||
$('#recent').hide();
|
||||
|
||||
$('.nav-tabs').append('<li><a href="#tab-' + tab_id + '" data-toggle="tab">' + $(node).attr('href').split('/').join(' / ') + ' <i class="fa fa-minus-circle"></i></a></li>');
|
||||
|
||||
html = '<div class="tab-pane" id="tab-' + tab_id + '">';
|
||||
html += ' <textarea name="code" rows="10"></textarea>';
|
||||
html += ' <input type="hidden" name="store_id" value="' + $('select[name="store_id"]').val() + '" />';
|
||||
html += ' <input type="hidden" name="path" value="' + $(node).attr('href') + '" />';
|
||||
html += ' <br />';
|
||||
html += ' <div class="pull-right">';
|
||||
html += ' <button type="button" data-loading-text="{{ text_loading }}" class="btn btn-primary"><i class="fa fa-floppy-o"></i> {{ button_save }}</button>';
|
||||
html += ' <button data-loading-text="{{ text_loading }}" class="btn btn-danger"><i class="fa fa-recycle"></i> {{ button_reset }}</button>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('.tab-content').append(html);
|
||||
|
||||
$('.nav-tabs a[href=\'#tab-' + tab_id + '\']').tab('show');
|
||||
|
||||
// Initialize codemirrror
|
||||
var codemirror = CodeMirror.fromTextArea(document.querySelector('.tab-content .active textarea'), {
|
||||
mode: 'text/html',
|
||||
height: '500px',
|
||||
lineNumbers: true,
|
||||
autofocus: true,
|
||||
theme: 'monokai'
|
||||
});
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.nav-tabs a[href=\'#tab-' + tab_id + '\']').tab('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('.nav-tabs').on('click', 'i.fa-minus-circle', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).parent().parent().is('li.active')) {
|
||||
index = $(this).parent().parent().index();
|
||||
|
||||
if (index == 0) {
|
||||
$(this).parent().parent().parent().find('li').eq(index + 1).find('a').tab('show');
|
||||
} else {
|
||||
$(this).parent().parent().parent().find('li').eq(index - 1).find('a').tab('show');
|
||||
}
|
||||
}
|
||||
|
||||
$(this).parent().parent().remove();
|
||||
|
||||
$($(this).parent().attr('href')).remove();
|
||||
|
||||
if (!$('#code > ul > li').length) {
|
||||
$('#code').hide();
|
||||
$('#recent').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('.tab-content').on('click', '.btn-primary', function(e) {
|
||||
var node = this;
|
||||
|
||||
var editor = $('.tab-content .active .CodeMirror')[0].CodeMirror;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/save&user_token={{ user_token }}&store_id=' + $('.tab-content .active input[name="store_id"]').val() + '&path=' + $('.tab-content .active input[name="path"]').val(),
|
||||
type: 'post',
|
||||
data: 'code=' + encodeURIComponent(editor.getValue()),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('#history').load('index.php?route=design/theme/history&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.tab-content').on('click', '.btn-danger', function(e) {
|
||||
if (confirm('{{ text_confirm }}')) {
|
||||
var node = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/reset&user_token={{ user_token }}&store_id=' + $('.tab-content .active input[name="store_id"]').val() + '&path=' + $('.tab-content .active input[name="path"]').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#content > .container-fluid').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
var codemirror = $('.tab-content .active .CodeMirror')[0].CodeMirror;
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#history').delegate('.pagination a', 'click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#history').load(this.href);
|
||||
});
|
||||
|
||||
$('#history').load('index.php?route=design/theme/history&user_token={{ user_token }}');
|
||||
|
||||
$('#history').on('click', '.btn-primary', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var node = this;
|
||||
|
||||
// Check if the file has an extension
|
||||
var tab_id = $(node).parent().parent().find('input[name="store_id"]').val() + '-' + $(node).parent().parent().find('input[name="path"]').val().replace(/\//g, '-').replace(/_/g, '-');
|
||||
|
||||
if (!$('#tab-' + tab_id).length) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme/template&user_token={{ user_token }}&store_id=' + $(node).parent().parent().find('input[name="store_id"]').val() + '&path=' + $(node).parent().parent().find('input[name="path"]').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['code']) {
|
||||
$('#code').show();
|
||||
$('#recent').hide();
|
||||
|
||||
$('.nav-tabs').append('<li><a href="#tab-' + tab_id + '" data-toggle="tab">' + $(node).parent().parent().find('input[name="path"]').val().split('/').join(' / ') + ' <i class="fa fa-minus-circle"></i></a></li>');
|
||||
|
||||
html = '<div class="tab-pane" id="tab-' + tab_id + '">';
|
||||
html += ' <textarea name="code" rows="10"></textarea>';
|
||||
html += ' <input type="hidden" name="store_id" value="' + $(node).parent().parent().find('input[name="store_id"]').val() + '" />';
|
||||
html += ' <input type="hidden" name="path" value="' + $(node).parent().parent().find('input[name="path"]').val() + '.twig" />';
|
||||
html += ' <br />';
|
||||
html += ' <div class="pull-right">';
|
||||
html += ' <button type="button" data-loading-text="{{ text_loading }}" class="btn btn-primary"><i class="fa fa-floppy-o"></i> {{ button_save }}</button>';
|
||||
html += ' <button data-loading-text="{{ text_loading }}" class="btn btn-danger"><i class="fa fa-recycle"></i> {{ button_reset }}</button>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('.tab-content').append(html);
|
||||
|
||||
$('.nav-tabs a[href=\'#tab-' + tab_id + '\']').tab('show');
|
||||
|
||||
// Initialize codemirrror
|
||||
var codemirror = CodeMirror.fromTextArea(document.querySelector('.tab-content .active textarea'), {
|
||||
mode: 'text/html',
|
||||
height: '500px',
|
||||
lineNumbers: true,
|
||||
autofocus: true,
|
||||
theme: 'monokai'
|
||||
});
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.nav-tabs a[href=\'#tab-' + tab_id + '\']').tab('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#history').on('click', '.btn-danger', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm('{{ text_confirm }}')) {
|
||||
var node = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(node).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(node).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(node).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#history').before('<div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#history').before('<div class="alert alert-success alert-dismissible"><i class="fa fa-exclamation-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
|
||||
$('#history').load('index.php?route=design/theme/history&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-left">{{ column_store }}</td>
|
||||
<td class="text-left">{{ column_route }}</td>
|
||||
<td class="text-left">{{ column_theme }}</td>
|
||||
<td class="text-left">{{ column_date_added }}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if histories %}
|
||||
{% for history in histories %}
|
||||
<tr>
|
||||
<td class="text-left">{{ history.store }}
|
||||
<input type="hidden" name="store_id" value="{{ history.store_id }}" /></td>
|
||||
<td class="text-left">{{ history.route }}
|
||||
<input type="hidden" name="path" value="{{ history.route }}" /></td>
|
||||
<td class="text-left">{{ history.theme }}</td>
|
||||
<td class="text-left">{{ history.date_added }}</td>
|
||||
<td class="text-right"><a href="{{ history.edit }}" data-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa fa-pencil"></i></a> <a href="{{ history.delete }}" data-loading-text="{{ text_loading }}" data-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="fa fa fa-trash-o"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="5">{{ 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,219 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-translation" 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">×</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-translation" 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 %}
|
||||
{% if store.store_id == store_id %}
|
||||
<option value="{{ store.store_id }}" selected="selected">{{ store.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ store.store_id }}">{{ store.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-language">{{ entry_language }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="language_id" id="input-language" class="form-control">
|
||||
{% for language in languages %}
|
||||
{% if language.language_id == language_id %}
|
||||
<option value="{{ language.language_id }}" selected="selected">{{ language.name }}</option>
|
||||
{% else %}
|
||||
<option value="{{ language.language_id }}">{{ language.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-route">{{ entry_route }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="route" id="input-route" class="form-control">
|
||||
{% if route %}
|
||||
<option value="{{ route }}" selected="selected">{{ route }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-key">{{ entry_key }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="key" id="input-key" class="form-control">
|
||||
{% if key %}
|
||||
<option value="{{ key }}" selected="selected">{{ key }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
<input type="text" name="key" value="{{ key }}" placeholder="{{ entry_key }}" class="form-control" />
|
||||
{% if error_key %}
|
||||
<div class="text-danger">{{ error_key }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-default">{{ entry_default }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="default" placeholder="{{ entry_default }}" rows="5" id="input-default" class="form-control" disabled="disabled">{% if default %}{{ default }}{% endif %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-value">{{ entry_value }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="value" rows="5" placeholder="{{ entry_value }}" id="input-value" class="form-control">{{ value }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
{% if key %}
|
||||
$('select[name="store_id"]').prop('disabled', true);
|
||||
$('select[name="language_id"]').prop('disabled', true);
|
||||
$('select[name="route"]').prop('disabled', true);
|
||||
$('select[name="key"]').prop('disabled', true);
|
||||
$('input[name="key"]').prop('disabled', true);
|
||||
{% else %}
|
||||
$('select[name="language_id"]').on('change', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/translation/path&user_token={{ user_token }}&language_id=' + $('select[name="language_id"]').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$('select[name="route"]').html('');
|
||||
$('select[name="key"]').html('');
|
||||
$('input[name="key"]').val('');
|
||||
$('textarea[name="default"]').val('');
|
||||
$('select[name="store_id"]').prop('disabled', true);
|
||||
$('select[name="language_id"]').prop('disabled', true);
|
||||
$('select[name="route"]').prop('disabled', true);
|
||||
$('select[name="key"]').prop('disabled', true);
|
||||
$('input[name="key"]').prop('disabled', true);
|
||||
$('textarea[name="value"]').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('select[name="store_id"]').prop('disabled', false);
|
||||
$('select[name="language_id"]').prop('disabled', false);
|
||||
$('select[name="route"]').prop('disabled', false);
|
||||
},
|
||||
success: function(json) {
|
||||
html = '<option value=""></option>';
|
||||
|
||||
if (json) {
|
||||
for (i = 0; i < json.length; i++) {
|
||||
if (i == 0) {
|
||||
html += '<option value="' + json[i] + '" selected="selected">' + json[i] + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + json[i] + '">' + json[i] + '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('select[name="route"]').html(html);
|
||||
|
||||
$('select[name="route"]').trigger('change');
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var translation = [];
|
||||
|
||||
$('select[name="route"]').on('change', function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/translation/translation&user_token={{ user_token }}&language_id=' + $('select[name="language_id"]').val() + '&path=' + $('select[name="route"]').val(),
|
||||
dataType: 'json',
|
||||
{% if not key %}
|
||||
beforeSend: function() {
|
||||
$('select[name="key"]').html('');
|
||||
$('input[name="key"]').val('');
|
||||
$('textarea[name="default"]').val('');
|
||||
$('textarea[name="value"]').val('');
|
||||
$('select[name="store_id"]').prop('disabled', true);
|
||||
$('select[name="language_id"]').prop('disabled', true);
|
||||
$('select[name="route"]').prop('disabled', true);
|
||||
$('select[name="key"]').prop('disabled', true);
|
||||
$('textarea[name="value"]').prop('disabled', true);
|
||||
},
|
||||
complete: function() {
|
||||
$('select[name="store_id"]').prop('disabled', false);
|
||||
$('select[name="language_id"]').prop('disabled', false);
|
||||
$('select[name="route"]').prop('disabled', false);
|
||||
$('select[name="key"]').prop('disabled', false);
|
||||
$('textarea[name="value"]').prop('disabled', false);
|
||||
},
|
||||
{% endif %}
|
||||
success: function(json) {
|
||||
translation = [];
|
||||
|
||||
html = '<option value=""></option>';
|
||||
|
||||
if (json) {
|
||||
for (i = 0; i < json.length; i++) {
|
||||
translation[json[i]['key']] = json[i]['value'];
|
||||
|
||||
if (i == 0) {
|
||||
html += '<option value="' + json[i]['key'] + '" selected="selected">' + json[i]['key'] + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + json[i]['key'] + '">' + json[i]['key'] + '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('select[name="key"]').html(html);
|
||||
|
||||
$('select[name="key"]').trigger('change');
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('select[name="language_id"]').trigger('change');
|
||||
|
||||
$('select[name="key"]').on('change', function() {
|
||||
if ($(this).val()) {
|
||||
$('textarea[name="default"]').val(translation[$('select[name="key"]').val()]);
|
||||
$('input[name="key"]').val($('select[name="key"]').val());
|
||||
|
||||
$('input[name="key"]').prop('disabled', true);
|
||||
} else {
|
||||
$('textarea[name="default"]').val('');
|
||||
|
||||
$('input[name="key"]').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
//--></script>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,79 @@
|
||||
{{ 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-translation').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">×</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">×</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-translation">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<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 == 'store' %}<a href="{{ sort_store }}" class="{{ order|lower }}">{{ column_store }}</a> {% else %}<a href="{{ sort_store }}">{{ column_store }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'language' %}<a href="{{ sort_language }}" class="{{ order|lower }}">{{ column_language }}</a>{% else %}<a href="{{ sort_language }}">{{ column_language }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'route' %}<a href="{{ sort_route }}" class="{{ order|lower }}">{{ column_route }}</a> {% else %}<a href="{{ sort_route }}">{{ column_route }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'key' %}<a href="{{ sort_key }}" class="{{ order|lower }}">{{ column_key }}</a>{% else %}<a href="{{ sort_key }}">{{ column_key }}</a>{% endif %}</td>
|
||||
<td class="text-left">{% if sort == 'value' %}<a href="{{ sort_value }}" class="{{ order|lower }}">{{ column_value }}</a>{% else %}<a href="{{ sort_value }}">{{ column_value }}</a>{% endif %}</td>
|
||||
<td class="text-right">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if translations %}
|
||||
{% for translation in translations %}
|
||||
<tr>
|
||||
<td class="text-center">{% if translation.translation_id in selected %}
|
||||
<input type="checkbox" name="selected[]" value="{{ translation.translation_id }}" checked="checked" />
|
||||
{% else %}
|
||||
<input type="checkbox" name="selected[]" value="{{ translation.translation_id }}" />
|
||||
{% endif %}</td>
|
||||
<td class="text-left">{{ translation.store }}</td>
|
||||
<td class="text-left">{{ translation.language }}</td>
|
||||
<td class="text-left">{{ translation.route }}</td>
|
||||
<td class="text-left">{{ translation.key }}</td>
|
||||
<td class="text-left">{{ translation.value }}</td>
|
||||
<td class="text-right"><a href="{{ translation.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="7">{{ 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,23 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<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-exclamation-triangle"></i> {{ heading_title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="text-center">{{ text_not_found }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<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-exclamation-triangle"></i> {{ heading_title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="text-center">{{ text_permission }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,88 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-primary" form="form" data-toggle="tooltip" title="{{ button_save }}"><i class="fa fa-save"></i></button>
|
||||
<a href="{{ mapping }}" class="btn btn-warning" data-toggle="tooltip" title="{{ button_mapping }}"><i class="fa fa-tags"></i></a>
|
||||
<a href="{{ shipping_taxes }}" class="btn btn-warning" data-toggle="tooltip" title="{{ button_shipping_taxes }}"><i class="fa fa-truck"></i></a>
|
||||
<a href="{{ campaign }}" class="btn btn-warning" data-toggle="tooltip" title="{{ button_campaign }}"><i class="fa fa-cogs"></i></a>
|
||||
<a href="{{ text_video_tutorial_url_setup }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_setup }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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 success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><i class="fa fa-close"></i></button>
|
||||
<i class="fa fa-check-circle"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="blockerError" style="display: none;" class="alert alert-danger">
|
||||
<i class="fa fa-exclamation-triangle"></i> {{ error_adblock }}
|
||||
</div>
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><i class="fa fa-close"></i></button>
|
||||
<i class="fa fa-exclamation-triangle"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="warning-container">
|
||||
{% if warning %}
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><i class="fa fa-close"></i></button>
|
||||
<i class="fa fa-info-circle"></i> {{ warning }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="alert-container"></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> <span>{{ text_panel_heading }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form">
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs mainMenuTabs">
|
||||
<li class="active"><a href="#tab_ads" data-toggle="tab">{{ tab_text_ads }}</a></li>
|
||||
<li><a href="#tab_reports" data-toggle="tab">{{ tab_text_reports }}</a></li>
|
||||
<li><a href="#tab_settings" data-toggle="tab">{{ tab_text_settings }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane" id="tab_settings">{{ tab_settings }}</div>
|
||||
<div class="tab-pane active" id="tab_ads">{{ tab_ads }}</div>
|
||||
<div class="tab-pane" id="tab_reports">{{ tab_reports }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.adBanner {
|
||||
background-color: transparent;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
}
|
||||
</style>
|
||||
<div id="wrapTest">
|
||||
<div class="adBanner">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#blockerError').toggle($("#wrapTest").height() == 0);
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,907 @@
|
||||
<!-- The filters -->
|
||||
<div id="filter-ads" class="col-lg-3 col-lg-push-9 col-md-12">
|
||||
<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">{{ text_product_name }}</label>
|
||||
<input type="text" name="filter_name" value="" placeholder="{{ text_product_name }}" id="input-name" class="form-control" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-model">{{ text_product_model }}</label>
|
||||
<input type="text" name="filter_model" value="" placeholder="{{ text_product_model }}" id="input-model" class="form-control" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-category">{{ text_product_category }}</label>
|
||||
<div class="category-select-container">
|
||||
<input id="input-category" type="text" name="category_autocomplete" value="" class="form-control" placeholder="{{ text_product_category }}" />
|
||||
<input type="hidden" name="filter_category_id" value="">
|
||||
<button id="button-category-remove" class="btn btn-default" disabled><i class="fa fa-close"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="select-is-modified">{{ text_product_is_modified }}</label>
|
||||
<select class="form-control" name="filter_is_modified" id="select-is-modified">
|
||||
<option value="">{{ text_all }}</option>
|
||||
<option value="0">{{ text_no }}</option>
|
||||
<option value="1">{{ text_yes }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<button type="button" id="button-filter" class="btn btn-default"><i class="fa fa-filter"></i> {{ text_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The ads -->
|
||||
<div class="col-lg-9 col-lg-pull-3 col-md-12">
|
||||
<div class="alert alert-info">
|
||||
{{ text_ads_intro }}
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right form-control-static">
|
||||
<button type="button" class="btn btn-default button-popup-bulk-edit form-control-static"><i class="fa fa-cog"></i> {{ button_bulk_edit_google_fields }}</button>
|
||||
<div class="btn-group form-control-static">
|
||||
<button type="button" class="btn btn-default dropdown-toggle button-advertise" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ button_select_campaigns }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right campaign-dropdown">
|
||||
{% for campaign in campaigns %}
|
||||
<li class="text-pre-line"><a><input type="checkbox" name="target_ids[]" value="{{ campaign.target_id }}" /> <span class="form-control-static">{{ campaign.campaign_name }}</span></a></li>
|
||||
{% endfor %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="text-center padding-lr-5">
|
||||
<p class="text-left text-sm text-pre-line"><em>{{ text_maximum_five }}</em></p>
|
||||
<button class="btn btn-success btn-xs button-apply-advertising"><i class="fa fa-check"></i> {{ button_apply }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="alert-container"></div>
|
||||
<div id="selection-container"></div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead id="list-head">
|
||||
<tr>
|
||||
<th class="text-center"><input type="checkbox" name="select_all" /></th>
|
||||
<th class="text-center">{{ text_image }}</th>
|
||||
<th class="text-left visible-lg"><a href="javascript:void(0)" data-sort="name">{{ text_product_name }}</a></th>
|
||||
<th class="text-left"><a href="javascript:void(0)" data-sort="model">{{ text_product_model }}</a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="impressions"><i data-toggle="tooltip" data-original-title="{{ text_impressions }}" class="fa fa-eye"></i></a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="clicks"><i data-toggle="tooltip" data-original-title="{{ text_clicks }}" class="fa fa-hand-pointer-o"></i></a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="cost"><i data-toggle="tooltip" data-original-title="{{ text_cost }}" class="fa fa-dollar"></i></a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="conversions"><i data-toggle="tooltip" data-original-title="{{ text_conversions }}" class="fa fa-handshake-o"></i></a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="conversion_value"><i data-toggle="tooltip" data-original-title="{{ text_conversion_value }}" class="fa fa-line-chart"></i></a></th>
|
||||
</a></th>
|
||||
<th class="text-left">{{ text_campaigns }}</th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="destination_status">{{ text_destination_status }}</a></th>
|
||||
<th class="text-center"><a href="javascript:void(0)" data-sort="has_issues">{{ text_issues }}</a></th>
|
||||
<th class="text-right">{{ text_action }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="pull-right form-control-static">
|
||||
<button type="button" class="btn btn-default button-popup-bulk-edit form-control-static"><i class="fa fa-cog"></i> {{ button_bulk_edit_google_fields }}</button>
|
||||
<div class="btn-group dropup form-control-static">
|
||||
<button type="button" class="btn btn-default dropdown-toggle button-advertise" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ button_select_campaigns }} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right campaign-dropdown">
|
||||
{% for campaign in campaigns %}
|
||||
<li class="text-pre-line"><a><input type="checkbox" name="target_ids[]" value="{{ campaign.target_id }}" /> <span class="form-control-static">{{ campaign.campaign_name }}</span></a></li>
|
||||
{% endfor %}
|
||||
<li role="separator" class="divider"></li>
|
||||
<li class="text-center padding-lr-5">
|
||||
<p class="text-left text-sm text-pre-line"><em>{{ text_maximum_five }}</em></p>
|
||||
<button class="btn btn-success btn-sm button-apply-advertising"><i class="fa fa-check"></i> {{ button_apply }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="list-pagination">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="pull-right list-showing form-control-static">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.padding-lr-5 {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#select_all_pages, #deselect_all_pages {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.category-select-container {
|
||||
padding-right: 50px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.category-select-container #button-category-remove {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.text-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
</style>
|
||||
<script id="template-success" type="text/template">
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {message}
|
||||
</div>
|
||||
</script>
|
||||
<script id="template-error" type="text/template">
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {message}
|
||||
</div>
|
||||
</script>
|
||||
<script id="template-warning" type="text/template">
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i> {message}
|
||||
</div>
|
||||
</script>
|
||||
<script id="template-popup-product" type="text/template">
|
||||
<div class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<h4 class="modal-title">{title}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{body}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ button_close }}</button>
|
||||
<button type="button" class="btn btn-primary" id="button-popup-product-save">{{ button_save }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script id="template-popup-issues" type="text/template">
|
||||
<div class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<h4 class="modal-title">{title}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{body}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ button_close }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var selector = {
|
||||
ad_wrap: '#wrapTest',
|
||||
campaign_dropdown: {
|
||||
container: '.campaign-dropdown',
|
||||
element: '.campaign-dropdown li',
|
||||
first_container_checkboxes: '.campaign-dropdown:first li input[type=checkbox]',
|
||||
checkboxes: '.campaign-dropdown li input[type=checkbox]'
|
||||
},
|
||||
popup: {
|
||||
product: {
|
||||
form: '#form-popup-product',
|
||||
template: '#template-popup-product',
|
||||
button_show: '[data-product-id]',
|
||||
button_save: '#button-popup-product-save'
|
||||
},
|
||||
issues: {
|
||||
template: '#template-popup-issues',
|
||||
button_show: '[data-url-popup-issues]'
|
||||
}
|
||||
},
|
||||
template_success: '#template-success',
|
||||
template_error: '#template-error',
|
||||
template_warning: '#template-warning',
|
||||
alert_container: '#alert-container',
|
||||
warning_container: '#warning-container',
|
||||
selection_container: '#selection-container',
|
||||
button_advertise: '.button-advertise',
|
||||
button_bulk_edit: '.button-popup-bulk-edit',
|
||||
button_apply_advertising: '.button-apply-advertising',
|
||||
row: '.product-row',
|
||||
highlightable: '.highlightable',
|
||||
checkboxes: 'input[type="checkbox"][name="select[]"]',
|
||||
select_all: 'input[type="checkbox"][name="select_all"]',
|
||||
select_all_pages: '#select_all_pages',
|
||||
deselect_all_pages: '#deselect_all_pages',
|
||||
list: '#list',
|
||||
button_filter: '#button-filter',
|
||||
head: '#list-head',
|
||||
pagination: '.list-pagination',
|
||||
showing: '.list-showing',
|
||||
page: '.list-pagination .pagination li > a',
|
||||
filter: {
|
||||
product_name: 'input[name="filter_name"]',
|
||||
product_model: 'input[name="filter_model"]',
|
||||
category: 'input[name="filter_category_id"]',
|
||||
category_autocomplete: 'input[name="category_autocomplete"]',
|
||||
button_category_remove: '#button-category-remove',
|
||||
is_modified: 'select[name="filter_is_modified"]'
|
||||
}
|
||||
};
|
||||
|
||||
var total_items = 0;
|
||||
var total_pages = 1;
|
||||
var selected_all_pages = false;
|
||||
|
||||
var makeDestinationStatus = function(status) {
|
||||
switch (status) {
|
||||
case 'pending' :
|
||||
return '<span class="label label-warning">{{ text_label_pending }}</span>';
|
||||
case 'approved' :
|
||||
return '<span class="label label-success">{{ text_label_approved }}</span>';
|
||||
case 'disapproved' :
|
||||
return '<span class="label label-danger">{{ text_label_disapproved }}</span>';
|
||||
}
|
||||
}
|
||||
|
||||
var makeIssuesButton = function(has_issues, url) {
|
||||
if (has_issues) {
|
||||
return '<a data-toggle="tooltip" title="{{ text_view_issues }}" class="btn btn-warning" data-url-popup-issues="' + url + '"><i class="fa fa-exclamation-triangle"></i></a>';
|
||||
}
|
||||
|
||||
return '–';
|
||||
}
|
||||
|
||||
var makeCampaigns = function(campaigns) {
|
||||
var html = '';
|
||||
|
||||
if (campaigns.length > 0) {
|
||||
var result = $.map(campaigns, function(element) {
|
||||
return element.campaign_name;
|
||||
});
|
||||
|
||||
html = result.join('<br />');
|
||||
}
|
||||
|
||||
return html != '' ? html : '<span class="label label-default">{{ text_label_unassigned }}</span>';
|
||||
}
|
||||
|
||||
var getFilterPostData = function() {
|
||||
return {
|
||||
product_name: $(selector.filter.product_name).val(),
|
||||
product_model: $(selector.filter.product_model).val(),
|
||||
category_id: $(selector.filter.category).val(),
|
||||
is_modified: $(selector.filter.is_modified).val()
|
||||
};
|
||||
};
|
||||
|
||||
var listProducts = function() {
|
||||
$.ajax({
|
||||
url: '{{ list_ads }}',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
sort: $(selector.list).data('sort'),
|
||||
order: $(selector.list).data('order'),
|
||||
page: $(selector.list).data('page'),
|
||||
filter: getFilterPostData()
|
||||
},
|
||||
beforeSend: function() {
|
||||
$('[data-sort]').removeClass('asc').removeClass('desc');
|
||||
|
||||
$('[data-sort="' + $(selector.list).data('sort') + '"]').addClass($(selector.list).data('order') == 'ASC' ? 'asc' : 'desc');
|
||||
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="text-center">{{ text_loading }}</div></td></tr>');
|
||||
|
||||
$(selector.button_advertise).attr('disabled', true).toggleClass('btn-info', false).toggleClass('btn-default', true);
|
||||
|
||||
$(selector.button_bulk_edit).attr('disabled', true);
|
||||
|
||||
$(selector.campaign_dropdown.checkboxes).prop('checked', false).trigger('change');
|
||||
|
||||
$(selector.select_all).prop('checked', false);
|
||||
|
||||
total_items = 0;
|
||||
total_pages = 1;
|
||||
$(selector.deselect_all_pages).trigger('click');
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
if ($(selector.ad_wrap).height() == 0) {
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="alert alert-danger">{{ error_adblock }}</div></td></tr>');
|
||||
} else {
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="alert alert-danger">' + textStatus + ': ' + errorThrown + '</div></td></tr>');
|
||||
}
|
||||
},
|
||||
success: function(data) {
|
||||
$(selector.list).empty();
|
||||
|
||||
if (typeof data.error != 'undefined') {
|
||||
$(selector.pagination).empty();
|
||||
$(selector.showing).empty();
|
||||
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="alert alert-danger">' + data.error + '</div></td></tr>');
|
||||
} else {
|
||||
if (data.products.length) {
|
||||
$(data.products).each(function(index, product) {
|
||||
var html = '<tr class="product-row">';
|
||||
|
||||
html += '<td class="highlightable text-center"><input type="checkbox" name="select[]" value="' + product.product_id + '"></td>';
|
||||
html += '<td class="highlightable text-center"><img class="img-thumbnail" src="' + product.image + '" alt="' + product.name + '" /></td>';
|
||||
html += '<td class="highlightable text-left visible-lg">' + product.name + '</td>';
|
||||
html += '<td class="highlightable text-left">' + product.model + '</td>';
|
||||
html += '<td class="highlightable text-center">' + product.impressions + '</td>';
|
||||
html += '<td class="highlightable text-center">' + product.clicks + '</td>';
|
||||
html += '<td class="highlightable text-center">' + product.cost + '</td>';
|
||||
html += '<td class="highlightable text-center">' + product.conversions + '</td>';
|
||||
html += '<td class="highlightable text-center">' + product.conversion_value + '</td>';
|
||||
html += '<td class="highlightable text-left no-wrap">' + makeCampaigns(product.campaigns) + '</td>';
|
||||
html += '<td class="highlightable text-center">' + makeDestinationStatus(product.destination_status) + '</td>';
|
||||
html += '<td class="highlightable text-center">' + makeIssuesButton(product.has_issues, product.url_issues) + '</td>';
|
||||
html += '<td class="highlightable text-right"><button class="btn ' + (product.is_modified ? "btn-default" : "btn-warning") + '" data-toggle="tooltip" title="' + (product.is_modified ? "{{ button_product_edit }}" : "{{ button_product_set }}") + '" data-product-id="' + product.product_id + '" data-product-advertise-google-id="' + product.product_advertise_google_id + '"><i class="fa fa-cog"></i></button></td>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
$(selector.list).append(html);
|
||||
});
|
||||
} else {
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="text-center">{{ text_no_results }}</div></td></tr>');
|
||||
}
|
||||
|
||||
$(selector.pagination).html(data.pagination);
|
||||
$(selector.showing).html(data.showing);
|
||||
|
||||
total_items = data.total;
|
||||
total_pages = data.pages;
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
updateSelected();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var displayWarning = function(message) {
|
||||
$(selector.warning_container).html($(selector.template_warning).html().replace(/{message}/g, message));
|
||||
}
|
||||
|
||||
var displayError = function(message) {
|
||||
$(selector.alert_container).html($(selector.template_error).html().replace(/{message}/g, message));
|
||||
}
|
||||
|
||||
var displaySuccess = function(message) {
|
||||
$(selector.alert_container).html($(selector.template_success).html().replace(/{message}/g, message));
|
||||
}
|
||||
|
||||
var getPopupHtml = function(selector, data) {
|
||||
return $(selector).html().replace(/{body}/g, data.body).replace(/{title}/g, data.title);
|
||||
}
|
||||
|
||||
var advertiseChange = function() {
|
||||
var post_data = {
|
||||
all_pages : selected_all_pages ? '1' : '0',
|
||||
filter: getFilterPostData(),
|
||||
select : [],
|
||||
target_ids : []
|
||||
};
|
||||
|
||||
$(selector.campaign_dropdown.first_container_checkboxes + ':checked').each(function(index, element) {
|
||||
post_data.target_ids.push($(element).val());
|
||||
});
|
||||
|
||||
$(selector.checkboxes + ':checked').each(function(index, element) {
|
||||
post_data.select.push($(element).val());
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '{{ advertise }}',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
data: post_data,
|
||||
beforeSend: function() {
|
||||
$(selector.list).html('<tr><td colspan="' + $(selector.head).find('th').length + '"><div class="text-center">{{ text_loading }}</div></td></tr>');
|
||||
|
||||
$(selector.campaign_dropdown.container).closest('.btn-group').removeClass('open');
|
||||
|
||||
$(selector.alert_container).empty();
|
||||
$(selector.warning_container).empty();
|
||||
|
||||
$(selector.button_advertise).attr('disabled', true).toggleClass('btn-info', false).toggleClass('btn-default', true);
|
||||
|
||||
$(selector.button_bulk_edit).attr('disabled', true);
|
||||
|
||||
$(selector.select_all).prop('checked', false);
|
||||
|
||||
total_items = 0;
|
||||
total_pages = 1;
|
||||
$(selector.deselect_all_pages).trigger('click');
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
displayError(textStatus + ': ' + errorThrown);
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.warning) {
|
||||
displayWarning(data.warning);
|
||||
}
|
||||
|
||||
if (data.error) {
|
||||
displayError(data.error);
|
||||
} else if (data.success) {
|
||||
displaySuccess(data.success);
|
||||
}
|
||||
|
||||
listProducts();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var updateSelected = function() {
|
||||
var selected = $(selector.checkboxes + ':checked').length;
|
||||
var selection_text = '{{ text_selection_page }}'.replace(/{selected_page}/, selected).replace(/{total}/, total_items);
|
||||
var deselection_text = '{{ text_selection_all }}'.replace(/{total}/, total_items);
|
||||
|
||||
if (selected_all_pages) {
|
||||
$(selector.selection_container).html('<div class="alert alert-warning"><i class="fa fa-exclamation-triangle"></i> ' + deselection_text + '</div>');
|
||||
} else {
|
||||
if (selected > 0 && total_pages > 1) {
|
||||
$(selector.selection_container).html('<div class="alert alert-warning"><i class="fa fa-exclamation-triangle"></i> ' + selection_text + '</div>');
|
||||
} else {
|
||||
$(selector.selection_container).empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var googleFieldsPopup = function(settings) {
|
||||
var data = {
|
||||
title: '{{ text_popup_loading_title }}',
|
||||
body: '<p>{{ text_popup_loading_body }}<p>'
|
||||
};
|
||||
|
||||
var modal = $(getPopupHtml(selector.popup.product.template, data));
|
||||
|
||||
var ajaxSuccess = function(data) {
|
||||
var new_html = getPopupHtml(selector.popup.product.template, data);
|
||||
|
||||
$(modal).find('.modal-body').html($(new_html).find('.modal-body').html());
|
||||
$(modal).find('.modal-title').html($(new_html).find('.modal-title').html());
|
||||
|
||||
$.each(data.required_fields, function(key, element) {
|
||||
if (element.selected_field !== null) {
|
||||
$.each(element.selected_field, function(dependency, values) {
|
||||
$(modal).find('.modal-body').find('[name="' + dependency + '"]').change(function(e) {
|
||||
var newValue = $(this).val();
|
||||
|
||||
$(modal).find('.modal-body').find('[name="' + key + '"]').closest('.form-group').removeClass('required');
|
||||
|
||||
$.each(element.selected_field, function(k, values) {
|
||||
if (values.indexOf(newValue) >= 0) {
|
||||
$(modal).find('.modal-body').find('[name="' + key + '"]').closest('.form-group').addClass('required');
|
||||
}
|
||||
});
|
||||
}).trigger('change');
|
||||
});
|
||||
} else {
|
||||
$(modal).find('.modal-body').find('[name="' + key + '"]').closest('.form-group').addClass('required');
|
||||
}
|
||||
});
|
||||
|
||||
if (data.success) {
|
||||
$(modal).modal('hide');
|
||||
|
||||
displaySuccess(data.success_message);
|
||||
|
||||
settings.success_callback(data);
|
||||
}
|
||||
};
|
||||
|
||||
var ajaxError = function(jqXHR, textStatus, errorThrown) {
|
||||
var new_html = getPopupHtml(selector.popup.product.template, {
|
||||
title: '{{ text_popup_error_title }}',
|
||||
body: '{{ text_popup_error_body }}'.replace(/{error}/g, errorThrown)
|
||||
});
|
||||
|
||||
$(modal).find('.modal-body').html($(new_html).find('.modal-body').html());
|
||||
$(modal).find('.modal-title').html($(new_html).find('.modal-title').html());
|
||||
};
|
||||
|
||||
$(modal).on('hidden.bs.modal', function(e) {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$(modal).on('shown.bs.modal', function(e) {
|
||||
$(selector.popup.product.button_save).click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url_popup }}',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'submit',
|
||||
operand: settings.operand,
|
||||
form: $(selector.popup.product.form).serializeObject()
|
||||
},
|
||||
beforeSend: function() {
|
||||
$(modal).modal('show');
|
||||
},
|
||||
success: ajaxSuccess,
|
||||
error: ajaxError,
|
||||
complete: function() {
|
||||
// Highlight any found errors
|
||||
$(modal).find('.modal-body').find('.text-danger').each(function(index, element) {
|
||||
$(element).closest('.form-group').addClass('has-error');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url_popup }}',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
data: {
|
||||
action : 'view',
|
||||
operand : settings.operand
|
||||
},
|
||||
beforeSend: function() {
|
||||
$(modal).modal('show');
|
||||
},
|
||||
success: ajaxSuccess,
|
||||
error: ajaxError
|
||||
});
|
||||
}
|
||||
|
||||
$(document)
|
||||
.on('click', selector.page, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(selector.list).data('page', parseInt($(this).attr('href')));
|
||||
|
||||
listProducts();
|
||||
})
|
||||
.on('click', '[data-sort]', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(selector.list).data('sort', $(this).attr('data-sort'));
|
||||
|
||||
$(selector.list).data('order', $(selector.list).data('order') == 'ASC' ? 'DESC' : 'ASC');
|
||||
|
||||
listProducts();
|
||||
})
|
||||
.on('click', selector.button_filter, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(selector.list).data('page', 1);
|
||||
|
||||
listProducts();
|
||||
})
|
||||
.on('change', selector.select_all, function(e) {
|
||||
if ($(this).is(':checked')) {
|
||||
$(selector.checkboxes).prop('checked', true).trigger('change');
|
||||
} else {
|
||||
$(selector.checkboxes).prop('checked', false).trigger('change');
|
||||
}
|
||||
|
||||
updateSelected();
|
||||
})
|
||||
.on ('click', selector.select_all_pages, function(e) {
|
||||
selected_all_pages = true;
|
||||
|
||||
$(selector.select_all).prop('checked', true).trigger('change').attr('disabled', true);
|
||||
$(selector.checkboxes).attr('disabled', true);
|
||||
})
|
||||
.on ('click', selector.deselect_all_pages, function(e) {
|
||||
selected_all_pages = false;
|
||||
|
||||
$(selector.select_all).prop('checked', false).trigger('change').attr('disabled', false);
|
||||
$(selector.checkboxes).attr('disabled', false);
|
||||
})
|
||||
.on('change', selector.checkboxes, function(e) {
|
||||
$(this).closest(selector.row).find(selector.highlightable).removeClass('active');
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
$(this).closest(selector.row).find(selector.highlightable).addClass('active');
|
||||
}
|
||||
|
||||
var status = $(selector.checkboxes + ":checked").length == 0;
|
||||
|
||||
$(selector.button_advertise).attr('disabled', status).toggleClass('btn-info', !status).toggleClass('btn-default', status);
|
||||
|
||||
$(selector.button_bulk_edit).attr('disabled', status);
|
||||
|
||||
updateSelected();
|
||||
})
|
||||
.on('hide.bs.dropdown', function(e) {
|
||||
if ($(event.target).closest(selector.campaign_dropdown.container).length > 0) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.on('change', selector.campaign_dropdown.checkboxes, function(e) {
|
||||
var this_parent = $(this).closest(selector.campaign_dropdown.container)[0];
|
||||
var this_value = $(this).attr('value');
|
||||
var this_checked = $(this).is(':checked');
|
||||
var remaining_status;
|
||||
|
||||
$(selector.campaign_dropdown.container).each(function(index, element) {
|
||||
if (element != this_parent) {
|
||||
var other_checkbox = $(element).find('input[type="checkbox"][value="' + this_value + '"]');
|
||||
|
||||
$(other_checkbox).prop('checked', this_checked);
|
||||
|
||||
$(other_checkbox).closest(selector.campaign_dropdown.element).toggleClass('active', this_checked);
|
||||
}
|
||||
});
|
||||
|
||||
$(this).closest(selector.campaign_dropdown.element).toggleClass('active', this_checked);
|
||||
|
||||
// Disable/Enable all remaining checkboxes depending on the reached limit
|
||||
remaining_status = $(selector.campaign_dropdown.first_container_checkboxes + ':checked').length == 5;
|
||||
|
||||
$(selector.campaign_dropdown.checkboxes + ":not(:checked)").attr('disabled', remaining_status);
|
||||
})
|
||||
.on('click', selector.button_apply_advertising, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
advertiseChange();
|
||||
})
|
||||
.on('click', selector.popup.product.button_show, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
googleFieldsPopup({
|
||||
operand: {
|
||||
type: 'single',
|
||||
data: $(this).attr('data-product-advertise-google-id')
|
||||
},
|
||||
success_callback : function(data) {
|
||||
$(selector.popup.product.button_show + '[data-product-id=' + data.product_id + ']').removeClass('btn-warning').addClass('btn-default');
|
||||
}
|
||||
});
|
||||
})
|
||||
.on('click', selector.button_bulk_edit, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var post_data = {
|
||||
all_pages : selected_all_pages ? '1' : '0',
|
||||
filter: getFilterPostData(),
|
||||
select: []
|
||||
};
|
||||
|
||||
$(selector.checkboxes + ':checked').each(function(index, element) {
|
||||
post_data.select.push($(element).val());
|
||||
});
|
||||
|
||||
googleFieldsPopup({
|
||||
operand: {
|
||||
type: 'multiple',
|
||||
data: post_data
|
||||
},
|
||||
success_callback : function(data) {
|
||||
listProducts();
|
||||
}
|
||||
});
|
||||
})
|
||||
.on('click', selector.popup.issues.button_show, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var data = {
|
||||
title: '{{ text_popup_loading_title }}',
|
||||
body: '<p>{{ text_popup_loading_body }}<p>'
|
||||
};
|
||||
|
||||
var modal = $(getPopupHtml(selector.popup.issues.template, data));
|
||||
|
||||
var url_popup = $(this).attr('data-url-popup-issues');
|
||||
|
||||
$(modal).on('hidden.bs.modal', function(e) {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
var ajaxSuccess = function(data) {
|
||||
var new_html = getPopupHtml(selector.popup.issues.template, data);
|
||||
|
||||
$(modal).find('.modal-body').html($(new_html).find('.modal-body').html());
|
||||
$(modal).find('.modal-title').html($(new_html).find('.modal-title').html());
|
||||
};
|
||||
|
||||
var ajaxError = function(jqXHR, textStatus, errorThrown) {
|
||||
var new_html = getPopupHtml(selector.popup.issues.template, {
|
||||
title: '{{ text_popup_error_title }}',
|
||||
body: '{{ text_popup_error_body }}'.replace(/{error}/g, errorThrown)
|
||||
});
|
||||
|
||||
$(modal).find('.modal-body').html($(new_html).find('.modal-body').html());
|
||||
$(modal).find('.modal-title').html($(new_html).find('.modal-title').html());
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: url_popup,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
beforeSend: function() {
|
||||
$(modal).modal('show');
|
||||
},
|
||||
success: ajaxSuccess,
|
||||
error: ajaxError
|
||||
});
|
||||
})
|
||||
.on('change', selector.filter.category, function(e) {
|
||||
var has_value = $(this).val() != '';
|
||||
|
||||
$(selector.filter.category_autocomplete).attr('disabled', has_value);
|
||||
$(selector.filter.button_category_remove).attr('disabled', !has_value);
|
||||
})
|
||||
.on('click', selector.filter.button_category_remove, function(e) {
|
||||
$(selector.filter.category_autocomplete).val('');
|
||||
$(selector.filter.category).val('').trigger('change');
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$(selector.list).data('sort', 'name');
|
||||
$(selector.list).data('order', 'ASC');
|
||||
$(selector.list).data('page', 1);
|
||||
|
||||
listProducts();
|
||||
});
|
||||
|
||||
$(selector.filter.product_name).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) {
|
||||
$(selector.filter.product_name).val(item.label);
|
||||
}
|
||||
});
|
||||
|
||||
$(selector.filter.product_model).autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/product/autocomplete&user_token={{ user_token }}&filter_model=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['model'],
|
||||
value: item['product_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$(selector.filter.product_model).val(item.label);
|
||||
}
|
||||
});
|
||||
|
||||
$(selector.filter.category_autocomplete).autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: '{{ url_category_autocomplete }}&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) {
|
||||
$(selector.filter.category_autocomplete).val(item.label);
|
||||
|
||||
$(selector.filter.category).val(item.value).trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
$.fn.serializeObject = function(){
|
||||
var self = this,
|
||||
json = {},
|
||||
push_counters = {},
|
||||
patterns = {
|
||||
"validate": /^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,
|
||||
"key": /[a-zA-Z0-9_]+|(?=\[\])/g,
|
||||
"push": /^$/,
|
||||
"fixed": /^\d+$/,
|
||||
"named": /^[a-zA-Z0-9_]+$/
|
||||
};
|
||||
|
||||
|
||||
this.build = function(base, key, value){
|
||||
base[key] = value;
|
||||
return base;
|
||||
};
|
||||
|
||||
this.push_counter = function(key){
|
||||
if(push_counters[key] === undefined){
|
||||
push_counters[key] = 0;
|
||||
}
|
||||
return push_counters[key]++;
|
||||
};
|
||||
|
||||
$.each($(this).serializeArray(), function(){
|
||||
|
||||
// skip invalid keys
|
||||
if(!patterns.validate.test(this.name)){
|
||||
return;
|
||||
}
|
||||
|
||||
var k,
|
||||
keys = this.name.match(patterns.key),
|
||||
merge = this.value,
|
||||
reverse_key = this.name;
|
||||
|
||||
while((k = keys.pop()) !== undefined){
|
||||
|
||||
// adjust reverse_key
|
||||
reverse_key = reverse_key.replace(new RegExp("\\[" + k + "\\]$"), '');
|
||||
|
||||
// push
|
||||
if(k.match(patterns.push)){
|
||||
merge = self.build([], self.push_counter(reverse_key), merge);
|
||||
}
|
||||
|
||||
// fixed
|
||||
else if(k.match(patterns.fixed)){
|
||||
merge = self.build([], k, merge);
|
||||
}
|
||||
|
||||
// named
|
||||
else if(k.match(patterns.named)){
|
||||
merge = self.build({}, k, merge);
|
||||
}
|
||||
}
|
||||
|
||||
json = $.extend(true, json, merge);
|
||||
});
|
||||
|
||||
return json;
|
||||
};
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,805 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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 not from_dashboard %}
|
||||
{{ steps }}
|
||||
{% endif %}
|
||||
<div id="alerts">
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if warning %}
|
||||
<div class="alert alert-warning alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><i class="fa fa-close"></i></button>
|
||||
<i class="fa fa-info-circle"></i> {{ warning }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-pencil"></i>
|
||||
<span>
|
||||
{% if from_dashboard %}
|
||||
{{ text_panel_heading_campaign_2 }}
|
||||
{% else %}
|
||||
{{ text_panel_heading_campaign }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label">{{ entry_campaign }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="targets">
|
||||
{% if targets %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ entry_campaign_name }}</th>
|
||||
<th class="text-center">{{ entry_country }}</th>
|
||||
<th class="text-center">{{ entry_budget }}</th>
|
||||
<th class="text-left">{{ entry_feed }}</th>
|
||||
<th class="text-center">{{ entry_roas }}</th>
|
||||
<th class="text-center">{{ entry_status }}</th>
|
||||
<th class="text-right">{{ entry_action }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list">
|
||||
{% for target in targets %}
|
||||
<tr>
|
||||
<td class="text-left">{{ target.campaign_name }}</td>
|
||||
<td class="text-center">{{ target.country.name }}</td>
|
||||
<td class="text-center">{{ target.budget.formatted }}</td>
|
||||
<td class="text-left">
|
||||
<ul>
|
||||
{% for feed in target.feeds %}
|
||||
<li>{{ feed.text }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if target.roas_status %}
|
||||
{{ target.roas }}%
|
||||
{% else %}
|
||||
<span class="label label-default" data-toggle="tooltip" data-original-title="{{ target.roas_warning }}">{{ text_label_unavailable }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if target.status == 'paused' %}
|
||||
<span class="label label-warning">{{ text_label_paused }}</span>
|
||||
{% elseif target.status == 'active' %}
|
||||
<span class="label label-success">{{ text_label_active }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<button class="btn btn-primary button-target-edit" data-toggle="tooltip" title="{{ button_edit }}" data-target-id="{{ target.target_id }}"><i class="fa fa-pencil"></i></button>
|
||||
<button class="btn btn-danger button-target-delete" data-toggle="tooltip" title="{{ button_delete }}" data-target-id="{{ target.target_id }}"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning"><i class="fa fa-warning"></i> {{ text_no_targets }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<button id="button-target-add" class="btn btn-default"><i class="fa fa-plus"></i> {{ button_add_target }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_auto_advertise }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="advertise_google_auto_advertise" value="1" {{ advertise_google_auto_advertise == '1' ? 'checked="checked"' }}>
|
||||
{{ text_yes }}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="advertise_google_auto_advertise" value="0" {{ advertise_google_auto_advertise == '0' ? 'checked="checked"' }}>
|
||||
{{ text_no }}
|
||||
</label>
|
||||
</div>
|
||||
</div-->
|
||||
<hr />
|
||||
{% if not from_dashboard %}
|
||||
<div class="alert alert-info text-left">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" class="acknowledge" /> {{ text_acknowledge_add_campaign_1 }}</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" class="acknowledge" /> {{ text_acknowledge_add_campaign_2 }}</label>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="pull-right">
|
||||
<button type="submit" {{ not from_dashboard ? 'disabled' }} class="btn btn-primary" id="proceed">{{ button_proceed }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-info-circle"></i> <span>{{ text_panel_heading_more_info }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ text_campaign_more_info }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-image"></i> <span>{{ text_panel_heading_preview }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
<img id="ad-preview" src="view/image/advertise/google/ad-preview.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.feed {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.feed > .row {
|
||||
padding-right: 60px;
|
||||
}
|
||||
|
||||
.button-feed-delete {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#feeds > .feed:first-child > .row {
|
||||
margin-top: -9px;
|
||||
}
|
||||
|
||||
#ad-preview {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script type="text/template" id="template-targets">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ entry_campaign_name }}</th>
|
||||
<th class="text-center">{{ entry_country }}</th>
|
||||
<th class="text-center">{{ entry_budget }}</th>
|
||||
<th class="text-left">{{ entry_feed }}</th>
|
||||
<th class="text-center">{{ entry_roas }}</th>
|
||||
<th class="text-center">{{ entry_status }}</th>
|
||||
<th class="text-right">{{ entry_action }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list">
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="template-list-element">
|
||||
<tr>
|
||||
<td class="text-left">{campaign_name}</td>
|
||||
<td class="text-center">{country}</td>
|
||||
<td class="text-center">{budget}</td>
|
||||
<td class="text-left">{feeds}</td>
|
||||
<td class="text-center">{roas}</td>
|
||||
<td class="text-center">{status}</td>
|
||||
<td class="text-right">
|
||||
<button class="btn btn-primary button-target-edit" data-toggle="tooltip" title="{{ button_edit }}" data-target-id="{target_id}"><i class="fa fa-pencil"></i></button>
|
||||
<button class="btn btn-danger button-target-delete" data-toggle="tooltip" title="{{ button_delete }}" data-target-id="{target_id}"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
<script type="text/template" id="template-modal">
|
||||
<div id="target-modal" class="modal fade" tabindex="-1" role="dialog" data-backdrop="static">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="fa fa-close"></i></button>
|
||||
<h4 class="modal-title">{title}</h4>
|
||||
</div>
|
||||
<div class="modal-body form-horizontal">
|
||||
<div id="target-alerts"></div>
|
||||
<div class="form-group required" data-error-type="error_campaign_name">
|
||||
<label for="input-campaign-name" class="col-sm-3 control-label">{{ entry_campaign_name }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="input-campaign-name" name="campaign_name" value="{campaign_name}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="status" id="select-status" data-value="{status}">
|
||||
<option value="active">{{ text_active }}</option>
|
||||
<option value="paused">{{ text_paused }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required" data-error-type="error_country">
|
||||
<label for="select-country" class="col-sm-3 control-label">{{ entry_country }}</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" name="country" id="select-country" data-value="{country}">
|
||||
<option value="">{{ text_select_country }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-error-type="error_roas">
|
||||
<label for="input-roas" class="col-sm-3 control-label">{{ entry_roas }}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_roas }}</div>
|
||||
<div id="warning-roas" class="alert alert-warning" style="display: none;"><i class="fa fa-exclamation-triangle"></i> {roas_warning}</div>
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" id="input-roas" name="roas" value="{roas}" min="0" />
|
||||
<div class="input-group-addon"><i class="fa fa-percent"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required" data-error-type="error_budget">
|
||||
<label for="input-budget" class="col-sm-3 control-label">{{ entry_budget }}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_budget }}</div>
|
||||
<div id="warning-budget" class="alert alert-warning" style="display: none;"><i class="fa fa-exclamation-triangle"></i> {{ warning_budget }}</div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-dollar"></i></div>
|
||||
<input type="number" class="form-control" id="input-budget" name="budget" value="{budget}" min="5" />
|
||||
<div class="input-group-addon">{{ text_usd_day }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required" data-error-type="error_feed">
|
||||
<label class="col-sm-3 control-label">{{ entry_feed }}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ help_feed }}</div>
|
||||
<div id="feeds">{feeds}</div>
|
||||
<div>
|
||||
<button id="button-feed-add" class="btn btn-success"><i class="fa fa-plus"></i> {{ button_add_feed }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"></i> {{ button_close }}</button>
|
||||
<button type="button" class="btn btn-primary" id="button-target-save" data-text="{{ button_save }}" data-loading="{{ text_loading_please_wait }}" data-url="{url}"><i class="fa fa-save"></i> {{ button_save }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="template-feed">
|
||||
<div class="feed" data-id="{id}">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-control-static">
|
||||
<select class="form-control" name="feed[{id}][language]" data-value="{language}">
|
||||
<option value="">{{ text_select_language }}</option>
|
||||
{languages}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 form-control-static">
|
||||
<select class="form-control" name="feed[{id}][currency]" data-value="{currency}">
|
||||
<option value="">{{ text_select_currency }}</option>
|
||||
{currencies}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button class="button-feed-delete btn btn-default" data-toggle="tooltip" title="{{ button_delete }}"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/template" id="template-alert">
|
||||
<div class="alert alert-{type} alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-{icon}" aria-hidden="true"></i> {message}
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var allowed_targets = {{ json_allowed_targets }};
|
||||
|
||||
var targets = {{ json_targets }};
|
||||
|
||||
var id = 0;
|
||||
|
||||
var selector = {
|
||||
alerts: '#alerts',
|
||||
acknowledge: '.acknowledge',
|
||||
save: '#proceed',
|
||||
form: '#form',
|
||||
target: {
|
||||
container: '#targets',
|
||||
list: '#list',
|
||||
modal: '#target-modal',
|
||||
alerts: '#target-alerts',
|
||||
add : '#button-target-add',
|
||||
edit: '.button-target-edit',
|
||||
delete: '.button-target-delete',
|
||||
country : '#select-country',
|
||||
status : '#select-status',
|
||||
save: '#button-target-save',
|
||||
budget: '#input-budget',
|
||||
warning_budget: '#warning-budget',
|
||||
roas: '#input-roas',
|
||||
warning_roas: '#warning-roas'
|
||||
},
|
||||
feed: {
|
||||
container: '#feeds',
|
||||
error_type: '[data-error-type]',
|
||||
language: 'select[name*="[language]"]',
|
||||
currency: 'select[name*="[currency]"]',
|
||||
add : '#button-feed-add',
|
||||
delete: '.button-feed-delete',
|
||||
row: '.feed'
|
||||
},
|
||||
template : {
|
||||
alert: '#template-alert',
|
||||
modal : '#template-modal',
|
||||
feed : '#template-feed',
|
||||
targets: '#template-targets',
|
||||
list_element: '#template-list-element'
|
||||
}
|
||||
};
|
||||
|
||||
var template = function(html, data) {
|
||||
$.map(data, function(text, key) {
|
||||
html = html.replace(new RegExp("{" + key + "}", 'g'), text);
|
||||
});
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
var makeModalHtml = function(data) {
|
||||
var html = $(selector.template.modal).html();
|
||||
|
||||
return template(html, data);
|
||||
};
|
||||
|
||||
var makeFeedsHtml = function(data) {
|
||||
var html = $(selector.template.feed).html();
|
||||
|
||||
data.languages = '';
|
||||
data.currencies = '';
|
||||
|
||||
// Set the feed countries
|
||||
$(allowed_targets).each(function(index, target) {
|
||||
if (target.country.code == $(selector.target.country).val()) {
|
||||
$(target.languages).each(function(index, language) {
|
||||
data.languages += '<option value="' + language.code + '" ' + (language.status ? '' : 'disabled') + '>' + language.name + '</option>';
|
||||
});
|
||||
|
||||
$(target.currencies).each(function(index, currency) {
|
||||
data.currencies += '<option value="' + currency.code + '" ' + (currency.status ? '' : 'disabled') + '>' + currency.name + '</option>';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return template(html, data);
|
||||
};
|
||||
|
||||
var makeAlertHtml = function(data) {
|
||||
var html = $(selector.template.alert).html();
|
||||
|
||||
return template(html, data);
|
||||
};
|
||||
|
||||
var displayError = function(container, message) {
|
||||
$(container).html(makeAlertHtml({
|
||||
icon: 'exclamation-triangle',
|
||||
type: 'danger',
|
||||
message: message
|
||||
}));
|
||||
};
|
||||
|
||||
var makeListElementHtml = function(data) {
|
||||
var html = $(selector.template.list_element).html();
|
||||
|
||||
return template(html, data);
|
||||
}
|
||||
|
||||
var makeListElementRoasHtml = function(roas_status, roas_warning, roas) {
|
||||
if (!roas_status) {
|
||||
return '<span class="label label-default" data-toggle="tooltip" data-original-title="' + roas_warning + '">{{ text_label_unavailable }}</span>';
|
||||
} else {
|
||||
return roas.toString() + '%';
|
||||
}
|
||||
}
|
||||
|
||||
var makeListElementStatusHtml = function(status) {
|
||||
if (status == 'paused') {
|
||||
return '<span class="label label-warning">{{ text_label_paused }}</span>';
|
||||
} else if (status == 'active') {
|
||||
return '<span class="label label-success">{{ text_label_active }}</span>';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
var makeListElementFeedsHtml = function(feeds) {
|
||||
html = '<ul>';
|
||||
$(feeds).each(function(index, feed) {
|
||||
html += '<li>' + feed.text + '</li>';
|
||||
});
|
||||
html += '</ul>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
var displaySuccess = function(message) {
|
||||
$(selector.alerts).html(makeAlertHtml({
|
||||
icon: 'check-circle',
|
||||
type: 'success',
|
||||
message: message
|
||||
}));
|
||||
};
|
||||
|
||||
var refreshTargets = function(callback) {
|
||||
$.ajax({
|
||||
url: '{{ target_list }}',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(selector.target.container).html('<div class="alert alert-info text-center">{{ text_loading }}</div>');
|
||||
},
|
||||
complete: callback,
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
displayError(selector.alerts, '(' + textStatus + ') ' + errorThrown);
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
displayError(selector.alerts, data.error);
|
||||
} else {
|
||||
if (data.targets.length) {
|
||||
targets = data.targets;
|
||||
|
||||
$(selector.target.container).html($(selector.template.targets).html());
|
||||
|
||||
$(data.targets).each(function(index, target) {
|
||||
$(selector.target.list).append(makeListElementHtml({
|
||||
target_id: target.target_id,
|
||||
campaign_name: target.campaign_name,
|
||||
country: target.country.name,
|
||||
budget: target.budget.formatted,
|
||||
roas: makeListElementRoasHtml(target.roas_status, target.roas_warning, target.roas),
|
||||
status: makeListElementStatusHtml(target.status),
|
||||
feeds: makeListElementFeedsHtml(target.feeds)
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
$(selector.target.container).html('<div class="alert alert-warning"><i class="fa fa-warning"></i> {{ text_no_targets }}</div>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var initModal = function(modalData) {
|
||||
var html = $(makeModalHtml(modalData));
|
||||
|
||||
$(html).modal();
|
||||
|
||||
$(html).on('shown.bs.modal', function() {
|
||||
// Enable tooltips
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body', html: true});
|
||||
|
||||
// Populate countries
|
||||
$(allowed_targets).each(function(index, target) {
|
||||
$(selector.target.country).append('<option value="' + target.country.code + '">' + target.country.name + '</option>');
|
||||
});
|
||||
|
||||
// Select the current country
|
||||
$(selector.target.country).val($(selector.target.country).attr('data-value')).trigger('change');
|
||||
|
||||
$(selector.target.status).val($(selector.target.status).attr('data-value')).trigger('change');
|
||||
|
||||
$(selector.target.budget).trigger('change');
|
||||
|
||||
$(selector.target.roas).attr('disabled', !modalData.roas_status);
|
||||
$(selector.target.roas).attr('data-original-disabled', !modalData.roas_status ? '1' : '0');
|
||||
|
||||
$(selector.target.warning_roas).toggle(!modalData.roas_status);
|
||||
});
|
||||
|
||||
$(html).on('hidden.bs.modal', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
};
|
||||
|
||||
var campaignCreateTestPromise = new Promise((resolve, reject) => {
|
||||
{% if can_edit_campaigns %}
|
||||
resolve();
|
||||
{% else %}
|
||||
var doCampaignCreateTest = function() {
|
||||
$.ajax({
|
||||
url: '{{ url_campaign_test }}',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.status) {
|
||||
resolve();
|
||||
} else if (data.redirect) {
|
||||
document.location = data.redirect;
|
||||
} else {
|
||||
setTimeout(doCampaignCreateTest, 10000);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
doCampaignCreateTest();
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
$(document).on('click', selector.target.add, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var modalData = {
|
||||
title: '{{ text_add_target }}',
|
||||
url: '{{ target_add }}',
|
||||
campaign_name : '',
|
||||
budget: '25.00',
|
||||
roas: 0,
|
||||
roas_status: false,
|
||||
roas_warning: '{{ text_roas_warning }}',
|
||||
country: '',
|
||||
status: 'active',
|
||||
feeds: makeFeedsHtml({
|
||||
id: id++,
|
||||
language: '',
|
||||
currency: ''
|
||||
})
|
||||
};
|
||||
|
||||
initModal(modalData);
|
||||
});
|
||||
|
||||
$(document).on('click', selector.target.edit, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var data = null;
|
||||
var feeds = '';
|
||||
var target_id = $(this).attr('data-target-id');
|
||||
|
||||
$(targets).each(function(index, target) {
|
||||
if (target.target_id == target_id) {
|
||||
data = target;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
$(data.feeds).each(function(index, feed) {
|
||||
feeds += makeFeedsHtml({
|
||||
id: id++,
|
||||
language: feed.language,
|
||||
currency: feed.currency
|
||||
});
|
||||
});
|
||||
|
||||
var modalData = {
|
||||
title: '{{ text_edit_target }}'.replace(/%s/, data.campaign_name),
|
||||
url: '{{ target_edit }}'.replace(/{target_id}/, target_id),
|
||||
campaign_name : data.campaign_name,
|
||||
budget: data.budget.value,
|
||||
roas: data.roas,
|
||||
roas_status: data.roas_status,
|
||||
roas_warning: data.roas_warning,
|
||||
country: data.country.code,
|
||||
status: data.status,
|
||||
feeds: feeds
|
||||
};
|
||||
|
||||
initModal(modalData);
|
||||
});
|
||||
|
||||
$(document).on('click', selector.target.delete, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (confirm("{{ text_confirm }}")) {
|
||||
var target_id = $(this).attr('data-target-id');
|
||||
|
||||
$(selector.target.container).html('<div class="alert alert-info text-center">{{ text_loading_please_wait }}</div>');
|
||||
|
||||
campaignCreateTestPromise.then(function() {
|
||||
$.ajax({
|
||||
url: '{{ target_delete }}'.replace(/{target_id}/, target_id),
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
complete: function() {
|
||||
refreshTargets();
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
displayError(selector.alerts, '(' + textStatus + ') ' + errorThrown);
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
displayError(selector.alerts, data.error);
|
||||
} else if (data.redirect) {
|
||||
document.location = data.redirect;
|
||||
} else {
|
||||
displaySuccess(data.success);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', selector.feed.add, function(e) {
|
||||
$(selector.feed.container).append(
|
||||
$(makeFeedsHtml({
|
||||
id: id++,
|
||||
language: '',
|
||||
currency: ''
|
||||
}))
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', selector.feed.delete, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (confirm("{{ text_confirm }}")) {
|
||||
$(this).closest(selector.feed.row).remove();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', selector.target.save, function(e) {
|
||||
var saveButton = this;
|
||||
|
||||
$(selector.target.alerts).empty();
|
||||
$(selector.alerts).empty();
|
||||
|
||||
$(selector.target.save)
|
||||
.text($(selector.target.save).attr('data-loading'))
|
||||
.attr('disabled', true);
|
||||
|
||||
$(selector.target.modal).find('input,select').attr('disabled', true);
|
||||
$(selector.target.modal).find(selector.feed.add).attr('disabled', true);
|
||||
$(selector.target.modal).find(selector.feed.delete).attr('disabled', true);
|
||||
|
||||
$('.text-danger').remove();
|
||||
|
||||
$('.has-error').removeClass('has-error');
|
||||
|
||||
campaignCreateTestPromise.then(function() {
|
||||
$.ajax({
|
||||
url: $(saveButton).attr('data-url'),
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: $(selector.target.modal).find('input,select'),
|
||||
complete: function() {
|
||||
$(selector.target.save)
|
||||
.text($(selector.target.save).attr('data-text'))
|
||||
.attr('disabled', false);
|
||||
|
||||
$(selector.target.modal).find('input,select').attr('disabled', false);
|
||||
$(selector.target.modal).find('[data-original-disabled]').each(function(index, element) {
|
||||
$(element).attr('disabled', $(element).attr('data-original-disabled') == '1');
|
||||
});
|
||||
$(selector.target.modal).find(selector.feed.add).attr('disabled', false);
|
||||
$(selector.target.modal).find(selector.feed.delete).attr('disabled', false);
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
displayError(selector.target.alerts, '(' + textStatus + ') ' + errorThrown);
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.error) {
|
||||
displayError(selector.target.alerts, data.error);
|
||||
|
||||
$(selector.feed.error_type).each(function(index, element) {
|
||||
if (typeof data[$(element).attr('data-error-type')] != 'undefined') {
|
||||
$(element).find('.col-sm-9').append('<div class="text-danger">' + data[$(element).attr('data-error-type')] + '</div>');
|
||||
}
|
||||
});
|
||||
|
||||
// Highlight any found errors
|
||||
$('.text-danger').each(function() {
|
||||
var element = $(saveButton).parent().parent();
|
||||
|
||||
if (element.hasClass('form-group')) {
|
||||
element.addClass('has-error');
|
||||
}
|
||||
});
|
||||
} else if (data.redirect) {
|
||||
document.location = data.redirect;
|
||||
} else if (data.success) {
|
||||
displaySuccess(data.success);
|
||||
|
||||
refreshTargets(function() {
|
||||
$(selector.target.modal).modal('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', selector.target.country, function() {
|
||||
var code = $(this).val();
|
||||
|
||||
// Set the feed countries
|
||||
$(allowed_targets).each(function(index, target) {
|
||||
if (target.country.code == code) {
|
||||
$(selector.feed.container).find(selector.feed.language).find('option[value!=""]').remove();
|
||||
|
||||
$(target.languages).each(function(index, language) {
|
||||
$(selector.feed.container).find(selector.feed.language).append('<option value="' + language.code + '" ' + (language.status ? '' : 'disabled') + '>' + language.name + '</option>');
|
||||
});
|
||||
|
||||
$(selector.feed.container).find(selector.feed.language).val(
|
||||
$(selector.feed.container).find(selector.feed.language).attr('data-value')
|
||||
);
|
||||
|
||||
$(selector.feed.container).find(selector.feed.currency).find('option[value!=""]').remove();
|
||||
|
||||
$(target.currencies).each(function(index, currency) {
|
||||
$(selector.feed.container).find(selector.feed.currency).append('<option value="' + currency.code + '" ' + (currency.status ? '' : 'disabled') + '>' + currency.name + '</option>');
|
||||
});
|
||||
|
||||
$(selector.feed.container).find(selector.feed.currency).val(
|
||||
$(selector.feed.container).find(selector.feed.currency).attr('data-value')
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', selector.acknowledge, function() {
|
||||
$(selector.save).attr('disabled', $(selector.acknowledge + ':not(:checked)').length > 0);
|
||||
});
|
||||
|
||||
$(document).on('change keyup', selector.target.budget, function() {
|
||||
if (parseFloat($(this).val()) < 10) {
|
||||
$(selector.target.warning_budget).show();
|
||||
} else {
|
||||
$(selector.target.warning_budget).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', selector.save, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(selector.save).text('{{ text_loading_please_wait }}').attr('disabled', true);
|
||||
$(selector.acknowledge).attr('disabled', true);
|
||||
|
||||
campaignCreateTestPromise.then(function() {
|
||||
$(selector.form).submit();
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,102 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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 success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list-ol"></i> <span>{{ text_panel_heading }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<input type="hidden" name="advertise_google_checklist_confirmed" value="1" />
|
||||
|
||||
<div class="alert alert-info">
|
||||
{{ text_checklist_intro }}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-center td-pointer"><input type="checkbox" name="acknowledge[0]" /></td>
|
||||
<td class="text-left">{{ text_checklist_acknowledge_0 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center td-pointer"><input type="checkbox" name="acknowledge[1]" /></td>
|
||||
<td class="text-left">{{ text_checklist_acknowledge_1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center td-pointer"><input type="checkbox" name="acknowledge[2]" /></td>
|
||||
<td class="text-left">{{ text_checklist_acknowledge_2 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center td-pointer"><input type="checkbox" name="acknowledge[3]" /></td>
|
||||
<td class="text-left">{{ text_checklist_acknowledge_3 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center td-pointer"><input type="checkbox" name="acknowledge[4]" /></td>
|
||||
<td class="text-left">{{ text_checklist_acknowledge_4 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-primary">{{ button_proceed }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.td-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$('input[name^=acknowledge]').change(function(e) {
|
||||
$(this).closest('tr').toggleClass('success', $(this).is(':checked'));
|
||||
|
||||
$('button[type="submit"]').attr('disabled', $('input[name^=acknowledge]:not(:checked)').length > 0);
|
||||
}).trigger('change');
|
||||
|
||||
$('input[name^=acknowledge]').closest('td').click(function(e) {
|
||||
if ($(e.target).is('input')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var checkbox = $(this).find('input[name^=acknowledge]').first();
|
||||
|
||||
$(checkbox).prop('checked', !$(checkbox).prop('checked')).trigger('change');
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,168 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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">
|
||||
{{ steps }}
|
||||
<div class="alert alert-info alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-info-circle" aria-hidden="true"></i> {{ text_connect_intro }}
|
||||
</div>
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-plug"></i> <span>{{ text_panel_connect }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_extension_settings }}</legend>
|
||||
<div class="form-group">
|
||||
<label for="select-status" class="col-sm-2 control-label">{{ text_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="advertise_google_status" id="select-status" class="form-control">
|
||||
<option value="1" selected>{{ text_enabled }}</option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label for="input-app-id" class="col-sm-2 control-label">{{ text_app_id }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="input-app-id" class="form-control" name="advertise_google_app_id" autocomplete="off" value="{{ advertise_google_app_id }}" />
|
||||
{% if error_app_id %}
|
||||
<div class="text-danger">{{ error_app_id }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label for="input-app-secret" class="col-sm-2 control-label">{{ text_app_secret }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="input-app-secret" class="form-control" name="advertise_google_app_secret" autocomplete="off" value="{{ advertise_google_app_secret }}" />
|
||||
{% if error_app_secret %}
|
||||
<div class="text-danger">{{ error_app_secret }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_cron_settings }}</legend>
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_cron_info }}</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" data-original-title="{{ help_local_cron }}">{{ text_local_cron }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input readonly type="text" class="form-control" value="{{ advertise_google_cron_command }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" data-original-title="{{ help_remote_cron }}">{{ text_remote_cron }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input readonly type="text" name="advertise_google_cron_url" id="input_advertise_google_cron_url" class="form-control" value="" />
|
||||
<div data-toggle="tooltip" data-original-title="{{ text_refresh_token }}" class="input-group-addon btn btn-primary" id="refresh-cron-token">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</div>
|
||||
</div>
|
||||
<input id="input_advertise_google_cron_token" type="hidden" name="advertise_google_cron_token" value="{{ advertise_google_cron_token }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="checkbox_advertise_google_cron_acknowledge">{{ entry_setup_confirmation }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="checkbox-inline">
|
||||
<input id="checkbox_advertise_google_cron_acknowledge" type="checkbox" value="1" {% if advertise_google_cron_acknowledge %} checked {% endif %} name="advertise_google_cron_acknowledge" /> {{ text_acknowledge_cron }}
|
||||
</label>
|
||||
|
||||
{% if error_cron_acknowledge %}
|
||||
<div class="text-danger">{{ error_cron_acknowledge }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="dropdown_advertise_google_cron_email_status"><span data-toggle="tooltip" data-original-title="{{ help_cron_email_status }}">{{ text_cron_email_status }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select id="dropdown_advertise_google_cron_email_status" name="advertise_google_cron_email_status" class="form-control">
|
||||
<option value="1" {% if advertise_google_cron_email_status == '1' %} selected {% endif %}>{{ text_enabled }}</option>
|
||||
<option value="0" {% if advertise_google_cron_email_status == '0' %} selected {% endif %}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input_advertise_google_cron_email"><span data-toggle="tooltip" data-original-title="{{ help_cron_email }}">{{ text_cron_email }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input id="input_advertise_google_cron_email" name="advertise_google_cron_email" type="text" class="form-control" value="{{ advertise_google_cron_email }}"/>
|
||||
{% if error_cron_email %}
|
||||
<div class="text-danger">{{ error_cron_email }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-primary btn-block" id="connect">{{ button_connect }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var selector = {
|
||||
save: '#connect',
|
||||
form: '#form'
|
||||
}
|
||||
|
||||
var randomString = function() {
|
||||
return (Math.random() * 100).toString(16).replace('.', '');
|
||||
}
|
||||
|
||||
var setCronUrl = function() {
|
||||
$('#input_advertise_google_cron_url').val(
|
||||
"{{ advertise_google_cron_url }}".replace('{CRON_TOKEN}', $('#input_advertise_google_cron_token').val())
|
||||
);
|
||||
}
|
||||
|
||||
$(document).on('click', selector.save, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(selector.save).text('{{ text_connecting }}').attr('disabled', true);
|
||||
|
||||
$(selector.form).submit();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
setCronUrl();
|
||||
});
|
||||
|
||||
$('#refresh-cron-token').click(function() {
|
||||
$('#input_advertise_google_cron_token').val(randomString() + randomString());
|
||||
setCronUrl();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,200 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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 not from_dashboard %}
|
||||
{{ steps }}
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-tags"></i>
|
||||
<span>
|
||||
{% if from_dashboard %}
|
||||
{{ text_panel_heading_mapping_2 }}
|
||||
{% else %}
|
||||
{{ text_panel_heading_mapping }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<input type="hidden" name="advertise_google_modify_existing" value="0" />
|
||||
|
||||
<p>{{ text_mapping_intro }}</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="width_33">{{ entry_google_product_category }}</th>
|
||||
<th class="width_66">{{ entry_oc_category }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for map in mapping %}
|
||||
<tr>
|
||||
<td class="width_33">
|
||||
{{ map.google_product_category.name }}
|
||||
</td>
|
||||
<td class="width_66 category-select-container">
|
||||
<input type="text" name="category_autocomplete" value="{{ map.oc_category.name }}" class="form-control" />
|
||||
<input type="hidden" name="advertise_google_mapping[{{ map.google_product_category.id }}]" data-google-category-id="{{ map.google_product_category.id }}" value="{{ map.oc_category.category_id }}">
|
||||
<button class="btn btn-danger button-remove"><i class="fa fa-close"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-primary" id="proceed">{{ button_proceed }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.width_33 {
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.width_66 {
|
||||
width: 66%;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td.category-select-container {
|
||||
padding-right: 50px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.category-select-container .button-remove {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 8px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var selector = {
|
||||
save: '#proceed',
|
||||
save_modify: '#button-save-modify',
|
||||
save_proceed: '#button-save-proceed',
|
||||
form: '#form',
|
||||
autocomplete: '[name="category_autocomplete"]',
|
||||
category_id: '[data-google-category-id]',
|
||||
remove: '.button-remove',
|
||||
modify_existing: '[name="advertise_google_modify_existing"]'
|
||||
};
|
||||
|
||||
$(selector.autocomplete).each(function(index, element) {
|
||||
$(element).autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: '{{ url_category_autocomplete }}&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) {
|
||||
$(element).val(item.label);
|
||||
|
||||
$(element).closest('td').find(selector.category_id).val(item.value).trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(selector.category_id).change(function(e) {
|
||||
var has_value = $(this).val() != '';
|
||||
|
||||
$(this).closest('td').find(selector.autocomplete).attr('disabled', has_value);
|
||||
$(this).closest('td').find(selector.remove).attr('disabled', !has_value);
|
||||
}).trigger('change');
|
||||
|
||||
$(selector.remove).click(function(e) {
|
||||
$(this).closest('td').find(selector.autocomplete).val('');
|
||||
$(this).closest('td').find(selector.category_id).val('').trigger('change');
|
||||
});
|
||||
|
||||
$(document).on('click', selector.save, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(selector.save).text('{{ text_loading }}').attr('disabled', true);
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url_mapping_verify }}',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
if (data.submit_directly) {
|
||||
$(selector.modify_existing).val('0');
|
||||
$(selector.form).submit();
|
||||
} else {
|
||||
var modal = $(data.modal_confirmation).modal();
|
||||
|
||||
$(modal).on('hidden.bs.modal', function(e) {
|
||||
$(this).remove();
|
||||
|
||||
$(selector.save).text('{{ button_proceed }}').attr('disabled', false);
|
||||
});
|
||||
|
||||
$(modal).on('shown.bs.modal', function(e) {
|
||||
$(selector.save_proceed).click(function() {
|
||||
$(selector.save_proceed).text('{{ text_loading }}').attr('disabled', true);
|
||||
$(selector.save_modify).attr('disabled', true);
|
||||
$(selector.modify_existing).val('0');
|
||||
|
||||
$(selector.form).submit();
|
||||
});
|
||||
|
||||
$(selector.save_modify).click(function() {
|
||||
$(selector.save_modify).text('{{ text_loading }}').attr('disabled', true);
|
||||
$(selector.save_proceed).attr('disabled', true);
|
||||
$(selector.modify_existing).val('1');
|
||||
|
||||
$(selector.form).submit();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<h4 class="modal-title">{{ text_mapping_verify_title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ text_mapping_verify_intro }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-warning" id="button-save-modify">{{ button_save_modify }}</button>
|
||||
<button type="button" class="btn btn-primary" id="button-save-proceed">{{ button_save_future }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,88 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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">
|
||||
{{ steps }}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-user"></i> <span>{{ text_panel_heading_merchant }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<p class="col-md-12">{{ text_merchant_intro }}</p>
|
||||
<div class="col-md-12">
|
||||
<label class="control-label"><input type="radio" name="advertise_google_gmc_account_type" value="api" {% if advertise_google_gmc_account_type == "api" %} checked {% endif %} /> {{ text_new_merchant }}</label>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label class="control-label"><input type="radio" name="advertise_google_gmc_account_type" value="existing" {% if advertise_google_gmc_account_type == "existing" %} checked {% endif %} /> {{ text_existing_merchant }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info text-left">
|
||||
{{ text_merchant_website_claim }}
|
||||
<hr />
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" class="acknowledge" /> {{ text_acknowledge_merchant_tos }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<button id="proceed" disabled type="submit" class="btn btn-primary">{{ button_proceed }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var selector = {
|
||||
acknowledge: '.acknowledge',
|
||||
save: '#proceed',
|
||||
form: '#form'
|
||||
}
|
||||
|
||||
$(document).on('change', selector.acknowledge, function() {
|
||||
$(selector.save).attr('disabled', $(selector.acknowledge + ':not(:checked)').length > 0);
|
||||
});
|
||||
|
||||
$(selector.acknowledge).trigger('change');
|
||||
|
||||
$(document).on('click', selector.save, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(selector.save).text('{{ text_loading }}').attr('disabled', true);
|
||||
|
||||
$(selector.form).submit();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,69 @@
|
||||
{% for product_issue in product_issues %}
|
||||
<h3>{{ product_issue.language_name }}</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ text_color }}</th>
|
||||
<th class="text-left">{{ text_size }}</th>
|
||||
<th class="text-left">{{ text_destination_status }}</th>
|
||||
<th class="text-left">{{ text_data_quality_issues }}</th>
|
||||
<th class="text-left">{{ text_item_level_issues }}</th>
|
||||
<th class="text-left">{{ text_google_expiration_date }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for issue in product_issue.issues %}
|
||||
<tr>
|
||||
<td class="text-left">{{ issue.color }}</td>
|
||||
<td class="text-left">{{ issue.size }}</td>
|
||||
<td class="text-left">
|
||||
{% for status in issue.destination_statuses %}
|
||||
{% if status.approvalPending %}
|
||||
{{ status.destination }}{{ status.destination ? ': ' : '' }}<span class="label label-warning">{{ text_label_pending }}</span><br />
|
||||
{% else %}
|
||||
{% if status.approvalStatus == 'approved' %}
|
||||
{{ status.destination }}{{ status.destination ? ': ' : '' }}<span class="label label-success">{{ text_label_approved }}</span><br />
|
||||
{% elseif status.approvalStatus == 'disapproved' %}
|
||||
{{ status.destination }}{{ status.destination ? ': ' : '' }}<span class="label label-danger">{{ text_label_disapproved }}</span><br />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="label label-warning">{{ text_label_pending }}</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-left">
|
||||
{% for quality_issue in issue.data_quality_issues %}
|
||||
{% if quality_issue.severity == 'critical' %}
|
||||
{{ quality_issue.destination }}{{ quality_issue.destination ? ': ' : '' }}<span class="label label-danger">{{ text_label_critical }}</span>
|
||||
{% elseif quality_issue.severity == 'error' %}
|
||||
{{ quality_issue.destination }}{{ quality_issue.destination ? ': ' : '' }}<span class="label label-danger">{{ text_label_error }}</span>
|
||||
{% elseif quality_issue.severity == 'suggestion' %}
|
||||
{{ quality_issue.destination }}{{ quality_issue.destination ? ': ' : '' }}<span class="label label-info">{{ text_label_suggestion }}</span>
|
||||
{% endif %}
|
||||
{{ quality_issue.detail }}
|
||||
{% if not loop.last %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ text_na }}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-left">
|
||||
{% for item_issue in issue.item_level_issues %}
|
||||
<strong>{{ item_issue.servability }}</strong> {{ item_issue.detail }} <a href="{{ item_issue.documentation }}" target="_blank">{{ text_learn_more }} <i class="fa fa-external-link"></i></a>
|
||||
{% if not loop.last %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ text_na }}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td class="text-left">{{ issue.google_expiration_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,181 @@
|
||||
<style type="text/css">
|
||||
.control-label.control-label-left {
|
||||
text-align:left;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<form id="form-popup-product">
|
||||
<div class="alert alert-info">
|
||||
{{ text_info_popup_product }}
|
||||
</div>
|
||||
|
||||
<div class="form-horizontal">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-google-product-category" class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_google_product_category }}">{{ entry_google_product_category }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<select name="google_product_category" id="select-google-product-category" class="form-control">
|
||||
{% for id, name in google_product_categories %}
|
||||
<option value="{{ id }}" {{ id == google_product_category ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_product_category %}
|
||||
<div class="text-danger">{{ error_product_category }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-color" class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_color }}">{{ entry_color }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<select id="select-color" name="color" class="form-control">
|
||||
{% for id, name in options %}
|
||||
<option value="{{ id }}" {{ id == color ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_color %}
|
||||
<div class="text-danger">{{ error_color }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 margin-top-10">
|
||||
<label for="select-size-system" class="control-label control-label-left"><span data-toggle="tooltip" title="{{ help_size_system }}">{{ entry_size_system }}</span></label>
|
||||
<select id="select-size-system" name="size_system" class="form-control">
|
||||
{% for id, name in size_systems %}
|
||||
<option value="{{ id }}" {{ id == size_system ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_size_system %}
|
||||
<div class="text-danger">{{ error_size_system }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-4 margin-top-10">
|
||||
<label for="select-size-type" class="control-label control-label-left"><span data-toggle="tooltip" title="{{ help_size_type }}">{{ entry_size_type }}</span></label>
|
||||
<select id="select-size-type" name="size_type" class="form-control">
|
||||
{% for id, name in size_types %}
|
||||
<option value="{{ id }}" {{ id == size_type ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_size_type %}
|
||||
<div class="text-danger">{{ error_size_type }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-4 margin-top-10">
|
||||
<label for="select-size" class="control-label control-label-left"><span data-toggle="tooltip" title="{{ help_size }}">{{ entry_size }}</span></label>
|
||||
<select id="select-size" name="size" class="form-control">
|
||||
{% for id, name in options %}
|
||||
<option value="{{ id }}" {{ id == size ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_size %}
|
||||
<div class="text-danger">{{ error_size }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-condition" class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_condition }}">{{ entry_condition }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<select name="condition" id="select-condition" class="form-control">
|
||||
{% for id, name in conditions %}
|
||||
<option value="{{ id }}" {{ id == condition ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_condition %}
|
||||
<div class="text-danger">{{ error_condition }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-age-group" class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_age_group }}">{{ entry_age_group }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<select name="age_group" id="select-age-group" class="form-control">
|
||||
{% for id, name in age_groups %}
|
||||
<option value="{{ id }}" {{ id == age_group ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_age_group %}
|
||||
<div class="text-danger">{{ error_age_group }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-gender" class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_gender }}">{{ entry_gender }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<select name="gender" id="select-gender" class="form-control">
|
||||
{% for id, name in genders %}
|
||||
<option value="{{ id }}" {{ id == gender ? 'selected' }}>{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if error_gender %}
|
||||
<div class="text-danger">{{ error_gender }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_adult }}">{{ entry_adult }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="adult" value="1" {{ adult ? "checked" }} /> {{ text_yes }}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="adult" value="0" {{ not adult ? "checked" }} /> {{ text_no }}
|
||||
</label>
|
||||
{% if error_adult %}
|
||||
<div class="text-danger">{{ error_adult }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_multipack }}">{{ entry_multipack }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<input type="number" name="multipack" value="{{ multipack }}" class="form-control" />
|
||||
{% if error_multipack %}
|
||||
<div class="text-danger">{{ error_multipack }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 control-label control-label-left"><span data-toggle="tooltip" title="{{ help_is_bundle }}">{{ entry_is_bundle }}</span></label>
|
||||
<div class="col-xs-12">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_bundle" value="1" {{ is_bundle ? "checked" }} /> {{ text_yes }}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="is_bundle" value="0" {{ not is_bundle ? "checked" }} /> {{ text_no }}
|
||||
</label>
|
||||
{% if error_is_bundle %}
|
||||
<div class="text-danger">{{ error_is_bundle }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,34 @@
|
||||
<h3>{{ text_report_date_range }}</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ text_report_campaign_name }}</th>
|
||||
<th class="text-center">{{ text_report_status }}</th>
|
||||
<th class="text-center">{{ text_report_impressions }}</th>
|
||||
<th class="text-center">{{ text_report_clicks }}</th>
|
||||
<th class="text-center">{{ text_report_cost }}</th>
|
||||
<th class="text-center">{{ text_report_conversions }}</th>
|
||||
<th class="text-center">{{ text_report_conversion_value }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for campaign in advertise_google_report_campaigns %}
|
||||
<tr>
|
||||
<td class="text-left">{{ campaign.campaign_name }}</td>
|
||||
<td class="text-center">
|
||||
{% if campaign.status == 'paused' %}
|
||||
<span class="label label-warning">{{ text_label_paused }}</span>
|
||||
{% elseif campaign.status == 'active' %}
|
||||
<span class="label label-success">{{ text_label_active }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">{{ campaign.impressions }}</td>
|
||||
<td class="text-center">{{ campaign.clicks }}</td>
|
||||
<td class="text-center">{{ campaign.cost }}</td>
|
||||
<td class="text-center">{{ campaign.conversions }}</td>
|
||||
<td class="text-center">{{ campaign.conversion_value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,136 @@
|
||||
<div class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_extension_settings }}</legend>
|
||||
<div class="form-group">
|
||||
<label for="select-status" class="col-sm-2 control-label">{{ text_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="advertise_google_status" id="select-status" class="form-control">
|
||||
<option value="1" {{ advertise_google_status ? 'selected' }}>{{ text_enabled }}</option>
|
||||
<option value="0" {{ not advertise_google_status ? 'selected' }}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="select-reporting-interval" class="col-sm-2 control-label">{{ text_reporting_interval }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="advertise_google_reporting_interval" id="select-reporting-interval" class="form-control">
|
||||
{% for interval, description in reporting_intervals %}
|
||||
<option value="{{ interval }}" {{ interval == advertise_google_reporting_interval ? 'selected' }}>{{ description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="select-debug-log" class="col-sm-2 control-label">{{ text_debug_log }}</label>
|
||||
<div class="col-sm-10" id="select-debug-log-container">
|
||||
<select name="advertise_google_debug_log" id="select-debug-log" class="form-control">
|
||||
<option value="0" {{ not advertise_google_debug_log ? 'selected' }}>{{ text_disabled }}</option>
|
||||
<option value="1" {{ advertise_google_debug_log ? 'selected' }}>{{ text_enabled }}</option>
|
||||
</select>
|
||||
<a href="{{ url_debug_log_download }}" id="download-debug-log" data-toggle="tooltip" title="{{ text_download_debug_log }}" class="btn btn-default"><i class="fa fa-download"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ text_connection }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_disconnect_reminder }}</div>
|
||||
<div class="form-control-static"><i class="text-success fa fa-circle"></i> {{ text_connected }}</div>
|
||||
<a id="button_disconnect" href="{{ disconnect }}" class="btn btn-default"><i class="fa fa-power-off"></i> {{ button_disconnect }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_cron_settings }}</legend>
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_cron_info }}</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" data-original-title="{{ help_local_cron }}">{{ text_local_cron }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input readonly type="text" class="form-control" value="{{ advertise_google_cron_command }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" data-original-title="{{ help_remote_cron }}">{{ text_remote_cron }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input readonly type="text" name="advertise_google_cron_url" id="input_advertise_google_cron_url" class="form-control" value="" />
|
||||
<div data-toggle="tooltip" data-original-title="{{ text_refresh_token }}" class="input-group-addon btn btn-primary" id="refresh-cron-token">
|
||||
<i class="fa fa-refresh"></i>
|
||||
</div>
|
||||
</div>
|
||||
<input id="input_advertise_google_cron_token" type="hidden" name="advertise_google_cron_token" value="{{ advertise_google_cron_token }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="checkbox_advertise_google_cron_acknowledge">{{ entry_setup_confirmation }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="checkbox-inline">
|
||||
<input id="checkbox_advertise_google_cron_acknowledge" type="checkbox" value="1" {% if advertise_google_cron_acknowledge %} checked {% endif %} name="advertise_google_cron_acknowledge" /> {{ text_acknowledge_cron }}
|
||||
</label>
|
||||
|
||||
{% if error_cron_acknowledge %}
|
||||
<div class="text-danger">{{ error_cron_acknowledge }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-2" for="dropdown_advertise_google_cron_email_status"><span data-toggle="tooltip" data-original-title="{{ help_cron_email_status }}">{{ text_cron_email_status }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select id="dropdown_advertise_google_cron_email_status" name="advertise_google_cron_email_status" class="form-control">
|
||||
<option value="1" {% if advertise_google_cron_email_status == '1' %} selected {% endif %}>{{ text_enabled }}</option>
|
||||
<option value="0" {% if advertise_google_cron_email_status == '0' %} selected {% endif %}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input_advertise_google_cron_email"><span data-toggle="tooltip" data-original-title="{{ help_cron_email }}">{{ text_cron_email }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input id="input_advertise_google_cron_email" name="advertise_google_cron_email" type="text" class="form-control" value="{{ advertise_google_cron_email }}"/>
|
||||
{% if error_cron_email %}
|
||||
<div class="text-danger">{{ error_cron_email }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
#select-debug-log-container {
|
||||
position: relative;
|
||||
padding-right: 70px;
|
||||
}
|
||||
|
||||
#download-debug-log {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 0;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var randomString = function() {
|
||||
return (Math.random() * 100).toString(16).replace('.', '');
|
||||
}
|
||||
|
||||
var setCronUrl = function() {
|
||||
$('#input_advertise_google_cron_url').val(
|
||||
"{{ advertise_google_cron_url }}".replace('{CRON_TOKEN}', $('#input_advertise_google_cron_token').val())
|
||||
);
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#button_disconnect').click(function(e) {
|
||||
if ($(this).is(':disabled') || !confirm('{{ text_confirm }}')) {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
$('#button_disconnect').text('{{ text_disconnecting_please_wait }}').attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
setCronUrl();
|
||||
});
|
||||
|
||||
$('#refresh-cron-token').click(function() {
|
||||
$('#input_advertise_google_cron_token').val(randomString() + randomString());
|
||||
setCronUrl();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,231 @@
|
||||
{{ header }}
|
||||
{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ text_video_tutorial_url_install }}" target="_blank" class="btn btn-info" data-toggle="tooltip" title="{{ button_video_tutorial_install }}"><i class="fa fa-video-camera"></i></a>
|
||||
<a href="{{ cancel }}" class="btn btn-default" data-toggle="tooltip" title="{{ button_cancel }}"><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 not from_dashboard %}
|
||||
{{ steps }}
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-check-circle" aria-hidden="true"></i> {{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ text_close }}"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
|
||||
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<i class="fa fa-truck"></i>
|
||||
<span>
|
||||
{% if from_dashboard %}
|
||||
{{ text_panel_heading_shipping_taxes_2 }}
|
||||
{% else %}
|
||||
{{ text_panel_heading_shipping_taxes }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
|
||||
<fieldset>
|
||||
<legend>{{ text_shipping_transit_times }}</legend>
|
||||
<div class="form-group required">
|
||||
<label for="input-min-transit-time" class="col-sm-3 control-label">{{ entry_min_transit_time }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" class="form-control" id="input-min-transit-time" name="advertise_google_shipping_taxes[min_transit_time]" value="{{ advertise_google_shipping_taxes.min_transit_time }}" />
|
||||
{% if error_min_transit_time %}
|
||||
<div class="text-danger">{{ error_min_transit_time }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label for="input-max-transit-time" class="col-sm-3 control-label">{{ entry_max_transit_time }}</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" class="form-control" id="input-max-transit-time" name="advertise_google_shipping_taxes[max_transit_time]" value="{{ advertise_google_shipping_taxes.max_transit_time }}" />
|
||||
{% if error_max_transit_time %}
|
||||
<div class="text-danger">{{ error_max_transit_time }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_shipping_services }}</legend>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[shipping_type]" value="flat" {{ advertise_google_shipping_taxes.shipping_type == 'flat' ? 'checked' }} />
|
||||
{{ text_shipping_flat }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-9" data-shipping-visible-on="flat">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-dollar"></i></div>
|
||||
<input type="number" class="form-control" name="advertise_google_shipping_taxes[flat_rate]" value="{{ advertise_google_shipping_taxes.flat_rate }}" />
|
||||
<div class="input-group-addon">{{ text_usd }}</div>
|
||||
</div>
|
||||
{% if error_flat_rate %}
|
||||
<div class="text-danger">{{ error_flat_rate }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[shipping_type]" value="carrier" {{ advertise_google_shipping_taxes.shipping_type == 'carrier' ? 'checked' }} />
|
||||
{{ text_shipping_carrier }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-9" data-shipping-visible-on="carrier">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ text_carrier_postcode }}</div>
|
||||
<input type="text" class="form-control" name="advertise_google_shipping_taxes[carrier_postcode]" value="{{ advertise_google_shipping_taxes.carrier_postcode }}" />
|
||||
</div>
|
||||
{% if error_carrier_postcode %}
|
||||
<div class="text-danger">{{ error_carrier_postcode }}</div>
|
||||
{% endif %}
|
||||
<div class="input-group margin-top-10">
|
||||
<div class="input-group-addon"><span data-toggle="tooltip" title="{{ help_carrier_price_percentage }}">{{ text_carrier_price_percentage }}</span></div>
|
||||
<input type="number" class="form-control" name="advertise_google_shipping_taxes[carrier_price_percentage]" value="{{ advertise_google_shipping_taxes.carrier_price_percentage }}" />
|
||||
<div class="input-group-addon"><i class="fa fa-percent"></i></div>
|
||||
</div>
|
||||
{% if error_carrier_price_percentage %}
|
||||
<div class="text-danger">{{ error_carrier_price_percentage }}</div>
|
||||
{% endif %}
|
||||
{% for carrier in available_carriers %}
|
||||
<fieldset class="margin-top-10">
|
||||
<legend>{{ carrier.name }} ({{ carrier.country }})</legend>
|
||||
{% for service in carrier.services %}
|
||||
<label class="label-block">
|
||||
<input type="checkbox" name="advertise_google_shipping_taxes[carrier][{{ carrier.code }}][{{ service.code }}]" value="1" {{ advertise_google_shipping_taxes.carrier[carrier.code][service.code] == '1' ? 'checked' }} /> {{ service.name }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[shipping_type]" value="custom" {{ advertise_google_shipping_taxes.shipping_type == 'custom' ? 'checked' }} />
|
||||
{{ text_shipping_custom }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="margin-top-10">
|
||||
<legend>{{ text_taxes }}</legend>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[tax_type]" value="usa" {{ advertise_google_shipping_taxes.tax_type == 'usa' ? 'checked' }} />
|
||||
{{ text_tax_usa }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-9" data-tax-visible-on="usa">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{ text_tax_on_shipping }}</div>
|
||||
<select class="form-control" name="advertise_google_shipping_taxes[tax_on_shipping]">
|
||||
<option value="1" {{ advertise_google_shipping_taxes.tax_on_shipping == '1' ? 'selected' }}>{{ text_enabled }}</option>
|
||||
<option value="0" {{ advertise_google_shipping_taxes.tax_on_shipping == '0' ? 'selected' }}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<fieldset class="margin-top-10">
|
||||
<legend>{{ text_active_states }}</legend>
|
||||
{% for id, state in states %}
|
||||
<label class="label-block">
|
||||
<input type="checkbox" name="advertise_google_shipping_taxes[tax][]" value="{{ id }}" {{ id in advertise_google_shipping_taxes.tax ? 'checked' }} /> {{ state }}
|
||||
</label>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[tax_type]" value="not_usa" {{ advertise_google_shipping_taxes.tax_type == 'not_usa' ? 'checked' }} />
|
||||
{{ text_tax_not_usa }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<label>
|
||||
<input type="radio" name="advertise_google_shipping_taxes[tax_type]" value="custom" {{ advertise_google_shipping_taxes.tax_type == 'custom' ? 'checked' }} />
|
||||
{{ text_tax_custom }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="pull-right">
|
||||
<button type="submit" class="btn btn-primary" id="proceed">{{ button_proceed }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.label-block {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.margin-top-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var selector = {
|
||||
shipping_type: '[name="advertise_google_shipping_taxes[shipping_type]"]',
|
||||
tax_type: '[name="advertise_google_shipping_taxes[tax_type]"]',
|
||||
save: '#proceed',
|
||||
form: '#form'
|
||||
}
|
||||
|
||||
$(selector.shipping_type).change(function(e) {
|
||||
$('[data-shipping-visible-on]').hide();
|
||||
|
||||
$('[data-shipping-visible-on="' + $(this).val() + '"]').show();
|
||||
});
|
||||
|
||||
$(selector.shipping_type + ':checked').trigger('change');
|
||||
|
||||
$(selector.tax_type).change(function(e) {
|
||||
$('[data-tax-visible-on]').hide();
|
||||
|
||||
$('[data-tax-visible-on="' + $(this).val() + '"]').show();
|
||||
});
|
||||
|
||||
$(selector.tax_type + ':checked').trigger('change');
|
||||
|
||||
$(document).on('click', selector.save, function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(selector.save).text('{{ text_loading }}').attr('disabled', true);
|
||||
|
||||
$(selector.form).submit();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,22 @@
|
||||
<div class="stepper">
|
||||
<input class="stepper__input" id="stepper-3-0" name="stepper-3" type="radio" {{ current_step >= 1 ? "checked" }}/>
|
||||
<div class="stepper__step">
|
||||
<label class="stepper__button">{{ step_connect }}</label>
|
||||
</div>
|
||||
<input class="stepper__input" id="stepper-3-1" name="stepper-3" type="radio" {{ current_step >= 2 ? "checked" }}/>
|
||||
<div class="stepper__step">
|
||||
<label class="stepper__button">{{ step_merchant_account }}</label>
|
||||
</div>
|
||||
<input class="stepper__input" id="stepper-3-2" name="stepper-3" type="radio" {{ current_step >= 3 ? "checked" }}/>
|
||||
<div class="stepper__step">
|
||||
<label class="stepper__button">{{ step_campaigns }}</label>
|
||||
</div>
|
||||
<input class="stepper__input" id="stepper-3-3" name="stepper-3" type="radio" {{ current_step >= 4 ? "checked" }}/>
|
||||
<div class="stepper__step">
|
||||
<label class="stepper__button">{{ step_shipping_taxes }}</label>
|
||||
</div>
|
||||
<input class="stepper__input" id="stepper-3-4" name="stepper-3" type="radio" {{ current_step >= 5 ? "checked" }}/>
|
||||
<div class="stepper__step">
|
||||
<label class="stepper__button">{{ step_mapping }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-analytics" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-analytics" class="form-horizontal">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_signup }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-code">{{ entry_code }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="analytics_google_code" rows="5" placeholder="{{ entry_code }}" id="input-code" class="form-control">{{ analytics_google_code }}</textarea>
|
||||
{% 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-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="analytics_google_status" id="input-status" class="form-control">
|
||||
{% if analytics_google_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,77 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-yandex-metrika" 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"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-yandex-metrika" class="form-horizontal">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_help }}</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-code">{{ entry_code }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="analytics_yandex_metrika_code" rows="10" placeholder="{{ entry_code }}" id="input-code" class="form-control" style=" font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;" />{{ analytics_yandex_metrika_code }}</textarea>
|
||||
{% if (error_code) %}
|
||||
<div class="text-danger">{{ error_code }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class="col-sm-2 control-label" for="input-yandex-metrika"><span data-toggle="tooltip" title="{{ text_help_counter }}">{{ text_yandex_metrika }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="analytics_yandex_metrika_counter" value="{{ analytics_yandex_metrika_counter }}" placeholder="{{ text_yandex_metrika }}" id="input-yandex-metrika" 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-2">
|
||||
<select name="analytics_yandex_metrika_status" id="input-status" class="form-control">
|
||||
{% if (analytics_yandex_metrika_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 class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="" data-original-title="{{ text_no_admin }}">{{ entry_no_admin }}</span></label>
|
||||
<div class="col-sm-2">
|
||||
<label class="radio-inline"><input type="radio" name="analytics_yandex_metrika_no_admin" value="1" {{ analytics_yandex_metrika_no_admin == '1' ? 'checked="checked"' : '' }} /> {{ text_yes }} </label>
|
||||
<label class="radio-inline"><input type="radio" name="analytics_yandex_metrika_no_admin" value="" {{ analytics_yandex_metrika_no_admin == '' ? 'checked="checked"' : '' }} /> {{ text_no }} </label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"><span data-toggle="tooltip" title="" data-original-title="{{ text_no_users }}">{{ entry_no_users }}</span></label>
|
||||
<div class="col-sm-2">
|
||||
<label class="radio-inline"><input type="radio" name="analytics_yandex_metrika_no_users" value="1" {{ analytics_yandex_metrika_no_users == '1' ? 'checked="checked"' : '' }} /> {{ text_yes }} </label>
|
||||
<label class="radio-inline"><input type="radio" name="analytics_yandex_metrika_no_users" value="" {{ analytics_yandex_metrika_no_users == '' ? 'checked="checked"' : '' }} /> {{ text_no }} </label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-captcha" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-captcha" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="captcha_basic_status" id="input-status" class="form-control">
|
||||
{% if captcha_basic_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,66 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-captcha" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-captcha" class="form-horizontal">
|
||||
<div class="alert alert-info"><i class="fa fa-info-circle"></i> {{ text_signup }}</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-key">{{ entry_key }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="captcha_google_key" value="{{ captcha_google_key }}" placeholder="{{ entry_key }}" id="input-key" class="form-control" />
|
||||
{% if error_key %}
|
||||
<div class="text-danger">{{ error_key }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-secret">{{ entry_secret }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="captcha_google_secret" value="{{ captcha_google_secret }}" placeholder="{{ entry_secret }}" id="input-secret" class="form-control" />
|
||||
{% if error_secret %}
|
||||
<div class="text-danger">{{ error_secret }}</div>
|
||||
{% endif %}
|
||||
</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="captcha_google_status" id="input-status" class="form-control">
|
||||
{% if captcha_google_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-module" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="module_account_status" id="input-status" class="form-control">
|
||||
{% if currency_cbr_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-module" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="module_account_status" id="input-status" class="form-control">
|
||||
{% if module_account_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-module" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="module_account_status" id="input-status" class="form-control">
|
||||
{% if module_account_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-module" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-module" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-status">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="module_account_status" id="input-status" class="form-control">
|
||||
{% if module_account_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>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_activity_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_activity_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_activity_status" id="input-status" class="form-control">
|
||||
{% if dashboard_activity_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_activity_sort_order" value="{{ dashboard_activity_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-calendar"></i> {{ heading_title }}</h3>
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% if activities %}
|
||||
{% for activity in activities %}
|
||||
<li class="list-group-item">{{ activity.comment }}<br />
|
||||
<small class="text-muted"><i class="fa fa-clock-o"></i> {{ activity.date_added }}</small></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li class="list-group-item text-center">{{ text_no_results }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_chart_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_chart_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_chart_status" id="input-status" class="form-control">
|
||||
{% if dashboard_chart_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_chart_sort_order" value="{{ dashboard_chart_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,83 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-right"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-calendar"></i> <i class="caret"></i></a>
|
||||
<ul id="range" class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="day">{{ text_day }}</a></li>
|
||||
<li><a href="week">{{ text_week }}</a></li>
|
||||
<li class="active"><a href="month">{{ text_month }}</a></li>
|
||||
<li><a href="year">{{ text_year }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3 class="panel-title"><i class="fa fa-bar-chart-o"></i> {{ heading_title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="chart-sale" style="width: 100%; height: 260px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="view/javascript/jquery/flot/jquery.flot.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/jquery/flot/jquery.flot.resize.min.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#range a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(this).parent().parent().find('li').removeClass('active');
|
||||
|
||||
$(this).parent().addClass('active');
|
||||
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: 'index.php?route=extension/dashboard/chart/chart&user_token={{ user_token }}&range=' + $(this).attr('href'),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
if (typeof json['order'] == 'undefined') { return false; }
|
||||
|
||||
var option = {
|
||||
shadowSize: 0,
|
||||
colors: ['#9FD5F1', '#1065D2'],
|
||||
bars: {
|
||||
show: true,
|
||||
fill: true,
|
||||
lineWidth: 1
|
||||
},
|
||||
grid: {
|
||||
backgroundColor: '#FFFFFF',
|
||||
hoverable: true
|
||||
},
|
||||
points: {
|
||||
show: false
|
||||
},
|
||||
xaxis: {
|
||||
show: true,
|
||||
ticks: json['xaxis']
|
||||
}
|
||||
}
|
||||
|
||||
$.plot('#chart-sale', [json['order'], json['customer']], option);
|
||||
|
||||
$('#chart-sale').bind('plothover', function(event, pos, item) {
|
||||
$('.tooltip').remove();
|
||||
|
||||
if (item) {
|
||||
$('<div id="tooltip" class="tooltip top in"><div class="tooltip-arrow"></div><div class="tooltip-inner">' + item.datapoint[1].toFixed(2) + '</div></div>').prependTo('body');
|
||||
|
||||
$('#tooltip').css({
|
||||
position: 'absolute',
|
||||
left: item.pageX - ($('#tooltip').outerWidth() / 2),
|
||||
top: item.pageY - $('#tooltip').outerHeight(),
|
||||
pointer: 'cusror'
|
||||
}).fadeIn('slow');
|
||||
|
||||
$('#chart-sale').css('cursor', 'pointer');
|
||||
} else {
|
||||
$('#chart-sale').css('cursor', 'auto');
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#range .active a').trigger('click');
|
||||
//--></script>
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_customer_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_customer_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_customer_status" id="input-status" class="form-control">
|
||||
{% if dashboard_customer_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_customer_sort_order" value="{{ dashboard_customer_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="tile tile-primary">
|
||||
<div class="tile-heading">{{ heading_title }} <span class="pull-right">
|
||||
{% if percentage > 0 %}
|
||||
<i class="fa fa-caret-up"></i>
|
||||
{% elseif percentage < 0 %}
|
||||
<i class="fa fa-caret-down"></i>
|
||||
{% endif %}
|
||||
{{ percentage }}%</span></div>
|
||||
<div class="tile-body"><i class="fa fa-user"></i>
|
||||
<h2 class="pull-right">{{ total }}</h2>
|
||||
</div>
|
||||
<div class="tile-footer"><a href="{{ customer }}">{{ text_view }}</a></div>
|
||||
</div>
|
||||
@@ -0,0 +1,167 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_domovoy_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_domovoy_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_domovoy_status" id="input-status" class="form-control">
|
||||
{% if dashboard_domovoy_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_domovoy_sort_order" value="{{ dashboard_domovoy_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% for folder in folders %}
|
||||
<fieldset>
|
||||
<legend>{{ folder.name }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_folder_cron_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline"> {% if folder.cron.status %}
|
||||
<input type="radio" name="dashboard_domovoy_cron[{{folder.key}}][status]" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="dashboard_domovoy_cron[{{folder.key}}][status]" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if not folder.cron.status %}
|
||||
<input type="radio" name="dashboard_domovoy_cron[{{folder.key}}][status]" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="dashboard_domovoy_cron[{{folder.key}}][status]" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_folder_space_limit }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<input type="text" name="dashboard_domovoy_cron[{{folder.key}}][size]" value="{{ folder.cron.size }}" placeholder="{{ entry_size }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" >{{ entry_folder_calc_time }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<input type="text" name="dashboard_domovoy_cron[{{folder.key}}][time]" value="{{ folder.cron.time }}" placeholder="{{ entry_time }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
<fieldset>
|
||||
<legend>{{ text_server }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{entry_disk_free_space_limit}}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<input type="text" name="dashboard_domovoy_disk_free_space" value="{{ dashboard_domovoy_disk_free_space }}" placeholder="{{ entry_size }}" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ entry_free_space_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline"> {% if dashboard_domovoy_free_space_status %}
|
||||
<input type="radio" name="dashboard_domovoy_free_space_status" value="1" checked="checked" />
|
||||
{{ text_yes }}
|
||||
{% else %}
|
||||
<input type="radio" name="dashboard_domovoy_free_space_status" value="1" />
|
||||
{{ text_yes }}
|
||||
{% endif %} </label>
|
||||
<label class="radio-inline"> {% if not dashboard_domovoy_free_space_status %}
|
||||
<input type="radio" name="dashboard_domovoy_free_space_status" value="0" checked="checked" />
|
||||
{{ text_no }}
|
||||
{% else %}
|
||||
<input type="radio" name="dashboard_domovoy_free_space_status" value="0" />
|
||||
{{ text_no }}
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_check_function }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-valide-params">{{ entry_danger_funtions }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="dashboard_domovoy_danger_funtions" rows=10" placeholder="{{ entry_danger_funtions }}" id="input-valide-params" class="form-control">{{ dashboard_domovoy_danger_funtions }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-valide-params">{{ entry_warning_funtions }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="dashboard_domovoy_warning_funtions" rows=10" placeholder="{{ entry_warning_funtions }}" id="input-valide-params" class="form-control">{{ dashboard_domovoy_warning_funtions }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center"> <b>{{ text_copyright }}</b> </div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,319 @@
|
||||
<div id="domovoy" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-calendar"></i> {{ heading_title }}</h3>
|
||||
<button type="button" id="button-phpinfo" title="{{ text_phpinfo }}" class="btn btn-info">phpinfo</button>
|
||||
{% if phpversion %}
|
||||
<button type="button" title="{{ text_copy }}" onclick="copyToClipboard('#phpversion')" class="btn"><i
|
||||
class="fa fa-php"></i> <span id="phpversion">PHP {{ phpversion }}</span></button>{% endif %}
|
||||
{% if database_version %}
|
||||
<button type="button" title="{{ text_copy }}" onclick="copyToClipboard('#database_version')" class="btn"><i
|
||||
class="fa fa-database"></i> <span id="database_version">{{ database_version }}</span>
|
||||
</button>{% endif %}
|
||||
{% if ioncube_version %}
|
||||
<button type="button" title="{{ text_copy }}" onclick="copyToClipboard('#ioncube_version')" class="btn"><i
|
||||
class="fa fa-square"></i> <span id="ioncube_version">ionCube {{ ioncube_version }}</span>
|
||||
</button>{% endif %}
|
||||
{% if disk_free_space %}
|
||||
<button type="button" title="{{ text_copy }}" onclick="copyToClipboard('#disk_free_space')" class="btn{% if disk_free_space_warning %} btn-danger{% endif %}"><i
|
||||
class="fa fa-hdd-o"></i> <span
|
||||
id="disk_free_space">{{ text_disk_free_space }} {{ disk_free_space.size }}{{ disk_free_space.unit }}</span>
|
||||
</button>{% endif %}
|
||||
<div class="pull-right">
|
||||
<a title="{{ text_setting }}" href="{{ setting }}" class="close"><i class="fa fa-cog fa-2x "></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert-body"></div>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" value="theme" data-toggle="tooltip" title="{{ button_refresh }}"
|
||||
class="btn btn-warning"><i class="fa fa-refresh"></i></button>
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
{% if developer_theme %}
|
||||
<label class="btn btn-success active" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="1" autocomplete="off"
|
||||
{% if not eval %}disabled="disabled"{% endif %} checked/>
|
||||
{{ button_on }}
|
||||
</label>
|
||||
{% else %}
|
||||
<label class="btn btn-success" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="1" autocomplete="off"
|
||||
{% if not eval %}disabled="disabled"{% endif %}/>
|
||||
{{ button_on }}
|
||||
</label>
|
||||
{% endif %}
|
||||
{% if not developer_theme %}
|
||||
<label class="btn btn-danger active" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="0" autocomplete="off"
|
||||
{% if not eval %}disabled="disabled"{% endif %} checked/>
|
||||
{{ button_off }}
|
||||
</label>
|
||||
{% else %}
|
||||
<label class="btn btn-danger" {% if not eval %}disabled="disabled"{% endif %}>
|
||||
<input type="radio" name="developer_theme" value="0" autocomplete="off"
|
||||
{% if not eval %}disabled="disabled"{% endif %}/>
|
||||
{{ button_off }}
|
||||
</label>
|
||||
{% endif %}</div> {{ entry_theme_cache }}
|
||||
</td>
|
||||
<td class="text-right">{{ entry_modification_cache }} <a id="odmod-refresh" data-toggle="tooltip"
|
||||
title="{{ button_refresh }}"
|
||||
class="btn btn-warning"><i
|
||||
class="fa fa-refresh"></i></a></td>
|
||||
<td class="text-right">{{ entry_allcache }}
|
||||
<button type="button" value="allcache" data-toggle="tooltip" title="{{ button_refresh }}"
|
||||
class="btn btn-warning"><i class="fa fa-refresh"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
{% if disk_free_space_warning %}
|
||||
<li class="list-group-item">{{ disk_free_space_warning }}</li>
|
||||
{% endif %}
|
||||
{% if not developer_theme %}
|
||||
<li class="list-group-item"><span class="btn-warning btn-xs">{{ text_warning }}</span> {{ text_twig_off_warning }}</li>
|
||||
{% endif %}
|
||||
{% if folders %}
|
||||
{% for folder in folders %}
|
||||
<li class="list-group-item">
|
||||
<button type="button" value="{{ folder.key }}" data-toggle="tooltip" title="{{ text_clear }}"
|
||||
class="btn btn-warning clearFolder" data-original-title="{{ button_refresh }}"><i
|
||||
class="fa fa-refresh"></i></button>
|
||||
<button type="button" value="{{ folder.key }}" data-toggle="tooltip" title="{{ text_calculate }}"
|
||||
class="btn btn-success calcFolder" data-original-title="{{ button_refresh }}"><i
|
||||
class="fa fa-cogs"></i></button>
|
||||
{{ folder.name }}<span
|
||||
class="textFolder">{{ folder.size }} {{ folder.files }}{% if not folder.warning_size %}{{ text_normal }}{% else %} {{ folder.warning_size }} {% endif %}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<li class="list-group-item">
|
||||
{% if danger_funtions %}
|
||||
<span class="btn-warning btn-xs">{{ text_warning }}</span> {{ text_danger_info }}
|
||||
<span>{{ danger_funtions }}</span>
|
||||
{% else %}
|
||||
<span class="btn-warning btn-xs">{{ text_normal }}</span> {{ text_danger_info_normal }}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
{% if warning_funtions %}
|
||||
<span class="btn-warning btn-xs">{{ text_warning }}</span> {{ text_warning_info }}
|
||||
<span>{{ warning_funtions }}</span>
|
||||
{% else %}
|
||||
<span class="btn-warning btn-xs">{{ text_normal }}</span> {{ text_warning_info_normal }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if activities %}
|
||||
{% for activity in activities %}
|
||||
<li class="list-group-item">{{ activity.comment }}<br/>
|
||||
<small class="text-muted"><i class="fa fa-clock-o"></i> {{ activity.date_added }}</small></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<style>
|
||||
#domovoy .btn-group label {
|
||||
background: #a9a9a9
|
||||
}
|
||||
|
||||
#domovoy .btn-group label.btn-success.active {
|
||||
background-color: #4cb64c;
|
||||
}
|
||||
|
||||
#domovoy .btn-group label.btn-danger.active {
|
||||
background-color: #d0321e;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-phpinfo').on('click', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/dashboard/domovoy/phpinfo&user_token={{ user_token }}',
|
||||
dataType: 'html',
|
||||
beforeSend: function () {
|
||||
$('#modal-phpinfo').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#modal-phpinfo').button('reset');
|
||||
},
|
||||
success: function (html) {
|
||||
$('#modal-phpinfo').remove();
|
||||
|
||||
$('body').prepend('<div id="modal-phpinfo" class="modal">' + html + '</div>');
|
||||
|
||||
$('#modal-phpinfo').modal('show');
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function setTooltip(element) {
|
||||
$(element).tooltip('enable');
|
||||
$(element).tooltip('hide')
|
||||
.attr('data-original-title', '{{ text_copied }}')
|
||||
.tooltip('show');
|
||||
}
|
||||
|
||||
function hideTooltip(element) {
|
||||
setTimeout(function () {
|
||||
$(element).tooltip('disable');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function copyToClipboard(element) {
|
||||
var $temp = $("<input>");
|
||||
$("body").append($temp);
|
||||
$temp.val($(element).text()).select();
|
||||
document.execCommand("copy");
|
||||
setTooltip(element);
|
||||
hideTooltip(element);
|
||||
$temp.remove();
|
||||
}
|
||||
|
||||
function calcFolder(element) {
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/dashboard/domovoy/calc&dir=' + $(element).attr('value') + '&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
$(element).tooltip('disable');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$(element).parent().find('.textFolder').html(json['error']['warning']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$(element).parent().find('.textFolder').html(json['success']);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$('#domovoy button.clearFolder').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/dashboard/domovoy/clear&dir=' + $(element).attr('value') + '&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$(element).parent().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">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$(element).parent().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">×</button></div>');
|
||||
setTimeout(function () {
|
||||
calcFolder(element);
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#domovoy button.calcFolder').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
calcFolder(element);
|
||||
});
|
||||
//--></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#domovoy input[name=\'developer_theme\']').on('change', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer/edit&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'developer_theme\']:checked'),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('input[name=\'developer_theme\']').prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$('input[name=\'developer_theme\']').prop('disabled', false);
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#domovoy .alert-body').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">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#domovoy .alert-body').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">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#domovoy table button').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer/' + $(element).attr('value') + '&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#domovoy .alert-body').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">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#domovoy .alert-body').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">×</button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#odmod-refresh').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=marketplace/modification/refresh&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
$('.alert-dismissible').remove();
|
||||
$('#domovoy .alert-body').prepend('<div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ text_ocmod_cache_success }} <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_map_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_map_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_map_status" id="input-status" class="form-control">
|
||||
{% if dashboard_map_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_map_sort_order" value="{{ dashboard_map_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,47 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-globe"></i> {{ heading_title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="vmap" style="width: 100%; height: 260px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<link type="text/css" href="view/javascript/jquery/jqvmap/jqvmap.css" rel="stylesheet" media="screen" />
|
||||
<script type="text/javascript" src="view/javascript/jquery/jqvmap/jquery.vmap.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/jquery/jqvmap/maps/jquery.vmap.world.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/dashboard/map/map&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
data = [];
|
||||
|
||||
for (i in json) {
|
||||
data[i] = json[i]['total'];
|
||||
}
|
||||
|
||||
$('#vmap').vectorMap({
|
||||
map: 'world_en',
|
||||
backgroundColor: '#FFFFFF',
|
||||
borderColor: '#FFFFFF',
|
||||
color: '#9FD5F1',
|
||||
hoverOpacity: 0.7,
|
||||
selectedColor: '#666666',
|
||||
enableZoom: true,
|
||||
showTooltip: true,
|
||||
values: data,
|
||||
normalizeFunction: 'polynomial',
|
||||
onLabelShow: function(event, label, code) {
|
||||
if (json[code]) {
|
||||
label.html('<strong>' + label.text() + '</strong><br />' + '{{ text_order }} ' + json[code]['total'] + '<br />' + '{{ text_sale }} ' + json[code]['amount']);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_online_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_online_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_online_status" id="input-status" class="form-control">
|
||||
{% if dashboard_online_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_online_sort_order" value="{{ dashboard_online_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="tile tile-primary">
|
||||
<div class="tile-heading">{{ heading_title }}</div>
|
||||
<div class="tile-body"><i class="fa fa-users"></i>
|
||||
<h2 class="pull-right">{{ total }}</h2>
|
||||
</div>
|
||||
<div class="tile-footer"><a href="{{ online }}">{{ text_view }}</a></div>
|
||||
</div>
|
||||
@@ -0,0 +1,67 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="form-dashboard" 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">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-dashboard" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-width">{{ entry_width }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="dashboard_order_width" id="input-width" class="form-control">
|
||||
{% for column in columns %}
|
||||
{% if column == dashboard_order_width %}
|
||||
<option value="{{ column }}" selected="selected">{{ column }}</option>
|
||||
{% else %}
|
||||
<option value="{{ column }}">{{ column }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</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="dashboard_order_status" id="input-status" class="form-control">
|
||||
{% if dashboard_order_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 class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-sort-order">{{ entry_sort_order }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="dashboard_order_sort_order" value="{{ dashboard_order_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -0,0 +1,13 @@
|
||||
<div class="tile tile-primary">
|
||||
<div class="tile-heading">{{ heading_title }} <span class="pull-right">
|
||||
{% if percentage > 0 %}
|
||||
<i class="fa fa-caret-up"></i>
|
||||
{% elseif percentage < 0 %}
|
||||
<i class="fa fa-caret-down"></i>
|
||||
{% endif %}
|
||||
{{ percentage }}%</span></div>
|
||||
<div class="tile-body"><i class="fa fa-shopping-cart"></i>
|
||||
<h2 class="pull-right">{{ total }}</h2>
|
||||
</div>
|
||||
<div class="tile-footer"><a href="{{ order }}">{{ text_view }}</a></div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user