view.html.twig 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {% block rightpanel %}
  2. <label class="panel-right-icon" for="toggle-panel-right" tabindex="-1">{{ icon('chevron-left', 'icon icon-right') | raw }}</label>
  3. <a id="anchor-right-panel" class="anchor-hidden" tabindex="0" title="{{ 'Press tab followed by a space to access right panel' | trans }}"></a>
  4. <input type="checkbox" id="toggle-panel-right" tabindex="0" title="{{ 'Open right panel' | trans }}">
  5. <aside class="section-panel section-panel-right">
  6. <section class="panel-content accessibility-target">
  7. {% set prepend_right_panel = handle_event('PrependRightPanel', request) %}
  8. {% for widget in prepend_right_panel %}
  9. {{ widget | raw }}
  10. {% endfor %}
  11. {% set current_path = app.request.get('_route') %}
  12. {% set blocks = handle_event('AppendRightPostingBlock', request) %}
  13. {% if blocks['post_form'] is defined %}
  14. <section class="frame-section" title="{{ 'Create a new note.' | trans }}">
  15. <details class="section-details-title" open="open"
  16. title="{{ 'Expand if you want to access more options.' | trans }}">
  17. <summary class="details-summary-title">
  18. <h2>
  19. {% set current_path = app.request.get('_route') %}
  20. {% if current_path == 'conversation_reply_to' %}
  21. {{ "Reply to note" | trans }}
  22. {% else %}
  23. {{ "Create a note" | trans }}
  24. {% endif %}
  25. </h2>
  26. </summary>
  27. <section class="section-form">
  28. {{ form_start(blocks['post_form']) }}
  29. {{ form_errors(blocks['post_form']) }}
  30. {% if blocks['post_form'].in is defined %}
  31. {{ form_row(blocks['post_form'].in) }}
  32. {% endif %}
  33. {{ form_row(blocks['post_form'].visibility) }}
  34. {{ form_row(blocks['post_form'].content_type) }}
  35. {{ form_row(blocks['post_form'].content) }}
  36. {{ form_row(blocks['post_form'].attachments) }}
  37. <details class="section-details-subtitle">
  38. <summary class="details-summary-subtitle">
  39. <strong>
  40. {{ "Additional options" | trans }}
  41. </strong>
  42. </summary>
  43. <section class="section-form">
  44. {{ form_row(blocks['post_form'].language) }}
  45. {{ form_row(blocks['post_form'].tag_use_canonical) }}
  46. </section>
  47. </details>
  48. {{ form_rest(blocks['post_form']) }}
  49. {{ form_end(blocks['post_form']) }}
  50. </section>
  51. </details>
  52. </section>
  53. {% endif %}
  54. {% set extra_blocks = get_right_panel_blocks({'path': current_path, 'request': app.request, 'vars': (right_panel_vars | default)}) %}
  55. {% for block in extra_blocks %}
  56. {{ block | raw }}
  57. {% endfor %}
  58. </section>
  59. </aside>
  60. {% endblock rightpanel %}