showUser.html.twig 4.4KB

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