Files
sterivein/templates/backOffice/default/export.html
Benjamin Perche 749d55102c Add import description
modifié:         core/lib/Thelia/Config/Resources/import.xml
	modifié:         core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php
	modifié:         templates/backOffice/default/ajax/export-modal.html
	modifié:         templates/backOffice/default/ajax/import-modal.html
	modifié:         templates/backOffice/default/export-page.html
	modifié:         templates/backOffice/default/export.html
	modifié:         templates/backOffice/default/import-page.html
	modifié:         templates/backOffice/default/import.html
2014-08-01 12:48:06 +02:00

196 lines
10 KiB
HTML

{extends file="admin-layout.tpl"}
{block name="no-return-functions"}
{$admin_current_location = 'tools'}
{/block}
{block name="page-title"}{intl l='Exports'}{/block}
{block name="check-resource"}admin.export{/block}
{block name="check-access"}view{/block}
{block name="main-content"}
{if $category_order != "manual"}
{assign url_category "category_order="|cat:$category_order}
{/if}
{if $export_order != "manual"}
{assign url_export "export_order="|cat:$export_order}
{/if}
<div id="export-modal"></div>
<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="Exports"}</li>
</ul>
</nav>
{module_include location='tools_top'}
{loop name="export-category" type="export-category" order=$category_order}
{assign category_title $TITLE}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive" id="category_{$category_title}">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
<a href="{url path="/admin/export/position/category/up/{$ID}{if $url_export}?{$url_export}{/if}#category_{$category_title}"}">
<span class="glyphicon glyphicon-arrow-up"></span>
</a>
{$POSITION}
<a href="{url path="/admin/export/position/category/down/{$ID}{if $url_export}?{$url_export}{/if}#category_{$category_title}"}">
<span class="glyphicon glyphicon-arrow-down"></span>
</a>
{$TITLE}
</caption>
<thead>
<tr>
<th class="col-md-1">
{if $export_order == "id"}
<i class="glyphicon glyphicon-chevron-up"></i>
{elseif $export_order == "id_reverse"}
<i class="glyphicon glyphicon-chevron-down"></i>
{/if}
<a href="{url path="/admin/export"}?{if $url_category}{$url_category}&{/if}export_order=id{if $export_order == "id"}_reverse{/if}#category_{$category_title}">
{intl l="ID"}
</a>
</th>
<th class="col-md-2">
{if $export_order == "alpha"}
<i class="glyphicon glyphicon-chevron-up"></i>
{elseif $export_order == "alpha_reverse"}
<i class="glyphicon glyphicon-chevron-down"></i>
{/if}
<a href="{url path="/admin/export"}?{if $url_category}{$url_category}&{/if}export_order=alpha{if $export_order == "alpha"}_reverse{/if}#category_{$category_title}">
{intl l="Name"}
</a>
</th>
<th class="col-md-6">
{intl l="Description"}
</th>
<th class="col-md-2">
{if $export_order == "manual"}
<i class="glyphicon glyphicon-chevron-up"></i>
{elseif $export_order == "manual_reverse"}
<i class="glyphicon glyphicon-chevron-down"></i>
{/if}
<a href="{url path="/admin/export"}?{if $url_category}{$url_category}&{/if}export_order=manual{if $export_order == "manual"}_reverse{/if}#category_{$category_title}">
{intl l="Position"}
</a>
</th>
<th class="col-md-1">
{intl l="Actions"}
</th>
</tr>
</thead>
<tbody>
{loop name="export-categ-list" type="export" order=$export_order category=$ID}
<tr>
<td>
{$ID}
</td>
<td>
<a href="#category_{$category_title}" class="btn-show-export-modal" data-id="{$ID}" data-url="{$URL}">{$TITLE}</a>
</td>
<td>
{$DESCRIPTION nofilter}
</td>
<td>
<a href="{url path="/admin/export/position/up/{if $url_category}?{$url_category}{/if}{$ID}#category_{$category_title}"}">
<span class="glyphicon glyphicon-arrow-up"></span>
</a>
{$POSITION}
<a href="{url path="/admin/export/position/down/{$ID}{if $url_category}?{$url_category}{/if}#category_{$category_title}"}">
<span class="glyphicon glyphicon-arrow-down"></span>
</a>
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs btn-show-export-modal" data-id="{$ID}" data-url="{$URL}" title="{intl l="Do this export"}">
<span class="glyphicon glyphicon-open"></span>
</a>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div>
</div>
{/loop}
{elseloop rel="export-category"}
<div class="alert alert-info">
{intl l="You don't have any export"}
</div>
{/elseloop}
{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 export_modal = $("#export-modal");
$(".btn-show-export-modal").click(function() {
var export_id = $(this).data("id");
/**
* If we can't load the modal form, redirect to a page where the form is too.
*/
$.ajax(
$(this).data("url")
).success(function(data) {
export_modal.html(data);
var compression_switch = $("#export-compression-switch", export_modal);
var compression_row = $(".export-compression-selection-row", export_modal);
compression_switch.on("switch-change", function(e, data) {
var is_checked = data.value;
if (is_checked) {
compression_row.show("slow");
} else {
compression_row.hide("slow");
}
});
if ($("input[type=checkbox]", compression_switch).is(":checked")) {
compression_row.show();
} else {
compression_row.hide();
}
$(".make-switch", export_modal).bootstrapSwitch();
$("#real-export-modal").modal();
}).fail(function() {
window.location.replace("{url path='/admin/export/'}"+export_id);
});
});
});
</script>
{module_include location='configuration-js'}
{/block}