first commit
This commit is contained in:
30
admininistrator/view/template/catalog/attribute.twig
Normal file
30
admininistrator/view/template/catalog/attribute.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-attribute" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="attribute" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#attribute').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#attribute').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
62
admininistrator/view/template/catalog/attribute_form.twig
Normal file
62
admininistrator/view/template/catalog/attribute_form.twig
Normal file
@ -0,0 +1,62 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-attribute" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-attribute" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<input type="text" name="attribute_description[{{ language.language_id }}][name]" value="{{ attribute_description[language.language_id] ? attribute_description[language.language_id].name }}" id="input-name-{{ language.language_id }}" placeholder="{{ entry_name }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-attribute-group" class="col-sm-2 col-form-label required">{{ entry_attribute_group }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="attribute_group_id" id="input-attribute-group" class="form-select">
|
||||
<option value="0"></option>
|
||||
{% for attribute_group in attribute_groups %}
|
||||
<option value="{{ attribute_group.attribute_group_id }}"{% if attribute_group.attribute_group_id == attribute_group_id %} selected{% endif %}>{{ attribute_group.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div id="error-attribute-group" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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>
|
||||
|
||||
<input type="hidden" name="attribute_id" value="{{ attribute_id }}" id="input-attribute-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
31
admininistrator/view/template/catalog/attribute_group.twig
Normal file
31
admininistrator/view/template/catalog/attribute_group.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" formaction="{{ delete }}" form="form-attribute-group" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="attribute-group" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#attribute-group').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#attribute-group').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
@ -0,0 +1,46 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-attribute-group" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-attribute-group" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-name-{{ language.language_id }}" placeholder="{{ entry_name }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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>
|
||||
<input type="hidden" name="attribute_group_id" value="{{ attribute_group_id }}" id="input-attribute-group-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
@ -0,0 +1,34 @@
|
||||
<form id="form-attribute-group" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#attribute-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'agd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'ag.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if attribute_groups %}
|
||||
{% for attribute_group in attribute_groups %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ attribute_group.attribute_group_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ attribute_group.name }}</td>
|
||||
<td class="text-end">{{ attribute_group.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ attribute_group.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
36
admininistrator/view/template/catalog/attribute_list.twig
Normal file
36
admininistrator/view/template/catalog/attribute_list.twig
Normal file
@ -0,0 +1,36 @@
|
||||
<form id="form-attribute" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#attribute">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'ad.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_attribute_group }}"{% if sort == 'attribute_group' %} class="{{ order|lower }}"{% endif %}>{{ column_attribute_group }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'a.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if attributes %}
|
||||
{% for attribute in attributes %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ attribute.attribute_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ attribute.name }}</td>
|
||||
<td class="text-start">{{ attribute.attribute_group }}</td>
|
||||
<td class="text-end">{{ attribute.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ attribute.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
63
admininistrator/view/template/catalog/category.twig
Normal file
63
admininistrator/view/template/catalog/category.twig
Normal file
@ -0,0 +1,63 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" id="button-repair" data-bs-toggle="tooltip" title="{{ button_rebuild }}" class="btn btn-warning"><i class="fa-solid fa-rotate"></i></button>
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-category" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="category" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#category').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#category').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-repair').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/category.repair&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#category').load('index.php?route=catalog/category.list&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
285
admininistrator/view/template/catalog/category_form.twig
Normal file
285
admininistrator/view/template/catalog/category_form.twig
Normal file
@ -0,0 +1,285 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><button type="submit" form="form-category" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-category" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-data" data-bs-toggle="tab" class="nav-link">{{ tab_data }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-seo" data-bs-toggle="tab" class="nav-link">{{ tab_seo }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-design" data-bs-toggle="tab" class="nav-link">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<ul class="nav nav-tabs">
|
||||
{% for language in languages %}
|
||||
<li class="nav-item"><a href="#language-{{ language.language_id }}" data-bs-toggle="tab" class="nav-link{% if loop.first %} active{% endif %}"><img src="{{ language.image }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div id="language-{{ language.language_id }}" class="tab-pane{% if loop.first %} active{% endif %}">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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"/>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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-oc-toggle="ckeditor" data-lang="{{ ckeditor }}" class="form-control">{{ category_description[language.language_id] ? category_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-meta-title-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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 id="error-meta-title-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-meta-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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="row mb-3">
|
||||
<label for="input-meta-keyword-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-data" class="tab-pane">
|
||||
<div class="row mb-3">
|
||||
<label for="input-parent" class="col-sm-2 col-form-label">{{ entry_parent }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="path" value="{{ path }}" placeholder="{{ entry_parent }}" id="input-parent" data-oc-target="autocomplete-parent" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-parent" class="dropdown-menu"></ul>
|
||||
<input type="hidden" name="parent_id" value="{{ parent_id }}" id="input-parent-id"/>
|
||||
<div class="form-text">{{ help_parent }}</div>
|
||||
<div id="error-parent" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_filter }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="filter" value="" placeholder="{{ entry_filter }}" id="input-filter" data-oc-target="autocomplete-filter" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-filter" class="dropdown-menu"></ul>
|
||||
<div class="form-control p-0" style="height: 150px; overflow: auto;">
|
||||
<table id="category-filter" class="table m-0">
|
||||
<tbody>
|
||||
{% for category_filter in category_filters %}
|
||||
<tr id="category-filter-{{ category_filter.filter_id }}">
|
||||
<td>{{ category_filter.name }}<input type="hidden" name="category_filter[]" value="{{ category_filter.filter_id }}"/></td>
|
||||
<td class="text-end"><button type="button" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-text">{{ help_filter }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="category_store[]" value="{{ store.store_id }}" id="input-store-{{ store.store_id }}" class="form-check-input"{% if store.store_id in category_store %} checked{% endif %}/> <label for="input-store-{{ store.store_id }}" class="form-check-label">{{ store.name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="card image">
|
||||
<img src="{{ thumb }}" alt="" title="" id="thumb-image" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="image" value="{{ image }}" id="input-image"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image" data-oc-thumb="#thumb-image" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image" data-oc-thumb="#thumb-image" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_top }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="top" value="0"/>
|
||||
<input type="checkbox" name="top" value="1" id="input-top" class="form-check-input"{% if top %} checked{% endif %}/>
|
||||
</div>
|
||||
<div class="form-text">{{ help_top }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-column" class="col-sm-2 col-form-label">{{ entry_column }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="column" value="{{ column }}" placeholder="{{ entry_column }}" id="input-column" class="form-control"/>
|
||||
<div class="form-text">{{ help_column }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-seo" class="tab-pane">
|
||||
<div class="alert alert-info"><i class="fa-solid fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-keyword-{{ store.store_id }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-keyword-{{ store.store_id }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-design" class="tab-pane">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start"><select name="category_layout[{{ store.store_id }}]" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
<option value="{{ layout.layout_id }}"{% if category_layout[store.store_id] and category_layout[store.store_id] == layout.layout_id %} selected{% endif %}>{{ layout.name }}</option>
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="category_id" value="{{ category_id }}" id="input-category-id"/></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('textarea[data-oc-toggle=\'ckeditor\']').ckeditor({
|
||||
language: '{{ ckeditor }}'
|
||||
});
|
||||
|
||||
$('#input-parent').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({
|
||||
'name': '{{ text_none }}',
|
||||
'category_id': '0'
|
||||
});
|
||||
|
||||
response($.map(json, function (item) {
|
||||
return {
|
||||
value: item['category_id'],
|
||||
label: item['name']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function (item) {
|
||||
$('#input-parent').val(item['label']);
|
||||
$('#input-parent-id').val(item['value']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-filter').val('');
|
||||
|
||||
$('#category-filter-' + item['value']).remove();
|
||||
|
||||
html = '<tr id="category-filter-' + item['value'] + '">';
|
||||
html += ' <td>' + item['label'] + '<input type="hidden" name="category_filter[]" value="' + item['value'] + '"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#category-filter tbody').append(html);
|
||||
}
|
||||
});
|
||||
|
||||
$('#category-filter').on('click', '.btn', function () {
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
41
admininistrator/view/template/catalog/category_list.twig
Normal file
41
admininistrator/view/template/catalog/category_list.twig
Normal file
@ -0,0 +1,41 @@
|
||||
<form id="form-category" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#category">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if categories %}
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ category.category_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ category.name }}
|
||||
<br/>
|
||||
{% if category.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}</td>
|
||||
<td class="text-end">{{ category.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ category.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
||||
|
30
admininistrator/view/template/catalog/download.twig
Normal file
30
admininistrator/view/template/catalog/download.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-download" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="download" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#download').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#download').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
158
admininistrator/view/template/catalog/download_form.twig
Normal file
158
admininistrator/view/template/catalog/download_form.twig
Normal file
@ -0,0 +1,158 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-download" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-download" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-report" data-bs-toggle="tab" class="nav-link">{{ tab_report }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-filename" class="col-sm-2 col-form-label">{{ entry_filename }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<button type="button" id="button-upload" class="btn btn-primary"><i class="fa-solid fa-upload"></i> {{ button_upload }}</button>
|
||||
<input type="text" name="filename" value="{{ filename }}" placeholder="{{ entry_filename }}" id="input-filename" class="form-control"/>
|
||||
<button type="button" id="button-download" class="btn btn-outline-secondary"{% if not filename %} disabled{% endif %}><i class="fa-solid fa-download"></i> {{ button_download }}</button>
|
||||
</div>
|
||||
<div class="form-text">{{ help_filename }}</div>
|
||||
<div id="error-filename" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-mask" class="col-sm-2 col-form-label">{{ entry_mask }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="mask" value="{{ mask }}" placeholder="{{ entry_mask }}" id="input-mask" class="form-control"/>
|
||||
<div class="form-text">{{ help_mask }}</div>
|
||||
<div id="error-mask" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-report" class="tab-pane">
|
||||
<fieldset>
|
||||
<legend>{{ text_report }}</legend>
|
||||
<div id="report">{{ report }}</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="download_id" value="{{ download_id }}" id="input-download-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#report').on('click', '.pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#report').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-upload').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$('#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');
|
||||
|
||||
$('#form-upload input[name=\'file\']').on('change', function () {
|
||||
if ((this.files[0].size / 1024) > {{ config_file_max_size }}) {
|
||||
$(this).val('');
|
||||
|
||||
alert('{{ error_upload_size }}');
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof timer !== 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
var 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 () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#input-filename').val(json['filename']);
|
||||
$('#input-mask').val(json['mask']);
|
||||
|
||||
$('#button-download').prop('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$('#input-filename').on('change', function (e) {
|
||||
var value = $(this).val();
|
||||
|
||||
if (value != '') {
|
||||
$('#button-download').prop('disabled', false);
|
||||
} else {
|
||||
$('#button-download').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-download').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
location = 'index.php?route=catalog/download.download&user_token=' + getURLVar('user_token') + '&filename=' + $('#input-filename').val();
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
34
admininistrator/view/template/catalog/download_list.twig
Normal file
34
admininistrator/view/template/catalog/download_list.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<form id="form-download" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#download">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'dd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_date_added }}"{% if sort == 'd.date_added' %} class="{{ order|lower }}"{% endif %}>{{ column_date_added }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if downloads %}
|
||||
{% for download in downloads %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ download.download_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ download.name }}</td>
|
||||
<td class="text-end">{{ download.date_added }}</td>
|
||||
<td class="text-end"><a href="{{ download.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
34
admininistrator/view/template/catalog/download_report.twig
Normal file
34
admininistrator/view/template/catalog/download_report.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_ip }}</td>
|
||||
<td class="text-end">{{ column_account }}</td>
|
||||
<td class="text-start">{{ column_store }}</td>
|
||||
<td class="text-start">{{ column_country }}</td>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if reports %}
|
||||
{% for report in reports %}
|
||||
<tr>
|
||||
<td class="text-start"><a href="https://whatismyipaddress.com/ip/{{ report.ip }}" target="_blank">{{ report.ip }}</a></td>
|
||||
<td class="text-end"><a href="{{ report.filter_ip }}" target="_blank">{{ report.account }}</a></td>
|
||||
<td class="text-start">{{ report.store }}</td>
|
||||
<td class="text-start">{{ report.country }}</td>
|
||||
<td class="text-start">{{ report.date_added }}</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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
30
admininistrator/view/template/catalog/filter.twig
Normal file
30
admininistrator/view/template/catalog/filter.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-filter" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="filter" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#filter').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#filter').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
107
admininistrator/view/template/catalog/filter_form.twig
Normal file
107
admininistrator/view/template/catalog/filter_form.twig
Normal file
@ -0,0 +1,107 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-filter" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-filter" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<fieldset>
|
||||
<legend>{{ text_group }}</legend>
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_group }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-group-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-group-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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="filter" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start required">{{ entry_name }}</td>
|
||||
<td class="text-end">{{ 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-start" style="width: 70%;"><input type="hidden" name="filter[{{ filter_row }}][filter_id]" value="{{ filter.filter_id }}"/>
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-filter-{{ filter_row }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-filter-{{ filter_row }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}</td>
|
||||
<td class="text-end"><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-end"><button type="button" onclick="$('#filter-row-{{ filter_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set filter_row = filter_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td class="text-end"><button type="button" id="button-filter" data-bs-toggle="tooltip" title="{{ button_filter_add }}" class="btn btn-primary"><i class="fa-solid fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
<input type="hidden" name="filter_group_id" value="{{ filter_group_id }}" id="input-filter-group-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
var filter_row = {{ filter_row }};
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
html = '<tr id="filter-row-' + filter_row + '">';
|
||||
html += ' <td class="text-start" style="width: 70%;"><input type="hidden" name="filter[' + filter_row + '][filter_id]" value=""/>';
|
||||
{% for language in languages %}
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-text"><img src="{{ language.image|escape('js') }}" title="{{ language.name|escape('js') }}" /></div>';
|
||||
html += ' <input type="text" name="filter[' + filter_row + '][filter_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_name|escape('js') }}" id="input-filter-' + filter_row + '-{{ language.language_id }}" class="form-control"/>';
|
||||
html += ' </div>';
|
||||
html += ' <div id="error-filter-' + filter_row + '-{{ language.language_id }}" class="invalid-feedback"></div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-end"><input type="text" name="filter[' + filter_row + '][sort_order]" value="" placeholder="{{ entry_sort_order|escape('js') }}" id="input-sort-order" class="form-control"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" onclick="$(\'#filter-row-' + filter_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#filter tbody').append(html);
|
||||
|
||||
filter_row++;
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
34
admininistrator/view/template/catalog/filter_list.twig
Normal file
34
admininistrator/view/template/catalog/filter_list.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<form id="form-filter" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#filter">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'fgd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_group }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'fg.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if filters %}
|
||||
{% for filter in filters %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ filter.filter_group_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ filter.name }}</td>
|
||||
<td class="text-end">{{ filter.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ filter.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
30
admininistrator/view/template/catalog/information.twig
Normal file
30
admininistrator/view/template/catalog/information.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-information" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="information" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#information').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#information').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
179
admininistrator/view/template/catalog/information_form.twig
Normal file
179
admininistrator/view/template/catalog/information_form.twig
Normal file
@ -0,0 +1,179 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-information" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-information" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-data" data-bs-toggle="tab" class="nav-link">{{ tab_data }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-seo" data-bs-toggle="tab" class="nav-link">{{ tab_seo }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-design" data-bs-toggle="tab" class="nav-link">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<ul class="nav nav-tabs">
|
||||
{% for language in languages %}
|
||||
<li class="nav-item"><a href="#language-{{ language.language_id }}" data-bs-toggle="tab" class="nav-link{% if loop.first %} active{% endif %}"><img src="{{ language.image }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div id="language-{{ language.language_id }}" class="tab-pane{% if loop.first %} active{% endif %}">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-title-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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"/>
|
||||
<div id="error-title-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="input-description-{{ language.language_id }}">
|
||||
<textarea name="information_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" data-oc-toggle="ckeditor" data-lang="{{ ckeditor }}" class="form-control">{{ information_description[language.language_id] ? information_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-meta-title-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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 id="error-meta-title-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-meta-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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="row mb-3">
|
||||
<label for="input-meta-keyword-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-data" class="tab-pane">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="information_store[]" value="{{ store.store_id }}" id="input-store-{{ store.store_id }}" class="form-check-input"{% if store.store_id in information_store %} checked{% endif %}/> <label for="input-store-{{ store.store_id }}" class="form-check-label">{{ store.name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_bottom }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="bottom" value="0"/>
|
||||
<input type="checkbox" name="bottom" value="1" id="input-bottom" class="form-check-input"{% if bottom %} checked{% endif %}/>
|
||||
</div>
|
||||
<div class="form-text">{{ help_bottom }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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 id="tab-seo" class="tab-pane">
|
||||
<div class="alert alert-info"><i class="fa-solid fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-keyword-{{ store.store_id }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-keyword-{{ store.store_id }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-design" class="tab-pane">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start"><select name="information_layout[{{ store.store_id }}]" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
<option value="{{ layout.layout_id }}"{% if information_layout[store.store_id] and information_layout[store.store_id] == layout.layout_id %} selected{% endif %}>{{ layout.name }}</option>
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="information_id" value="{{ information_id }}" id="input-information-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('textarea[data-oc-toggle=\'ckeditor\']').ckeditor({
|
||||
language:'{{ ckeditor }}'
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
40
admininistrator/view/template/catalog/information_list.twig
Normal file
40
admininistrator/view/template/catalog/information_list.twig
Normal file
@ -0,0 +1,40 @@
|
||||
<form id="form-information" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#information">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_title }}"{% if sort == 'id.title' %} class="{{ order|lower }}"{% endif %}>{{ column_title }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'i.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if informations %}
|
||||
{% for information in informations %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ information.information_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ information.title }}
|
||||
<br/>
|
||||
{% if information.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}</td>
|
||||
<td class="text-end">{{ information.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ information.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
30
admininistrator/view/template/catalog/manufacturer.twig
Normal file
30
admininistrator/view/template/catalog/manufacturer.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-manufacturer" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="manufacturer" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#manufacturer').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#manufacturer').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
125
admininistrator/view/template/catalog/manufacturer_form.twig
Normal file
125
admininistrator/view/template/catalog/manufacturer_form.twig
Normal file
@ -0,0 +1,125 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-manufacturer" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-manufacturer" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-seo" data-bs-toggle="tab" class="nav-link">{{ tab_seo }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-design" data-bs-toggle="tab" class="nav-link">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name" class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control"/>
|
||||
<div id="error-name" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="manufacturer_store[]" value="{{ store.store_id }}" id="input-store-{{ store.store_id }}" class="form-check-input"{% if store.store_id in manufacturer_store %} checked{% endif %}/> <label for="input-store-{{ store.store_id }}" class="form-check-label">{{ store.name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-image" class="col-sm-2 col-form-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="card image">
|
||||
<img src="{{ thumb }}" alt="" title="" id="thumb-image" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="image" value="{{ image }}" id="input-image"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image" data-oc-thumb="#thumb-image" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image" data-oc-thumb="#thumb-image" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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 id="tab-seo" class="tab-pane">
|
||||
<div class="alert alert-info"><i class="fa-solid fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start">{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-keyword-{{ store.store_id }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-keyword-{{ store.store_id }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-design" class="tab-pane">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start"><select name="manufacturer_layout[{{ store.store_id }}]" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
<option value="{{ layout.layout_id }}"{% if manufacturer_layout[store.store_id] and manufacturer_layout[store.store_id] == layout.layout_id %} selected{% endif %}>{{ layout.name }}</option>
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="manufacturer_id" value="{{ manufacturer_id }}" id="input-manufacturer-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
34
admininistrator/view/template/catalog/manufacturer_list.twig
Normal file
34
admininistrator/view/template/catalog/manufacturer_list.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<form id="form-manufacturer" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#manufacturer">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if manufacturers %}
|
||||
{% for manufacturer in manufacturers %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ manufacturer.manufacturer_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ manufacturer.name }}</td>
|
||||
<td class="text-end">{{ manufacturer.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ manufacturer.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
30
admininistrator/view/template/catalog/option.twig
Normal file
30
admininistrator/view/template/catalog/option.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-option" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="option" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#option').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#option').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
161
admininistrator/view/template/catalog/option_form.twig
Normal file
161
admininistrator/view/template/catalog/option_form.twig
Normal file
@ -0,0 +1,161 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-option" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-option" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<fieldset>
|
||||
<legend>{{ text_option }}</legend>
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-type" class="col-sm-2 col-form-label">{{ entry_type }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="type" id="input-type" class="form-select">
|
||||
<optgroup label="{{ text_choose }}">
|
||||
<option value="select"{% if type == 'select' %} selected{% endif %}>{{ text_select }}</option>
|
||||
<option value="radio"{% if type == 'radio' %} selected{% endif %}>{{ text_radio }}</option>
|
||||
<option value="checkbox"{% if type == 'checkbox' %} selected{% endif %}>{{ text_checkbox }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_input }}">
|
||||
<option value="text"{% if type == 'text' %} selected{% endif %}>{{ text_text }}</option>
|
||||
<option value="textarea"{% if type == 'textarea' %} selected{% endif %}>{{ text_textarea }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_file }}">
|
||||
<option value="file"{% if type == 'file' %} selected{% endif %}>{{ text_file }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_date }}">
|
||||
<option value="date"{% if type == 'date' %} selected{% endif %}>{{ text_date }}</option>
|
||||
<option value="time"{% if type == 'time' %} selected{% endif %}>{{ text_time }}</option>
|
||||
<option value="datetime"{% if type == 'datetime' %} selected{% endif %}>{{ text_datetime }}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start required">{{ entry_option_value }}</td>
|
||||
<td class="text-center">{{ entry_image }}</td>
|
||||
<td class="text-end">{{ 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">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-option-value-{{ option_value_row }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-option-value-{{ option_value_row }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}</td>
|
||||
<td class="text-center">
|
||||
<div class="card image">
|
||||
<img src="{{ option_value.thumb }}" alt="" title="" id="thumb-image-{{ option_value_row }}" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="option_value[{{ option_value_row }}][image]" value="{{ option_value.image }}" id="input-image-{{ option_value_row }}"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image-{{ option_value_row }}" data-oc-thumb="#thumb-image-{{ option_value_row }}" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image-{{ option_value_row }}" data-oc-thumb="#thumb-image-{{ option_value_row }}" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end"><input type="text" name="option_value[{{ option_value_row }}][sort_order]" value="{{ option_value.sort_order }}" placeholder="{{ entry_sort_order }}" class="form-control"/></td>
|
||||
<td class="text-end"><button type="button" onclick="$('#option-value-row-{{ option_value_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa-solid 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-end"><button type="button" onclick="addOptionValue();" data-bs-toggle="tooltip" title="{{ button_option_value_add }}" class="btn btn-primary"><i class="fa-solid fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
<input type="hidden" name="option_id" value="{{ option_id }}" id="input-option-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#input-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();
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-start"><input type="hidden" name="option_value[' + option_value_row + '][option_value_id]" value="" />';
|
||||
{% for language in languages %}
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-text"><img src="{{ language.image|escape('js') }}" title="{{ language.name|escape('js') }}" /></div>';
|
||||
html += ' <input type="text" name="option_value[' + option_value_row + '][option_value_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_option_value|escape('js') }}" id="input-option-value-' + option_value_row + '-{{ language.language_id }}" class="form-control"/>';
|
||||
html += ' </div>';
|
||||
html += ' <div id="error-option-value-' + option_value_row + '-{{ language.language_id }}" class="invalid-feedback"></div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-center">';
|
||||
html += ' <div class="card image">';
|
||||
html += ' <img src="{{ placeholder|escape('js') }}" alt="" title="" id="thumb-image-' + option_value_row + '" data-oc-placeholder="{{ placeholder|escape('js') }}" class="card-img-top"/>';
|
||||
html += ' <input type="hidden" name="option_value[' + option_value_row + '][image]" value="" id="input-image-' + option_value_row + '"/>';
|
||||
html += ' <div class="card-body">';
|
||||
html += ' <button type="button" data-oc-toggle="image" data-oc-target="#input-image-' + option_value_row + '" data-oc-thumb="#thumb-image-' + option_value_row + '" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit|escape('js') }}</button>';
|
||||
html += ' <button type="button" data-oc-toggle="clear" data-oc-target="#input-image-' + option_value_row + '" data-oc-thumb="#thumb-image-' + option_value_row + '" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear|escape('js') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-end"><input type="text" name="option_value[' + option_value_row + '][sort_order]" value="" placeholder="{{ entry_sort_order|escape('js') }}" class="form-control"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" onclick="$(\'#option-value-row-' + option_value_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#option-value tbody').append(html);
|
||||
|
||||
option_value_row++;
|
||||
}
|
||||
//--></script>
|
||||
{{ footer }}
|
34
admininistrator/view/template/catalog/option_list.twig
Normal file
34
admininistrator/view/template/catalog/option_list.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<form id="form-option" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#option">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'od.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'o.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if options %}
|
||||
{% for option in options %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ option.option_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ option.name }}</td>
|
||||
<td class="text-end">{{ option.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ option.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
148
admininistrator/view/template/catalog/product.twig
Normal file
148
admininistrator/view/template/catalog/product.twig
Normal file
@ -0,0 +1,148 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-product').toggleClass('d-none');" class="btn btn-light d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-product" formaction="{{ copy }}" data-bs-toggle="tooltip" title="{{ button_copy }}" class="btn btn-light"><i class="fa-regular fa-copy"></i></button>
|
||||
<button type="submit" form="form-product" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-product" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="input-name" class="form-label">{{ entry_name }}</label>
|
||||
<input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_name }}" id="input-name" data-oc-target="autocomplete-name" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-name" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-model" class="form-label">{{ entry_model }}</label>
|
||||
<input type="text" name="filter_model" value="{{ filter_model }}" placeholder="{{ entry_model }}" id="input-model" data-oc-target="autocomplete-model" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-model" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-price" class="form-label">{{ entry_price }}</label> <input type="text" name="filter_price" value="{{ filter_price }}" placeholder="{{ entry_price }}" id="input-price" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-quantity" class="form-label">{{ entry_quantity }}</label> <input type="text" name="filter_quantity" value="{{ filter_quantity }}" placeholder="{{ entry_quantity }}" id="input-quantity" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-status" class="form-label">{{ entry_status }}</label> <select name="filter_status" id="input-status" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="1"{% if filter_status == '1' %} selected{% endif %}>{{ text_enabled }}</option>
|
||||
<option value="0"{% if filter_status == '0' %} selected{% endif %}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="product" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#product').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#product').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
var url = '';
|
||||
|
||||
var filter_name = $('#input-name').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
var filter_model = $('#input-model').val();
|
||||
|
||||
if (filter_model) {
|
||||
url += '&filter_model=' + encodeURIComponent(filter_model);
|
||||
}
|
||||
|
||||
var filter_price = $('#input-price').val();
|
||||
|
||||
if (filter_price) {
|
||||
url += '&filter_price=' + encodeURIComponent(filter_price);
|
||||
}
|
||||
|
||||
var filter_quantity = $('#input-quantity').val();
|
||||
|
||||
if (filter_quantity) {
|
||||
url += '&filter_quantity=' + filter_quantity;
|
||||
}
|
||||
|
||||
var filter_status = $('#input-status').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + filter_status;
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=catalog/product&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#product').load('index.php?route=catalog/product.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-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').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-model').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
2120
admininistrator/view/template/catalog/product_form.twig
Normal file
2120
admininistrator/view/template/catalog/product_form.twig
Normal file
File diff suppressed because it is too large
Load Diff
69
admininistrator/view/template/catalog/product_list.twig
Normal file
69
admininistrator/view/template/catalog/product_list.twig
Normal file
@ -0,0 +1,69 @@
|
||||
<form id="form-product" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#product">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-center">{{ column_image }}</td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'pd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-start d-none d-lg-table-cell"><a href="{{ sort_model }}"{% if sort == 'p.model' %} class="{{ order|lower }}"{% endif %}>{{ column_model }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_price }}"{% if sort == 'p.price' %} class="{{ order|lower }}"{% endif %}>{{ column_price }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_quantity }}"{% if sort == 'p.quantity' %} class="{{ order|lower }}"{% endif %}>{{ column_quantity }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if products %}
|
||||
{% for product in products %}
|
||||
<tr{% if not product.variant %} class="table-warning"{% endif %}>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ product.product_id }}" class="form-check-input"/></td>
|
||||
<td class="text-center"><img src="{{ product.image }}" alt="{{ product.name }}" class="img-thumbnail"/></td>
|
||||
<td class="text-start">{{ product.name }}
|
||||
<br/>
|
||||
{% if product.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}</td>
|
||||
<td class="text-start d-none d-lg-table-cell">{{ product.model }}</td>
|
||||
<td class="text-end">
|
||||
{% 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-end">
|
||||
{% if product.quantity <= 0 %}
|
||||
<span class="badge bg-warning">{{ product.quantity }}</span>
|
||||
{% elseif product.quantity <= 5 %}
|
||||
<span class="badge bg-danger">{{ product.quantity }}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-success">{{ product.quantity }}</span>
|
||||
{% endif %}</td>
|
||||
<td class="text-end">
|
||||
{% if product.variant %}
|
||||
<div class="btn-group">
|
||||
<a href="{{ product.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown"><i class="fa-solid fa-caret-down"></i></button>
|
||||
<div class="dropdown-menu dropdown-menu-end"><a href="{{ product.variant }}" class="dropdown-item"><i class="fa-solid fa-plus"></i> {{ text_variant_add }}</a></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{{ product.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-warning"><i class="fa-solid fa-pencil"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
32
admininistrator/view/template/catalog/product_report.twig
Normal file
32
admininistrator/view/template/catalog/product_report.twig
Normal file
@ -0,0 +1,32 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_ip }}</td>
|
||||
<td class="text-start">{{ column_store }}</td>
|
||||
<td class="text-start">{{ column_country }}</td>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if reports %}
|
||||
{% for report in reports %}
|
||||
<tr>
|
||||
<td class="text-start"><a href="https://whatismyipaddress.com/ip/{{ report.ip }}" target="_blank">{{ report.ip }}</a></td>
|
||||
<td class="text-start">{{ report.store }}</td>
|
||||
<td class="text-start">{{ report.country }}</td>
|
||||
<td class="text-start">{{ report.date_added }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
185
admininistrator/view/template/catalog/review.twig
Normal file
185
admininistrator/view/template/catalog/review.twig
Normal file
@ -0,0 +1,185 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-review').toggleClass('d-none');" class="btn btn-light d-md-none d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<button type="button" id="button-rating" data-bs-toggle="tooltip" title="{{ button_rating }}" class="btn btn-warning"><i class="fa-solid fa-rotate"></i></button>
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-review" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-review" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="input-product" class="form-label">{{ entry_product }}</label>
|
||||
<input type="text" name="filter_product" value="{{ filter_product }}" placeholder="{{ entry_product }}" id="input-product" data-oc-target="autocomplete-product" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-product" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-author" class="form-label">{{ entry_author }}</label>
|
||||
<input type="text" name="filter_author" value="{{ filter_author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-status" class="form-label">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="1"{% if filter_status == '1' %} selected{% endif %}>{{ text_enabled }}</option>
|
||||
<option value="0"{% if filter_status == '0' %} selected{% endif %}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-from" class="form-label">{{ entry_date_from }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_from" value="{{ filter_date_from }}" placeholder="{{ entry_date_from }}" id="input-date-from" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-to" class="form-label">{{ entry_date_to }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_to" value="{{ filter_date_to }}" placeholder="{{ entry_date_to }}" id="input-date-to" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="review" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#review').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#review').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
url = '';
|
||||
|
||||
var filter_product = $('#input-product').val();
|
||||
|
||||
if (filter_product) {
|
||||
url += '&filter_product=' + encodeURIComponent(filter_product);
|
||||
}
|
||||
|
||||
var filter_author = $('#input-author').val();
|
||||
|
||||
if (filter_author) {
|
||||
url += '&filter_author=' + encodeURIComponent(filter_author);
|
||||
}
|
||||
|
||||
var filter_status = $('#input-status').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + filter_status;
|
||||
}
|
||||
|
||||
var filter_date_from = $('#input-date-from').val();
|
||||
|
||||
if (filter_date_from) {
|
||||
url += '&filter_date_from=' + encodeURIComponent(filter_date_from);
|
||||
}
|
||||
|
||||
var filter_date_to = $('#input-date-to').val();
|
||||
|
||||
if (filter_date_to) {
|
||||
url += '&filter_date_to=' + encodeURIComponent(filter_date_to);
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=catalog/review&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#review').load('index.php?route=catalog/review.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-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-product').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#button-rating').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$(element).button('loading');
|
||||
|
||||
var next = 'index.php?route=catalog/review.sync&user_token={{ user_token }}';
|
||||
|
||||
var rating = function () {
|
||||
return $.ajax({
|
||||
url: next,
|
||||
dataType: 'json',
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle-circle"></i> ' + json['text'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next = json['next'];
|
||||
|
||||
chain.attach(rating);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
chain.attach(rating);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
113
admininistrator/view/template/catalog/review_form.twig
Normal file
113
admininistrator/view/template/catalog/review_form.twig
Normal file
@ -0,0 +1,113 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-review" formaction="{{ save }}" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-review" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-author" class="col-sm-2 col-form-label">{{ entry_author }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control"/>
|
||||
<div id="error-author" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_product }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="product" value="{{ product }}" placeholder="{{ entry_product }}" id="input-product" data-oc-target="autocomplete-product" class="form-control" autocomplete="off"/>
|
||||
<input type="hidden" name="product_id" value="{{ product_id }}" id="input-product-id"/>
|
||||
<ul id="autocomplete-product" class="dropdown-menu"></ul>
|
||||
<div class="form-text">{{ help_product }}</div>
|
||||
<div id="error-product" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-text" class="col-sm-2 col-form-label">{{ entry_text }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="text" rows="8" placeholder="{{ entry_text }}" id="input-text" class="form-control">{{ text }}</textarea>
|
||||
<div id="error-text" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-rating" class="col-sm-2 col-form-label">{{ entry_rating }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="input-rating">
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="radio" name="rating" value="1" id="input-rating-1" class="form-check-input"{% if rating == 1 %} checked{% endif %}/> <label for="input-rating-1" class="form-check-label">1</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="radio" name="rating" value="2" id="input-rating-2" class="form-check-input"{% if rating == 2 %} checked{% endif %}/> <label for="input-rating-2" class="form-check-label">2</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="radio" name="rating" value="3" id="input-rating-3" class="form-check-input"{% if rating == 3 %} checked{% endif %}/> <label for="input-rating-3" class="form-check-label">3</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="radio" name="rating" value="4" id="input-rating-4" class="form-check-input"{% if rating == 4 %} checked{% endif %}/> <label for="input-rating-4" class="form-check-label">4</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input type="radio" name="rating" value="5" id="input-rating-5" class="form-check-input"{% if rating == 5 %} checked{% endif %}/> <label for="input-rating-5" class="form-check-label">5</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="error-rating" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-date-added" class="col-sm-2 col-form-label">{{ entry_date_added }}</label>
|
||||
<div class="col-sm-10 col-md-4">
|
||||
<div class="input-group">
|
||||
<input type="text" name="date_added" value="{{ date_added }}" placeholder="{{ entry_date_added }}" id="input-date-added" class="form-control datetime"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/> <input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="review_id" value="{{ review_id }}" id="input-review-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#input-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-product').val(item['label']);
|
||||
$('#input-product-id').val(item['value']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
44
admininistrator/view/template/catalog/review_list.twig
Normal file
44
admininistrator/view/template/catalog/review_list.twig
Normal file
@ -0,0 +1,44 @@
|
||||
<form id="form-review" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#review">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_product }}"{% if sort == 'pd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_product }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_author }}"{% if sort == 'r.author' %} class="{{ order|lower }}"{% endif %}>{{ column_author }}</a></td>
|
||||
<td class="text-end d-none d-lg-table-cell"><a href="{{ sort_rating }}"{% if sort == 'r.rating' %} class="{{ order|lower }}"{% endif %}>{{ column_rating }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_date_added }}"{% if sort == 'r.date_added' %} class="{{ order|lower }}"{% endif %}>{{ column_date_added }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if reviews %}
|
||||
{% for review in reviews %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ review.review_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ review.name }}
|
||||
<br/>
|
||||
{% if review.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}</td>
|
||||
<td class="text-start">{{ review.author }}</td>
|
||||
<td class="text-end d-none d-lg-table-cell">{{ review.rating }}</td>
|
||||
<td class="text-start">{{ review.date_added }}</td>
|
||||
<td class="text-end"><a href="{{ review.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
31
admininistrator/view/template/catalog/subscription_plan.twig
Normal file
31
admininistrator/view/template/catalog/subscription_plan.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-subscription-plan" formaction="{{ copy }}" data-bs-toggle="tooltip" title="{{ button_copy }}" class="btn btn-light"><i class="fa-regular fa-copy"></i></button>
|
||||
<button type="submit" form="form-subscription-plan" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="subscription-plan" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#subscription-plan').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#subscription-plan').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
@ -0,0 +1,120 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-subscription-plan" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-subscription-plan" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<input type="text" name="subscription_plan_description[{{ language.language_id }}][name]" value="{{ subscription_plan_description[language.language_id] ? subscription_plan_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>{{ text_trial }}</legend>
|
||||
<div class="row mb-3">
|
||||
<label for="input-trial-duration" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_trial_duration }}</div>
|
||||
<div id="error-trial-duration" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-trial-cycle" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_trial_cycle }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-trial-frequency" class="col-sm-2 col-form-label">{{ entry_trial_frequency }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="trial_frequency" id="input-trial-frequency" class="form-select">
|
||||
{% for frequency_option in frequencies %}
|
||||
<option value="{{ frequency_option.value }}"{% if trial_frequency == frequency_option.value %} selected{% endif %}>{{ frequency_option.text }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-text">{{ help_trial_frequency }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_trial_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="trial_status" value="0"/>
|
||||
<input type="checkbox" name="trial_status" value="1" id="input-notify" class="form-check-input"{% if trial_status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_subscription }}</legend>
|
||||
<div class="row mb-3">
|
||||
<label for="input-duration" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_duration }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-cycle" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_cycle }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-frequency" class="col-sm-2 col-form-label">{{ entry_frequency }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="frequency" id="input-frequency" class="form-select">
|
||||
{% for frequency_option in frequencies %}
|
||||
<option value="{{ frequency_option.value }}"{% if frequency == frequency_option.value %} selected{% endif %}>{{ frequency_option.text }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-text">{{ help_frequency }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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>
|
||||
<input type="hidden" name="subscription_plan_id" value="{{ subscription_plan_id }}" id="input-subscription-plan-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
@ -0,0 +1,40 @@
|
||||
<form id="form-subscription-plan" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#subscription-plan">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'spd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 's.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if subscription_plans %}
|
||||
{% for subscription_plan in subscription_plans %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ subscription_plan.subscription_plan_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ subscription_plan.name }}
|
||||
<br/>
|
||||
{% if subscription_plan.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}</td>
|
||||
<td class="text-end">{{ subscription_plan.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ subscription_plan.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
31
admininistrator/view/template/cms/antispam.twig
Normal file
31
admininistrator/view/template/cms/antispam.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-antispam" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="antispam" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#antispam').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#antispam').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
34
admininistrator/view/template/cms/antispam_form.twig
Normal file
34
admininistrator/view/template/cms/antispam_form.twig
Normal file
@ -0,0 +1,34 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><button type="submit" form="form-antispam" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-antispam" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-keyword" class="col-sm-2 col-form-label">{{ entry_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="keyword" value="{{ keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control"/>
|
||||
<div id="error-keyword" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="antispam_id" value="{{ antispam_id }}" id="input-antispam-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
32
admininistrator/view/template/cms/antispam_list.twig
Normal file
32
admininistrator/view/template/cms/antispam_list.twig
Normal file
@ -0,0 +1,32 @@
|
||||
<form id="form-antispam" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#antispam">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_keyword }}"{% if sort == 'keyword' %} class="{{ order|lower }}"{% endif %}>{{ column_keyword }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if antispams %}
|
||||
{% for antispam in antispams %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ antispam.antispam_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ antispam.keyword }}</td>
|
||||
<td class="text-end"><a href="{{ antispam.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
31
admininistrator/view/template/cms/article.twig
Normal file
31
admininistrator/view/template/cms/article.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-article" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="article" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#article').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#article').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
199
admininistrator/view/template/cms/article_form.twig
Normal file
199
admininistrator/view/template/cms/article_form.twig
Normal file
@ -0,0 +1,199 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><button type="submit" form="form-article" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-article" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-data" data-bs-toggle="tab" class="nav-link">{{ tab_data }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-seo" data-bs-toggle="tab" class="nav-link">{{ tab_seo }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-design" data-bs-toggle="tab" class="nav-link">{{ tab_design }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<ul class="nav nav-tabs">
|
||||
{% for language in languages %}
|
||||
<li class="nav-item"><a href="#language-{{ language.language_id }}" data-bs-toggle="tab" class="nav-link{% if loop.first %} active{% endif %}"><img src="{{ language.image }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div id="language-{{ language.language_id }}" class="tab-pane{% if loop.first %} active{% endif %}">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10">
|
||||
<img src="{{ article_description[language.language_id] ? article_description[language.language_id].thumb : placeholder }}" alt="" title="" id="thumb-image-{{ language.language_id }}" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/>
|
||||
<input type="hidden" name="article_description[{{ language.language_id }}][image]" value="{{ article_description[language.language_id] ? article_description[language.language_id].image }}" id="input-image-{{ language.language_id }}"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image-{{ language.language_id }}" data-oc-thumb="#thumb-image-{{ language.language_id }}" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image-{{ language.language_id }}" data-oc-thumb="#thumb-image-{{ language.language_id }}" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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"/>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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-oc-toggle="ckeditor" data-lang="{{ ckeditor }}" class="form-control">{{ article_description[language.language_id] ? article_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-tag-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_tag }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="article_description[{{ language.language_id }}][tag]" value="{{ article_description[language.language_id] ? article_description[language.language_id].tag }}" placeholder="{{ entry_tag }}" id="input-tag-{{ language.language_id }}" class="form-control"/>
|
||||
<div id="error-tag-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-meta-title-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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 id="error-meta-title-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-meta-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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="row mb-3">
|
||||
<label for="input-meta-keyword-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ 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>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-data" class="tab-pane">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-author" class="col-sm-2 col-form-label">{{ entry_author }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="author" value="{{ author }}" placeholder="{{ entry_author }}" id="input-author" class="form-control"/>
|
||||
<div id="error-author" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-topic" class="col-sm-2 col-form-label">{{ entry_topic }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="topic_id" id="input-topic" class="form-select">
|
||||
<option value="0">{{ text_none }}</option>
|
||||
{% for topic in topics %}
|
||||
<option value="{{ topic.topic_id }}"{% if topic.topic_id == topic_id %} selected{% endif %}>{{ topic.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="article_store[]" value="{{ store.store_id }}" id="input-store-{{ store.store_id }}" class="form-check-input"{% if store.store_id in article_store %} checked{% endif %}/>
|
||||
<label for="input-store-{{ store.store_id }}" class="form-check-label">{{ store.name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-seo" class="tab-pane">
|
||||
<div class="alert alert-info"><i class="fa-solid fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-keyword-{{ store.store_id }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-keyword-{{ store.store_id }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-design" class="tab-pane">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_layout }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start"><select name="article_layout[{{ store.store_id }}]" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for layout in layouts %}
|
||||
<option value="{{ layout.layout_id }}"{% if article_layout[store.store_id] and article_layout[store.store_id] == layout.layout_id %} selected{% endif %}>{{ layout.name }}</option>
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="article_id" value="{{ article_id }}" id="input-article-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('textarea[data-oc-toggle=\'ckeditor\']').ckeditor({
|
||||
language: '{{ ckeditor }}'
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
43
admininistrator/view/template/cms/article_list.twig
Normal file
43
admininistrator/view/template/cms/article_list.twig
Normal file
@ -0,0 +1,43 @@
|
||||
<form id="form-article" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#article">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'ad.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_author }}"{% if sort == 'a.author' %} class="{{ order|lower }}"{% endif %}>{{ column_author }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_date_added }}"{% if sort == 'a.date_added' %} class="{{ order|lower }}"{% endif %}>{{ column_date_added }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if articles %}
|
||||
{% for article in articles %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ article.article_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ article.name }}
|
||||
<br/>
|
||||
{% if article.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-start">{{ article.author }}</td>
|
||||
<td class="text-end">{{ article.date_added }}</td>
|
||||
<td class="text-end"><a href="{{ article.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
175
admininistrator/view/template/cms/comment.twig
Normal file
175
admininistrator/view/template/cms/comment.twig
Normal file
@ -0,0 +1,175 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-comment" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="input-keyword" class="form-label">{{ entry_keyword }}</label>
|
||||
<input type="text" name="filter_keyword" value="" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-article" class="form-label">{{ entry_article }}</label>
|
||||
<input type="text" name="filter_article" value="" placeholder="{{ entry_article }}" id="input-article" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-customer" class="form-label">{{ entry_customer }}</label>
|
||||
<input type="text" name="filter_customer" value="" placeholder="{{ entry_customer }}" id="input-customer" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-status" class="form-label">{{ entry_status }}</label>
|
||||
<select name="filter_status" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="0">{{ text_disabled }}</option>
|
||||
<option value="1">{{ text_enabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-added" class="form-label">{{ entry_date_added }}</label>
|
||||
<div class="input-group">
|
||||
<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 date"/>
|
||||
<div class="input-group-text"><i class="fas fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa fa-list"></i> {{ text_list }}</div>
|
||||
<div class="card-body">
|
||||
<div id="comment">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#comment').on('click', '.pagination a', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#comment').load(this.href);
|
||||
});
|
||||
|
||||
$('#comment').on('click', '.btn-success, .btn-danger', function() {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function(json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').before('<div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> ' + json['error'] + ' <button type="button" class="close" data-dismiss="alert">×</button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').before('<div class="alert alert-success alert-dismissible"><i class="fas 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() {
|
||||
var url = '';
|
||||
|
||||
var filter_keyword = $('input-keyword').val();
|
||||
|
||||
if (filter_keyword) {
|
||||
url += '&filter_keyword=' + encodeURIComponent(filter_keyword);
|
||||
}
|
||||
|
||||
var filter_article = $('input-article').val();
|
||||
|
||||
if (filter_article) {
|
||||
url += '&filter_article=' + encodeURIComponent(filter_article);
|
||||
}
|
||||
|
||||
var filter_customer = $('input-customer').val();
|
||||
|
||||
if (filter_customer) {
|
||||
url += '&filter_customer=' + encodeURIComponent(filter_customer);
|
||||
}
|
||||
|
||||
var filter_status = $('input-status').val();
|
||||
|
||||
if (filter_status) {
|
||||
url += '&filter_status=' + filter_status;
|
||||
}
|
||||
|
||||
var filter_date_added = $('input-date-added').val();
|
||||
|
||||
if (filter_date_added) {
|
||||
url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
|
||||
}
|
||||
|
||||
$('#comment').load('index.php?route=cms/comment.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-customer').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-customer').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-email').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
39
admininistrator/view/template/cms/comment_list.twig
Normal file
39
admininistrator/view/template/cms/comment_list.twig
Normal file
@ -0,0 +1,39 @@
|
||||
{% if comments %}
|
||||
{% for comment in comments %}
|
||||
<table class="table table-bordered">
|
||||
|
||||
<tr>
|
||||
<td class="align-text-top">
|
||||
|
||||
<h4><a href="{{ comment.filter_blog }}" target="_blank">{{ comment.title }}</a></h4>
|
||||
<p><a href="{{ comment.filter_member }}" target="_blank">{{ comment.customer }}</a> - {{ comment.date_added }}</p>
|
||||
<p>{{ comment.comment }}</p>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="w-25 align-text-top">
|
||||
|
||||
{% if comment.approve %}
|
||||
<button type="button" value="{{ comment.approve }}" class="btn btn-success btn-block"><i class="fas fa-check-circle"></i> {{ button_approve }}</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-success btn-block" disabled><i class="fas fa-check-circle"></i> {{ button_approve }}</button>
|
||||
{% endif %}
|
||||
|
||||
<button type="button" value="{{ comment.spam }}" class="btn btn-warning btn-block"><i class="fas fas fa-ban"></i> {{ button_spam }}</button>
|
||||
<button type="button" value="{{ comment.delete }}" class="btn btn-danger btn-block"><i class="fas fa-trash-alt"></i> {{ button_delete }}</button>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="text-center">No results!</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
31
admininistrator/view/template/cms/topic.twig
Normal file
31
admininistrator/view/template/cms/topic.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-topic" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="topic" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#topic').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#topic').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
152
admininistrator/view/template/cms/topic_form.twig
Normal file
152
admininistrator/view/template/cms/topic_form.twig
Normal file
@ -0,0 +1,152 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><button type="submit" form="form-topic" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-topic" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a href="#tab-general" data-bs-toggle="tab" class="nav-link active">{{ tab_general }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-data" data-bs-toggle="tab" class="nav-link">{{ tab_data }}</a></li>
|
||||
<li class="nav-item"><a href="#tab-seo" data-bs-toggle="tab" class="nav-link">{{ tab_seo }}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="tab-general" class="tab-pane active">
|
||||
<ul class="nav nav-tabs">
|
||||
{% for language in languages %}
|
||||
<li class="nav-item"><a href="#language-{{ language.language_id }}" data-bs-toggle="tab" class="nav-link{% if loop.first %} active{% endif %}"><img src="{{ language.image }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% for language in languages %}
|
||||
<div id="language-{{ language.language_id }}" class="tab-pane{% if loop.first %} active{% endif %}">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_image }}</label>
|
||||
<div class="col-sm-10">
|
||||
<img src="{{ topic_description[language.language_id] ? topic_description[language.language_id].thumb : placeholder }}" alt="" title="" id="thumb-image-{{ language.language_id }}" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/>
|
||||
<input type="hidden" name="topic_description[{{ language.language_id }}][image]" value="{{ topic_description[language.language_id] ? topic_description[language.language_id].image }}" id="input-image-{{ language.language_id }}"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image-{{ language.language_id }}" data-oc-thumb="#thumb-image-{{ language.language_id }}" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image-{{ language.language_id }}" data-oc-thumb="#thumb-image-{{ language.language_id }}" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="topic_description[{{ language.language_id }}][name]" value="{{ topic_description[language.language_id] ? topic_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="topic_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description-{{ language.language_id }}" data-oc-toggle="ckeditor" data-lang="{{ ckeditor }}" class="form-control">{{ topic_description[language.language_id] ? topic_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-meta-title-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_meta_title }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="topic_description[{{ language.language_id }}][meta_title]" value="{{ topic_description[language.language_id] ? topic_description[language.language_id].meta_title }}" placeholder="{{ entry_meta_title }}" id="input-meta-title-{{ language.language_id }}" class="form-control"/>
|
||||
<div id="error-meta-title-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-meta-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_meta_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="topic_description[{{ language.language_id }}][meta_description]" rows="5" placeholder="{{ entry_meta_description }}" id="input-meta-description-{{ language.language_id }}" class="form-control">{{ topic_description[language.language_id] ? topic_description[language.language_id].meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-meta-keyword-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_meta_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="topic_description[{{ language.language_id }}][meta_keyword]" rows="5" placeholder="{{ entry_meta_keyword }}" id="input-meta-keyword-{{ language.language_id }}" class="form-control">{{ topic_description[language.language_id] ? topic_description[language.language_id].meta_keyword }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-data" class="tab-pane">
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% for store in stores %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="topic_store[]" value="{{ store.store_id }}" id="input-store-{{ store.store_id }}" class="form-check-input"{% if store.store_id in topic_store %} checked{% endif %}/> <label for="input-store-{{ store.store_id }}" class="form-check-label">{{ store.name }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-seo" class="tab-pane">
|
||||
<div class="alert alert-info"><i class="fa-solid fa-info-circle"></i> {{ text_keyword }}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ entry_keyword }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in stores %}
|
||||
<tr>
|
||||
<td class="text-start">{{ store.name }}</td>
|
||||
<td class="text-start">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<input type="text" name="topic_seo_url[{{ store.store_id }}][{{ language.language_id }}]" value="{% if topic_seo_url[store.store_id][language.language_id] %}{{ topic_seo_url[store.store_id][language.language_id] }}{% endif %}" placeholder="{{ entry_keyword }}" id="input-keyword-{{ store.store_id }}-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-keyword-{{ store.store_id }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="topic_id" value="{{ topic_id }}" id="input-topic-id"/></form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('textarea[data-oc-toggle=\'ckeditor\']').ckeditor({
|
||||
language: '{{ ckeditor }}'
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
42
admininistrator/view/template/cms/topic_list.twig
Normal file
42
admininistrator/view/template/cms/topic_list.twig
Normal file
@ -0,0 +1,42 @@
|
||||
<form id="form-topic" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#topic">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if topics %}
|
||||
{% for topic in topics %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ topic.topic_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ topic.name }}
|
||||
<br/>
|
||||
{% if topic.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-end">{{ topic.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ topic.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
||||
|
78
admininistrator/view/template/common/authorize.twig
Normal file
78
admininistrator/view/template/common/authorize.twig
Normal file
@ -0,0 +1,78 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid">
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-10 col-md-8 col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-lock"></i> {{ heading_title }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-authorize" action="{{ action }}" method="post" data-oc-toggle="ajax">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> {{ error_warning }} <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> {{ success }} <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
||||
{% endif %}
|
||||
<p>{{ text_security }}</p>
|
||||
<p>{{ text_code }}</p>
|
||||
<div class="mb-3">
|
||||
<label for="input-code" class="form-label">{{ entry_code }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="code" value="" placeholder="{{ entry_code }}" id="input-code" class="form-control"/>
|
||||
<button type="button" id="button-send" class="btn btn-danger"><i class="fa-solid fa-mail-bulk"></i> {{ button_resend }}</button>
|
||||
</div>
|
||||
<div id="error-code" class="invalid-feedback"></div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-key"></i> {{ button_submit }}</button>
|
||||
</div>
|
||||
{% if redirect %}
|
||||
<input type="hidden" name="redirect" value="{{ redirect }}"/>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-send').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/authorize.send&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('#button-send').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#button-send').button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-send').trigger('click');
|
||||
//--></script>
|
||||
{{ footer }}
|
||||
|
56
admininistrator/view/template/common/authorize_unlock.twig
Normal file
56
admininistrator/view/template/common/authorize_unlock.twig
Normal file
@ -0,0 +1,56 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid">
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-10 col-md-8 col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-lock"></i> {{ text_locked }}</div>
|
||||
<div class="card-body">
|
||||
<p>{{ text_unlock }}</p>
|
||||
<div class="d-grid">
|
||||
<button type="button" id="button-reset" class="btn btn-danger btn-lg"><i class="fa-solid fa-unlock"></i> {{ button_reset }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-reset').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/authorize.confirm&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('#button-reset').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#button-reset').button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
||||
|
74
admininistrator/view/template/common/column_left.twig
Normal file
74
admininistrator/view/template/common/column_left.twig
Normal file
@ -0,0 +1,74 @@
|
||||
<nav id="column-left">
|
||||
<div id="navigation"><span class="fa-solid 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="{{ menu.icon }}"></i> {{ menu.name }}</a>
|
||||
{% else %}
|
||||
<a href="#collapse-{{ i }}" data-bs-toggle="collapse" class="parent collapsed"><i class="{{ menu.icon }}"></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-bs-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-bs-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>
|
||||
{% if statistics_status %}
|
||||
<div id="stats">
|
||||
<ul>
|
||||
<li>
|
||||
<div>{{ text_complete_status }} <span class="float-end">{{ complete_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-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="float-end">{{ processing_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-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="float-end">{{ other_status }}%</span></div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-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>
|
||||
{% endif %}
|
||||
</nav>
|
116
admininistrator/view/template/common/dashboard.twig
Normal file
116
admininistrator/view/template/common/dashboard.twig
Normal file
@ -0,0 +1,116 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
{% if developer_status %}
|
||||
<div class="float-end">
|
||||
<button type="button" id="button-setting" data-bs-toggle="tooltip" title="{{ button_developer }}" class="btn btn-info"><i class="fa-solid fa-cog"></i></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% 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 }} mb-3">{{ dashboard_1.output }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ security }}
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-setting').on('click', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer&user_token={{ user_token }}',
|
||||
dataType: 'html',
|
||||
beforeSend: function () {
|
||||
$('#button-setting').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#button-setting').button('reset');
|
||||
},
|
||||
success: function (html) {
|
||||
$('#modal-developer').remove();
|
||||
|
||||
$('body').prepend(html);
|
||||
|
||||
$('#modal-developer').modal('show');
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('input[name=\'developer_sass\']').on('change', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer.edit&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'developer_sass\']:checked'),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('input[name=\'developer_sass\']').prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$('input[name=\'developer_sass\']').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-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
if (json['success']) {
|
||||
$('#modal-developer .modal-body').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(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-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#modal-developer .modal-body').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
95
admininistrator/view/template/common/developer.twig
Normal file
95
admininistrator/view/template/common/developer.twig
Normal file
@ -0,0 +1,95 @@
|
||||
<div id="modal-developer" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="fa-solid fa-cog"></i> {{ heading_title }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ column_component }}</td>
|
||||
<td class="w-25">{{ entry_cache }}</td>
|
||||
<td class="text-end" style="width: 1px;">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>{{ entry_theme }}</td>
|
||||
<td></td>
|
||||
<td class="text-end"><button type="button" value="theme" data-bs-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa-solid fa-rotate"></i></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ entry_sass }}</td>
|
||||
<td>
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="developer_sass" value="0"/>
|
||||
<input type="checkbox" name="developer_sass" value="1" id="input-developer-sass" class="form-check-input"{% if developer_sass %} checked{% endif %}/>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end"><button type="button" value="sass" data-bs-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-warning"><i class="fa-solid fa-rotate"></i></button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('input[name=\'developer_sass\']').on('change', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/developer.edit&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: $('input[name=\'developer_sass\']:checked'),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('input[name=\'developer_sass\']').prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$('input[name=\'developer_sass\']').prop('disabled', false);
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(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']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
228
admininistrator/view/template/common/filemanager.twig
Normal file
228
admininistrator/view/template/common/filemanager.twig
Normal file
@ -0,0 +1,228 @@
|
||||
<div id="modal-image" class="modal">
|
||||
<div id="filemanager" class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ heading_title }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#modal-image .modal-body').load('index.php?route=common/filemanager.list&user_token={{ user_token }}');
|
||||
|
||||
$('#modal-image').on('click', '#button-parent', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image .modal-body').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-refresh', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image .modal-body').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#modal-image').on('keydown', '#input-search', function (e) {
|
||||
if (e.which == 13) {
|
||||
$('#button-search').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-search', function (e) {
|
||||
var url = 'index.php?route=common/filemanager.list&user_token={{ user_token }}';
|
||||
|
||||
var directory = $('#input-directory').val();
|
||||
|
||||
if (directory) {
|
||||
url += '&directory=' + encodeURIComponent(directory);
|
||||
}
|
||||
|
||||
var filter_name = $('#input-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 %}
|
||||
|
||||
{% if ckeditor %}
|
||||
url += '&ckeditor={{ ckeditor|escape('js') }}';
|
||||
{% endif %}
|
||||
|
||||
$('#modal-image .modal-body').load(url);
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-upload', 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');
|
||||
|
||||
$('#form-upload input[name=\'file[]\']').on('change', function () {
|
||||
for (i = 0; i < this.files.length; i++) {
|
||||
if ((this.files[0].size / 1024) > {{ config_file_max_size }}) {
|
||||
$(this).val('');
|
||||
|
||||
alert('{{ error_upload_size }}');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof timer != 'undefined') {
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
timer = setInterval(function () {
|
||||
if ($('#form-upload input[name=\'file[]\']').val() !== '') {
|
||||
clearInterval(timer);
|
||||
|
||||
var url = 'index.php?route=common/filemanager.upload&user_token={{ user_token }}';
|
||||
|
||||
var directory = $('#input-directory').val();
|
||||
|
||||
if (directory) {
|
||||
url += '&directory=' + encodeURIComponent(directory);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
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']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-folder', function () {
|
||||
$('#modal-folder').slideToggle();
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-create', function () {
|
||||
var url = 'index.php?route=common/filemanager.folder&user_token={{ user_token }}';
|
||||
|
||||
var directory = $('#input-directory').val();
|
||||
|
||||
if (directory) {
|
||||
url += '&directory=' + encodeURIComponent(directory);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: 'folder=' + encodeURIComponent($('#input-folder').val()),
|
||||
beforeSend: function () {
|
||||
$('#button-create').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#button-create').button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '#button-delete', 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').button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$('#button-delete').button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
alert(json['success']);
|
||||
|
||||
$('#button-refresh').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', 'a.directory', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image .modal-body').load($(this).attr('href'));
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', 'a.thumbnail', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
{% if thumb %}
|
||||
$('{{ thumb|escape('js') }}').attr('src', $(this).find('img').attr('src'));
|
||||
|
||||
$('{{ target|escape('js') }}').val('catalog/' + $(this).parent().parent().find('input').val());
|
||||
{% endif %}
|
||||
|
||||
{% if ckeditor %}
|
||||
CKEDITOR.instances['{{ ckeditor|escape('js') }}'].insertHtml('<img src="' + $(this).attr('href') + '" alt="" title=""/>');
|
||||
{% endif %}
|
||||
|
||||
$('#modal-image').modal('hide');
|
||||
});
|
||||
|
||||
$('#modal-image').on('click', '.pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#modal-image .modal-body').load($(this).attr('href'));
|
||||
});
|
||||
//--></script>
|
||||
</div>
|
57
admininistrator/view/template/common/filemanager_list.twig
Normal file
57
admininistrator/view/template/common/filemanager_list.twig
Normal file
@ -0,0 +1,57 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-5">
|
||||
<a href="{{ parent }}" id="button-parent" data-bs-toggle="tooltip" title="{{ button_parent }}" class="btn btn-light"><i class="fa-solid fa-level-up-alt"></i></a>
|
||||
<a href="{{ refresh }}" id="button-refresh" data-bs-toggle="tooltip" title="{{ button_refresh }}" class="btn btn-light"><i class="fa-solid fa-rotate"></i></a>
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_upload }}" id="button-upload" class="btn btn-primary"><i class="fa-solid fa-upload"></i></button>
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_folder }}" id="button-folder" class="btn btn-light"><i class="fa-solid fa-folder"></i></button>
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_delete }}" id="button-delete" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
<input type="hidden" name="directory" value="{{ directory }}" id="input-directory"/>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="input-group">
|
||||
<input type="text" name="search" value="{{ filter_name }}" placeholder="{{ entry_search }}" id="input-search" class="form-control">
|
||||
<button type="button" id="button-search" data-bs-toggle="tooltip" title="{{ button_search }}" class="btn btn-primary"><i class="fa-solid fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="modal-folder" class="row mb-3" style="display: none;">
|
||||
<div class="col-sm-12">
|
||||
<div class="input-group">
|
||||
<div class="input-group">
|
||||
<input type="text" name="folder" value="" placeholder="{{ entry_folder }}" id="input-folder" class="form-control">
|
||||
<button type="button" title="{{ button_folder }}" id="button-create" class="btn btn-primary"><i class="fa-solid fa-plus-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row row-cols-sm-3 row-cols-lg-4">
|
||||
{% set path_row = 0 %}
|
||||
{% for directory in directories %}
|
||||
<div class="mb-3">
|
||||
<div class="mb-1" style="min-height: 140px;">
|
||||
<a href="{{ directory.href }}" class="directory mb-1"><i class="fa-solid fa-folder fa-5x"></i></a>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="input-path-{{ path_row }}" class="form-check-label">{{ directory.name }}</label>
|
||||
<input type="checkbox" name="path[]" value="{{ directory.path }}" id="input-path-{{ path_row }}" class="form-check-input"/>
|
||||
</div>
|
||||
</div>
|
||||
{% set path_row = path_row + 1 %}
|
||||
{% endfor %}
|
||||
{% for image in images %}
|
||||
<div class="mb-3">
|
||||
<div class="mb-1" style="min-height: 140px;">
|
||||
<a href="{{ image.href }}" class="thumbnail mb-1"><img src="{{ image.thumb }}" alt="{{ image.name }}" title="{{ image.name }}" class="img-thumbnail"/></a>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<label for="input-path-{{ path_row }}" class="form-check-label">{{ image.name }}</label>
|
||||
<input type="checkbox" name="path[]" value="{{ image.path }}" id="input-path-{{ path_row }}" class="form-check-input"/>
|
||||
</div>
|
||||
</div>
|
||||
{% set path_row = path_row + 1 %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if pagination %}
|
||||
<div class="modal-footer">{{ pagination }}</div>
|
||||
{% endif %}
|
3
admininistrator/view/template/common/footer.twig
Normal file
3
admininistrator/view/template/common/footer.twig
Normal file
@ -0,0 +1,3 @@
|
||||
<footer id="footer">{{ text_footer }}<br/>{{ text_version }}</footer></div>
|
||||
<script src="{{ bootstrap }}" type="text/javascript"></script>
|
||||
</body></html>
|
33
admininistrator/view/template/common/forgotten.twig
Normal file
33
admininistrator/view/template/common/forgotten.twig
Normal file
@ -0,0 +1,33 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid">
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-10 col-md-8 col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa-solid fa-redo"></i> {{ heading_title }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="form-forgotten" action="{{ confirm }}" method="post" data-oc-toggle="ajax">
|
||||
<p>{{ text_email }}</p>
|
||||
<div class="mb-3">
|
||||
<label for="input-email" class="form-label">{{ entry_email }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><i class="fa-solid fa-envelope"></i></div>
|
||||
<input type="text" name="email" value="" placeholder="{{ entry_email }}" id="input-email" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-check"></i> {{ button_reset }}</button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
32
admininistrator/view/template/common/forgotten_reset.twig
Normal file
32
admininistrator/view/template/common/forgotten_reset.twig
Normal file
@ -0,0 +1,32 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container">
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-10 col-md-8 col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-redo"></i> {{ heading_title }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-forgotten" action="{{ reset }}" method="post" data-oc-toggle="ajax">
|
||||
<p>{{ text_password }}</p>
|
||||
<div class="mb-3">
|
||||
<label for="input-password" class="form-label">{{ entry_password }}</label>
|
||||
<input type="password" name="password" value="" id="input-password" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-confirm" class="form-label">{{ entry_confirm }}</label>
|
||||
<input type="password" name="confirm" value="" id="input-confirm" class="form-control"/>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> {{ button_save }}</button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
78
admininistrator/view/template/common/header.twig
Normal file
78
admininistrator/view/template/common/header.twig
Normal file
@ -0,0 +1,78 @@
|
||||
<!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, shrink-to-fit=no"/>
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<link href="{{ bootstrap }}" rel="stylesheet" media="screen"/>
|
||||
<link href="{{ icons }}" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ stylesheet }}" rel="stylesheet" type="text/css"/>
|
||||
<script src="{{ jquery }}" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="view/javascript/jquery/datetimepicker/moment.min.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/jquery/datetimepicker/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/jquery/datetimepicker/daterangepicker.js"></script>
|
||||
<link href="view/javascript/jquery/datetimepicker/daterangepicker.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="view/javascript/common.js"></script>
|
||||
{% 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 %}
|
||||
{% for script in scripts %}
|
||||
<script type="text/javascript" src="{{ script.href }}"></script>
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="alert" class="toast-container position-fixed top-0 end-0 p-3"></div>
|
||||
<header id="header" class="navbar navbar-expand navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
<a href="{{ home }}" class="navbar-brand d-none d-lg-block"><img src="view/image/logo.png" alt="{{ heading_title }}" title="{{ heading_title }}"/></a>
|
||||
{% if logged %}
|
||||
<button type="button" id="button-menu" class="btn btn-link d-inline-block d-lg-none"><i class="fa-solid fa-bars"></i></button>
|
||||
<ul class="nav navbar-nav">
|
||||
<li id="nav-notification" class="nav-item dropdown">
|
||||
<a href="#" data-bs-toggle="dropdown" class="nav-link dropdown-toggle"><i class="fa-regular fa-bell"></i>{% if notification_total %} <span class="badge bg-danger">{{ notification_total }}</span>{% endif %}</a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
{% if notifications %}
|
||||
{% for notification in notifications %}
|
||||
<a href="{{ notification.href }}" data-bs-toggle="modal" class="dropdown-item">{{ notification.title }}</a>
|
||||
{% endfor %}
|
||||
<a href="{{ notification_all }}" class="dropdown-item text-center text-primary">{{ text_notification_all }}</a>
|
||||
{% else %}
|
||||
<span class="dropdown-item text-center">{{ text_no_results }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
<li id="nav-language" class="nav-item dropdown">{{ language }}</li>
|
||||
<li id="nav-profile" class="nav-item dropdown">
|
||||
<a href="#" data-bs-toggle="dropdown" class="nav-link dropdown-toggle"><img src="{{ image }}" alt="{{ firstname }} {{ lastname }}" title="{{ username }}" class="rounded-circle"/><span class="d-none d-md-inline d-lg-inline"> {{ firstname }} {{ lastname }} <i class="fa-solid fa-caret-down fa-fw"></i></span></a>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><a href="{{ profile }}" class="dropdown-item"><i class="fa-solid fa-user-circle fa-fw"></i> {{ text_profile }}</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><h6 class="dropdown-header">{{ text_store }}</h6></li>
|
||||
{% for store in stores %}
|
||||
<a href="{{ store.href }}" target="_blank" class="dropdown-item">{{ store.name }}</a>
|
||||
{% endfor %}
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><h6 class="dropdown-header">{{ text_help }}</h6></li>
|
||||
<li><a href="https://www.opencart.com" target="_blank" class="dropdown-item"><i class="fa-brands fa-opencart fa-fw"></i> {{ text_homepage }}</a></li>
|
||||
<li><a href="http://docs.opencart.com" target="_blank" class="dropdown-item"><i class="fa-solid fa-file fa-fw"></i> {{ text_documentation }}</a></li>
|
||||
<li><a href="https://forum.opencart.com" target="_blank" class="dropdown-item"><i class="fa-solid fa-comments fa-fw"></i> {{ text_support }}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li id="nav-logout" class="nav-item"><a href="{{ logout }}" class="nav-link"><i class="fa-solid fa-sign-out"></i> <span class="d-none d-md-inline">{{ text_logout }}</span></a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
40
admininistrator/view/template/common/language.twig
Normal file
40
admininistrator/view/template/common/language.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{% for language in languages %}
|
||||
{% if language.code == code %}
|
||||
<a href="{{ language.code }}" class="nav-link dropdown-toggle" data-bs-toggle="dropdown"><img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}"/></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<ul class="dropdown-menu">
|
||||
{% for language in languages %}
|
||||
<li><a href="{{ language.code }}" class="dropdown-item"><img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="hidden" name="redirect" value="{{ redirect }}" id="input-redirect"/>
|
||||
<script type="text/javascript"><!--
|
||||
$('#nav-language .dropdown-item').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/language.save&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
data: 'code=' + $(element).attr('href') + '&redirect=' + encodeURIComponent($('#input-redirect').val()),
|
||||
dataType: 'json',
|
||||
success: function (json) {
|
||||
console.log($(element).attr('href'));
|
||||
console.log($('input-redirect').val());
|
||||
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
48
admininistrator/view/template/common/login.twig
Normal file
48
admininistrator/view/template/common/login.twig
Normal file
@ -0,0 +1,48 @@
|
||||
{{ header }}
|
||||
<div id="content">
|
||||
<div class="container-fluid">
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row justify-content-sm-center">
|
||||
<div class="col-sm-10 col-md-8 col-lg-5">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-lock"></i> {{ text_login }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-login" action="{{ login }}" method="post" data-oc-toggle="ajax">
|
||||
{% if error_warning %}
|
||||
<div class="alert alert-danger alert-dismissible"><i class="Dfa-circle-exclamation"></i> {{ error_warning }} <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> {{ success }} <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
||||
{% endif %}
|
||||
<div class="mb-3">
|
||||
<label for="input-username" class="form-label">{{ entry_username }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><i class="fa-solid fa-user"></i></div>
|
||||
<input type="text" name="username" value="" placeholder="{{ entry_username }}" id="input-username" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-password" class="form-label">{{ entry_password }}</label>
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-text"><i class="fa-solid fa-lock"></i></div>
|
||||
<input type="password" name="password" value="" placeholder="{{ entry_password }}" id="input-password" class="form-control"/>
|
||||
</div>
|
||||
{% if forgotten %}
|
||||
<div class="mb-3"><a href="{{ forgotten }}">{{ text_forgotten }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="submit" class="btn btn-primary"><i class="fa-solid 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 }}
|
21
admininistrator/view/template/common/pagination.twig
Normal file
21
admininistrator/view/template/common/pagination.twig
Normal file
@ -0,0 +1,21 @@
|
||||
<ul class="pagination">
|
||||
{% if first %}
|
||||
<li class="page-item"><a href="{{ first }}" class="page-link">|<</a></li>
|
||||
{% endif %}
|
||||
{% if prev %}
|
||||
<li class="page-item"><a href="{{ prev }}" class="page-link"><</a></li>
|
||||
{% endif %}
|
||||
{% for link in links %}
|
||||
{% if link.page == page %}
|
||||
<li class="page-item active"><span class="page-link">{{ link.page }}</span></li>
|
||||
{% else %}
|
||||
<li class="page-item"><a href="{{ link.href }}" class="page-link">{{ link.page }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if next %}
|
||||
<li class="page-item"><a href="{{ next }}" class="page-link">></a></li>
|
||||
{% endif %}
|
||||
{% if last %}
|
||||
<li class="page-item"><a href="{{ last }}" class="page-link">>|</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
250
admininistrator/view/template/common/security.twig
Normal file
250
admininistrator/view/template/common/security.twig
Normal file
@ -0,0 +1,250 @@
|
||||
<div id="modal-security" class="modal show">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title text-danger"><i class="fa-solid fa-triangle-exclamation"></i> {{ heading_title }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div id="accordion" class="accordion">
|
||||
|
||||
{% if install %}
|
||||
<div id="security-install" class="accordion-item">
|
||||
<h5 class="accordion-header"><button type="button" data-bs-toggle="collapse" data-bs-target="#accordion-install" class="accordion-button collapsed"><span class="fa-solid fa-folder"></span> {{ text_install }}</button></h5>
|
||||
<div id="accordion-install" class="accordion-collapse collapse" data-bs-parent="#accordion">
|
||||
<div class="modal-body">
|
||||
<p>{{ text_install_description }}</p>
|
||||
<div class="mb-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">{{ text_path }}</div>
|
||||
<input type="text" value="{{ install }}" class="form-control is-invalid bg-white" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-install" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i> {{ button_delete }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if storage %}
|
||||
<div id="security-storage" class="accordion-item">
|
||||
<h2 class="accordion-header"><button type="button" data-bs-toggle="collapse" data-bs-target="#accordion-storage" class="accordion-button collapsed"><i class="fa-solid fa-circle-right"></i> {{ text_storage }}</button></h2>
|
||||
<div id="accordion-storage" class="accordion-collapse collapse" data-bs-parent="#accordion">
|
||||
<div class="modal-body">
|
||||
<form id="form-storage">
|
||||
<p>{{ text_storage_description }}</p>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_path_current }}</label>
|
||||
<input type="text" value="{{ storage }}" class="form-control is-invalid bg-white" readonly/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_path_new }}</label>
|
||||
<div class="input-group dropdown">
|
||||
<button type="button" id="button-path" data-bs-toggle="dropdown" class="btn btn-outline-secondary dropdown-toggle">{{ document_root }} <span class="fa-solid fa-caret-down"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for path in paths %}
|
||||
<li><a href="{{ path }}" class="dropdown-item">{{ path }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<input type="text" name="name" value="storage" placeholder="{{ text_path }}" id="input-storage" class="form-control"/>
|
||||
</div>
|
||||
<input type="hidden" name="path" value="{{ document_root }}" id="input-path"/>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-storage" class="btn btn-danger"><span class="fa-solid fa-circle-right"></span> {{ button_move }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if admin %}
|
||||
<div id="security-admin" class="accordion-item">
|
||||
<h2 class="accordion-header"><button type="button" data-bs-toggle="collapse" data-bs-target="#accordion-admin" class="accordion-button collapsed"><span class="fa-solid fa-lock"></span> {{ text_admin }}</button></h2>
|
||||
<div id="accordion-admin" class="accordion-collapse collapse" data-bs-parent="#accordion">
|
||||
<div class="modal-body">
|
||||
<form id="form-admin">
|
||||
<p>{{ text_admin_description }}</p>
|
||||
<div class="mb-3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">{{ text_path }}</div>
|
||||
<input type="text" name="name" value="admin" placeholder="{{ entry_name }}" id="input-admin" class="form-control is-invalid"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-admin" class="btn btn-danger"><i class="fa-solid fa-pencil"></i> {{ button_rename }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$(document).ready(function () {
|
||||
// Show modal
|
||||
var modal = new bootstrap.Modal($('#modal-security'));
|
||||
|
||||
modal.show();
|
||||
|
||||
$('#accordion .accordion-header:first button').trigger('click');
|
||||
});
|
||||
|
||||
$('#button-install').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=common/security.install&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']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#security-install').remove();
|
||||
|
||||
$('#accordion .accordion-header:first button').trigger('click');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#form-storage .dropdown-menu a').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#input-path').val($(this).attr('href'));
|
||||
|
||||
$('#button-path').html($(this).attr('href') + ' <span class="fa-solid fa-caret-down"></span>');
|
||||
});
|
||||
|
||||
$('#button-storage').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$(element).button('loading');
|
||||
|
||||
var next = 'index.php?route=common/security.storage&user_token={{ user_token }}&name=' + encodeURIComponent($('#input-storage').val()) + '&path=' + encodeURIComponent($('#input-path').val());
|
||||
|
||||
var storage = function () {
|
||||
return $.ajax({
|
||||
url: next,
|
||||
dataType: 'json',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle-circle"></i> ' + json['text'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
|
||||
$('#security-storage').remove();
|
||||
|
||||
$('#accordion .accordion-header:first button').trigger('click');
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next = json['next'];
|
||||
|
||||
chain.attach(storage);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
chain.attach(storage);
|
||||
});
|
||||
|
||||
$('#button-admin').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
$(element).button('loading');
|
||||
|
||||
var next = 'index.php?route=common/security.admin&user_token={{ user_token }}&name=' + encodeURIComponent($('#input-admin').val());
|
||||
|
||||
var admin = function () {
|
||||
return $.ajax({
|
||||
url: next,
|
||||
dataType: 'json',
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
success: function (json) {
|
||||
console.log(json);
|
||||
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
|
||||
if (json['text']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle-circle"></i> ' + json['text'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$(element).button('reset');
|
||||
|
||||
$('#security-admin').remove();
|
||||
|
||||
$('#accordion .accordion-header:first button').trigger('click');
|
||||
}
|
||||
|
||||
if (json['next']) {
|
||||
next = json['next'];
|
||||
|
||||
chain.attach(admin);
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
|
||||
$(element).button('reset');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
chain.attach(admin);
|
||||
});
|
||||
//--></script>
|
30
admininistrator/view/template/customer/custom_field.twig
Normal file
30
admininistrator/view/template/customer/custom_field.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-custom-field" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="custom-field" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#custom-field').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#custom-field').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
218
admininistrator/view/template/customer/custom_field_form.twig
Normal file
218
admininistrator/view/template/customer/custom_field_form.twig
Normal file
@ -0,0 +1,218 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-custom-field" formaction="{{ save }}" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-custom-field" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<fieldset>
|
||||
<legend>{{ text_custom_field }}</legend>
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-location" class="col-sm-2 col-form-label">{{ entry_location }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="location" id="input-location" class="form-select">
|
||||
<option value="account"{% if location == 'account' %} selected{% endif %}>{{ text_account }}</option>
|
||||
<option value="address"{% if location == 'address' %} selected{% endif %}>{{ text_address }}</option>
|
||||
<option value="affiliate"{% if location == 'affiliate' %} selected{% endif %}>{{ text_affiliate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-type" class="col-sm-2 col-form-label">{{ entry_type }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="type" id="input-type" class="form-select">
|
||||
<optgroup label="{{ text_choose }}">
|
||||
<option value="select"{% if type == 'select' %} selected{% endif %}>{{ text_select }}</option>
|
||||
<option value="radio"{% if type == 'radio' %} selected{% endif %}>{{ text_radio }}</option>
|
||||
<option value="checkbox"{% if type == 'checkbox' %} selected{% endif %}>{{ text_checkbox }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_input }}">
|
||||
<option value="text"{% if type == 'text' %} selected{% endif %}>{{ text_text }}</option>
|
||||
<option value="textarea"{% if type == 'textarea' %} selected{% endif %}>{{ text_textarea }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_file }}">
|
||||
<option value="file"{% if type == 'file' %} selected{% endif %}>{{ text_file }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="{{ text_date }}">
|
||||
<option value="date"{% if type == 'date' %} selected{% endif %}>{{ text_date }}</option>
|
||||
<option value="time"{% if type == 'time' %} selected{% endif %}>{{ text_time }}</option>
|
||||
<option value="datetime"{% if type == 'datetime' %} selected{% endif %}>{{ text_datetime }}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3" id="display-value">
|
||||
<label for="input-value" class="col-sm-2 col-form-label">{{ 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="row mb-3" id="display-validation">
|
||||
<label for="input-validation" class="col-sm-2 col-form-label">{{ entry_validation }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="validation" id="input-validation" value="{{ validation }}" placeholder="{{ text_regex }}" class="form-control"/>
|
||||
<div class="form-text">{{ help_regex }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_customer_group }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% set customer_group_row = 0 %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][customer_group_id]" value="{{ customer_group.customer_group_id }}" id="input-customer-group-{{ customer_group.customer_group_id }}" class="form-check-input"{% if customer_group.customer_group_id in custom_field_customer_group %} checked{% endif %}/> <label for="input-customer-group-{{ customer_group.customer_group_id }}" class="form-check-label">{{ customer_group.name }}</label>
|
||||
</div>
|
||||
{% set customer_group_row = customer_group_row + 1 %}
|
||||
{% endfor %}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_required }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-control" style="height: 150px; overflow: auto;">
|
||||
{% set customer_group_row = 0 %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="custom_field_customer_group[{{ customer_group_row }}][required]" value="{{ customer_group.customer_group_id }}" id="input-required-{{ customer_group.customer_group_id }}" class="form-check-input"{% if customer_group.customer_group_id in custom_field_required %} checked{% endif %}/> <label for="input-required-{{ customer_group.customer_group_id }}" class="form-check-label">{{ customer_group.name }}</label>
|
||||
</div>
|
||||
{% set customer_group_row = customer_group_row + 1 %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_sort_order }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<br/>
|
||||
<div id="custom-field-value">
|
||||
<fieldset>
|
||||
<legend>{{ text_value }}</legend>
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start required">{{ entry_custom_value }}</td>
|
||||
<td class="text-end">{{ 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-start" 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">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-custom-field-{{ custom_field_value_row }}-{{ language.language_id }}" placeholder="{{ entry_custom_value }}" class="form-control"/>
|
||||
</div>
|
||||
<div id="error-custom-field-{{ custom_field_value_row }}-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
{% endfor %}</td>
|
||||
<td class="text-end"><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-end"><button type="button" onclick="$('#custom-field-value-row-{{ custom_field_value_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa-solid 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-end"><button type="button" onclick="addCustomFieldValue();" data-bs-toggle="tooltip" title="{{ button_custom_field_value_add }}" class="btn btn-primary"><i class="fa-solid fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<input type="hidden" name="custom_field_id" value="{{ custom_field_id }}" id="input-custom-field-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#input-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"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value|escape('js') }}" id="input-value" class="form-control date"/><div class="input-group-text"><i class="fa-regular fa-calendar"></i></div></div>');
|
||||
} else if (this.value == 'time') {
|
||||
$('#display-value > div').html('<div class="input-group"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value|escape('js') }}" id="input-value" class="form-control time"/><div class="input-group-text"><i class="fa-regular fa-calendar"></i></div></div>');
|
||||
} else if (this.value == 'datetime') {
|
||||
$('#display-value > div').html('<div class="input-group"><input type="text" name="value" value="' + $('#input-value').val() + '" placeholder="{{ entry_value|escape('js') }}" id="input-value" class="form-control datetime"/><div class="input-group-text"><i class="fa-regular fa-calendar"></i></div></div>');
|
||||
} else if (this.value == 'textarea') {
|
||||
$('#display-value > div').html('<textarea name="value" placeholder="{{ entry_value|escape('js') }}" 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|escape('js') }}" id="input-value" class="form-control"/>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-start" 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 += ' <div class="input-group-text"><img src="{{ language.image|escape('js') }}" title="{{ language.name|escape('js') }}" /></div>';
|
||||
html += ' <input type="text" name="custom_field_value[' + custom_field_value_row + '][custom_field_value_description][{{ language.language_id }}][name]" value="" placeholder="{{ entry_custom_value|escape('js') }}" id="input-custom-field-{{ custom_field_value_row }}-{{ language.language_id }}" class="form-control"/>';
|
||||
html += ' </div>';
|
||||
html += ' <div id="error-custom-field-value-{{ custom_field_value_row }}-{{ language.language_id }}" class="invalid-feedback"></div>';
|
||||
{% endfor %}
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-end"><input type="text" name="custom_field_value[' + custom_field_value_row + '][sort_order]" value="" placeholder="{{ entry_sort_order|escape('js') }}" class="form-control"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" onclick="$(\'#custom-field-value-row-' + custom_field_value_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#custom-field-value tbody').append(html);
|
||||
|
||||
custom_field_value_row++;
|
||||
}
|
||||
//--></script>
|
||||
{{ footer }}
|
@ -0,0 +1,45 @@
|
||||
<form id="form-custom-field" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#custom-field">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'cfd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_location }}"{% if sort == 'cf.location' %} class="{{ order|lower }}"{% endif %}>{{ column_location }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_type }}"{% if sort == 'cf.type' %} class="{{ order|lower }}"{% endif %}>{{ column_type }}</a></td>
|
||||
<td class="text-end d-none d-lg-table-cell"><a href="{{ sort_sort_order }}"{% if sort == 'cf.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if custom_fields %}
|
||||
{% for custom_field in custom_fields %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ custom_field.custom_field_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ custom_field.name }}
|
||||
<br/>
|
||||
{% if custom_field.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-start">{{ custom_field.location }}</td>
|
||||
<td class="text-start">{{ custom_field.type }}</td>
|
||||
<td class="text-end d-none d-lg-table-cell">{{ custom_field.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ custom_field.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid 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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
178
admininistrator/view/template/customer/customer.twig
Normal file
178
admininistrator/view/template/customer/customer.twig
Normal file
@ -0,0 +1,178 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-customer').toggleClass('d-none');" class="btn btn-light d-md-none d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-customer" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-customer" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_name }}</label>
|
||||
<input type="text" name="filter_name" value="{{ filter_name }}" placeholder="{{ entry_name }}" id="input-name" data-oc-target="autocomplete-name" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-name" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_email }}</label>
|
||||
<input type="text" name="filter_email" value="{{ filter_email }}" placeholder="{{ entry_email }}" id="input-email" data-oc-target="autocomplete-email" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-email" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-customer-group" class="form-label">{{ entry_customer_group }}</label> <select name="filter_customer_group_id" id="input-customer-group" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for customer_group in customer_groups %}
|
||||
<option value="{{ customer_group.customer_group_id }}"{% if customer_group.customer_group_id == filter_customer_group_id %} selected{% endif %}>{{ customer_group.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-status" class="form-label">{{ entry_status }}</label> <select name="filter_status" id="input-status" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="1"{% if filter_status == '1' %} selected{% endif %}>{{ text_enabled }}</option>
|
||||
<option value="0" {% if filter_status == '0' %} selected{% endif %}>{{ text_disabled }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-ip" class="form-label">{{ entry_ip }}</label> <input type="text" name="filter_ip" value="{{ filter_ip }}" placeholder="{{ entry_ip }}" id="input-ip" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-from" class="form-label">{{ entry_date_from }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_from" value="{{ filter_date_from }}" placeholder="{{ entry_date_from }}" id="input-date-from" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-to" class="form-label">{{ entry_date_to }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_to" value="{{ filter_date_to }}" placeholder="{{ entry_date_to }}" id="input-date-to" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="customer" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#customer').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#customer').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
url = '';
|
||||
|
||||
var filter_name = $('#input-name').val();
|
||||
|
||||
if (filter_name) {
|
||||
url += '&filter_name=' + encodeURIComponent(filter_name);
|
||||
}
|
||||
|
||||
var filter_email = $('#input-email').val();
|
||||
|
||||
if (filter_email) {
|
||||
url += '&filter_email=' + encodeURIComponent(filter_email);
|
||||
}
|
||||
|
||||
var filter_customer_group_id = $('#input-customer-group').val();
|
||||
|
||||
if (filter_customer_group_id !== '') {
|
||||
url += '&filter_customer_group_id=' + filter_customer_group_id;
|
||||
}
|
||||
|
||||
var filter_status = $('#input-status').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + filter_status;
|
||||
}
|
||||
|
||||
var filter_ip = $('#input-ip').val();
|
||||
|
||||
if (filter_ip) {
|
||||
url += '&filter_ip=' + encodeURIComponent(filter_ip);
|
||||
}
|
||||
|
||||
var filter_date_from = $('#input-date-from').val();
|
||||
|
||||
if (filter_date_from) {
|
||||
url += '&filter_date_from=' + encodeURIComponent(filter_date_from);
|
||||
}
|
||||
|
||||
var filter_date_to = $('#input-date-to').val();
|
||||
|
||||
if (filter_date_to) {
|
||||
url += '&filter_date_to=' + encodeURIComponent(filter_date_to);
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=customer/customer&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#customer').load('index.php?route=customer/customer.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-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').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-email').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
204
admininistrator/view/template/customer/customer_approval.twig
Normal file
204
admininistrator/view/template/customer/customer_approval.twig
Normal file
@ -0,0 +1,204 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-customer').toggleClass('d-none');" class="btn btn-light d-md-none d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<button type="submit" form="form-customer-approval" formaction="{{ approve }}" data-bs-toggle="tooltip" title="{{ text_approve }}" class="btn btn-success"><i class="fa-solid fa-check"></i></button>
|
||||
<button type="submit" form="form-customer-approval" formaction="{{ deny }}" data-bs-toggle="tooltip" title="{{ text_deny }}" class="btn btn-warning"><i class="fa-solid fa-circle-xmark"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-customer" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_customer }}</label>
|
||||
<input type="text" name="filter_customer" value="" placeholder="{{ entry_customer }}" id="input-customer" data-oc-target="autocomplete-customer" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-customer" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_email }}</label>
|
||||
<input type="text" name="filter_email" value="" placeholder="{{ entry_email }}" id="input-email" data-oc-target="autocomplete-email" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-email" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-customer-group" class="form-label">{{ entry_customer_group }}</label> <select name="filter_customer_group_id" id="input-customer-group" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for customer_group in customer_groups %}
|
||||
<option value="{{ customer_group.customer_group_id }}">{{ customer_group.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-type" class="form-label">{{ entry_type }}</label> <select name="filter_type" id="input-type" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="customer">{{ text_customer }}</option>
|
||||
<option value="affiliate">{{ text_affiliate }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-from" class="form-label">{{ entry_date_from }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_from" value="{{ filter_date_from }}" placeholder="{{ entry_date_from }}" id="input-date-from" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-to" class="form-label">{{ entry_date_to }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_to" value="{{ filter_date_to }}" placeholder="{{ entry_date_to }}" id="input-date-to" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div class="card-body">
|
||||
<div id="customer-approval">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#customer-approval').on('click', '.pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#customer-approval').load(this.href);
|
||||
});
|
||||
|
||||
$('#customer-approval').on('click', '.btn-success, .btn-danger', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#customer-approval').load($('#form-customer-approval').attr('data-oc-load'));
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
var url = '';
|
||||
|
||||
var filter_customer = $('#input-customer').val();
|
||||
|
||||
if (filter_customer) {
|
||||
url += '&filter_customer=' + encodeURIComponent(filter_customer);
|
||||
}
|
||||
|
||||
var filter_email = $('#input-email').val();
|
||||
|
||||
if (filter_email) {
|
||||
url += '&filter_email=' + encodeURIComponent(filter_email);
|
||||
}
|
||||
|
||||
var filter_customer_group_id = $('#input-customer-group').val();
|
||||
|
||||
if (filter_customer_group_id !== '') {
|
||||
url += '&filter_customer_group_id=' + filter_customer_group_id;
|
||||
}
|
||||
|
||||
var filter_type = $('#input-type').val();
|
||||
|
||||
if (filter_type !== '') {
|
||||
url += '&filter_type=' + filter_type;
|
||||
}
|
||||
|
||||
var filter_date_from = $('#input-date-from').val();
|
||||
|
||||
if (filter_date_from) {
|
||||
url += '&filter_date_from=' + encodeURIComponent(filter_date_from);
|
||||
}
|
||||
|
||||
var filter_date_to = $('#input-date-to').val();
|
||||
|
||||
if (filter_date_to) {
|
||||
url += '&filter_date_to=' + encodeURIComponent(filter_date_to);
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=customer/customer_approval&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#customer-approval').load('index.php?route=customer/customer_approval.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-customer').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-customer').val(item['label']);
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-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-email').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
@ -0,0 +1,41 @@
|
||||
<form id="form-customer-approval" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#customer-approval">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ column_customer }}</td>
|
||||
<td class="text-start">{{ column_email }}</td>
|
||||
<td class="text-start">{{ column_customer_group }}</td>
|
||||
<td class="text-start">{{ column_type }}</td>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if customer_approvals %}
|
||||
{% for customer_approval in customer_approvals %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ customer_approval.customer_approval_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ customer_approval.edit }}">{{ customer_approval.customer }}</a></td>
|
||||
<td class="text-start">{{ customer_approval.email }}</td>
|
||||
<td class="text-start">{{ customer_approval.customer_group }}</td>
|
||||
<td class="text-start">{{ customer_approval.type }}</td>
|
||||
<td class="text-start">{{ customer_approval.date_added }}</td>
|
||||
<td class="text-end text-nowrap"><button type="button" value="{{ customer_approval.approve }}" data-bs-toggle="tooltip" title="{{ button_approve }}" class="btn btn-success"><i class="fa-solid fa-thumbs-up"></i></button>
|
||||
<button type="button" value="{{ customer_approval.deny }}" data-bs-toggle="tooltip" title="{{ button_deny }}" class="btn btn-danger"><i class="fa-solid fa-thumbs-down"></i></button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
1116
admininistrator/view/template/customer/customer_form.twig
Normal file
1116
admininistrator/view/template/customer/customer_form.twig
Normal file
File diff suppressed because it is too large
Load Diff
23
admininistrator/view/template/customer/customer_group.twig
Normal file
23
admininistrator/view/template/customer/customer_group.twig
Normal file
@ -0,0 +1,23 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-customer-group" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="customer-group" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
@ -0,0 +1,68 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
|
||||
<button type="submit" form="form-customer-group" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-customer-group" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
{% for language in languages %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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 }}" id="input-name-{{ language.language_id }}" class="form-control"/>
|
||||
<div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% for language in languages %}
|
||||
<div class="row mb-3">
|
||||
<label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
|
||||
<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="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_approval }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="approval" value="0"/>
|
||||
<input type="checkbox" name="approval" value="1" id="input-approval" class="form-check-input"{% if approval %} checked{% endif %}/>
|
||||
</div>
|
||||
<div class="form-text">{{ help_approval }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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>
|
||||
<input type="hidden" name="customer_group_id" value="{{ customer_group_id }}" id="input-customer-group-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
@ -0,0 +1,34 @@
|
||||
<form id="form-customer-group" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#customer-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'cgd.name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end"><a href="{{ sort_sort_order }}"{% if sort == 'cg.sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if customer_groups %}
|
||||
{% for customer_group in customer_groups %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ customer_group.customer_group_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ customer_group.name }}</td>
|
||||
<td class="text-end">{{ customer_group.sort_order }}</td>
|
||||
<td class="text-end"><a href="{{ customer_group.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
28
admininistrator/view/template/customer/customer_history.twig
Normal file
28
admininistrator/view/template/customer/customer_history.twig
Normal file
@ -0,0 +1,28 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
<td class="text-start">{{ column_comment }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if histories %}
|
||||
{% for history in histories %}
|
||||
<tr>
|
||||
<td class="text-start">{{ history.date_added }}</td>
|
||||
<td class="text-start">{{ 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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
34
admininistrator/view/template/customer/customer_ip.twig
Normal file
34
admininistrator/view/template/customer/customer_ip.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_ip }}</td>
|
||||
<td class="text-end">{{ column_account }}</td>
|
||||
<td class="text-start">{{ column_store }}</td>
|
||||
<td class="text-start">{{ column_country }}</td>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if ips %}
|
||||
{% for ip in ips %}
|
||||
<tr>
|
||||
<td class="text-start"><a href="https://whatismyipaddress.com/ip/{{ ip.ip }}" target="_blank">{{ ip.ip }}</a></td>
|
||||
<td class="text-end"><a href="{{ ip.filter_ip }}" target="_blank">{{ ip.account }}</a></td>
|
||||
<td class="text-start">{{ ip.store }}</td>
|
||||
<td class="text-start">{{ ip.country }}</td>
|
||||
<td class="text-start">{{ ip.date_added }}</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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
65
admininistrator/view/template/customer/customer_list.twig
Normal file
65
admininistrator/view/template/customer/customer_list.twig
Normal file
@ -0,0 +1,65 @@
|
||||
<form id="form-customer" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#customer">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_email }}"{% if sort == 'c.email' %} class="{{ order|lower }}"{% endif %}>{{ column_email }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_customer_group }}"{% if sort == 'customer_group' %} class="{{ order|lower }}"{% endif %}>{{ column_customer_group }}</a></td>
|
||||
<td class="text-start d-none d-lg-table-cell"><a href="{{ sort_date_added }}"{% if sort == 'c.date_added' %} class="{{ order|lower }}"{% endif %}>{{ column_date_added }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if customers %}
|
||||
{% for customer in customers %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ customer.customer_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ customer.name }}
|
||||
<br/>
|
||||
{% if customer.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-start">{{ customer.email }}</td>
|
||||
<td class="text-start">{{ customer.customer_group }}</td>
|
||||
<td class="text-start d-none d-lg-table-cell">{{ customer.date_added }}</td>
|
||||
<td class="text-end">
|
||||
<div class="btn-group dropdown">
|
||||
<a href="{{ customer.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a>
|
||||
<button type="button" data-bs-toggle="dropdown" class="btn btn-primary dropdown-toggle dropdown-toggle-split"><span class="fa-solid fa-caret-down"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><h6 class="dropdown-header">{{ text_option }}</h6></li>
|
||||
{% if customer.unlock %}
|
||||
<li><a href="{{ customer.unlock }}" class="dropdown-item"><i class="fa-solid fa-unlock"></i> {{ text_unlock }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="#" class="dropdown-item disabled"><i class="fa-solid fa-unlock"></i> {{ text_unlock }}</a></li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><h6 class="dropdown-header">{{ text_login }}</h6></li>
|
||||
{% for store in customer.store %}
|
||||
<li><a href="{{ store.href }}" target="_blank" class="dropdown-item"><i class="fa-solid fa-lock"></i> {{ store.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
35
admininistrator/view/template/customer/customer_payment.twig
Normal file
35
admininistrator/view/template/customer/customer_payment.twig
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_payment_method }}</td>
|
||||
<td class="text-start">{{ column_image }}</td>
|
||||
<td class="text-start">{{ column_type }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-start">{{ column_date_expire }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if payment_methods %}
|
||||
{% for payment_method in payment_methods %}
|
||||
<tr>
|
||||
<td class="text-start">{{ payment_method.name }}</td>
|
||||
<td class="text-start">{% if payment_method.image %}<img src="{{ payment_method.image }}" alt=""/>{% endif %}</td>
|
||||
<td class="text-start">{{ payment_method.type }}</td>
|
||||
<td class="text-start">{{ payment_method.date_expire }}</td>
|
||||
<td class="text-end"><button type="button" value="{{ payment_method.delete }}" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
35
admininistrator/view/template/customer/customer_reward.twig
Normal file
35
admininistrator/view/template/customer/customer_reward.twig
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
<td class="text-start">{{ column_description }}</td>
|
||||
<td class="text-end">{{ column_points }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if rewards %}
|
||||
{% for reward in rewards %}
|
||||
<tr>
|
||||
<td class="text-start">{{ reward.date_added }}</td>
|
||||
<td class="text-start">{{ reward.description }}</td>
|
||||
<td class="text-end">{{ reward.points }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="text-end"><b>{{ text_balance }}</b></td>
|
||||
<td class="text-end">{{ 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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
@ -0,0 +1,35 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
<td class="text-start">{{ column_description }}</td>
|
||||
<td class="text-end">{{ column_amount }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if transactions %}
|
||||
{% for transaction in transactions %}
|
||||
<tr>
|
||||
<td class="text-start">{{ transaction.date_added }}</td>
|
||||
<td class="text-start">{{ transaction.description }}</td>
|
||||
<td class="text-end">{{ transaction.amount }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="text-end"><b>{{ text_balance }}</b></td>
|
||||
<td class="text-end">{{ 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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
179
admininistrator/view/template/customer/gdpr.twig
Normal file
179
admininistrator/view/template/customer/gdpr.twig
Normal file
@ -0,0 +1,179 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-gdpr').toggleClass('d-none');" class="btn btn-light d-md-none d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<button type="submit" form="form-gdpr" formaction="{{ approve }}" data-bs-toggle="tooltip" title="{{ text_approve }}" class="btn btn-success"><i class="fa-solid fa-check"></i></button>
|
||||
<button type="submit" form="form-gdpr" formaction="{{ deny }}" data-bs-toggle="tooltip" title="{{ text_deny }}" class="btn btn-warning"><i class="fa-solid fa-circle-xmark"></i></button>
|
||||
<button type="submit" form="form-gdpr" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ text_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="alert alert-warning"><i class="fa-solid fa-info-circle"></i> {{ text_info }}</div>
|
||||
<div class="row">
|
||||
<div id="filter-gdpr" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">{{ entry_email }}</label>
|
||||
<input type="text" name="filter_email" value="" placeholder="{{ entry_email }}" id="input-email" data-oc-target="autocomplete-email" class="form-control" autocomplete="off"/>
|
||||
<ul id="autocomplete-email" class="dropdown-menu"></ul>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-action" class="col-form-label">{{ entry_action }}</label>
|
||||
<select name="filter_action" id="input-action" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="export">{{ text_export }}</option>
|
||||
<option value="remove">{{ text_remove }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-status" class="form-label">{{ entry_status }}</label>
|
||||
<select name="filter_status" id="input-status" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="0">{{ text_unverified }}</option>
|
||||
<option value="1">{{ text_pending }}</option>
|
||||
<option value="2">{{ text_processing }}</option>
|
||||
<option value="3">{{ text_complete }}</option>
|
||||
<option value="-1">{{ text_denied }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-from" class="form-label">{{ entry_date_from }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_from" value="{{ filter_date_from }}" placeholder="{{ entry_date_from }}" id="input-date-from" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-date-to" class="form-label">{{ entry_date_to }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="filter_date_to" value="{{ filter_date_to }}" placeholder="{{ entry_date_to }}" id="input-date-to" class="form-control date"/>
|
||||
<div class="input-group-text"><i class="fa-regular fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div class="card-body">
|
||||
<div id="gdpr">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#gdpr').on('click', '.pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#gdpr').load(this.href);
|
||||
});
|
||||
|
||||
$('#gdpr').on('click', '.btn-success, .btn-warning, .btn-danger', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: $(element).val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#gdpr').load($('#form-gdpr').attr('data-oc-load'));
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
var url = '';
|
||||
|
||||
var filter_email = $('#input-email').val();
|
||||
|
||||
if (filter_email) {
|
||||
url += '&filter_email=' + encodeURIComponent(filter_email);
|
||||
}
|
||||
|
||||
var filter_action = $('#input-action').val();
|
||||
|
||||
if (filter_action !== '') {
|
||||
url += '&filter_action=' + filter_action;
|
||||
}
|
||||
|
||||
var filter_status = $('#input-status').val();
|
||||
|
||||
if (filter_status !== '') {
|
||||
url += '&filter_status=' + filter_status;
|
||||
}
|
||||
|
||||
var filter_date_from = $('#input-date-from').val();
|
||||
|
||||
if (filter_date_from) {
|
||||
url += '&filter_date_from=' + encodeURIComponent(filter_date_from);
|
||||
}
|
||||
|
||||
var filter_date_to = $('#input-date-to').val();
|
||||
|
||||
if (filter_date_to) {
|
||||
url += '&filter_date_to=' + encodeURIComponent(filter_date_to);
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=customer/gdpr&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#gdpr').load('index.php?route=customer/gdpr.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
|
||||
$('#input-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-email').val(item['label']);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
57
admininistrator/view/template/customer/gdpr_list.twig
Normal file
57
admininistrator/view/template/customer/gdpr_list.twig
Normal file
@ -0,0 +1,57 @@
|
||||
<form id="form-gdpr" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#gdpr">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ column_email }}</td>
|
||||
<td class="text-start">{{ column_request }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-start d-none d-lg-table-cell">{{ column_date_added }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if gdprs %}
|
||||
{% for gdpr in gdprs %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ gdpr.gdpr_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">
|
||||
{% if gdpr.edit %}
|
||||
<a href="{{ gdpr.edit }}">{{ gdpr.email }}</a>
|
||||
{% else %}
|
||||
{{ gdpr.email }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-start">{{ gdpr.action }}</td>
|
||||
<td class="text-start">
|
||||
{% if gdpr.status == '-1' %}
|
||||
<span class="badge bg-danger">{{ text_denied }}</span>
|
||||
{% elseif gdpr.status == '0' %}
|
||||
<span class="badge bg-secondary">{{ text_unverified }}</span>
|
||||
{% elseif gdpr.status == '1' %}
|
||||
<span class="badge bg-warning">{{ text_pending }}</span>
|
||||
{% elseif gdpr.status == '2' %}
|
||||
<span class="badge bg-info">{{ text_processing }}</span>
|
||||
{% elseif gdpr.status == '3' %}
|
||||
<span class="badge bg-success">{{ text_complete }}</span>
|
||||
{% endif %}</td>
|
||||
<td class="text-start d-none d-lg-table-cell">{{ gdpr.date_added }}</td>
|
||||
<td class="text-end text-nowrap"><button type="button" value="{{ gdpr.approve }}" data-bs-toggle="tooltip" title="{{ text_approve }}" class="btn btn-success"><i class="fa-solid fa-check"></i></button>
|
||||
<button type="button" value="{{ gdpr.deny }}" data-bs-toggle="tooltip" title="{{ text_deny }}" class="btn btn-warning"><i class="fa-solid fa-circle-xmark"></i></button>
|
||||
<button type="button" value="{{ gdpr.delete }}" data-bs-toggle="tooltip" title="{{ text_delete }}" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
30
admininistrator/view/template/design/banner.twig
Normal file
30
admininistrator/view/template/design/banner.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-banner" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="banner" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#banner').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#banner').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
135
admininistrator/view/template/design/banner_form.twig
Normal file
135
admininistrator/view/template/design/banner_form.twig
Normal file
@ -0,0 +1,135 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-banner" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-banner" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name" class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control"/>
|
||||
<div id="error-name" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-sm-2 col-form-label">{{ entry_status }}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check form-switch form-switch-lg">
|
||||
<input type="hidden" name="status" value="0"/>
|
||||
<input type="checkbox" name="status" value="1" id="input-status" class="form-check-input"{% if status %} checked{% endif %}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<ul class="nav nav-tabs">
|
||||
{% for language in languages %}
|
||||
<li class="nav-item"><a href="#language-{{ language.language_id }}" data-bs-toggle="tab" class="nav-link{% if loop.first %} active{% endif %}"><img src="{{ language.image }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
{% set image_row = 0 %}
|
||||
{% for language in languages %}
|
||||
<div id="language-{{ language.language_id }}" class="tab-pane{% if loop.first %} active{% endif %}">
|
||||
<table id="image-{{ language.language_id }}" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start required">{{ entry_title }}</td>
|
||||
<td class="text-start">{{ entry_link }}</td>
|
||||
<td class="text-center">{{ entry_image }}</td>
|
||||
<td class="text-end">{{ 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-start">
|
||||
<input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][title]" value="{{ banner_image.title }}" placeholder="{{ entry_title }}" id="input-image-{{ language.language_id }}-{{ image_row }}-title" class="form-control"/>
|
||||
<div id="error-image-{{ language.language_id }}-{{ image_row }}-title" class="invalid-feedback"></div>
|
||||
</td>
|
||||
|
||||
<td class="text-start" style="width: 30%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][link]" value="{{ banner_image.link }}" placeholder="{{ entry_link }}" id="input-image-{{ language.language_id }}-{{ image_row }}-link" class="form-control"/></td>
|
||||
<td class="text-center">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<img src="{{ banner_image.thumb }}" alt="" title="" id="thumb-image-{{ language.language_id }}-{{ image_row }}" data-oc-placeholder="{{ placeholder }}" class="card-img-top"/>
|
||||
<input type="hidden" name="banner_image[{{ language.language_id }}][{{ image_row }}][image]" value="{{ banner_image.image }}" id="input-image-{{ language.language_id }}-{{ image_row }}-image"/>
|
||||
<div class="card-body">
|
||||
<button type="button" data-oc-toggle="image" data-oc-target="#input-image-{{ language.language_id }}-{{ image_row }}-image" data-oc-thumb="#thumb-image-{{ language.language_id }}-{{ image_row }}" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit }}</button>
|
||||
<button type="button" data-oc-toggle="clear" data-oc-target="#input-image-{{ language.language_id }}-{{ image_row }}-image" data-oc-thumb="#thumb-image-{{ language.language_id }}-{{ image_row }}" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end" style="width: 10%;"><input type="text" name="banner_image[{{ language.language_id }}][{{ image_row }}][sort_order]" value="{{ banner_image.sort_order }}" placeholder="{{ entry_sort_order }}" id="input-image-{{ language.language_id }}-{{ image_row }}-sort-order" class="form-control"/></td>
|
||||
<td class="text-end"><button type="button" onclick="$('#image-row-{{ image_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set image_row = image_row + 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="text-end"><button type="button" id="button-banner-{{ language.language_id }}" data-language="{{ language.language_id }}" data-bs-toggle="tooltip" title="{{ button_banner_add }}" class="btn btn-primary"><i class="fa-solid fa-plus-circle"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<input type="hidden" name="banner_id" value="{{ banner_id }}" id="input-banner-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
var image_row = {{ image_row }};
|
||||
|
||||
$('button[id^=\'button-banner\']').on('click', function () {
|
||||
var element = this;
|
||||
|
||||
html = '<tr id="image-row-' + image_row + '">';
|
||||
html += ' <td class="text-start">';
|
||||
html += ' <input type="text" name="banner_image[' + $(element).attr('data-language') + '][' + image_row + '][title]" value="" placeholder="{{ entry_title|escape('js') }}" id="input-image-' + $(element).attr('data-language') + '-' + image_row + '-title" class="form-control"/>';
|
||||
html += ' <div id="error-image-' + $(element).attr('data-language') + '-' + image_row + '-title" class="invalid-feedback"></div>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-start"><input type="text" name="banner_image[' + $(element).attr('data-language') + '][' + image_row + '][link]" value="" placeholder="{{ entry_link|escape('js') }}" id="input-image-' + $(element).attr('data-language') + '-' + image_row + '-link" class="form-control"/></td>';
|
||||
html += ' <td class="text-center">';
|
||||
html += ' <div class="card">';
|
||||
html += ' <img src="{{ placeholder|escape('js') }}" alt="" title="" id="thumb-image-' + $(element).attr('data-language') + '-' + image_row + '" data-oc-placeholder="{{ placeholder|escape('js') }}" class="card-img-top"/>';
|
||||
html += ' <input type="hidden" name="banner_image[' + $(element).attr('data-language') + '][' + image_row + '][image]" value="" id="input-image-' + $(element).attr('data-language') + '-' + image_row + '-image"/>';
|
||||
html += ' <div class="card-body">';
|
||||
html += ' <button type="button" data-oc-toggle="image" data-oc-target="#input-image-' + $(element).attr('data-language') + '-' + image_row + '-image" data-oc-thumb="#thumb-image-' + $(element).attr('data-language') + '-' + image_row + '" class="btn btn-primary btn-sm btn-block"><i class="fa-solid fa-pencil"></i> {{ button_edit|escape('js') }}</button>';
|
||||
html += ' <button type="button" data-oc-toggle="clear" data-oc-target="#input-image-' + $(element).attr('data-language') + '-' + image_row + '-image" data-oc-thumb="#thumb-image-' + $(element).attr('data-language') + '-' + image_row + '" class="btn btn-warning btn-sm btn-block"><i class="fa-regular fa-trash-can"></i> {{ button_clear|escape('js') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-end"><input type="text" name="banner_image[' + $(element).attr('data-language') + '][' + image_row + '][sort_order]" value="" placeholder="{{ entry_sort_order|escape('js') }}" id="input-image-' + $(element).attr('data-language') + '-' + image_row + '-sort-order" class="form-control"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" onclick="$(\'#image-row-' + image_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#image-' + $(element).attr('data-language') + ' tbody').append(html);
|
||||
|
||||
image_row++;
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
39
admininistrator/view/template/design/banner_list.twig
Normal file
39
admininistrator/view/template/design/banner_list.twig
Normal file
@ -0,0 +1,39 @@
|
||||
<form id="form-banner" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#banner">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if banners %}
|
||||
{% for banner in banners %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ banner.banner_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ banner.name }}
|
||||
<br/>
|
||||
{% if banner.status %}
|
||||
<small class="text-success">{{ text_enabled }}</small>
|
||||
{% else %}
|
||||
<small class="text-danger">{{ text_disabled }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-end"><a href="{{ banner.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
30
admininistrator/view/template/design/layout.twig
Normal file
30
admininistrator/view/template/design/layout.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-layout" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="layout" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#layout').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#layout').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
302
admininistrator/view/template/design/layout_form.twig
Normal file
302
admininistrator/view/template/design/layout_form.twig
Normal file
@ -0,0 +1,302 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-layout" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-layout" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<fieldset>
|
||||
<legend>{{ text_route }}</legend>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-name" class="col-sm-2 col-form-label">{{ entry_name }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" value="{{ name }}" placeholder="{{ entry_name }}" id="input-name" class="form-control"/>
|
||||
<div id="error-name" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<table id="route" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ entry_store }}</td>
|
||||
<td class="text-start">{{ 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-start"><select name="layout_route[{{ route_row }}][store_id]" class="form-select">
|
||||
<option value="0">{{ text_default }}</option>
|
||||
{% for store in stores %}
|
||||
<option value="{{ store.store_id }}"{% if store.store_id == layout_route.store_id %} selected{% endif %}>{{ store.name }}</option>
|
||||
{% endfor %}
|
||||
</select></td>
|
||||
<td class="text-start"><input type="text" name="layout_route[{{ route_row }}][route]" value="{{ layout_route.route }}" placeholder="{{ entry_route|escape('js') }}" class="form-control"/></td>
|
||||
<td class="text-end"><button type="button" onclick="$('#route-row-{{ route_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></button></td>
|
||||
</tr>
|
||||
{% set route_row = route_row + 1 %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td class="text-end"><button type="button" onclick="addRoute();" data-bs-toggle="tooltip" title="{{ button_route_add|escape('js') }}" class="btn btn-primary"><i class="fa-solid 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-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-start">
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-select input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}"{% if extension.code == layout_module.code %} selected{% endif %}>{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}"{% if module.code == layout_module.code %} selected{% endif %}>{{ module.name }}</option>
|
||||
{% 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 }}"/> <a href="{{ layout_module.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<button type="button" onclick="$('#module-row-{{ module_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle fa-fw"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-end"><button type="button" onclick="addModule('column-left');" data-bs-toggle="tooltip" title="{{ button_module_add|escape('js') }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-plus-circle fa-fw"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-4 col-sm-12">
|
||||
<table id="module-content-top" class="table 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-start">
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-select input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}"{% if extension.code == layout_module.code %} selected{% endif %}>{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}"{% if module.code == layout_module.code %} selected{% endif %}>{{ module.name }}</option>
|
||||
{% 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 }}"/> <a href="{{ layout_module.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<button type="button" onclick="$('#module-row-{{ module_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle fa-fw"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-end"><button type="button" onclick="addModule('content-top');" data-bs-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-plus-circle fa-fw"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<table id="module-content-bottom" class="table 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-start">
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-select input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}"{% if extension.code == layout_module.code %} selected{% endif %}>{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}"{% if module.code == layout_module.code %} selected{% endif %}>{{ module.name }}</option>
|
||||
{% 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 }}"/> <a href="{{ layout_module.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<button type="button" onclick="$('#module-row-{{ module_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle fa-fw"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-end"><button type="button" onclick="addModule('content-bottom');" data-bs-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-plus-circle fa-fw"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-4 col-sm-12">
|
||||
<table id="module-column-right" class="table 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-end">
|
||||
<div class="input-group input-group-sm">
|
||||
<select name="layout_module[{{ module_row }}][code]" class="form-select input-sm">
|
||||
{% for extension in extensions %}
|
||||
<optgroup label="{{ extension.name }}">
|
||||
{% if not extension.module %}
|
||||
<option value="{{ extension.code }}"{% if extension.code == layout_module.code %} selected{% endif %}>{{ extension.name }}</option>
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
<option value="{{ module.code }}"{% if module.code == layout_module.code %} selected{% endif %}>{{ module.name }}</option>
|
||||
{% 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 }}"/> <a href="{{ layout_module.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<button type="button" onclick="$('#module-row-{{ module_row }}').remove();" data-bs-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle fa-fw"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% set module_row = module_row + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-end"><button type="button" onclick="addModule('column-right');" data-bs-toggle="tooltip" title="{{ button_module_add }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-plus-circle fa-fw"></i></button></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="layout_id" value="{{ layout_id }}" id="input-layout-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
var route_row = {{ route_row }};
|
||||
|
||||
function addRoute() {
|
||||
html = '<tr id="route-row-' + route_row + '">';
|
||||
html += ' <td class="text-start"><select name="layout_route[' + route_row + '][store_id]" class="form-select">';
|
||||
html += ' <option value="0">{{ text_default|escape('js') }}</option>';
|
||||
{% for store in stores %}
|
||||
html += '<option value="{{ store.store_id }}">{{ store.name|escape('js') }}</option>';
|
||||
{% endfor %}
|
||||
html += ' </select></td>';
|
||||
html += ' <td class="text-start"><input type="text" name="layout_route[' + route_row + '][route]" value="" placeholder="{{ entry_route|escape('js') }}" class="form-control"/></td>';
|
||||
html += ' <td class="text-end"><button type="button" onclick="$(\'#route-row-' + route_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger"><i class="fa-solid 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-start"><div class="input-group input-group-sm">';
|
||||
html += ' <select name="layout_module[' + module_row + '][code]" class="form-select input-sm">';
|
||||
{% for extension in extensions %}
|
||||
html += ' <optgroup label="{{ extension.name|escape('js') }}">';
|
||||
{% if not extension.module %}
|
||||
html += ' <option value="{{ extension.code|escape('js') }}">{{ extension.name|escape('js') }}</option>';
|
||||
{% else %}
|
||||
{% for module in extension.module %}
|
||||
html += ' <option value="{{ module.code|escape('js') }}">{{ module.name|escape('js') }}</option>';
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
html += ' </optgroup>';
|
||||
{% endfor %}
|
||||
html += ' </select>';
|
||||
html += ' <input type="hidden" name="layout_module[' + module_row + '][position]" value="' + type.replaceAll('-', '_') + '" />';
|
||||
html += ' <input type="hidden" name="layout_module[' + module_row + '][sort_order]" value="" />';
|
||||
html += ' <a href=" data-bs-toggle="tooltip" title="{{ button_edit|escape('js') }}" class="btn btn-primary btn-sm"><i class="fa-solid fa-pencil fa-fw"></i></a><button type="button" onclick="$(\'#module-row-' + module_row + '\').remove();" data-bs-toggle="tooltip" title="{{ button_remove|escape('js') }}" class="btn btn-danger btn-sm"><i class="fa-solid fa-minus-circle fa-fw"></i></button>';
|
||||
html += ' </div></td>';
|
||||
html += '</tr>';
|
||||
|
||||
$('#module-' + type + ' tbody').append(html);
|
||||
|
||||
$('#module-' + type + ' tbody input[name*=\'sort_order\']').each(function (i, element) {
|
||||
$(element).val(i);
|
||||
});
|
||||
|
||||
$('#module-' + type + ' select:last').trigger('change');
|
||||
|
||||
module_row++;
|
||||
}
|
||||
|
||||
$('#module-column-left, #module-column-right, #module-content-top, #module-content-bottom').on('change', 'select[name*=\'code\']', function () {
|
||||
var part = this.value.split('.');
|
||||
|
||||
if (typeof part[2] == 'undefined') {
|
||||
$(this).parent().find('a').attr('href', 'index.php?route=extension/' + part[0] + '/module/' + part[1] + '&user_token={{ user_token }}');
|
||||
} else {
|
||||
$(this).parent().find('a').attr('href', 'index.php?route=extension/' + part[0] + '/module/' + part[1] + '&user_token={{ user_token }}&module_id=' + part[2]);
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
32
admininistrator/view/template/design/layout_list.twig
Normal file
32
admininistrator/view/template/design/layout_list.twig
Normal file
@ -0,0 +1,32 @@
|
||||
<form id="form-layout" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#layout">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_name }}"{% if sort == 'name' %} class="{{ order|lower }}"{% endif %}>{{ column_name }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if layouts %}
|
||||
{% for layout in layouts %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ layout.layout_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ layout.name }}</td>
|
||||
<td class="text-end"><a href="{{ layout.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></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-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
110
admininistrator/view/template/design/seo_url.twig
Normal file
110
admininistrator/view/template/design/seo_url.twig
Normal file
@ -0,0 +1,110 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="button" data-bs-toggle="tooltip" title="{{ button_filter }}" onclick="$('#filter-seo').toggleClass('d-none');" class="btn btn-light d-md-none d-lg-none"><i class="fa-solid fa-filter"></i></button>
|
||||
<a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-seo-url" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="filter-seo" class="col-lg-3 col-md-12 order-lg-last d-none d-lg-block mb-3">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-filter"></i> {{ text_filter }}</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label for="input-keyword" class="form-label">{{ entry_keyword }}</label> <input type="text" name="filter_keyword" value="{{ filter_keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-key" class="form-label">{{ entry_key }}</label> <input type="text" name="filter_key" value="{{ filter_key }}" placeholder="{{ entry_key }}" id="input-key" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-value" class="form-label">{{ entry_value }}</label> <input type="text" name="filter_value" value="{{ filter_value }}" placeholder="{{ entry_value }}" id="input-value" class="form-control"/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-store" class="form-label">{{ entry_store }}</label> <select name="filter_store_id" id="input-store" class="form-select">
|
||||
<option value=""></option>
|
||||
<option value="0"{% if filter_store_id == '0' %} selected{% endif %}>{{ text_default }}</option>
|
||||
{% for store in stores %}
|
||||
<option value="{{ store.store_id }}"{% if store.store_id == filter_store_id %} selected{% endif %}>{{ store.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="input-language" class="form-label">{{ entry_language }}</label> <select name="filter_language_id" id="input-language" class="form-select">
|
||||
<option value=""></option>
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.language_id }}"{% if language.language_id == filter_language_id %} selected{% endif %}>{{ language.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<button type="button" id="button-filter" class="btn btn-light"><i class="fa-solid fa-filter"></i> {{ button_filter }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9 col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="seo-url" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#seo-url').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#seo-url').load(this.href);
|
||||
});
|
||||
|
||||
$('#button-filter').on('click', function () {
|
||||
var url = '';
|
||||
|
||||
var filter_keyword = $('#input-keyword').val();
|
||||
|
||||
if (filter_keyword) {
|
||||
url += '&filter_keyword=' + encodeURIComponent(filter_keyword);
|
||||
}
|
||||
|
||||
var filter_key = $('#input-key').val();
|
||||
|
||||
if (filter_key) {
|
||||
url += '&filter_key=' + encodeURIComponent(filter_key);
|
||||
}
|
||||
|
||||
var filter_value = $('#input-value').val();
|
||||
|
||||
if (filter_value) {
|
||||
url += '&filter_value=' + encodeURIComponent(filter_value);
|
||||
}
|
||||
|
||||
var filter_store_id = $('#input-store').val();
|
||||
|
||||
if (filter_store_id) {
|
||||
url += '&filter_store_id=' + filter_store_id;
|
||||
}
|
||||
|
||||
var filter_language_id = $('#input-language').val();
|
||||
|
||||
if (filter_language_id) {
|
||||
url += '&filter_language_id=' + filter_language_id;
|
||||
}
|
||||
|
||||
window.history.pushState({}, null, 'index.php?route=design/seo_url&user_token={{ user_token }}' + url);
|
||||
|
||||
$('#seo-url').load('index.php?route=design/seo_url.list&user_token={{ user_token }}' + url);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
76
admininistrator/view/template/design/seo_url_form.twig
Normal file
76
admininistrator/view/template/design/seo_url_form.twig
Normal file
@ -0,0 +1,76 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-seo-url" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-seo-url" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3">
|
||||
<label for="input-store" class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="store_id" id="input-store" class="form-select">
|
||||
{% for store in stores %}
|
||||
<option value="{{ store.store_id }}"{% if store.store_id == store_id %} selected{% endif %}>{{ store.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-language" class="col-sm-2 col-form-label">{{ entry_language }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="language_id" id="input-language" class="form-select">
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.language_id }}"{% if language.language_id == language_id %} selected{% endif %}>{{ language.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-key" class="col-sm-2 col-form-label">{{ entry_key }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="key" value="{{ key }}" placeholder="{{ entry_key }}" id="input-key" class="form-control"/>
|
||||
<div id="error-key" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-value" class="col-sm-2 col-form-label">{{ 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 id="error-value" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 required">
|
||||
<label for="input-keyword" class="col-sm-2 col-form-label">{{ entry_keyword }}</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="keyword" value="{{ keyword }}" placeholder="{{ entry_keyword }}" id="input-keyword" class="form-control"/>
|
||||
<div class="form-text">{{ help_keyword }}</div>
|
||||
<div id="error-keyword" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-sort-order" class="col-sm-2 col-form-label">{{ 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 class="form-text">{{ help_sort_order }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="seo_url_id" value="{{ seo_url_id }}" id="input-seo-url-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
42
admininistrator/view/template/design/seo_url_list.twig
Normal file
42
admininistrator/view/template/design/seo_url_list.twig
Normal file
@ -0,0 +1,42 @@
|
||||
<form id="form-seo-url" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#seo-url">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_keyword }}"{% if sort == 'keyword' %} class="{{ order|lower }}"{% endif %}>{{ column_keyword }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_key }}"{% if sort == 'key' %} class="{{ order|lower }}"{% endif %}>{{ column_key }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_value }}"{% if sort == 'value' %} class="{{ order|lower }}"{% endif %}>{{ column_value }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_sort_order }}"{% if sort == 'sort_order' %} class="{{ order|lower }}"{% endif %}>{{ column_sort_order }}</a></td>
|
||||
<td class="text-start d-none d-lg-table-cell"><a href="{{ sort_store }}"{% if sort == 'store' %} class="{{ order|lower }}"{% endif %}>{{ column_store }}</a></td>
|
||||
<td class="text-center d-none d-lg-table-cell"><a href="{{ sort_language }}"{% if sort == 'language' %} class="{{ order|lower }}"{% endif %}>{{ column_language }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if seo_urls %}
|
||||
{% for seo_url in seo_urls %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ seo_url.seo_url_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ seo_url.keyword }}</td>
|
||||
<td class="text-start">{{ seo_url.key }}</td>
|
||||
<td class="text-start">{{ seo_url.value }}</td>
|
||||
<td class="text-start">{{ seo_url.sort_order }}</td>
|
||||
<td class="text-start d-none d-lg-table-cell">{{ seo_url.store }}</td>
|
||||
<td class="text-center d-none d-lg-table-cell"><img src="{{ seo_url.image }}" alt="{{ seo_url.language }}" title="{{ seo_url.language }}"></td>
|
||||
<td class="text-end"><a href="{{ seo_url.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
434
admininistrator/view/template/design/theme.twig
Normal file
434
admininistrator/view/template/design/theme.twig
Normal file
@ -0,0 +1,434 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_edit }}</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-12">
|
||||
<div class="list-group mb-3">
|
||||
<div class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{{ text_store }}</h4>
|
||||
</div>
|
||||
<div class="list-group-item">
|
||||
<select name="store_id" id="input-store" class="form-select">
|
||||
<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-12">
|
||||
<div class="alert alert-info"><i class="fa-solid 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>
|
||||
</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/mode/xml/xml.js"></script>
|
||||
<script type="text/javascript" src="view/javascript/codemirror/mode/htmlmixed/htmlmixed.js"></script>
|
||||
<script type="text/javascript"><!--
|
||||
$('#input-store').on('change', function (e) {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme.path&user_token={{ user_token }}&store_id=' + $(element).val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$(element).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 list-group-item-action directory">' + json['directory'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['file']) {
|
||||
for (i = 0; i < json['file'].length; i++) {
|
||||
html += '<a href="' + json['file'][i]['path'] + '" class="list-group-item list-group-item-action file">' + json['file'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#path').html(html);
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#input-store').trigger('change');
|
||||
|
||||
$('#path').on('click', 'a.directory', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme.path&user_token={{ user_token }}&store_id=' + $('#input-store').val() + '&path=' + $(element).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).find('i').removeClass('fa-arrow-right');
|
||||
$(element).find('i').addClass('fa-circle-notch fa-spin');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).find('i').removeClass('fa-circle-notch fa-spin');
|
||||
$(element).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 list-group-item-action directory">' + json['directory'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['file']) {
|
||||
for (i = 0; i < json['file'].length; i++) {
|
||||
html += '<a href="' + json['file'][i]['path'] + '" class="list-group-item list-group-item-action file">' + json['file'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['extension']) {
|
||||
if (json['extension']['directory']) {
|
||||
for (i = 0; i < json['extension']['directory'].length; i++) {
|
||||
html += '<a href="' + json['extension']['directory'][i]['path'] + '" class="list-group-item list-group-item-action directory">' + json['extension']['directory'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (json['extension']['file']) {
|
||||
for (i = 0; i < json['extension']['file'].length; i++) {
|
||||
html += '<a href="' + json['extension']['file'][i]['path'] + '" class="list-group-item list-group-item-action file">' + json['extension']['file'][i]['name'] + ' <i class="fa-solid fa-arrow-right fa-fw float-end"></i></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (json['back']) {
|
||||
html += '<a href="' + json['back']['path'] + '" class="list-group-item list-group-item-action directory">' + json['back']['name'] + ' <i class="fa-solid fa-arrow-left fa-fw float-end"></i></a>';
|
||||
}
|
||||
|
||||
$('#path').html(html);
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var editor = [];
|
||||
|
||||
$('#path').on('click', 'a.file', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var element = this;
|
||||
|
||||
// Check if the file has an extension
|
||||
var pos = $(element).attr('href').lastIndexOf('.');
|
||||
|
||||
if (pos != -1) {
|
||||
var tab_id = $('#input-store').val() + '-' + $(element).attr('href').slice(0, pos).replace(/\//g, '-').replace(/_/g, '-');
|
||||
} else {
|
||||
var tab_id = $('#input-store').val() + '-' + $(element).attr('href').replace(/\//g, '-').replace(/_/g, '-');
|
||||
}
|
||||
|
||||
if (!editor['#tab-' + tab_id]) {
|
||||
editor['#tab-' + tab_id] = $.ajax({
|
||||
url: 'index.php?route=design/theme.template&user_token={{ user_token }}&store_id=' + $('#input-store').val() + '&path=' + $(element).attr('href'),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).find('i').removeClass('fa-arrow-right');
|
||||
$(element).find('i').addClass('fa-circle-notch fa-spin');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).find('i').removeClass('fa-circle-notch fa-spin');
|
||||
$(element).find('i').addClass('fa-arrow-right');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['code']) {
|
||||
$('#code').show();
|
||||
$('#recent').hide();
|
||||
|
||||
$('.nav-tabs').append('<li class="nav-item"><a href="#tab-' + tab_id + '" data-bs-toggle="tab" class="nav-link">' + $(element).attr('href').split('/').join(' / ') + ' <i class="fa-solid fa-minus-circle"></i></a></li>');
|
||||
|
||||
html = '<div class="tab-pane" id="tab-' + tab_id + '">';
|
||||
html += ' <textarea name="code" id="input-code" rows="10" class="form-control"></textarea>';
|
||||
html += ' <input type="hidden" name="store_id" value="' + $('#input-store').val() + '" id="input-' + tab_id + '-store"/>';
|
||||
html += ' <input type="hidden" name="path" value="' + $(element).attr('href') + '" id="input-' + tab_id + '-path"/>';
|
||||
html += ' <br/>';
|
||||
html += ' <div class="float-end">';
|
||||
html += ' <button type="button" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> {{ button_save|escape('js') }}</button>';
|
||||
html += ' <button class="btn btn-danger"><i class="fa-solid fa-recycle"></i> {{ button_reset|escape('js') }}</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',
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
autofocus: true,
|
||||
theme: 'monokai'
|
||||
});
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
codemirror.setSize('100%', '500px');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.nav-tabs a[href=\'#tab-' + tab_id + '\']').tab('show');
|
||||
}
|
||||
});
|
||||
|
||||
$('#code .nav-tabs').on('click', 'i.fas.fa-minus-circle', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
// 1. Remove tab functionality
|
||||
$(this).parent().removeAttr('data-bs-toggle');
|
||||
|
||||
var remove = $(this).parent().attr('href');
|
||||
|
||||
// 2. Remove entry in the editor array
|
||||
if (editor[remove]) {
|
||||
delete editor[remove];
|
||||
}
|
||||
|
||||
// 3. Remove the tab
|
||||
$(this).parent().parent().remove();
|
||||
|
||||
// 4. Remove the tab panel
|
||||
$(remove).remove();
|
||||
|
||||
if ($(this).parent().hasClass('active')) {
|
||||
$('.nav-tabs li:last-child a').tab('show');
|
||||
}
|
||||
|
||||
if (!$('#code > ul > li').length) {
|
||||
$('#code').hide();
|
||||
$('#recent').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('.tab-content').on('click', '.btn-primary', function (e) {
|
||||
var element = 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 () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#history').load('index.php?route=design/theme.history&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.tab-content').on('click', '.btn-danger', function (e) {
|
||||
if (confirm('{{ text_confirm }}')) {
|
||||
var element = this;
|
||||
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme.reset&user_token={{ user_token }}&store_id=' + $('.tab-content .active #input-store').val() + '&path=' + $('.tab-content .active input[name=\'path\']').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
$('.alert-dismissible').remove();
|
||||
|
||||
if (json['error']) {
|
||||
$('#alert').prepend('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#alert').prepend('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
var codemirror = $('.tab-content .active .CodeMirror')[0].CodeMirror;
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
codemirror.setSize('100%', '500px');
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('#history').on('click', '.pagination a', 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 element = this;
|
||||
|
||||
// Check if the file has an extension
|
||||
var tab_id = $(element).parent().parent().find('input[name=\'store_id\']').val() + '-' + $(element).parent().parent().find('input[name=\'path\']').val().replace(/\//g, '-').replace(/_/g, '-');
|
||||
|
||||
if (!editor['#tab-' + tab_id]) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/theme.template&user_token={{ user_token }}&store_id=' + $(element).parent().parent().find('input[name=\'store_id\']').val() + '&path=' + $(element).parent().parent().find('input[name=\'path\']').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$(element).button('loading');
|
||||
},
|
||||
complete: function () {
|
||||
$(element).button('reset');
|
||||
},
|
||||
success: function (json) {
|
||||
if (json['code']) {
|
||||
$('#code').show();
|
||||
$('#recent').hide();
|
||||
|
||||
$('.nav-tabs').append('<li class="nav-item"><a href="#tab-' + tab_id + '" data-bs-toggle="tab" class="nav-link">' + $(element).parent().parent().find('input[name=\'path\']').val().split('/').join(' / ') + ' <i class="fa-solid 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="' + $(element).parent().parent().find('input[name=\'store_id\']').val() + '" />';
|
||||
html += ' <input type="hidden" name="path" value="' + $(element).parent().parent().find('input[name=\'path\']').val() + '.twig" />';
|
||||
html += ' <br/>';
|
||||
html += ' <div class="float-end">';
|
||||
html += ' <button type="button" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> {{ button_save|escape('js') }}</button>';
|
||||
html += ' <button class="btn btn-danger"><i class="fa-solid fa-recycle"></i> {{ button_reset|escape('js') }}</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',
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
autofocus: true,
|
||||
theme: 'monokai'
|
||||
});
|
||||
|
||||
codemirror.setValue(json['code']);
|
||||
codemirror.setSize('100%', '500px');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(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 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']) {
|
||||
$('#history').before('<div class="alert alert-danger alert-dismissible"><i class="fa-solid fa-circle-exclamation"></i> ' + json['error'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
}
|
||||
|
||||
if (json['success']) {
|
||||
$('#history').before('<div class="alert alert-success alert-dismissible"><i class="fa-solid fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>');
|
||||
|
||||
$('#history').load('index.php?route=design/theme.history&user_token={{ user_token }}');
|
||||
}
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
34
admininistrator/view/template/design/theme_history.twig
Normal file
34
admininistrator/view/template/design/theme_history.twig
Normal file
@ -0,0 +1,34 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_store }}</td>
|
||||
<td class="text-start">{{ column_route }}</td>
|
||||
<td class="text-start">{{ column_date_added }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if histories %}
|
||||
{% for history in histories %}
|
||||
<tr>
|
||||
<td class="text-start">{{ history.store }}
|
||||
<input type="hidden" name="store_id" value="{{ history.store_id }}"/></td>
|
||||
<td class="text-start">{{ history.route }}
|
||||
<input type="hidden" name="path" value="{{ history.route }}"/></td>
|
||||
<td class="text-start">{{ history.date_added }}</td>
|
||||
<td class="text-end text-nowrap"><a href="{{ history.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a> <a href="{{ history.delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="4">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
30
admininistrator/view/template/design/translation.twig
Normal file
30
admininistrator/view/template/design/translation.twig
Normal file
@ -0,0 +1,30 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end"><a href="{{ add }}" data-bs-toggle="tooltip" title="{{ button_add }}" class="btn btn-primary"><i class="fa-solid fa-plus"></i></a>
|
||||
<button type="submit" form="form-translation" formaction="{{ delete }}" data-bs-toggle="tooltip" title="{{ button_delete }}" onclick="return confirm('{{ text_confirm }}');" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-list"></i> {{ text_list }}</div>
|
||||
<div id="translation" class="card-body">{{ list }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#translation').on('click', 'thead a, .pagination a', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
$('#translation').load(this.href);
|
||||
});
|
||||
//--></script>
|
||||
{{ footer }}
|
165
admininistrator/view/template/design/translation_form.twig
Normal file
165
admininistrator/view/template/design/translation_form.twig
Normal file
@ -0,0 +1,165 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="float-end">
|
||||
<button type="submit" form="form-translation" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
|
||||
<div class="card-body">
|
||||
<form id="form-translation" action="{{ save }}" method="post" data-oc-toggle="ajax">
|
||||
<div class="row mb-3">
|
||||
<label for="input-store" class="col-sm-2 col-form-label">{{ entry_store }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="store_id" id="input-store" class="form-select">
|
||||
<option value="0">{{ text_default }}</option>
|
||||
{% for store in stores %}
|
||||
<option value="{{ store.store_id }}"{% if store.store_id == store_id %} selected{% endif %}>{{ store.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-language" class="col-sm-2 col-form-label">{{ entry_language }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="language_id" id="input-language" class="form-select">
|
||||
{% for language in languages %}
|
||||
<option value="{{ language.language_id }}"{% if language.language_id == language_id %} selected{% endif %}>{{ language.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-route" class="col-sm-2 col-form-label">{{ entry_route }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="route" id="input-route" class="form-select"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-key" class="col-sm-2 col-form-label">{{ entry_key }}</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="input-keys" class="form-select"></select>
|
||||
<input type="text" name="key" value="{{ key }}" placeholder="{{ entry_key }}" id="input-key" class="form-control"/>
|
||||
<div id="error-key" class="invalid-feedback"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-default" class="col-sm-2 col-form-label">{{ entry_default }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="default" rows="5" placeholder="{{ entry_default }}" id="input-default" class="form-control" disabled="disabled">{% if default %}{{ default }}{% endif %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="input-value" class="col-sm-2 col-form-label">{{ 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>
|
||||
<input type="hidden" name="translation_id" value="{{ translation_id }}" id="input-translation-id"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#input-language').on('change', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/translation.path&user_token={{ user_token }}&language_id=' + $('#input-language').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('#input-language').prop('disabled', true);
|
||||
$('#input-route').prop('disabled', true);
|
||||
$('#input-key').prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$('#input-language').prop('disabled', false);
|
||||
$('#input-route').prop('disabled', false);
|
||||
$('#input-key').prop('disabled', false);
|
||||
},
|
||||
success: function (json) {
|
||||
html = '';
|
||||
|
||||
if (json) {
|
||||
for (i = 0; i < json.length; i++) {
|
||||
if (json[i] == '{{ route }}') {
|
||||
html += '<option value="' + json[i] + '" selected>' + json[i] + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + json[i] + '">' + json[i] + '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#input-route').html(html);
|
||||
|
||||
$('#input-route').trigger('change');
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#input-route').on('change', function () {
|
||||
$.ajax({
|
||||
url: 'index.php?route=design/translation.translation&user_token={{ user_token }}&language_id=' + $('#input-language').val() + '&path=' + $('#input-route').val(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('#input-language').prop('disabled', true);
|
||||
$('#input-route').prop('disabled', true);
|
||||
$('#input-key').prop('disabled', true);
|
||||
},
|
||||
complete: function () {
|
||||
$('#input-language').prop('disabled', false);
|
||||
$('#input-route').prop('disabled', false);
|
||||
$('#input-key').prop('disabled', false);
|
||||
},
|
||||
success: function (json) {
|
||||
translation = [];
|
||||
|
||||
html = '<option value=""></option>';
|
||||
|
||||
if (json) {
|
||||
for (i = 0; i < json.length; i++) {
|
||||
if (json[i]['key'] == $('#input-key').val()) {
|
||||
html += '<option value="' + json[i]['key'] + '" selected>' + json[i]['key'] + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + json[i]['key'] + '">' + json[i]['key'] + '</option>';
|
||||
}
|
||||
|
||||
translation[json[i]['key']] = json[i]['value'];
|
||||
}
|
||||
}
|
||||
|
||||
$('#input-keys').html(html);
|
||||
|
||||
$('#input-keys').trigger('change');
|
||||
},
|
||||
error: function (xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#input-keys').on('change', function () {
|
||||
if (translation[$('#input-keys').val()]) {
|
||||
$('#input-default').val(translation[$('#input-keys').val()]);
|
||||
|
||||
$('#input-key').val($('#input-keys').val());
|
||||
} else {
|
||||
$('#input-default').val('');
|
||||
}
|
||||
});
|
||||
|
||||
$('#input-language').trigger('change');
|
||||
//--></script>
|
||||
{{ footer }}
|
40
admininistrator/view/template/design/translation_list.twig
Normal file
40
admininistrator/view/template/design/translation_list.twig
Normal file
@ -0,0 +1,40 @@
|
||||
<form id="form-translation" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#translation">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
|
||||
<td class="text-start"><a href="{{ sort_store }}"{% if sort == 'store' %} class="{{ order|lower }}"{% endif %}>{{ column_store }}</a></td>
|
||||
<td class="text-center"><a href="{{ sort_language }}"{% if sort == 'language' %} class="{{ order|lower }}"{% endif %}>{{ column_language }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_route }}"{% if sort == 'route' %} class="{{ order|lower }}"{% endif %}>{{ column_route }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_key }}"{% if sort == 'key' %} class="{{ order|lower }}"{% endif %}>{{ column_key }}</a></td>
|
||||
<td class="text-start"><a href="{{ sort_value }}"{% if sort == 'value' %} class="{{ order|lower }}"{% endif %}>{{ column_value }}</a></td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if translations %}
|
||||
{% for translation in translations %}
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="selected[]" value="{{ translation.translation_id }}" class="form-check-input"/></td>
|
||||
<td class="text-start">{{ translation.store }}</td>
|
||||
<td class="text-center"><img src="{{ translation.image }}" alt="{{ translation.language }}" title="{{ translation.language }}"></td>
|
||||
<td class="text-start">{{ translation.route }}</td>
|
||||
<td class="text-start">{{ translation.key }}</td>
|
||||
<td class="text-start">{{ translation.value }}</td>
|
||||
<td class="text-end"><a href="{{ translation.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="7">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-start">{{ pagination }}</div>
|
||||
<div class="col-sm-6 text-end">{{ results }}</div>
|
||||
</div>
|
||||
</form>
|
22
admininistrator/view/template/error/exception.twig
Normal file
22
admininistrator/view/template/error/exception.twig
Normal file
@ -0,0 +1,22 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-triangle-exclamation"></i> {{ heading_title }}</div>
|
||||
<div class="card-body">
|
||||
<p class="text-center">{{ text_exception }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
22
admininistrator/view/template/error/not_found.twig
Normal file
22
admininistrator/view/template/error/not_found.twig
Normal file
@ -0,0 +1,22 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-triangle-exclamation"></i> {{ heading_title }}</div>
|
||||
<div class="card-body">
|
||||
<p class="text-center">{{ text_not_found }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
22
admininistrator/view/template/error/permission.twig
Normal file
22
admininistrator/view/template/error/permission.twig
Normal file
@ -0,0 +1,22 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fa-solid fa-triangle-exclamation"></i> {{ heading_title }}</div>
|
||||
<div class="card-body">
|
||||
<p class="text-center">{{ text_permission }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ footer }}
|
42
admininistrator/view/template/extension/analytics.twig
Normal file
42
admininistrator/view/template/extension/analytics.twig
Normal file
@ -0,0 +1,42 @@
|
||||
{{ promotion }}
|
||||
<fieldset>
|
||||
<legend>{{ heading_title }}</legend>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_name }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if extensions %}
|
||||
{% for extension in extensions %}
|
||||
<tr>
|
||||
<td class="text-start" colspan="2"><b>{{ extension.name }}</b></td>
|
||||
<td class="text-end">{% if not extension.installed %}
|
||||
<a href="{{ extension.install }}" data-bs-toggle="tooltip" title="{{ button_install }}" class="btn btn-success"><i class="fa-solid fa-plus-circle"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ extension.uninstall }}" data-bs-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></a>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% if extension.installed %}
|
||||
{% for store in extension.store %}
|
||||
<tr>
|
||||
<td class="text-start"> - {{ store.name }}</td>
|
||||
<td class="text-start">{{ store.status }}</td>
|
||||
<td class="text-end text-nowrap"><a href="{{ store.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
31
admininistrator/view/template/extension/captcha.twig
Normal file
31
admininistrator/view/template/extension/captcha.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ promotion }}
|
||||
<fieldset>
|
||||
<legend>{{ heading_title }}</legend>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_name }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if extensions %}
|
||||
{% for extension in extensions %}
|
||||
<tr>
|
||||
<td class="text-start">{{ extension.name }}</td>
|
||||
<td class="text-start">{{ extension.status }}</td>
|
||||
<td class="text-end text-nowrap">{% if extension.installed %}<a href="{{ extension.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a>{% else %}<button type="button" class="btn btn-primary" disabled="disabled"><i class="fa-solid fa-pencil"></i></button>{% endif %}
|
||||
{% if not extension.installed %} <a href="{{ extension.install }}" data-bs-toggle="tooltip" title="{{ button_install }}" class="btn btn-success"><i class="fa-solid fa-plus-circle"></i></a> {% else %} <a href="{{ extension.uninstall }}" data-bs-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
31
admininistrator/view/template/extension/currency.twig
Normal file
31
admininistrator/view/template/extension/currency.twig
Normal file
@ -0,0 +1,31 @@
|
||||
{{ promotion }}
|
||||
<fieldset>
|
||||
<legend>{{ heading_title }}</legend>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_name }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if extensions %}
|
||||
{% for extension in extensions %}
|
||||
<tr>
|
||||
<td class="text-start">{{ extension.name }}</td>
|
||||
<td class="text-start">{{ extension.status }}</td>
|
||||
<td class="text-end text-nowrap">{% if extension.installed %}<a href="{{ extension.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a>{% else %}<button type="button" class="btn btn-primary" disabled="disabled"><i class="fa-solid fa-pencil"></i></button>{% endif %}
|
||||
{% if not extension.installed %}<a href="{{ extension.install }}" data-bs-toggle="tooltip" title="{{ button_install }}" class="btn btn-success"><i class="fa-solid fa-plus-circle"></i></a>{% else %}<a href="{{ extension.uninstall }}" data-bs-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
43
admininistrator/view/template/extension/dashboard.twig
Normal file
43
admininistrator/view/template/extension/dashboard.twig
Normal file
@ -0,0 +1,43 @@
|
||||
{{ promotion }}
|
||||
<fieldset>
|
||||
<legend>{{ heading_title }}</legend>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="text-start">{{ column_name }}</td>
|
||||
<td class="text-end">{{ column_width }}</td>
|
||||
<td class="text-start">{{ column_status }}</td>
|
||||
<td class="text-end">{{ column_sort_order }}</td>
|
||||
<td class="text-end">{{ column_action }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if extensions %}
|
||||
{% for extension in extensions %}
|
||||
<tr>
|
||||
<td class="text-start">{{ extension.name }}</td>
|
||||
<td class="text-end">{{ extension.width }}</td>
|
||||
<td class="text-start">{{ extension.status }}</td>
|
||||
<td class="text-end">{{ extension.sort_order }}</td>
|
||||
<td class="text-end text-nowrap">{% if extension.installed %}
|
||||
<a href="{{ extension.edit }}" data-bs-toggle="tooltip" title="{{ button_edit }}" class="btn btn-primary"><i class="fa-solid fa-pencil"></i></a>
|
||||
{% else %}
|
||||
<button type="button" class="btn btn-primary" disabled="disabled"><i class="fa-solid fa-pencil"></i></button>
|
||||
{% endif %}
|
||||
{% if not extension.installed %}
|
||||
<a href="{{ extension.install }}" data-bs-toggle="tooltip" title="{{ button_install }}" class="btn btn-success"><i class="fa-solid fa-plus-circle"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ extension.uninstall }}" data-bs-toggle="tooltip" title="{{ button_uninstall }}" class="btn btn-danger"><i class="fa-solid fa-minus-circle"></i></a>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="3">{{ text_no_results }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user