templates/Page/menugroupe.html.twig line 1

Open in your IDE?
  1.         {% if not inmenu %}        
  2.             <ul class="list-group" id="listgrouppage">
  3.                 {% for groupshared in groupsshared %}
  4.                     {% for page in groupshared.pagesshared %} 
  5.                         {% set forcereload=true %}
  6.                         {% if page.pagecategory.id==1 %}
  7.                             {% set forcereload=page.toreload %}
  8.                         {% endif %}            
  9.                         {% set isactive="" %}
  10.                         {% if entity.id is defined and page.id==entity.id %}
  11.                             {% set isactive="active" %}
  12.                         {% endif %}
  13.                         
  14.                         <li id="menupage-{{page.id}}" {{ isactive }} class="list-group-item {{isactive}}" onClick="$('#listgrouppage li').removeClass('active'); $(this).addClass('active') " style="cursor:pointer">
  15.                             <a data-group="{{groupshared.id}}" onClick="$('#selgrouppages').modal('hide'); showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
  16.                                 {% if page.fonticon %}
  17.                                     <i class="{{ page.fonticon }} fa-faw"></i>
  18.                                 {% else %}
  19.                                     <i class="fa fa-users fa-fw"></i>
  20.                                 {% endif %}
  21.                                 {{ page.name }}
  22.                                 {% if loop.first and page.counterread > 0 %}
  23.                                     <span id="badge-{{groupshared.id}}" class="badge bg-secondary ms-1">{{page.counterread}}</span>
  24.                                 {% endif %}
  25.                             </a>
  26.                         
  27.                         {% if loop.first and groupshared.pagesshared|length > 1 %}
  28.                             <ul class="list-group" style="margin-top:15px">
  29.                         {% endif %}
  30.                         {% if groupshared.pagesshared|length > 1 and loop.last %}
  31.                             </ul>
  32.                         {% endif %}
  33.                         {% if loop.last %}
  34.                             </li>
  35.                         {% endif %}
  36.                     {% endfor %}
  37.                 {% endfor %}
  38.             </ul>
  39.         {% else %}
  40.             {% for groupshared in groupsshared %}
  41.                 {% if groupshared.pagesshared|length == 1 %}
  42.                     {% set page = groupshared.pagesshared[0] %}
  43.                     {% set forcereload=true %}
  44.                     {% if page.pagecategory.id==1 %}
  45.                         {% set forcereload=page.toreload %}
  46.                     {% endif %}            
  47.                     {% set isactive="" %}
  48.                     {% if entity.id is defined and page.id==entity.id %}
  49.                         {% set isactive="active" %}
  50.                     {% endif %}
  51.                     <div id="menupage-{{page.id}}" class="nav-link {{ isactive }}"  style="cursor:pointer">
  52.                         <a data-group="{{groupshared.id}}" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
  53.                             {% if page.fonticon %}
  54.                                 <i class="{{ page.fonticon }} fa-faw"></i>
  55.                             {% else %}
  56.                                 <i class="fa fa-users fa-fw"></i>
  57.                             {% endif %}
  58.                             {{ groupshared.label }}
  59.                             {% if page.counterread > 0 %}
  60.                                 <span id="badge-{{groupshared.id}}" class="badge bg-secondary ms-1">{{page.counterread}}</span>
  61.                             {% endif %}
  62.                         </a>
  63.                     </div>
  64.                 {% else %}
  65.                     <div id="pagesshared" class="">
  66.                         <li class="dropdown nav-link">
  67.                             <a data-group="{{groupshared.id}}" href="#" class="dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
  68.                                 <i class="fa fa-users fa-fw"></i>
  69.                                 {{ groupshared.label }}
  70.                                 <span class="caret"></span>
  71.                                 {% if groupshared.pagesshared[0].counterread > 0 %}
  72.                                     <span id="badge-{{groupshared.id}}" class="badge bg-secondary ms-1">{{groupshared.pagesshared[0].counterread}}</span>
  73.                                 {% endif %}
  74.                             </a>
  75.                             <ul class="dropdown-menu">
  76.                                 {% for page in groupshared.pagesshared %} 
  77.                                     {% set forcereload=true %}
  78.                                     {% if page.pagecategory.id==1 %}
  79.                                         {% set forcereload=page.toreload %}
  80.                                     {% endif %}
  81.                                     {% set isactive="" %}
  82.                                     {% if entity.id is defined and page.id==entity.id %}
  83.                                         {% set isactive="active" %}
  84.                                     {% endif %}
  85.                                     <li id="menupage-{{page.id}}" class="{{isactive}}" style="cursor:pointer">
  86.                                         <a onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
  87.                                             {% if page.fonticon %}
  88.                                                 <i class="{{ page.fonticon }} fa-faw"></i>
  89.                                             {% endif %}
  90.                                             {{ page.name }}
  91.                                         </a>
  92.                                     </li>
  93.                                 {% endfor %}
  94.                             </ul>
  95.                         </li>
  96.                     </div>
  97.                 {% endif %}
  98.             {% endfor %}
  99.         {% endif %}