templates/_partials/menu/client.html.twig line 1

Open in your IDE?
  1. <li class="menu-title"><span data-key="t-menu">KLIENT</span></li>
  2. {% include '_partials/menu/item.html.twig' with {
  3.     "label": "Strona główna",
  4.     "icon": 'ri-home-line',
  5.     "path_name": "dashboard"
  6. } %}
  7. {% set isAllegroProject = false %}
  8. {% set isFbProject = false %}
  9. {% set isGoogleProject = false %}
  10. {% set isSeoProject = false %}
  11. {% for project in app.user.clientProjects %}
  12.     {% if project.category == constant('App\\Entity\\Project::CATEGORY_ALLEGRO') %}
  13.         {% set isAllegroProject = true %}
  14.     {% endif %}
  15.     {% if project.category == constant('App\\Entity\\Project::CATEGORY_FB_ADS') %}
  16.         {% set isFbProject = true %}
  17.     {% endif %}
  18.     {% if project.category == constant('App\\Entity\\Project::CATEGORY_GOOGLE_ADS') %}
  19.         {% set isGoogleProject = true %}
  20.     {% endif %}
  21.     {% if project.category == constant('App\\Entity\\Project::CATEGORY_SEO') %}
  22.         {% set isSeoProject = true %}
  23.     {% endif %}
  24. {% endfor %}
  25. {% if isAllegroProject %}
  26.     {% include '_partials/menu/item.html.twig' with {
  27.         "label": "Raporty ADS",
  28.         "icon": 'ri-bar-chart-2-line',
  29.         "path_name": "allegro_ads_chart"
  30.     } %}
  31. {% endif %}
  32. {% if isFbProject or isGoogleProject %}
  33.     {% include '_partials/menu/item.html.twig' with {
  34.         "label": "Raporty ADS Social Media",
  35.         "icon": 'ri-bar-chart-2-line',
  36.         "path_name": "ads_social_media"
  37.     } %}
  38. {% endif %}
  39. {% if isSeoProject %}
  40.     {% include '_partials/menu/item.html.twig' with {
  41.         "label": "Raporty SEO",
  42.         "icon": 'ri-bar-chart-2-line',
  43.         "path_name": "ads_seo"
  44.     } %}
  45. {% endif %}
  46. {% include '_partials/menu/item.html.twig' with {
  47.     "label": "Timeline",
  48.     "icon": 'ri-file-list-line',
  49.     "path_name": "task_index"
  50. } %}
  51. {% include '_partials/menu/item.html.twig' with {
  52.     "label": "Kontakt",
  53.     "icon": 'ri-pause-circle-line',
  54.     "path_name": "user_contacts"
  55. } %}
  56. {% include '_partials/menu/item.html.twig' with {
  57.     "label": "Materiały szkoleniowe",
  58.     "icon": 'ri-attachment-line',
  59.     "path_name": "training_material_index"
  60. } %}
  61. {% include '_partials/menu/item.html.twig' with {
  62.     "label": "Edytuj konto",
  63.     "icon": 'ri-edit-box-line',
  64.     "path_name": "user_edit",
  65.     'path_options': {id: app.user.id},
  66. } %}