ui2022/schoolnow/feed__item__meta.html.twig line 1

Open in your IDE?
  1. {% set pinned = _args.pinned|default(null) %}
  2. {% set color = _args.color|default('dblue') %}
  3. {% set department = _args.department|default(null) %}
  4. {% set subdepartment = _args.subdepartment|default(null) %}
  5. {% set timestamp = _args.timestamp|default(null) %}
  6. {% set actions = _args.actions|default([]) %}
  7. {% set scheduledAt = _args.scheduledAt|default(null) %}
  8. <div class="feedbox__meta">
  9.     <span class="status status--{{ color }}"></span>
  10.     <span class="feedbox__meta--name">
  11.         {% if department %}
  12.             <a class="feedbox__meta--link" href="#">
  13.                 {{ department }}
  14.                 {% if subdepartment %}
  15.                     <span>({{ subdepartment }})</span>
  16.                 {% endif %}
  17.             </a>
  18.         {% endif %}
  19.         {% if draft %}
  20.             <span class="font-12 ml-2">
  21.                  {% if scheduledAt %}
  22.                      <span class="feedstatus text-bold mr-1">Scheduled -</span>
  23.                      <span class="status-time text-scheduled text-medium">{{ scheduledAt }}</span>
  24.                  {% else%}
  25.                      <span class="feedstatus text-bold mr-1">Unpublished</span>
  26.                      {% if timestamp %}
  27.                          <span class="status-time text-slate text-medium">{{ timestamp }}</span>
  28.                      {% endif %}
  29.                  {% endif %}
  30.             </span>
  31.         {% else %}
  32.             {% if timestamp %}
  33.                 <span class="feedbox__meta--time">{{ timestamp }}</span>
  34.             {% endif %}
  35.         {% endif %}
  36.     </span>
  37.     {% if actions %}
  38.         <span class="options">
  39.             {% if pinned is not empty %}
  40.                 <span class="feedbox__pinned{% if pinned.active|default(false) %} pinned{% endif %}">
  41.                     <i class="{{ pinned.icon|default('icon-pin') }}"></i>
  42.                     {{ pinned.text|default('Pinned') -}}
  43.                 </span>
  44.             {% endif %}
  45.             <a class="options-toggle" href="#">
  46.                 <i class="icon-moredots"></i>
  47.             </a>
  48.             <div class="options-drawer">
  49.                 {% for action in actions %}
  50.                     {% if action.toggler is defined %}
  51.                         <label class="options-pin">
  52.                             <input
  53.                                 type="checkbox"
  54.                                 class="sr-only"
  55.                                 {% if action.toggled %}checked{% endif %}
  56.                                 data-trigger="toggler"
  57.                                 data-toggler-url="{{ action.toggler }}"
  58.                             />
  59.                             <i class="{{ action.icon }} btn btn-gray"></i>
  60.                         </label>
  61.                     {% elseif action.items is defined %}
  62.                         <span class="dropdown">
  63.                             <a class="dropdown-toggle dropdown-toggle--noicon btn btn-gray" data-toggle="dropdown" href="#">
  64.                                 {{ action.title }}
  65.                                 <i class="icon-angledown"></i>
  66.                             </a>
  67.                             <span class="dropdown-menu dropdown-menu-right">
  68.                                 {% for item in action.items %}
  69.                                     <a
  70.                                         class="dropdown-item"
  71.                                         href="{{ item.link|default('#') }}"
  72.                                         {% if item.modal|default(null) %}data-toggle="modal" data-target="#{{ item.modal }}"{% endif %}
  73.                                         {% if item.sidepanel|default(null) %}data-toggle="sidepanel" data-target="#{{ item.sidepanel }}"{% endif %}
  74.                                     >{{ item.title }}</a>
  75.                                 {% endfor %}
  76.                             </span>
  77.                         </span>
  78.                     {% else %}
  79.                         <a
  80.                             class="btn btn-gray"
  81.                             href="{{ action.link|default('#') }}"
  82.                             {% if action.modal|default(null) %}data-toggle="modal" data-target="#{{ action.modal }}"{% endif %}
  83.                             {% if action.sidepanel|default(null) %}data-toggle="sidepanel" data-target="#{{ action.sidepanel }}"{% endif %}
  84.                         >{{ action.title }}</a>
  85.                     {% endif %}
  86.                 {% endfor %}
  87.             </div>
  88.         </span>
  89.     {% endif %}
  90. </div>