posts.tpl 1.8 KB

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