You are here

opigno-learning-path-step-block-progress.html.twig in Opigno Learning path 3.x

{% macro status(state, icon, label, date) %}
<span class="icon_state icon_state_{{ state }}">
      <i class="fi fi-rr-{{ icon }}"></i>
      <span>{{ label }}<br>
      <span class="date">{{ date }}</span>
  </span>
</span>
{% endmacro %}
{% if passed == true and expired == true %}
  {{ _self.status('pending', 'hourglass-end', 'Expired'|t , 'Since @date'|t({ '@date': expired_date|date("m/d/Y")})) }}
{% elseif passed == true and has_experation_date == true %}
  {{ _self.status('passed', 'check', 'Passed'|t , 'Valid untill @date'|t({ '@date': expired_date|date("m/d/Y")})) }}
{% elseif passed == true and has_experation_date != true %}
  {{ _self.status('passed', 'check', 'Passed'|t , 'Complited on @date'|t({ '@date': complite_date|date("m/d/Y")})) }}
{% elseif passed != true %}
  {{ _self.status('pending', 'rotate-right', 'Pending'|t , 'Started on @date'|t({ '@date': started_date|date("m/d/Y")})) }}
{% endif %}

File

templates/opigno-learning-path-step-block-progress.html.twig
View source
  1. {% macro status(state, icon, label, date) %}
  2. <span class="icon_state icon_state_{{ state }}">
  3. <i class="fi fi-rr-{{ icon }}"></i>
  4. <span>{{ label }}<br>
  5. <span class="date">{{ date }}</span>
  6. </span>
  7. </span>
  8. {% endmacro %}
  9. {% if passed == true and expired == true %}
  10. {{ _self.status('pending', 'hourglass-end', 'Expired'|t , 'Since @date'|t({ '@date': expired_date|date("m/d/Y")})) }}
  11. {% elseif passed == true and has_experation_date == true %}
  12. {{ _self.status('passed', 'check', 'Passed'|t , 'Valid untill @date'|t({ '@date': expired_date|date("m/d/Y")})) }}
  13. {% elseif passed == true and has_experation_date != true %}
  14. {{ _self.status('passed', 'check', 'Passed'|t , 'Complited on @date'|t({ '@date': complite_date|date("m/d/Y")})) }}
  15. {% elseif passed != true %}
  16. {{ _self.status('pending', 'rotate-right', 'Pending'|t , 'Started on @date'|t({ '@date': started_date|date("m/d/Y")})) }}
  17. {% endif %}