showGroup.html.twig 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {% extends "MuzichHomeBundle::layout.html.twig" %}
  2. {% block title %}{{ group.name }}{% endblock %}
  3. {% block mainbox_classes %}mainbox_nopadding{% endblock %}
  4. {% block content %}
  5. <div class="top_tools">
  6. {% if his_group or group.open %}
  7. <a href="#" id="element_add_link" class="button gradient justtopright">
  8. {{ 'home.add_element'|trans({}, 'navigationui') }}
  9. <img src="{{ asset('/img/icon_dart_right_white.png') }}" alt="" />
  10. </a>
  11. <a href="#" id="element_add_close_link" class="button gradient justtopright" style="display: none;">
  12. {{ 'home.add_element_box.close'|trans({}, 'navigationui') }}
  13. <img src="{{ asset('/img/icon_dart_left_white.png') }}" alt="" />
  14. </a>
  15. {% endif %}
  16. <div class="show_options">
  17. {% if his_group %}
  18. <a class="button darkbutton" href="{{ path('group_edit', { 'slug': group.slug }) }}" >
  19. {{ 'group.edit'|trans({}, 'groups') }}
  20. </a>
  21. {% endif %}
  22. <a href="{{ path('follow', { 'type': 'group', 'id': group.id, 'token': user.personalHash }) }}"
  23. class="follow_link button darkbutton {% if following %}following{% else %}notfollowing{% endif %}">
  24. {% if following %}
  25. {{ 'group.following'|trans({}, 'groups') }}
  26. {% else %}
  27. {{ 'group.follow'|trans({}, 'groups') }}
  28. {% endif %}
  29. </a>
  30. </div>
  31. <h1>{{ group.name }}</h1>
  32. {% if his_group or group.open %}
  33. <div id="element_add_box" style="display: none;">
  34. <input type="hidden" id="add_element_group_page" value="{{ group.slug }}" />
  35. <form novalidate name="{{ add_form_name }}" action="{{ path('element_add', {'group_slug' : group.slug}) }}" method="post" {{ form_enctype(add_form) }}>
  36. {% include "MuzichCoreBundle:Element:form.add.html.twig" with { 'form': add_form, 'form_name': add_form_name } %}
  37. </form>
  38. </div>
  39. {% endif %}
  40. <p class="show_info">
  41. {% if count_owned != 0 %}
  42. {{ 'show.user.elements.count'|trans({
  43. '%count_owned%' : count_owned,
  44. '%count_favorited%': count_favorited,
  45. '%count_favorited_users%': count_favorited_users
  46. }, 'elements') }}
  47. {% else %}
  48. {{ 'show.user.elements.no_count'|trans({}, 'elements') }}
  49. {% endif %}
  50. <br />
  51. {% if count_followers > 1 %}
  52. {{ 'show.user.followers.x_count'|trans({'%count%':count_followers, '%name%':group.name }, 'elements') }}
  53. {% elseif count_followers == 0 %}
  54. {{ 'show.user.followers.zero_count'|trans({'%name%':group.name }, 'elements') }}
  55. {% else %}
  56. {{ 'show.user.followers.one_count'|trans({'%count%':count_followers, '%name%':group.name }, 'elements') }}
  57. {% endif %}
  58. </p>
  59. <p class="group_description">
  60. {{ group.description }}
  61. </p>
  62. {% include "MuzichCoreBundle:Tag:tagsList.show.html.twig" with {
  63. 'object_id' : group.id,
  64. 'object_type' : 'group'
  65. } %}
  66. <a href="{{ path('elements_get_filter_data_autoplay_show', {
  67. 'show_type' : 'group',
  68. 'show_id' : group.id,
  69. 'data' : '[]'
  70. }) }}" class="button" id="autoplay_launch"
  71. title="{{ 'elements.autoplay.launch'|trans({}, 'elements') }}" >
  72. <img src="{{ asset('/bundles/muzichcore/img/1353494305_player_play.png') }}" alt="" />
  73. </a>
  74. </div>
  75. {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {'no_group_name' : true} %}
  76. <div class="elements_loader_div">
  77. <img class="elements_more_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
  78. </div>
  79. {% if more_count is defined %}
  80. {% if elements|length %}
  81. <input type="hidden" id="more_elements_url" value="{{ path('show_elements_get', {
  82. 'type' : 'group',
  83. 'object_id' : group.id,
  84. 'tags_ids_json' : ''
  85. }) }}" />
  86. <a href="{{ path('show_elements_get', {
  87. 'type' : 'group',
  88. 'object_id' : group.id,
  89. 'tags_ids_json' : '[]'
  90. }) }}" class="elements_more" >
  91. <div>
  92. {{ 'more'|trans({}, 'userui') }}
  93. </div>
  94. </a>
  95. {% endif %}
  96. {% endif %}
  97. <input type="hidden" id="autoplay_url" value="{{ path('elements_get_filter_data_autoplay_show', {
  98. 'show_type' : 'group',
  99. 'show_id' : group.id,
  100. 'data' : ''
  101. }) }}" />
  102. {% endblock %}