view.html.twig 5.1 KB

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