posts.html.twig 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
  2. {% import '@ChamiloTheme/Macros/box.html.twig' as display %}
  3. {% block content %}
  4. {% autoescape false %}
  5. {% if origin == 'learnpath' %}
  6. <div style="height:15px">&nbsp;</div>
  7. {% endif %}
  8. {% if forum_actions %}
  9. <div class="actions">
  10. {{ forum_actions }}
  11. </div>
  12. {% endif %}
  13. {% for post in posts %}
  14. {% set post_data %}
  15. <div class="row">
  16. <div class="col-md-2">
  17. {{ post.user_data }}
  18. </div>
  19. {% set highlight = '' %}
  20. {% if post.current %}
  21. {% set highlight = 'alert alert-danger' %}
  22. {% endif %}
  23. {% set highlight_revision = '' %}
  24. {% if post.is_a_revision %}
  25. {% set highlight_revision = 'forum_revision' %}
  26. {% endif %}
  27. <div class="col-md-10 {{ highlight }} ">
  28. {{ post.post_title }}
  29. {% if post.is_a_revision %}
  30. {{ 'ProposedRevision' | get_lang }} {{ post.flag_revision }}
  31. {% endif %}
  32. <div class="{{ highlight_revision }} ">
  33. {{ post.post_data }}
  34. </div>
  35. {{ post.post_attachments }}
  36. </div>
  37. </div>
  38. <div class="row">
  39. <div class="col-md-4"></div>
  40. <div class="col-md-8 text-right">
  41. {{ post.post_buttons }}
  42. </div>
  43. </div>
  44. {% endset %}
  45. <div class="col-md-offset-{{ post.indent_cnt }} forum-post">
  46. {{ display.panel('', post_data ) }}
  47. </div>
  48. {% endfor %}
  49. {% endautoescape %}
  50. {% endblock %}