|
|
|
|
|
|
|
|
{% endblock content_header %} |
|
|
{% endblock content_header %} |
|
|
|
|
|
|
|
|
{% block main %} |
|
|
{% block main %} |
|
|
|
|
|
{% block main_append %}{% endblock %} |
|
|
|
|
|
|
|
|
{% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %} |
|
|
{% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %} |
|
|
{% set _number_of_hidden_results = 0 %} |
|
|
{% set _number_of_hidden_results = 0 %} |
|
|
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %} |
|
|
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %} |
|
|
|
|
|
|
|
|
<div class="col-12"> |
|
|
<div class="col-12"> |
|
|
<div class="card card-outline card-primary"> |
|
|
<div class="card card-outline card-primary"> |
|
|
<div class="card-header"> |
|
|
<div class="card-header"> |
|
|
<h2 class="card-title text-lg "> |
|
|
|
|
|
{#{{ "list.title"|trans({'%label%' : _entity_config['label']|lower }) }}#} |
|
|
|
|
|
{% if paginator.nbResultsTotal != paginator.nbResults %} |
|
|
|
|
|
<span data-toggle="tooltip" title="{{ "list.nbResultsFiltered"|trans }}" |
|
|
|
|
|
class="badge badge-info">{{ paginator.nbResults }} <i |
|
|
|
|
|
class="fa fa-search"></i> </span> |
|
|
|
|
|
| |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
<span data-toggle="tooltip" title="{{ "list.nbResults"|trans }}" |
|
|
|
|
|
class="badge badge-primary">{{ paginator.nbResultsTotal }} <i |
|
|
|
|
|
class="fa fa-bars"></i> </span> |
|
|
|
|
|
{% if paginator.nbResultsOnline is defined %}<span data-toggle="tooltip" |
|
|
|
|
|
title="{{ "list.nbResultsOnline"|trans }}" |
|
|
|
|
|
class="badge badge-success">{{ paginator.nbResultsOnline }} |
|
|
|
|
|
<i class="fa fa-check"></i> </span>{% endif %} |
|
|
|
|
|
{% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip" |
|
|
|
|
|
title="{{ "list.nbResultsOffline"|trans }}" |
|
|
|
|
|
class="badge badge-warning">{{ paginator.nbResultsOffline }} |
|
|
|
|
|
<i class="fa fa-pen"></i></span>{% endif %} |
|
|
|
|
|
{% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span |
|
|
|
|
|
data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}" |
|
|
|
|
|
class="badge badge-danger">{{ paginator.nbResultsDeleted }} <i class="fa fa-trash"></i> |
|
|
|
|
|
</span>{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
</h2> |
|
|
|
|
|
{% if easyadmin_action_is_enabled_for_list_view('new', _entity_config.name) %} |
|
|
|
|
|
{% set _action = easyadmin_get_action_for_list_view('new', _entity_config.name) %} |
|
|
|
|
|
{% block new_action %} |
|
|
|
|
|
<div class="button-action"> |
|
|
|
|
|
<a class="float-right {{ _action.css_class|default('') }}" |
|
|
|
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: _action.name })) }}" |
|
|
|
|
|
target="{{ _action.target }}"> |
|
|
|
|
|
<i class="fa fa-fw fa-plus"></i> |
|
|
|
|
|
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }} |
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
|
|
|
|
{% if _entity_config['list']['btn_init_export_purchase_order'] is defined %} |
|
|
|
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
|
|
|
href="{{ path('easyadmin', { entity: 'Supplier', action: 'initExportPurchaseOrder' }) }}" |
|
|
|
|
|
target="{{ _action.target }}"> |
|
|
|
|
|
<i class="fa fa-undo"></i> Réinitialiser export bons de commande |
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
|
{% block card_header %} |
|
|
|
|
|
|
|
|
|
|
|
<h2 class="card-title text-lg "> |
|
|
|
|
|
{% block paginator_nb_results %} |
|
|
|
|
|
{#{{ "list.title"|trans({'%label%' : _entity_config['label']|lower }) }}#} |
|
|
|
|
|
{% if paginator.nbResultsTotal != paginator.nbResults %} |
|
|
|
|
|
<span data-toggle="tooltip" title="{{ "list.nbResultsFiltered"|trans }}" |
|
|
|
|
|
class="badge badge-info">{{ paginator.nbResults }} <i |
|
|
|
|
|
class="fa fa-search"></i> </span> |
|
|
|
|
|
| |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
<span data-toggle="tooltip" title="{{ "list.nbResults"|trans }}" |
|
|
|
|
|
class="badge badge-primary">{{ paginator.nbResultsTotal }} <i |
|
|
|
|
|
class="fa fa-bars"></i> </span> |
|
|
|
|
|
{% if paginator.nbResultsOnline is defined %}<span data-toggle="tooltip" |
|
|
|
|
|
title="{{ "list.nbResultsOnline"|trans }}" |
|
|
|
|
|
class="badge badge-success">{{ paginator.nbResultsOnline }} |
|
|
|
|
|
<i class="fa fa-check"></i> </span>{% endif %} |
|
|
|
|
|
{% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip" |
|
|
|
|
|
title="{{ "list.nbResultsOffline"|trans }}" |
|
|
|
|
|
class="badge badge-warning">{{ paginator.nbResultsOffline }} |
|
|
|
|
|
<i class="fa fa-pen"></i></span>{% endif %} |
|
|
|
|
|
{% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span |
|
|
|
|
|
data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}" |
|
|
|
|
|
class="badge badge-danger">{{ paginator.nbResultsDeleted }} <i |
|
|
|
|
|
class="fa fa-trash"></i> |
|
|
|
|
|
</span>{% endif %} |
|
|
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
|
{% if _entity_config['list']['edit_position'] is defined %} |
|
|
|
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
|
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}" |
|
|
|
|
|
|
|
|
</h2> |
|
|
|
|
|
{% if easyadmin_action_is_enabled_for_list_view('new', _entity_config.name) %} |
|
|
|
|
|
{% set _action = easyadmin_get_action_for_list_view('new', _entity_config.name) %} |
|
|
|
|
|
{% block new_action %} |
|
|
|
|
|
<div class="button-action"> |
|
|
|
|
|
<a class="float-right {{ _action.css_class|default('') }}" |
|
|
|
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: _action.name })) }}" |
|
|
target="{{ _action.target }}"> |
|
|
target="{{ _action.target }}"> |
|
|
<i class="fa fa-sort"></i> Modifier position |
|
|
|
|
|
|
|
|
<i class="fa fa-fw fa-plus"></i> |
|
|
|
|
|
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }} |
|
|
</a> |
|
|
</a> |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% if app.request.get('action') == 'listChildren' and app.request.get('entity') == 'ProductCategory' %} |
|
|
|
|
|
<a class="float-right btn-sm btn-primary" |
|
|
|
|
|
href="{{ path('easyadmin', {action: 'list', entity: 'ProductCategory'}) }}"> |
|
|
|
|
|
<i class="fa fa-chevron-left"></i> Retour à la catégorie parente |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
{% if _entity_config['list']['btn_init_export_purchase_order'] is defined %} |
|
|
|
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
|
|
|
href="{{ path('easyadmin', { entity: 'Supplier', action: 'initExportPurchaseOrder' }) }}" |
|
|
|
|
|
target="{{ _action.target }}"> |
|
|
|
|
|
<i class="fa fa-undo"></i> Réinitialiser export bons de commande |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% if _entity_config['list']['edit_position'] is defined %} |
|
|
|
|
|
<a class="float-right btn-sm btn-success action-sort" |
|
|
|
|
|
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}" |
|
|
|
|
|
target="{{ _action.target }}"> |
|
|
|
|
|
<i class="fa fa-sort"></i> Modifier position |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% if app.request.get('action') == 'listChildren' and app.request.get('entity') == 'ProductCategory' %} |
|
|
|
|
|
<a class="float-right btn-sm btn-primary" |
|
|
|
|
|
href="{{ path('easyadmin', {action: 'list', entity: 'ProductCategory'}) }}"> |
|
|
|
|
|
<i class="fa fa-chevron-left"></i> Retour à la catégorie parente |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
{% endblock new_action %} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
{% endblock card_header %} |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
{% endblock new_action %} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
{% endif %} |
|
|
</tr> |
|
|
</tr> |
|
|
{% endblock table_head %} |
|
|
{% endblock table_head %} |
|
|
<tr class="table-filters-line"> |
|
|
|
|
|
{% if _has_batch_actions %} |
|
|
|
|
|
<th></th>{% endif %} |
|
|
|
|
|
{% for field, metadata in _fields_visible_by_user %} |
|
|
|
|
|
<th> |
|
|
|
|
|
|
|
|
|
|
|
{% if filters_form[field] is defined %} |
|
|
|
|
|
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %} |
|
|
|
|
|
<div class="input-group input-group-sm"> |
|
|
|
|
|
<input type="text" |
|
|
|
|
|
class="form-control input-sm float-right date-range"> |
|
|
|
|
|
<div class="hidden date-time-range-fields" style="display: none;"> |
|
|
|
|
|
{{ form_widget(filters_form[field]['dateStart'], {"attr" : {'class' : 'date-start', 'form': 'filters-form'}}) }} |
|
|
|
|
|
{{ form_widget(filters_form[field]['dateEnd'], {"attr" : {'class' : 'date-end', 'form': 'filters-form'}}) }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<div class="form-widget input-group-sm"> |
|
|
|
|
|
{% if metadata.dataType == 'integer' or metadata.dataType== 'string' %} |
|
|
|
|
|
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', { |
|
|
|
|
|
action: 'autocomplete', |
|
|
|
|
|
field: field, |
|
|
|
|
|
entity: _entity_config.name, |
|
|
|
|
|
})|raw }}) }} |
|
|
|
|
|
|
|
|
{% block table_filters %} |
|
|
|
|
|
{% if filters_form is defined %} |
|
|
|
|
|
<tr class="table-filters-line"> |
|
|
|
|
|
{% if _has_batch_actions %} |
|
|
|
|
|
<th></th>{% endif %} |
|
|
|
|
|
{% for field, metadata in _fields_visible_by_user %} |
|
|
|
|
|
<th> |
|
|
|
|
|
|
|
|
|
|
|
{% if filters_form[field] is defined %} |
|
|
|
|
|
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %} |
|
|
|
|
|
<div class="input-group input-group-sm"> |
|
|
|
|
|
<input type="text" |
|
|
|
|
|
class="form-control input-sm float-right date-range"> |
|
|
|
|
|
<div class="hidden date-time-range-fields" |
|
|
|
|
|
style="display: none;"> |
|
|
|
|
|
{{ form_widget(filters_form[field]['dateStart'], {"attr" : {'class' : 'date-start', 'form': 'filters-form'}}) }} |
|
|
|
|
|
{{ form_widget(filters_form[field]['dateEnd'], {"attr" : {'class' : 'date-end', 'form': 'filters-form'}}) }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
{% else %} |
|
|
{% else %} |
|
|
{{ form_widget(filters_form[field]) }} |
|
|
|
|
|
|
|
|
<div class="form-widget input-group-sm"> |
|
|
|
|
|
{% if metadata.dataType == 'integer' or metadata.dataType== 'string' %} |
|
|
|
|
|
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', { |
|
|
|
|
|
action: 'autocomplete', |
|
|
|
|
|
field: field, |
|
|
|
|
|
entity: _entity_config.name, |
|
|
|
|
|
})|raw }}) }} |
|
|
|
|
|
{% else %} |
|
|
|
|
|
{{ form_widget(filters_form[field]) }} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</div> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
</div> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
{% if _list_item_actions|length > 0 %} |
|
|
|
|
|
<th class="actions"> |
|
|
|
|
|
<button type="submit" form="filters-form" class="btn btn-sm btn-info" |
|
|
|
|
|
data-toggle="tooltip" title="{{ "action.apply"|trans({}, 'lcshop') }}" |
|
|
|
|
|
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}"> |
|
|
|
|
|
<i class="fa fa-search"></i> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% if filters_form.vars.submitted %} |
|
|
|
|
|
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}" |
|
|
|
|
|
class="btn btn-sm btn-warning lc-reset-filters" data-toggle="tooltip" |
|
|
|
|
|
title="{{ "action.reset"|trans({}, 'lcshop') }}" |
|
|
|
|
|
aria-label="{{ "action.reset"|trans({}, 'lcshop') }}"> |
|
|
|
|
|
<i class="fa fa-eraser"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
{% if _list_item_actions|length > 0 %} |
|
|
|
|
|
<th class="actions"> |
|
|
|
|
|
<button type="submit" form="filters-form" class="btn btn-sm btn-info" |
|
|
|
|
|
data-toggle="tooltip" |
|
|
|
|
|
title="{{ "action.apply"|trans({}, 'lcshop') }}" |
|
|
|
|
|
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}"> |
|
|
|
|
|
<i class="fa fa-search"></i> |
|
|
|
|
|
</button> |
|
|
|
|
|
{% if filters_form.vars.submitted %} |
|
|
|
|
|
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}" |
|
|
|
|
|
class="btn btn-sm btn-warning lc-reset-filters" |
|
|
|
|
|
data-toggle="tooltip" |
|
|
|
|
|
title="{{ "action.reset"|trans({}, 'lcshop') }}" |
|
|
|
|
|
aria-label="{{ "action.reset"|trans({}, 'lcshop') }}"> |
|
|
|
|
|
<i class="fa fa-eraser"></i> |
|
|
|
|
|
</a> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</th> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</th> |
|
|
|
|
|
|
|
|
</tr> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
{% endblock table_filters %} |
|
|
{% block table_search %} |
|
|
{% block table_search %} |
|
|
|
|
|
|
|
|
{% endblock %} |
|
|
{% endblock %} |
|
|
|
|
|
|
|
|
{% endblock table_body %} |
|
|
{% endblock table_body %} |
|
|
</tbody> |
|
|
</tbody> |
|
|
</table> |
|
|
</table> |
|
|
|
|
|
|
|
|
{{ form_start(filters_form, {'attr' :{'id' : 'filters-form'}}) }} |
|
|
|
|
|
{% form_theme filters_form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} |
|
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="entity" value="{{ _entity_config.name }}"> |
|
|
|
|
|
<input type="hidden" name="menuIndex" value="{{ app.request.get('menuIndex') }}"> |
|
|
|
|
|
<input type="hidden" name="submenuIndex" value="{{ app.request.get('submenuIndex') }}"> |
|
|
|
|
|
<input type="hidden" name="sortField" value="{{ app.request.get('sortField', '') }}"> |
|
|
|
|
|
<input type="hidden" name="sortDirection" |
|
|
|
|
|
value="{{ app.request.get('sortDirection', 'DESC') }}"> |
|
|
|
|
|
<input type="hidden" name="action" value="{{ app.request.get('action') }}"> |
|
|
|
|
|
{{ form_end(filters_form) }} |
|
|
|
|
|
|
|
|
|
|
|
{% block delete_form %} |
|
|
|
|
|
{% set referer = paginator.currentPage == paginator.nbPages and 1 != paginator.currentPage and 1 == paginator.currentPageResults|length |
|
|
|
|
|
? path('easyadmin', app.request.query|merge({ page: app.request.query.get('page') - 1 })) |
|
|
|
|
|
: app.request.requestUri %} |
|
|
|
|
|
|
|
|
|
|
|
{{ include('@EasyAdmin/default/includes/_delete_form.html.twig', { |
|
|
|
|
|
view: 'list', |
|
|
|
|
|
referer: referer, |
|
|
|
|
|
delete_form: delete_form_template, |
|
|
|
|
|
_translation_domain: _entity_config.translation_domain, |
|
|
|
|
|
_trans_parameters: _trans_parameters, |
|
|
|
|
|
_entity_config: _entity_config, |
|
|
|
|
|
}, with_context = false) }} |
|
|
|
|
|
{% endblock delete_form %} |
|
|
|
|
|
{% endblock table %} |
|
|
{% endblock table %} |
|
|
|
|
|
|
|
|
|
|
|
{% block filters_form %} |
|
|
|
|
|
{% if filters_form is defined %} |
|
|
|
|
|
{{ form_start(filters_form, {'attr' :{'id' : 'filters-form'}}) }} |
|
|
|
|
|
{% form_theme filters_form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} |
|
|
|
|
|
|
|
|
|
|
|
<input type="hidden" name="entity" value="{{ _entity_config.name }}"> |
|
|
|
|
|
<input type="hidden" name="menuIndex" value="{{ app.request.get('menuIndex') }}"> |
|
|
|
|
|
<input type="hidden" name="submenuIndex" value="{{ app.request.get('submenuIndex') }}"> |
|
|
|
|
|
<input type="hidden" name="sortField" value="{{ app.request.get('sortField', '') }}"> |
|
|
|
|
|
<input type="hidden" name="sortDirection" |
|
|
|
|
|
value="{{ app.request.get('sortDirection', 'DESC') }}"> |
|
|
|
|
|
<input type="hidden" name="action" value="{{ app.request.get('action') }}"> |
|
|
|
|
|
{{ form_end(filters_form) }} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
{% endblock filters_form %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% block delete_form %} |
|
|
|
|
|
{% set referer = paginator.currentPage == paginator.nbPages and 1 != paginator.currentPage and 1 == paginator.currentPageResults|length |
|
|
|
|
|
? path('easyadmin', app.request.query|merge({ page: app.request.query.get('page') - 1 })) |
|
|
|
|
|
: app.request.requestUri %} |
|
|
|
|
|
|
|
|
|
|
|
{{ include('@EasyAdmin/default/includes/_delete_form.html.twig', { |
|
|
|
|
|
view: 'list', |
|
|
|
|
|
referer: referer, |
|
|
|
|
|
delete_form: delete_form_template, |
|
|
|
|
|
_translation_domain: _entity_config.translation_domain, |
|
|
|
|
|
_trans_parameters: _trans_parameters, |
|
|
|
|
|
_entity_config: _entity_config, |
|
|
|
|
|
}, with_context = false) }} |
|
|
|
|
|
{% endblock delete_form %} |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |