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

@@ -34,103 +34,105 @@
{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">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{admin_position_block
resource="admin.export"
access="UPDATE"
path={url path="admin/export/position/category"}
url_parameter="id"
in_place_edit_class="exportCategoryPositionChange"
position=$POSITION
id=$ID
}
{$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}
{ifloop rel="export-categ-list"}
{assign category_title $TITLE}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{admin_position_block
resource="admin.export"
access="UPDATE"
path={url path="admin/export/position/category"}
url_parameter="id"
in_place_edit_class="exportCategoryPositionChange"
position=$POSITION
id=$ID
}
{$TITLE}
</caption>
<thead>
<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>
<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>
{/loop}
</tbody>
</table>
</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>
{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>
{/ifloop}
{/loop}
{elseloop rel="export-category"}

View File

@@ -34,82 +34,84 @@
{module_include location='tools_top'}
{loop name="import-category" type="import-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">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{admin_position_block
resource="admin.import"
access="UPDATE"
path={url path="admin/import/position/category"}
url_parameter="id"
in_place_edit_class="importCategoryPositionChange"
position=$POSITION
id=$ID
}
{$TITLE}
</caption>
<thead>
<tr>
<th class="col-md-1">
<a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=id{if $import_order == "id"}_reverse{/if}">
{intl l="ID"}
</a>
</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>
{ifloop rel="import-categ-list"}
{assign category_title $TITLE}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{admin_position_block
resource="admin.import"
access="UPDATE"
path={url path="admin/import/position/category"}
url_parameter="id"
in_place_edit_class="importCategoryPositionChange"
position=$POSITION
id=$ID
}
{$TITLE}
</caption>
<thead>
<tr>
<th class="col-md-1">
<a href="{url path="/admin/import"}?{if $url_category}{$url_category}&{/if}import_order=id{if $import_order == "id"}_reverse{/if}">
{intl l="ID"}
</a>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</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>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
{/ifloop}
{/loop}
{elseloop rel="import-category"}