restore mass import path

This commit is contained in:
Tykayn 2025-02-14 16:19:32 +01:00 committed by tykayn
parent 7ad6f2d823
commit 2d1e830895
4 changed files with 87 additions and 75 deletions

View file

@ -14,7 +14,7 @@ $(document).ready(function () {
' dessin A4 crayon;20€\n' +
' dessin A4 aquarelle;150€';
$('[data-toggle="popover"]').popover();
// $('[data-toggle="popover"]').popover();
$('#menu_button').on('click', function () {
$('#menu-dashboard').toggleClass('shown');
});

View file

@ -110,10 +110,21 @@ final class DefaultController extends AbstractController
$products = $this->getUser()->get_my_products();
return $this->json([
'products' => $products,
'user' => $this->getUser(),
'products' => $this->getUser()->getProducts(),
]);
}
#[Route('/logged/import', name: 'import')]
public function import(): Response
{
// prendre en compte l'ajout de nouveaux produits si on a une valeur dans le POST
return $this->render('logged/import.html.twig', []);
}
#[Route('/logged/mass_create', name: 'mass_create')]
public function mass_create(): Response
{
// prendre en compte l'ajout de nouveaux produits si on a une valeur dans le POST
return $this->render('logged/import.html.twig', []);
}
}

View file

@ -4,6 +4,7 @@
<div class="login-choices">
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
{# panel latéral détaillant les liens#}
<div class="row">
<div class="col-xs-12 col-sm-9">
<div id="menu-dashboard">
@ -25,91 +26,91 @@
</a>
</li>
<li>
{# <a class="btn {% if app.request.attributes.get('_route') == 'productcategory_index' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %} "#}
{# href="{{ path('productcategory_index') }}">#}
{# <i class="fa fa-file-archive-o"></i>#}
{# {% trans %}menu.categories{% endtrans %}#}
{# <span class="badge">#}
{# {{ app.user.categories|length }}#}
{# </span>#}
{# </a>#}
<a class="btn {% if app.request.attributes.get('_route') == 'productcategory_index' %}
btn-success
{% else %}
btn-default
{% endif %} "
href="{{ path('app_group_of_products_index') }}">
<i class="fa fa-file-archive-o"></i>
{% trans %}menu.categories{% endtrans %}
<span class="badge">
{{ app.user.groupOfProducts|length }}
</span>
</a>
</li>
<li>
{# <a class="btn {% if app.request.attributes.get('_route') == 'product_index' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %} "#}
{# href="{{ path('product_index') }}"#}
{# >#}
{# <i class="fa fa-gears"></i>#}
{# {% trans %}menu.products{% endtrans %}#}
{# <span class="badge">#}
{# {{ app.user.products|length }}#}
{# </span>#}
{# </a>#}
<a class="btn {% if app.request.attributes.get('_route') == 'product_index' %}
btn-success
{% else %}
btn-default
{% endif %} "
href="{{ path('app_product_index') }}"
>
<i class="fa fa-gears"></i>
{% trans %}menu.products{% endtrans %}
<span class="badge">
{{ app.user.products|length }}
</span>
</a>
</li>
<li>
{# <a id="menu_festivals"#}
{# class="btn {% if app.request.attributes.get('_route') == 'festival_index' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %}#}
{# " href='{{ path('festival_index') }}'#}
{# >#}
{# <i class="fa fa-th-large"></i>#}
<a id="menu_festivals"
class="btn {% if app.request.attributes.get('_route') == 'festival_index' %}
btn-success
{% else %}
btn-default
{% endif %}
" href='{{ path('app_festival_index') }}'
>
<i class="fa fa-th-large"></i>
{# {% trans %}menu.festivals{% endtrans %}#}
{# <span class="badge">#}
{# {{ app.user.festivals|length }}#}
{# </span>#}
{# </a>#}
{% trans %}menu.festivals{% endtrans %}
<span class="badge">
{{ app.user.festivals|length }}
</span>
</a>
</li>
<li>
{# <a id="menu_series"#}
{# class="btn {% if app.request.attributes.get('_route') == 'seriefestival_index' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %}#}
{# " href='{{ path('seriefestival_index') }}'#}
{# >#}
{# <i class="fa fa-th-large"></i>#}
<a id="menu_series"
class="btn {% if app.request.attributes.get('_route') == 'seriefestival_index' %}
btn-success
{% else %}
btn-default
{% endif %}
" href='{{ path('app_serie_festival_index') }}'
>
<i class="fa fa-th-large"></i>
{# {% trans %}menu.series{% endtrans %}#}
{# <span class="badge">#}
{# {{ app.user.seriesFestivals|length }}#}
{# </span>#}
{# </a>#}
{% trans %}menu.series{% endtrans %}
<span class="badge">
{{ app.user.seriesFestival|length }}
</span>
</a>
</li>
<li>
{# <a class="btn {% if app.request.attributes.get('_route') == 'history' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %}" href="{{ path('history') }}"#}
{# >#}
{# <i class="fa fa-clock-o"></i>#}
{# {% trans %}menu.history{% endtrans %}#}
{# </a>#}
<a class="btn {% if app.request.attributes.get('_route') == 'history' %}
btn-success
{% else %}
btn-default
{% endif %}" href="{{ path('history') }}"
>
<i class="fa fa-clock-o"></i>
{% trans %}menu.history{% endtrans %}
</a>
</li>
<li>
{# <a class="btn {% if app.request.attributes.get('_route') == 'import' %}#}
{# btn-success#}
{# {% else %}#}
{# btn-default#}
{# {% endif %}" href="{{ path('import') }}"#}
{# >#}
{# <i class="fa fa-arrow-circle-o-up"></i>#}
<a class="btn {% if app.request.attributes.get('_route') == 'import' %}
btn-success
{% else %}
btn-default
{% endif %}" href="{{ path('import') }}"
>
<i class="fa fa-arrow-circle-o-up"></i>
{# {% trans %}menu.import{% endtrans %}#}
{# </a>#}
{% trans %}menu.import{% endtrans %}
</a>
</li>
<li>

View file

@ -73,7 +73,7 @@
{% if festival.user|length %}
{% for u in festival.user %}
<span class="badge badge-info">{{ u.username }}</span>
<span class="badge badge-info">{{ u.name }}</span>
{% endfor %}
{% else %}
<div class="alert alert-info">