vertical_activity.html.twig 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. {% for block in blocks %}
  2. <div class="{{ block.class ?: 'courseadminview-activity-3col' }}">
  3. {% if block.title %}
  4. <span class="viewcaption">{{ block.title }}</span>
  5. {% endif %}
  6. {% for item in block.content %}
  7. {% if loop.index0 == 0 %}
  8. <ul>
  9. {% endif %}
  10. <li class="course-tool">
  11. {{ item.extra }}
  12. {{ item.visibility }}
  13. {% set a_params = '' %}
  14. {% for foo, bar in item.url_params %}
  15. {% set a_params = a_params ~ [foo, bar]|join('="') ~ '" ' %}
  16. {% endfor %}
  17. <a {{ a_params }} >
  18. <img src="{{ item.tool.image|replace({'.gif': '.png'})|icon() }}" alt="{{ item.name }}"
  19. id="toolimage_{{ item.tool.iid }}">
  20. </a>
  21. {{ item.link }}
  22. </li>
  23. {% if block.content|length == loop.index %}
  24. </ul>
  25. {% endif %}
  26. {% endfor %}
  27. </div>
  28. {% endfor %}