hide category if no export/import and add module category

modifié:         core/lib/Thelia/Config/Resources/export.xml
	modifié:         core/lib/Thelia/Config/Resources/import.xml
	modifié:         templates/backOffice/default/export.html
	modifié:         templates/backOffice/default/import.html
This commit is contained in:
Benjamin Perche
2014-08-05 10:30:57 +02:00
parent c453981d5a
commit 718ed2ae2d
4 changed files with 176 additions and 165 deletions

View File

@@ -17,11 +17,14 @@
<title locale="en_US">Content</title> <title locale="en_US">Content</title>
<title locale="fr_FR">Contenu</title> <title locale="fr_FR">Contenu</title>
</export_category> </export_category>
<export_category id="thelia.export.orders"> <export_category id="thelia.export.orders">
<title locale="en_US">Orders</title> <title locale="en_US">Orders</title>
<title locale="fr_FR">Commandes</title> <title locale="fr_FR">Commandes</title>
</export_category> </export_category>
<export_category id="thelia.export.modules">
<title locale="en_US">Modules</title>
<title locale="fr_FR">Modules</title>
</export_category>
</export_categories> </export_categories>
<exports> <exports>

View File

@@ -8,6 +8,10 @@
<title locale="fr_FR">Produits</title> <title locale="fr_FR">Produits</title>
<title locale="en_US">Products</title> <title locale="en_US">Products</title>
</import_category> </import_category>
<import_category id="thelia.import.modules">
<title locale="en_US">Modules</title>
<title locale="fr_FR">Modules</title>
</import_category>
</import_categories> </import_categories>
<imports> <imports>

View File

@@ -34,103 +34,105 @@
{module_include location='tools_top'} {module_include location='tools_top'}
{loop name="export-category" type="export-category" order=$category_order} {loop name="export-category" type="export-category" order=$category_order}
{assign category_title $TITLE} {ifloop rel="export-categ-list"}
<div class="row"> {assign category_title $TITLE}
<div class="col-md-12"> <div class="row">
<div class="general-block-decorator"> <div class="col-md-12">
<div class="table-responsive"> <div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned"> <div class="table-responsive">
<caption class="clearfix"> <table class="table table-striped table-condensed table-left-aligned">
{admin_position_block <caption class="clearfix">
resource="admin.export" {admin_position_block
access="UPDATE" resource="admin.export"
path={url path="admin/export/position/category"} access="UPDATE"
url_parameter="id" path={url path="admin/export/position/category"}
in_place_edit_class="exportCategoryPositionChange" url_parameter="id"
position=$POSITION in_place_edit_class="exportCategoryPositionChange"
id=$ID position=$POSITION
} id=$ID
{$TITLE} }
</caption> {$TITLE}
<thead> </caption>
<tr> <thead>
<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> <tr>
<td> <th class="col-md-1">
{$ID} {if $export_order == "id"}
</td> <i class="glyphicon glyphicon-chevron-up"></i>
<td> {elseif $export_order == "id_reverse"}
<a href="#category_{$category_title}" class="btn-show-export-modal" data-id="{$ID}" data-url="{$URL}">{$TITLE}</a> <i class="glyphicon glyphicon-chevron-down"></i>
</td> {/if}
<td> <a href="{url path="/admin/export"}?{if $url_category}{$url_category}&{/if}export_order=id{if $export_order == "id"}_reverse{/if}#category_{$category_title}">
{$DESCRIPTION nofilter} {intl l="ID"}
</td> </a>
<td> </th>
{admin_position_block <th class="col-md-2">
resource="admin.export" {if $export_order == "alpha"}
access="UPDATE" <i class="glyphicon glyphicon-chevron-up"></i>
path={url path="admin/export/position"} {elseif $export_order == "alpha_reverse"}
url_parameter="id" <i class="glyphicon glyphicon-chevron-down"></i>
in_place_edit_class="exportPositionChange" {/if}
position=$POSITION <a href="{url path="/admin/export"}?{if $url_category}{$url_category}&{/if}export_order=alpha{if $export_order == "alpha"}_reverse{/if}#category_{$category_title}">
id=$ID {intl l="Name"}
} </a>
</td> </th>
<td> <th class="col-md-6">
<div class="btn-group"> {intl l="Description"}
<a class="btn btn-default btn-xs btn-show-export-modal" data-id="{$ID}" data-url="{$URL}" title="{intl l="Do this export"}"> </th>
<span class="glyphicon glyphicon-open"></span> <th class="col-md-2">
</a> {if $export_order == "manual"}
</div> <i class="glyphicon glyphicon-chevron-up"></i>
</td> {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> </tr>
{/loop} </thead>
</tbody> <tbody>
</table> {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>
{admin_position_block
resource="admin.export"
access="UPDATE"
path={url path="admin/export/position"}
url_parameter="id"
in_place_edit_class="exportPositionChange"
position=$POSITION
id=$ID
}
</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> </div>
</div>
</div> </div>
{/ifloop}
{/loop} {/loop}
{elseloop rel="export-category"} {elseloop rel="export-category"}

View File

@@ -34,82 +34,84 @@
{module_include location='tools_top'} {module_include location='tools_top'}
{loop name="import-category" type="import-category" order=$category_order} {loop name="import-category" type="import-category" order=$category_order}
{assign category_title $TITLE} {ifloop rel="import-categ-list"}
<div class="row"> {assign category_title $TITLE}
<div class="col-md-12"> <div class="row">
<div class="general-block-decorator"> <div class="col-md-12">
<div class="table-responsive"> <div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned"> <div class="table-responsive">
<caption class="clearfix"> <table class="table table-striped table-condensed table-left-aligned">
{admin_position_block <caption class="clearfix">
resource="admin.import" {admin_position_block
access="UPDATE" resource="admin.import"
path={url path="admin/import/position/category"} access="UPDATE"
url_parameter="id" path={url path="admin/import/position/category"}
in_place_edit_class="importCategoryPositionChange" url_parameter="id"
position=$POSITION in_place_edit_class="importCategoryPositionChange"
id=$ID position=$POSITION
} id=$ID
{$TITLE} }
</caption> {$TITLE}
<thead> </caption>
<tr> <thead>
<th class="col-md-1"> <tr>
<a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=id{if $import_order == "id"}_reverse{/if}"> <th class="col-md-1">
{intl l="ID"} <a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=id{if $import_order == "id"}_reverse{/if}">
</a> {intl l="ID"}
</th>
<th class="col-md-8">
<a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}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"}?{if $url_category}{$url_category}&{/if}import_order=manual{if $import_order == "manual"}_reverse{/if}">
{intl l="Position"}
</a>
</th>
<th class="col-md-1">
{intl l="Actions"}
</th>
</tr>
</thead>
<tbody>
{loop name="import-categ-list" type="import" order=$import_order category=$ID}
<tr>
<td>
{$ID}
</td>
<td>
<a href="#category_{$category_title}" class="btn-show-import-modal" data-id="{$ID}" data-url="{$URL}">{$TITLE}</a>
</td>
<td>
{admin_position_block
resource="admin.import"
access="UPDATE"
path={url path="admin/import/position"}
url_parameter="id"
in_place_edit_class="importPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs btn-show-import-modal" href="#category_{$category_title}" data-id="{$ID}" data-url="{$URL}" title="{intl l="Do this import"}">
<span class="glyphicon glyphicon-open"></span>
</a> </a>
</div> </th>
</td> <th class="col-md-8">
</tr> <a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=alpha{if $import_order == "alpha"}_reverse{/if}">
{/loop} {intl l="Name"}
</tbody> </a>
</table> </th>
<th class="col-md-2">
<a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=manual{if $import_order == "manual"}_reverse{/if}">
{intl l="Position"}
</a>
</th>
<th class="col-md-1">
{intl l="Actions"}
</th>
</tr>
</thead>
<tbody>
{loop name="import-categ-list" type="import" order=$import_order category=$ID}
<tr>
<td>
{$ID}
</td>
<td>
<a href="#category_{$category_title}" class="btn-show-import-modal" data-id="{$ID}" data-url="{$URL}">{$TITLE}</a>
</td>
<td>
{admin_position_block
resource="admin.import"
access="UPDATE"
path={url path="admin/import/position"}
url_parameter="id"
in_place_edit_class="importPositionChange"
position=$POSITION
id=$ID
}
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs btn-show-import-modal" href="#category_{$category_title}" data-id="{$ID}" data-url="{$URL}" title="{intl l="Do this import"}">
<span class="glyphicon glyphicon-open"></span>
</a>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
{/ifloop}
{/loop} {/loop}
{elseloop rel="import-category"} {elseloop rel="import-category"}