view.html.twig 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {% extends 'collection/notes.html.twig' %}
  2. {% block body %}
  3. {% if error is defined %}
  4. <label class="alert alert-danger">
  5. {{ error.getMessage() }}
  6. </label>
  7. {% endif %}
  8. <section class="frame-section frame-section-padding">
  9. <h2>{% trans %}Search{% endtrans %}</h2>
  10. {{ form_start(search_form) }}
  11. <section class="frame-section section-form">
  12. {{ form_errors(search_form) }}
  13. {{ form_row(search_form.search_query) }}
  14. {% if actor is not null %}
  15. <details class="section-details-subtitle">
  16. <summary class="details-summary-subtitle">
  17. <strong>{% trans %}Other options{% endtrans %}</strong>
  18. </summary>
  19. <div class="section-form">
  20. <details class="section-details-subtitle">
  21. <summary class="details-summary-subtitle">
  22. <strong>
  23. {% trans %}Save query as a feed{% endtrans %}
  24. </strong>
  25. </summary>
  26. <div class="section-form">
  27. {{ form_row(search_form.title) }}
  28. {{ form_row(search_form.subscribe_to_search) }}
  29. </div>
  30. <hr>
  31. </details>
  32. </div>
  33. </details>
  34. {% endif %}
  35. {{ form_row(search_form.submit_search) }}
  36. </section>
  37. {{ form_end(search_form)}}
  38. <section class="frame-section">
  39. <details class="section-details-subtitle">
  40. <summary class="details-summary-subtitle">
  41. <strong>{% trans %}Build a search query{% endtrans %}</strong>
  42. </summary>
  43. {{ form_start(search_builder_form) }}
  44. <div class="section-form">
  45. {# actor options, display if first checked, with checkbox trick #}
  46. <details class="section-details-subtitle">
  47. <summary class="details-summary-subtitle">
  48. <strong>{% trans %}People search options{% endtrans %}</strong>
  49. </summary>
  50. <div class="section-form">
  51. {{ form_row(search_builder_form.include_actors) }}
  52. {{ form_row(search_builder_form.include_actors_people) }}
  53. {{ form_row(search_builder_form.include_actors_groups) }}
  54. {{ form_row(search_builder_form.include_actors_lists) }}
  55. {{ form_row(search_builder_form.include_actors_businesses) }}
  56. {{ form_row(search_builder_form.include_actors_organizations) }}
  57. {{ form_row(search_builder_form.include_actors_bots) }}
  58. {{ form_row(search_builder_form.actor_langs) }}
  59. {{ form_row(search_builder_form.actor_tags) }}
  60. </div>
  61. <hr>
  62. </details>
  63. <details class="section-details-subtitle">
  64. <summary class="details-summary-subtitle">
  65. <strong>{% trans %}Note search options{% endtrans %}</strong>
  66. </summary>
  67. <div class="section-form">
  68. {{ form_row(search_builder_form.include_notes) }}
  69. {{ form_row(search_builder_form.include_notes_text) }}
  70. {{ form_row(search_builder_form.include_notes_media) }}
  71. {{ form_row(search_builder_form.include_notes_polls) }}
  72. {{ form_row(search_builder_form.include_notes_bookmarks) }}
  73. {{ form_row(search_builder_form.note_langs) }}
  74. {{ form_row(search_builder_form.note_tags) }}
  75. {{ form_row(search_builder_form.note_actor_langs) }}
  76. {{ form_row(search_builder_form.note_actor_tags) }}
  77. </div>
  78. <hr>
  79. </details>
  80. </div>
  81. {{ form_end(search_builder_form) }}
  82. </details>
  83. </section>
  84. </section>
  85. <section class="frame-section frame-section-padding">
  86. <h2>{% trans %}Results{% endtrans %}</h2>
  87. <div class="frame-section frame-section-padding feed-empty">
  88. {% if notes is defined and notes is not empty %}
  89. {{ parent() }}
  90. {% else %}
  91. <h3>{% trans %}No notes found{% endtrans %}</h3>
  92. <em>{% trans %}No notes were found for the specified query...{% endtrans %}</em>
  93. {% endif %}
  94. </div>
  95. <div class="frame-section frame-section-padding feed-empty">
  96. <h3>{% trans %}Actors found{% endtrans %}</h3>
  97. {% if actors is defined and actors is not empty %}
  98. {% for actor in actors %}
  99. {% include 'cards/profile/view.html.twig' with {'actor': actor} %}
  100. {% endfor %}
  101. {% else %}
  102. <em>{% trans %}No Actors were found for the specified query...{% endtrans %}</em>
  103. {% endif %}
  104. </div>
  105. </section>
  106. {{ "Page: " ~ page }}
  107. {% endblock body %}