showGroup.html.twig 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. {% include 'MuzichCoreBundle:Component:element_add_buttons_topright.html.twig' %}
  8. {% endif %}
  9. <div class="show_options">
  10. {% if his_group %}
  11. <a class="button darkbutton" href="{{ path('group_edit', { 'slug': group.slug }) }}" >
  12. {{ 'group.edit'|trans({}, 'groups') }}
  13. </a>
  14. {% endif %}
  15. <a href="{{ path('follow', { 'type': 'group', 'id': group.id, 'token': user.personalHash(group.id) }) }}"
  16. class="follow_link button darkbutton {% if following %}following{% else %}notfollowing{% endif %}">
  17. {% if following %}
  18. {{ 'group.following'|trans({}, 'groups') }}
  19. {% else %}
  20. {{ 'group.follow'|trans({}, 'groups') }}
  21. {% endif %}
  22. </a>
  23. </div>
  24. <h1>{{ group.name }}</h1>
  25. {% if his_group or group.open %}
  26. {% include 'MuzichCoreBundle:Component:element_add_box.html.twig' with {
  27. 'group_slug' : group.slug,
  28. 'show_add_to_group' : false
  29. } %}
  30. {% endif %}
  31. <p class="show_info">
  32. {% if count_owned != 0 %}
  33. {{ 'show.user.elements.count'|trans({
  34. '%count_owned%' : count_owned,
  35. '%count_favorited%': count_favorited,
  36. '%count_favorited_users%': count_favorited_users
  37. }, 'elements') }}
  38. {% else %}
  39. {{ 'show.user.elements.no_count'|trans({}, 'elements') }}
  40. {% endif %}
  41. <br />
  42. {% if count_followers > 1 %}
  43. {{ 'show.user.followers.x_count'|trans({'%count%':count_followers, '%name%':group.name }, 'elements') }}
  44. {% elseif count_followers == 0 %}
  45. {{ 'show.user.followers.zero_count'|trans({'%name%':group.name }, 'elements') }}
  46. {% else %}
  47. {{ 'show.user.followers.one_count'|trans({'%count%':count_followers, '%name%':group.name }, 'elements') }}
  48. {% endif %}
  49. </p>
  50. <p class="group_description">
  51. {{ group.description }}
  52. </p>
  53. {% include "MuzichCoreBundle:Tag:tagsList.show.html.twig" with {
  54. 'object_id' : group.id,
  55. 'object_type' : 'group',
  56. 'display_autoplay' : true,
  57. 'autoplay_context' : 'show_group'
  58. } %}
  59. </div>
  60. {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {
  61. 'no_group_name' : true,
  62. 'his_group' : his_group,
  63. 'group' : group
  64. }%}
  65. {% if more_count is defined %}
  66. {% if elements|length %}
  67. {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
  68. 'more_path' : path('show_elements_get', {
  69. 'type' : 'group',
  70. 'object_id' : group.id,
  71. 'tags_ids_json' : '[]'
  72. }),
  73. 'more_url_path' : path('show_elements_get', {
  74. 'type' : 'group',
  75. 'object_id' : group.id,
  76. 'tags_ids_json' : ''
  77. })
  78. }%}
  79. {% endif %}
  80. {% endif %}
  81. {% endblock %}