default.html.twig 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {% if display_new_elements is not defined %}
  2. {% set display_new_elements = false %}
  3. {% endif %}
  4. {% if display_autoplay is not defined %}
  5. {% set display_autoplay = false %}
  6. {% endif %}
  7. {% if autoplay_context is not defined %}
  8. {% set autoplay_context = '' %}
  9. {% endif %}
  10. {% if elements_context is not defined %}
  11. {% set elements_context = '' %}
  12. {% endif %}
  13. {% if autoplay_shuffle is not defined %}
  14. {% set autoplay_shuffle = '' %}
  15. {% endif %}
  16. {% if tag_ids_json is not defined %}
  17. {% set tag_ids_json = '[]' %}
  18. {% endif %}
  19. {% if display_new_elements %}
  20. <div class="display_more_elements" style="display: none;">
  21. <span></span>
  22. </div>
  23. {% endif %}
  24. {% if not app.request.isXmlHttpRequest %}
  25. <div class="elements_loader_div">
  26. <img class="elements_new_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  27. </div>
  28. {% endif %}
  29. {% if elements|length %}
  30. {% if not app.request.isXmlHttpRequest %}<ul class="elements" data-autoplay_context="{{ autoplay_context }}" data-context="{{ elements_context }}">{% endif %}
  31. {% if autoplay_shuffle %}
  32. <li class="inline_actions">
  33. <a class="autoplay_favshow button simpleimg darkbutton"
  34. {% if autoplay_shuffle == 'elements_get_filter_data_autoplay_show' %}
  35. href="{{ path(autoplay_shuffle, {
  36. 'element_id' : -1,
  37. 'type' : 'show',
  38. 'show_type' : autoplay_shuffle_show_type,
  39. 'show_id' : viewed_user.id,
  40. 'data' : tag_ids_json
  41. }) }}"
  42. {% endif %}
  43. {% if autoplay_shuffle == 'elements_get_filter_data_autoplay_favorite' %}
  44. href="{{ path(autoplay_shuffle, {
  45. 'element_id' : -1,
  46. 'type' : 'favorite',
  47. 'show_type' : 'user',
  48. 'show_id' : viewed_user.id,
  49. 'data' : tag_ids_json
  50. }) }}"
  51. {% endif %}
  52. >
  53. <img src="{{ asset('/img/1372889556_random_shuffle.png') }}" alt="shuffle" />
  54. </a>
  55. </li>
  56. {% endif %}
  57. {% for element in elements %}
  58. {% include "MuzichCoreBundle:SearchElement:li.element.html.twig" %}
  59. {% endfor %}
  60. {% if not app.request.isXmlHttpRequest %}</ul>{% endif %}
  61. {% else %}
  62. <ul class="elements"></ul>
  63. <div class="no_elements">
  64. {% if noelements_filter is defined %}
  65. <p class="no-elements">
  66. {% autoescape false %}
  67. {{ 'noelements.sentence_filter'|trans({
  68. '%link_string%': 'noelements.sentence_filter_link_string'|trans({}, 'elements')
  69. }, 'elements') }}
  70. {% endautoescape %}
  71. </p>
  72. {% else %}
  73. <p class="no-elements">{{ 'noelements.sentence'|trans({}, 'elements') }}</p>
  74. {% endif %}
  75. </div>
  76. {% endif %}
  77. {% if not app.request.isXmlHttpRequest %}
  78. <div class="elements_loader_div">
  79. <img class="elements_more_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  80. </div>
  81. {% endif %}