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>
|
Reference in New Issue
Block a user