vendor/kevinpapst/adminlte-bundle/Resources/views/Navbar/tasks.html.twig line 1

Open in your IDE?
  1. {% if tasks is not defined or adminlte_direct_include is defined %}
  2.     {% set tasks = null %}
  3.     {% set adminlte_tasks = adminlte_tasks() %}
  4.     {% if adminlte_tasks is not null %}
  5.         {% set tasks = adminlte_tasks.tasks %}
  6.         {% set total = adminlte_tasks.total %}
  7.     {% endif %}
  8. {% endif %}
  9. {% if tasks is defined and tasks is not null %}
  10. <li class="dropdown tasks-menu">
  11.     <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  12.         <i class="far fa-flag"></i>
  13.         <span class="label label-danger">{{ total }}</span>
  14.     </a>
  15.     <ul class="dropdown-menu">
  16.         <li class="header">{{ 'You have %count% tasks' |trans({'%count%': total}, 'AdminLTEBundle') }}</li>
  17.         <li>
  18.             <ul class="menu">
  19.                 {% for task in tasks %}
  20.                     <li>
  21.                         <a href="{{ path('adminlte_task'|route_alias, {'id': task.identifier}) }}">
  22.                             <h3>
  23.                                 {{ task.title }}
  24.                                 <small class="pull-right">{{ task.progress }}%</small>
  25.                             </h3>
  26.                             <div class="progress xs">
  27.                                 <div class="progress-bar progress-bar-{{ task.color }}"
  28.                                      style="width: {{ task.progress }}%"
  29.                                      role="progressbar"
  30.                                      aria-valuenow="{{ task.progress }}"
  31.                                      aria-valuemin="0"
  32.                                      aria-valuemax="100">
  33.                                     <span class="sr-only">{{ '%progress%% Complete'|trans({'%progress%':task.progress}, 'AdminLTEBundle') }}</span>
  34.                                 </div>
  35.                             </div>
  36.                         </a>
  37.                     </li>
  38.                 {%  endfor  %}
  39.             </ul>
  40.         <li class="footer">
  41.             <a href="{{ path('adminlte_tasks'|route_alias) }}">{{'View all'|trans({}, 'AdminLTEBundle')}}</a>
  42.         </li>
  43.     </ul>
  44. </li>
  45. {% endif %}