default.html.twig 749 B

1234567891011121314151617181920212223242526
  1. {%- set object_context = object ?? {} -%}
  2. {%- set object_layout = object_context.layout ?? ('list-' ~ layout) -%}
  3. <div id="flex-objects">
  4. <div class="text-center">
  5. <input class="form-input search" type="text" placeholder="Search by name, email, etc" />
  6. <button class="button button-primary sort asc" data-sort="name">
  7. Sort by Name
  8. </button>
  9. </div>
  10. <ul class="list">
  11. {% for object in collection.filterBy({ published: true }) %}
  12. <li>
  13. {% render object layout: object_layout with object_context %}
  14. </li>
  15. {% endfor %}
  16. </ul>
  17. </div>
  18. <script>
  19. var options = {
  20. valueNames: [ 'name', 'email', 'website', 'entry-extra' ]
  21. };
  22. var flexList = new List('flex-objects', options);
  23. </script>