notes.html.twig 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {% extends 'stdgrid.html.twig' %}
  2. {% import '/cards/note/view.html.twig' as noteView %}
  3. {% block title %}{% if page_title is defined %}{{ page_title | trans }}{% endif %}{% endblock %}
  4. {% block stylesheets %}
  5. {{ parent() }}
  6. <link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
  7. {% endblock stylesheets %}
  8. {% block body %}
  9. {% for block in handle_event('BeforeFeed', app.request) %}
  10. {{ block | raw }}
  11. {% endfor %}
  12. {% if notes is defined %}
  13. <header class="feed-header">
  14. {% if page_title is defined %}
  15. <h1 class="heading-no-margin">{{ page_title | trans }}</h1>
  16. {% else %}
  17. <h3 class="heading-no-margin">{{ 'Notes' | trans }}</h3>
  18. {% endif %}
  19. <nav class="feed-actions">
  20. <details class="feed-actions-details">
  21. <summary>
  22. {{ icon('filter', 'icon icon-feed-actions') | raw }} {# button-container #}
  23. </summary>
  24. <div class="feed-actions-details-dropdown">
  25. <menu>
  26. {% for block in handle_event('AddFeedActions', app.request, notes is defined and notes is not empty) %}
  27. {{ block | raw }}
  28. {% endfor %}
  29. </menu>
  30. </div>
  31. </details>
  32. </nav>
  33. </header>
  34. {% if notes is not empty %}
  35. {# Backwards compatibility with hAtom 0.1 #}
  36. <section class="feed h-feed hfeed notes" tabindex="0" role="feed">
  37. {% for conversation in notes %}
  38. {% block current_note %}
  39. {% if conversation is instanceof('array') %}
  40. {{ noteView.macro_note(conversation['note'], conversation['replies']) }}
  41. {% else %}
  42. {{ noteView.macro_note(conversation) }}
  43. {% endif %}
  44. <hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
  45. {% endblock current_note %}
  46. {% endfor %}
  47. </section>
  48. {% endif %}
  49. {% endif %}
  50. {% endblock body %}