Fix import loop and a resource
modifié: core/lib/Thelia/Core/Security/Resource/AdminResources.php modifié: core/lib/Thelia/Core/Template/Loop/Import.php nouveau fichier: templates/backOffice/default/import.html
This commit is contained in:
@@ -105,7 +105,7 @@ final class AdminResources
|
|||||||
|
|
||||||
const EXPORT = "admin.export";
|
const EXPORT = "admin.export";
|
||||||
|
|
||||||
const EXPORT_CUSTOMER_NEWSLETTER = "admin.export.customer.newsletter";
|
const IMPORT = "admin.import";
|
||||||
|
|
||||||
const TOOLS = "admin.tools";
|
const TOOLS = "admin.tools";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Import extends ImportExportType
|
|||||||
{
|
{
|
||||||
protected function getBaseUrl()
|
protected function getBaseUrl()
|
||||||
{
|
{
|
||||||
return $this->container->getParameter("export.base_url");
|
return $this->container->getParameter("import.base_url");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getQueryModel()
|
protected function getQueryModel()
|
||||||
|
|||||||
127
templates/backOffice/default/import.html
Normal file
127
templates/backOffice/default/import.html
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
{extends file="admin-layout.tpl"}
|
||||||
|
|
||||||
|
{block name="no-return-functions"}
|
||||||
|
{$admin_current_location = 'tools'}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name="page-title"}{intl l='Imports'}{/block}
|
||||||
|
|
||||||
|
{block name="check-resource"}admin.import{/block}
|
||||||
|
{block name="check-access"}view{/block}
|
||||||
|
|
||||||
|
{block name="main-content"}
|
||||||
|
<div class="configuration">
|
||||||
|
|
||||||
|
<div id="wrapper" class="container">
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||||
|
<li><a href="{url path='admin/tools'}">{intl l='Tools'}</a></li>
|
||||||
|
<li>{intl l="Imports"}</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{module_include location='tools_top'}
|
||||||
|
|
||||||
|
{loop name="import-category" type="import-category"}
|
||||||
|
{if $LOOP_COUNT % 3}
|
||||||
|
<div class="row">
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="menu-list-table general-block-decorator">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-condensed">
|
||||||
|
<caption>
|
||||||
|
<!-- add up and down arrows -->
|
||||||
|
{$TITLE}
|
||||||
|
</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-md-1">
|
||||||
|
<a href="{url path="/admin/import"}?import_order=id{if $import_order == "id"}_reverse{/if}">
|
||||||
|
{intl l="ID"}
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th class="col-md-9">
|
||||||
|
<a href="{url path="/admin/import"}?import_order=alpha{if $import_order == "alpha"}_reverse{/if}">
|
||||||
|
{intl l="Name"}
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
<th class="col-md-2">
|
||||||
|
<a href="{url path="/admin/import"}?import_order=manual{if $import_order == "manual"}_reverse{/if}">
|
||||||
|
{intl l="Position"}
|
||||||
|
</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{loop name="import-categ-list" type="import" order=$import_order category=$ID}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{$ID}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{$URL}">{$TITLE}</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href="{url path="/admin/import"}/position/up/{$ID}">
|
||||||
|
<span class="glyphicon glyphicon-arrow-up"></span>
|
||||||
|
</a>
|
||||||
|
{$POSITION}
|
||||||
|
<a href="{url path="/admin/import/position/down"}/{$ID}">
|
||||||
|
<span class="glyphicon glyphicon-arrow-down"></span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/loop}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{if $LOOP_COUNT % 3}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/loop}
|
||||||
|
|
||||||
|
{module_include location='configuration_bottom'}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
|
{block name="javascript-initialization"}
|
||||||
|
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||||
|
<script src="{$asset_url}"></script>
|
||||||
|
{/javascripts}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name="javascript-last-call"}
|
||||||
|
<!-- -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var compression_switch = $(".import-compression-switch");
|
||||||
|
var compression_row = $(".import-compression-selection-row");
|
||||||
|
|
||||||
|
compression_switch.on("switch-change", function(e, data) {
|
||||||
|
var is_checked = data.value;
|
||||||
|
|
||||||
|
if (is_checked) {
|
||||||
|
compression_row.show();
|
||||||
|
} else {
|
||||||
|
compression_row.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($("input[type=checkbox]", compression_switch).is(":checked")) {
|
||||||
|
compression_row.show();
|
||||||
|
} else {
|
||||||
|
compression_row.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{module_include location='configuration-js'}
|
||||||
|
{/block}
|
||||||
Reference in New Issue
Block a user