You are here

opigno-lp-step-module-activity.html.twig in Opigno Learning path 3.x

{#
/**
 * #state -
 * #current -
 * title -
 */
#}

{% set state = elements['#state'] ?? 'pending' %}
{% set current = elements['#current'] == true ? 'current' : '' %}

<div {{ attributes.addClass('opigno-lp-step-module-activity', state, current) }}>
  {{ elements['#current'] == true ? '<i class="fi fi-rr-caret-right"></i>' : '' }}
  {% if elements['#link'] %}
    <a href="{{ elements['#link'] }}">{{ elements.title }}</a>
  {% else %}
    {{ elements.title }}
  {% endif %}
</div>

File

templates/opigno-lp-step-module-activity.html.twig
View source
  1. {#
  2. /**
  3. * #state -
  4. * #current -
  5. * title -
  6. */
  7. #}
  8. {% set state = elements['#state'] ?? 'pending' %}
  9. {% set current = elements['#current'] == true ? 'current' : '' %}
  10. <div {{ attributes.addClass('opigno-lp-step-module-activity', state, current) }}>
  11. {{ elements['#current'] == true ? '<i class="fi fi-rr-caret-right"></i>' : '' }}
  12. {% if elements['#link'] %}
  13. <a href="{{ elements['#link'] }}">{{ elements.title }}</a>
  14. {% else %}
  15. {{ elements.title }}
  16. {% endif %}
  17. </div>