Merge pull request #784 from openclassify/vedatakd

admin theme && fixed version excel export libs
This commit is contained in:
Dia Shalabi 2020-11-10 16:52:21 +03:00 committed by GitHub
commit 9134817e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 81 additions and 107 deletions

View File

@ -32,4 +32,5 @@ return [
'please_wait' => 'Please wait.Deleting Sub Categories', 'please_wait' => 'Please wait.Deleting Sub Categories',
'category_selection' => 'Category Selection', 'category_selection' => 'Category Selection',
'go_to_parent' => 'Go To Parent',
]; ];

View File

@ -1,31 +0,0 @@
<tbody>
{% for row in table.rows %}
<tr id="{{ loop.index }}" class="{{ row.class }}">
{% if table.options.sortable %}
<td>
{{ icon('fa fa-arrows handle') }}
<input type="hidden" name="{{ row.table.options.prefix }}order[]" value="{{ row.key }}"/>
</td>
{% endif %}
{% if not table.actions.empty() %}
<td>
<input type="checkbox" data-toggle="action" name="{{ row.table.options.prefix }}id[]" value="{{ row.key }}"/>
</td>
{% endif %}
{% for column in row.columns %}
<td data-title="{{ trans(column.heading) }}"
class="{{ column.class }}" {{ html_attributes(column.attributes) }}>
{{ column.value|raw }}
</td>
{% endfor %}
<td class="text-lg-right">
{{ buttons(row.buttons)|raw }}
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -1,74 +0,0 @@
{{ asset_add("scripts.js", "streams::js/table/table.js") }}
{% if not actions.empty() %}
{{ asset_add("scripts.js", "streams::js/table/actions.js") }}
{% endif %}
{% if table.options.sortable %}
{{ asset_add("scripts.js", "streams::js/table/sortable.js") }}
{% endif %}
{% if app.request.get('cat') != null %}
{% set parent = category_detail(app.request.get('cat')) %}
{% if parent.parent_category is null %}
{% set parent_url = url('admin/cats') %}
{% else %}
{% set parent_url = url('admin/cats?cat='~parent.parent_category_id) %}
{% endif %}
<ol class="breadcrumb">
{% for parnt in category_parents_name(app.request.get('cat'))|reverse %}
<li class="breadcrumb-item"><a><b>{{ parnt }}</b></a></li>
{% endfor %}
</ol>
<div class="container-fluid">
<div id="buttons">
<a class="btn btn-md btn-warning " href="{{ parent_url }}">
<i class="fa fa-arrow-left"></i> Go To Parent
</a>
</div>
</div>
{% endif %}
<div class="container-fluid">
{{ view("streams::table/partials/filters", {'table': table}) }}
{{ view("streams::table/partials/views", {'table': table}) }}
{{ view(table.options.heading ?: "streams::table/partials/heading", {'table': table}) }}
{% if not table.rows.empty() %}
{% block card %}
<div class="card">
{{ form_open({ 'url': url_full() }) }}
<div class="table-stack">
<table
class="
{{ table.options.class ?: 'table' }}
{{ table.options.sortable ? 'table--sortable' }}
"
{{ table.options.sortable ? 'data-sortable' }}
{{ html_attributes(table.options.attributes) }}>
{{ view("streams::table/partials/header", {'table': table}) }}
{% block body %}
{{ view("visiosoft.module.cats::table.body", {'table': table}) }}
{% endblock %}
{{ view("streams::table/partials/footer", {'table': table}) }}
</table>
</div>
{{ form_close() }}
</div>
{% endblock %}
{% else %}
{% block no_results %}
<div class="card">
<div class="card-block">
{{ trans(table.options.get('no_results_message', 'streams::message.no_results')) }}
</div>
</div>
{% endblock %}
{% endif %}
</div>

View File

@ -0,0 +1,78 @@
{{ asset_add("scripts.js", "streams::js/table/table.js") }}
{% if not actions.empty() %}
{{ asset_add("scripts.js", "streams::js/table/actions.js") }}
{% endif %}
{% if table.options.sortable %}
{{ asset_add("scripts.js", "streams::js/table/sortable.js") }}
{% endif %}
<div class="{{ table.options.container_class ?: 'container-fluid' }}">
{{ view("streams::table/partials/filters", {'table': table}) }}
<div class="card card-custom gutter-b table-responsive">
<div class="card-body pb-0">
{{ view("streams::table/partials/views", {'table': table}) }}
{{ view(table.options.heading ?: "streams::table/partials/heading", {'table': table}) }}
</div>
<div class="card-body pb-0">
{% if app.request.get('cat') != null %}
<ol class="breadcrumb">
{% for parnt in category_parents_name(app.request.get('cat'))|reverse %}
<li class="breadcrumb-item"><b>{{ parnt }}</b></li>
{% endfor %}
</ol>
<div id="buttons">
{% set parent = category_detail(app.request.get('cat')) %}
{% if parent.parent_category is null %}
{% set parent_url = url('admin/cats') %}
{% else %}
{% set parent_url = url('admin/cats?cat='~parent.parent_category_id) %}
{% endif %}
<a class="btn btn-md btn-warning " href="{{ parent_url }}">
<i class="fa fa-arrow-left"></i> {{ trans('module::field.go_to_parent') }}
</a>
</div>
{% endif %}
</div>
<div class="card-body">
{% if not table.rows.empty() %}
{% block card %}
{{ form_open({ 'url': url_full() }) }}
<div class="table-stack">
<table
class="
{{ table.options.class ?: 'table' }}
{{ table.options.sortable ? 'table--sortable' }}
"
{{ table.options.sortable ? 'data-sortable' }}
{{ html_attributes(table.options.attributes) }}>
{{ view("streams::table/partials/header", {'table': table}) }}
{% block body %}
{{ view("streams::table/partials/body", {'table': table}) }}
{% endblock %}
{{ view("streams::table/partials/footer", {'table': table}) }}
</table>
</div>
{{ form_close() }}
{% endblock %}
{% else %}
{% block no_results %}
<div class="card">
<div class="card-block card-body">
{{ trans(table.options.get('no_results_message', 'streams::message.no_results')) }}
</div>
</div>
{% endblock %}
{% endif %}
</div>
</div>
</div>

View File

@ -80,7 +80,7 @@ class CategoryTableBuilder extends TableBuilder
* @var array * @var array
*/ */
protected $options = [ protected $options = [
'table_view' => 'visiosoft.module.cats::table.categories' 'table_view' => 'visiosoft.module.cats::table.table'
]; ];
/** /**

View File

@ -111,7 +111,7 @@ class UploadController extends AdminController
if ($settings_value['watermark_type'] == 'image') { if ($settings_value['watermark_type'] == 'image') {
if (!$watermarkimage = $this->files->find($settings_value['watermark_image'])) { if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path()); $watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path());
$image->insert($watermark, $settings_value['watermark_position']); $image->insert($watermark, $settings_value['watermark_position']);
} }