templates/FO/FO/fil_ariane.html.twig line 1

Open in your IDE?
  1. <div style="width:100%;box-sising:border-box;" id="conteneur_fil_ariane">
  2.     <ol class="breadcrumb" style="margin-bottom:0px;font-size:0.9em;padding-left:30px;border-radius:0px;padding-left:15px;">
  3.         <li style="padding-left:16px;"><a href="{{ path ("dtcfo_homepage") }}" title="Accueil"><i style="font-size:1em;margin-top:3px;position:absolute;margin-left:-20px;" class="fa fa-home  fa-fw"></i> Accueil</a></li>
  4.         {% if tableau == 'DTCArticlesBundle:Article' %}
  5.             <li><a href="{{ path ("dtc_article_liste") }}" title="Produits">{% trans %}Produits{% endtrans %}</a></li>
  6.         {% endif %}
  7.         {% if type == 'liste' %}
  8.             <li class="active">{% trans %}Liste{% endtrans %}</li>
  9.         {% else %}
  10.             {% if tableau == 'DTCArticlesBundle:Article' and  type != "liste" %}
  11.                 {% set cat_dernier_niveau =  dtc_article.getCategorieDernierNiveau(objet) %}
  12.                 {% set breadcrumb = [] %}
  13.                 {% if cat_dernier_niveau.id is defined %}
  14.                     {% set current = cat_dernier_niveau %}
  15.                     {% for i in 0..9 %}
  16.                         {% if current is not null %}
  17.                             {% set breadcrumb = breadcrumb|merge([current]) %}
  18.                             {% set current = current.categorieParent %}
  19.                         {% else %}
  20.                             {% set current = null %} {# stoppe la boucle naturellement #}
  21.                         {% endif %}
  22.                     {% endfor %}
  23.                     {% set breadcrumb = breadcrumb|reverse %}
  24.                 {% endif %}
  25.                 {% set cat_niveau_un = NULL %}
  26.                 {% set cat_niveau_deux = NULL %}
  27.                 {% for cat in breadcrumb %}
  28.                     {% if cat.libelle != "Racine" %}
  29.                     <li class="active">
  30.                         {% set url_cat = "" %}
  31.                         {% if loop.index == 2 %}
  32.                             {% set url_cat =  path("dtc_article_liste" , { 'c_l': cat.libelle,'c':cat.id })  %}
  33.                             {% set cat_niveau_un = cat %}
  34.                         {% elseif loop.index == 3 %}
  35.                             {% set url_cat =  path("dtc_article_liste" , { 'c_l': cat_niveau_un.libelle,'c':cat_niveau_un.id,'cn2_l': cat.libelle,'cn2':cat.id })  %}
  36.                             {% set cat_niveau_deux = cat %}
  37.                         {% elseif loop.index == 4 %}
  38.                             {% set url_cat =  path("dtc_article_liste" , { 'c_l': cat_niveau_un.libelle,'c':cat_niveau_un.id,'cn2_l': cat_niveau_deux.libelle,'cn2':cat_niveau_deux.id,'cn3_l': cat.libelle,'cn3':cat.id })  %}
  39.                         {% endif %}
  40.                         {% if url_cat != "" %}
  41.                             <a href="{{ url_cat }}"> {{ cat.libelle }}</a>
  42.                         {% else %}
  43.                             {{ cat.libelle }}
  44.                         {% endif %}
  45.                     </li>
  46.                     {% endif %}
  47.                 {% endfor %}
  48.             {% endif %}
  49.             <li class="active">{{ type|raw }}</li>
  50.         {% endif %}
  51.     </ol>
  52. </div>
  53. <style>
  54.        .pagination {
  55.            display: inline-block;
  56.            padding-left: 0;
  57.            margin: @line-height-computed 0;
  58.            border-radius: @border-radius-base;
  59.            > li {
  60.                display: inline; // Remove list-style and block-level defaults
  61.            > a,
  62.            > span {
  63.                position: relative;
  64.                float: left; // Collapse white-space
  65.            padding: @padding-base-vertical @padding-base-horizontal;
  66.                line-height: @line-height-base;
  67.                text-decoration: none;
  68.                color: @pagination-color;
  69.                background-color: @pagination-bg;
  70.                border: 1px solid @pagination-border;
  71.                margin-left: -1px;
  72.            }
  73.                &:first-child {
  74.                    > a,
  75.                    > span {
  76.                        margin-left: 0;
  77.                        .border-left-radius(@border-radius-base);
  78.                    }
  79.                }
  80.                &:last-child {
  81.                    > a,
  82.                    > span {
  83.                        .border-right-radius(@border-radius-base);
  84.                    }
  85.                }
  86.            }
  87.            > li > a,
  88.            > li > span {
  89.                &:hover,
  90.                &:focus {
  91.                    color: @pagination-hover-color;
  92.                    background-color: @pagination-hover-bg;
  93.                    border-color: @pagination-hover-border;
  94.                }
  95.            }
  96.            > .active > a,
  97.            > .active > span {
  98.                &,
  99.                &:hover,
  100.                &:focus {
  101.                    z-index: 2;
  102.                    color: @pagination-active-color;
  103.                    background-color: @pagination-active-bg;
  104.                    border-color: @pagination-active-border;
  105.                    cursor: default;
  106.                }
  107.            }
  108.            > .disabled {
  109.                > span,
  110.                > span:hover,
  111.                > span:focus,
  112.                > a,
  113.                > a:hover,
  114.                > a:focus {
  115.                    color: @pagination-disabled-color;
  116.                    background-color: @pagination-disabled-bg;
  117.                    border-color: @pagination-disabled-border;
  118.                    cursor: @cursor-disabled;
  119.                }
  120.            }
  121.        }
  122.        .pagination-lg {
  123.            .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
  124.        }
  125.        .pagination-sm {
  126.            .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
  127.        }
  128.        .breadcrumb > li + li::before {
  129.            padding: 0 5px;
  130.            color: #ccc;
  131.            content: "/\00a0";
  132.        }
  133.        #conteneur_fil_ariane {
  134.            width: 100%;
  135.            overflow: hidden;
  136.        }
  137.        #conteneur_fil_ariane .breadcrumb {
  138.            white-space: nowrap;
  139.            overflow: hidden;
  140.            text-overflow: ellipsis;  /* Affiche les "..." */
  141.            display: block;           /* Assure que l'ellipsis fonctionne */
  142.        }
  143.        #conteneur_fil_ariane .breadcrumb li {
  144.            display: inline;          /* Garde tout sur la même ligne */
  145.        }
  146. </style>