|
@@ -56,34 +56,46 @@
|
56
|
56
|
{{ element.points|format_score }}
|
57
|
57
|
</li>
|
58
|
58
|
<li class="vote thumb">
|
59
|
|
- {% if element.owner.id != app.user.id %}
|
60
|
|
- {% if element.hasVoteGood(app.user.id) %}
|
61
|
|
- <a class="vote" href="{{ path('ajax_element_remove_vote_good', {
|
62
|
|
- 'element_id' : element.id,
|
63
|
|
- 'token' : app.user.getPersonalHash(element.id)
|
64
|
|
- }) }}" title="{{ 'element.vote.good'|trans({}, 'elements') }}">
|
65
|
|
- <img src="{{ asset('img/icon_thumb_red.png') }}" alt="vote" />
|
66
|
|
- </a>
|
|
59
|
+ {% if app.user %}
|
|
60
|
+ {% if element.owner.id != app.user.id %}
|
|
61
|
+ {% if element.hasVoteGood(app.user.id) %}
|
|
62
|
+ <a class="vote" href="{{ path('ajax_element_remove_vote_good', {
|
|
63
|
+ 'element_id' : element.id,
|
|
64
|
+ 'token' : app.user.getPersonalHash(element.id)
|
|
65
|
+ }) }}" title="{{ 'element.vote.good'|trans({}, 'elements') }}">
|
|
66
|
+ <img src="{{ asset('img/icon_thumb_red.png') }}" alt="vote" />
|
|
67
|
+ </a>
|
|
68
|
+ {% else %}
|
|
69
|
+ <a class="vote" href="{{ path('ajax_element_add_vote_good', {
|
|
70
|
+ 'element_id' : element.id,
|
|
71
|
+ 'token' : app.user.getPersonalHash(element.id)
|
|
72
|
+ }) }}" title="{{ 'element.vote.good'|trans({}, 'elements') }}">
|
|
73
|
+ <img src="{{ asset('img/icon_thumb.png') }}" alt="vote" />
|
|
74
|
+ </a>
|
|
75
|
+ {% endif %}
|
67
|
76
|
{% else %}
|
68
|
|
- <a class="vote" href="{{ path('ajax_element_add_vote_good', {
|
69
|
|
- 'element_id' : element.id,
|
70
|
|
- 'token' : app.user.getPersonalHash(element.id)
|
71
|
|
- }) }}" title="{{ 'element.vote.good'|trans({}, 'elements') }}">
|
72
|
|
- <img src="{{ asset('img/icon_thumb.png') }}" alt="vote" />
|
73
|
|
- </a>
|
|
77
|
+ <img src="{{ asset('img/icon_thumb_gray.png') }}" alt="vote" />
|
74
|
78
|
{% endif %}
|
75
|
79
|
{% else %}
|
76
|
|
- <img src="{{ asset('img/icon_thumb_gray.png') }}" alt="vote" />
|
|
80
|
+ <a href="#" class="mustbeconnected">
|
|
81
|
+ <img src="{{ asset('img/icon_thumb.png') }}" alt="vote" />
|
|
82
|
+ </a>
|
77
|
83
|
{% endif %}
|
78
|
84
|
</li>
|
79
|
85
|
<li class="star">
|
80
|
|
- {% if element.hasFavoriteUser(app.user.id) %}
|
81
|
|
- <a class="favorite_link" href="{{ path('favorite_remove', { 'id': element.id, 'token': app.user.personalHash(element.id) }) }}" >
|
82
|
|
- <img id="favorite_{{ element.id }}_is" src="{{ asset('img/icon_star_2_red.png') }}" title="{{ 'element.favorite.remove'|trans({}, 'elements') }}" alt="{{ 'element.favorite.remove'|trans({}, 'elements') }}"/>
|
83
|
|
- </a>
|
|
86
|
+ {% if app.user %}
|
|
87
|
+ {% if element.hasFavoriteUser(app.user.id) %}
|
|
88
|
+ <a class="favorite_link" href="{{ path('favorite_remove', { 'id': element.id, 'token': app.user.personalHash(element.id) }) }}" >
|
|
89
|
+ <img id="favorite_{{ element.id }}_is" src="{{ asset('img/icon_star_2_red.png') }}" title="{{ 'element.favorite.remove'|trans({}, 'elements') }}" alt="{{ 'element.favorite.remove'|trans({}, 'elements') }}"/>
|
|
90
|
+ </a>
|
|
91
|
+ {% else %}
|
|
92
|
+ <a class="favorite_link" href="{{ path('favorite_add', { 'id': element.id, 'token': app.user.personalHash(element.id) }) }}" >
|
|
93
|
+ <img id="favorite_{{ element.id }}_isnot" src="{{ asset('img/icon_star_2.png') }}" title="{{ 'element.favorite.add'|trans({}, 'elements') }}" alt="{{ 'element.favorite.add'|trans({}, 'elements') }}" />
|
|
94
|
+ </a>
|
|
95
|
+ {% endif %}
|
84
|
96
|
{% else %}
|
85
|
|
- <a class="favorite_link" href="{{ path('favorite_add', { 'id': element.id, 'token': app.user.personalHash(element.id) }) }}" >
|
86
|
|
- <img id="favorite_{{ element.id }}_isnot" src="{{ asset('img/icon_star_2.png') }}" title="{{ 'element.favorite.add'|trans({}, 'elements') }}" alt="{{ 'element.favorite.add'|trans({}, 'elements') }}" />
|
|
97
|
+ <a class="mustbeconnected" href="#" >
|
|
98
|
+ <img src="{{ asset('img/icon_star_2.png') }}" title="{{ 'element.favorite.add'|trans({}, 'elements') }}" alt="{{ 'element.favorite.add'|trans({}, 'elements') }}" />
|
87
|
99
|
</a>
|
88
|
100
|
{% endif %}
|
89
|
101
|
</li>
|
|
@@ -149,68 +161,96 @@
|
149
|
161
|
</li>
|
150
|
162
|
{% endif %}
|
151
|
163
|
|
152
|
|
- {% if app.user.id != element.owner.id %}
|
153
|
|
-
|
154
|
|
- {% if display_edit_actions %}
|
155
|
|
- <li class="element_propose_tags">
|
156
|
|
- <a title="{{ 'element.proposition_tags.link_title'|trans({}, 'userui') }}"
|
157
|
|
- class="element_propose_tags"
|
158
|
|
- href="{{ path('ajax_element_propose_tags_open', {'element_id' : element.id}) }}">
|
159
|
|
- <img src="{{ asset('bundles/muzichcore/img/1333484018_rss-tag.png') }}" alt="tags_proposition" />
|
160
|
|
- </a>
|
161
|
|
- </li>
|
162
|
|
-
|
163
|
|
- <li class="element_reshare">
|
164
|
|
- <a title="{{ 'element.reshare.link_title'|trans({}, 'userui') }}"
|
165
|
|
- class="element_reshare"
|
166
|
|
- href="{{ path('ajax_reshare_element', {'element_id':element.id, 'token':app.user.getPersonalHash('reshare_'~element.id)}) }}">
|
167
|
|
- <img src="{{ asset('/img/icon_reload.png') }}" alt="re" />
|
168
|
|
- </a>
|
169
|
|
- </li>
|
170
|
|
-
|
171
|
|
- <li class="element_report">
|
172
|
|
- <a title="{{ 'element.report.link_title'|trans({}, 'userui') }}"
|
173
|
|
- class="element_report"
|
174
|
|
- href="{{ path('ajax_report_element', {'element_id':element.id, 'token':app.user.getPersonalHash(element.id)}) }}">
|
175
|
|
- <img src="{{ asset('/img/icon_alert.png') }}" alt="report" />
|
176
|
|
- </a>
|
177
|
|
- </li>
|
178
|
|
-
|
|
164
|
+ {% if app.user %}
|
|
165
|
+ {% if app.user.id != element.owner.id %}
|
|
166
|
+
|
|
167
|
+ {% if display_edit_actions %}
|
|
168
|
+ <li class="element_propose_tags">
|
|
169
|
+ <a title="{{ 'element.proposition_tags.link_title'|trans({}, 'userui') }}"
|
|
170
|
+ class="element_propose_tags"
|
|
171
|
+ href="{{ path('ajax_element_propose_tags_open', {'element_id' : element.id}) }}">
|
|
172
|
+ <img src="{{ asset('bundles/muzichcore/img/1333484018_rss-tag.png') }}" alt="tags_proposition" />
|
|
173
|
+ </a>
|
|
174
|
+ </li>
|
|
175
|
+
|
|
176
|
+ <li class="element_reshare">
|
|
177
|
+ <a title="{{ 'element.reshare.link_title'|trans({}, 'userui') }}"
|
|
178
|
+ class="element_reshare"
|
|
179
|
+ href="{{ path('ajax_reshare_element', {'element_id':element.id, 'token':app.user.getPersonalHash('reshare_'~element.id)}) }}">
|
|
180
|
+ <img src="{{ asset('/img/icon_reload.png') }}" alt="re" />
|
|
181
|
+ </a>
|
|
182
|
+ </li>
|
|
183
|
+
|
|
184
|
+ <li class="element_report">
|
|
185
|
+ <a title="{{ 'element.report.link_title'|trans({}, 'userui') }}"
|
|
186
|
+ class="element_report"
|
|
187
|
+ href="{{ path('ajax_report_element', {'element_id':element.id, 'token':app.user.getPersonalHash(element.id)}) }}">
|
|
188
|
+ <img src="{{ asset('/img/icon_alert.png') }}" alt="report" />
|
|
189
|
+ </a>
|
|
190
|
+ </li>
|
|
191
|
+
|
|
192
|
+ {% endif %}
|
|
193
|
+
|
179
|
194
|
{% endif %}
|
180
|
195
|
|
181
|
|
- {% endif %}
|
182
|
|
-
|
183
|
|
- {% if app.user.id == element.owner.id %}
|
184
|
|
-
|
185
|
|
- {% if display_edit_actions %}
|
186
|
|
-
|
187
|
|
- {% if element.hasTagProposition %}
|
188
|
|
- <li class="element_view_propositions_link">
|
189
|
|
- <a title="{{ 'element.view_propositions.link'|trans({}, 'elements') }}" class="element_view_propositions_link"
|
190
|
|
- href="{{ path('ajax_element_proposed_tags_view', {'element_id' : element.id}) }}"
|
|
196
|
+ {% if app.user.id == element.owner.id %}
|
|
197
|
+
|
|
198
|
+ {% if display_edit_actions %}
|
|
199
|
+
|
|
200
|
+ {% if element.hasTagProposition %}
|
|
201
|
+ <li class="element_view_propositions_link">
|
|
202
|
+ <a title="{{ 'element.view_propositions.link'|trans({}, 'elements') }}" class="element_view_propositions_link"
|
|
203
|
+ href="{{ path('ajax_element_proposed_tags_view', {'element_id' : element.id}) }}"
|
|
204
|
+ >
|
|
205
|
+ <img src="{{ asset('bundles/muzichcore/img/1333493527_tag_add.png') }}" alt="tags proposition" />
|
|
206
|
+ </a>
|
|
207
|
+ </li>
|
|
208
|
+ {% endif %}
|
|
209
|
+
|
|
210
|
+ <li class="element_edit_link">
|
|
211
|
+ <a title="{{ 'element.edit.link'|trans({}, 'elements') }}" class="element_edit_link"
|
|
212
|
+ href="{{ path('element_edit', {'element_id' : element.id}) }}"
|
191
|
213
|
>
|
192
|
|
- <img src="{{ asset('bundles/muzichcore/img/1333493527_tag_add.png') }}" alt="tags proposition" />
|
|
214
|
+ <img src="{{ asset('/img/icon_pen.png') }}" alt="edit" />
|
|
215
|
+ </a>
|
|
216
|
+ </li>
|
|
217
|
+
|
|
218
|
+ <li class="element_remove_link">
|
|
219
|
+ <a title="{{ 'element.remove.link'|trans({}, 'elements') }}" class="element_remove_link"
|
|
220
|
+ href="{{ path('element_remove', {'element_id' : element.id, 'token':app.user.getPersonalHash(element.id)}) }}"
|
|
221
|
+ >
|
|
222
|
+ <img src="{{ asset('/img/icon_close_2.png') }}" alt="delete" />
|
193
|
223
|
</a>
|
194
|
224
|
</li>
|
195
|
225
|
{% endif %}
|
196
|
|
-
|
197
|
|
- <li class="element_edit_link">
|
198
|
|
- <a title="{{ 'element.edit.link'|trans({}, 'elements') }}" class="element_edit_link"
|
199
|
|
- href="{{ path('element_edit', {'element_id' : element.id}) }}"
|
200
|
|
- >
|
201
|
|
- <img src="{{ asset('/img/icon_pen.png') }}" alt="edit" />
|
202
|
|
- </a>
|
203
|
|
- </li>
|
204
|
|
-
|
205
|
|
- <li class="element_remove_link">
|
206
|
|
- <a title="{{ 'element.remove.link'|trans({}, 'elements') }}" class="element_remove_link"
|
207
|
|
- href="{{ path('element_remove', {'element_id' : element.id, 'token':app.user.getPersonalHash(element.id)}) }}"
|
208
|
|
- >
|
209
|
|
- <img src="{{ asset('/img/icon_close_2.png') }}" alt="delete" />
|
210
|
|
- </a>
|
211
|
|
- </li>
|
|
226
|
+
|
212
|
227
|
{% endif %}
|
|
228
|
+ {% else %}
|
|
229
|
+
|
|
230
|
+ <li class="element_propose_tags">
|
|
231
|
+ <a title="{{ 'element.proposition_tags.link_title'|trans({}, 'userui') }}"
|
|
232
|
+ class="mustbeconnected"
|
|
233
|
+ href="#">
|
|
234
|
+ <img src="{{ asset('bundles/muzichcore/img/1333484018_rss-tag.png') }}" alt="tags_proposition" />
|
|
235
|
+ </a>
|
|
236
|
+ </li>
|
213
|
237
|
|
|
238
|
+ <li class="element_reshare">
|
|
239
|
+ <a title="{{ 'element.reshare.link_title'|trans({}, 'userui') }}"
|
|
240
|
+ class="mustbeconnected"
|
|
241
|
+ href="#">
|
|
242
|
+ <img src="{{ asset('/img/icon_reload.png') }}" alt="re" />
|
|
243
|
+ </a>
|
|
244
|
+ </li>
|
|
245
|
+
|
|
246
|
+ <li class="element_report">
|
|
247
|
+ <a title="{{ 'element.report.link_title'|trans({}, 'userui') }}"
|
|
248
|
+ class="mustbeconnected"
|
|
249
|
+ href="#">
|
|
250
|
+ <img src="{{ asset('/img/icon_alert.png') }}" alt="report" />
|
|
251
|
+ </a>
|
|
252
|
+ </li>
|
|
253
|
+
|
214
|
254
|
{% endif %}
|
215
|
255
|
|
216
|
256
|
{% if his_group %}
|
|
@@ -275,22 +315,33 @@
|
275
|
315
|
{% for tag in element.tags %}
|
276
|
316
|
<li class="element_tag">
|
277
|
317
|
<a id="element_tag_{{ tag.id }}" href="#"
|
278
|
|
- class="element_tag button {% if app.user.haveTagsFavorite(tag.id) %}element_tag_large_for_fav_still{% endif %}"
|
|
318
|
+ class="element_tag button {% if app.user %}{% if app.user.haveTagsFavorite(tag.id) %}element_tag_large_for_fav_still{% endif %}{% endif %}"
|
279
|
319
|
>
|
280
|
320
|
{{ tag.name }}
|
281
|
321
|
</a>
|
282
|
|
- {% if app.user.haveTagsFavorite(tag.id) %}
|
283
|
|
- <img class="tag_to_favorites" src="{{ asset('/img/icon_heart.png') }}"
|
284
|
|
- alt="add-to-favorites"
|
285
|
|
- title="{{ 'element.tag.isfav.title'|trans({'%tagname%':tag.name}, 'elements') }}"
|
286
|
|
- />
|
|
322
|
+ {% if app.user %}
|
|
323
|
+ {% if app.user.haveTagsFavorite(tag.id) %}
|
|
324
|
+ <img class="tag_to_favorites" src="{{ asset('/img/icon_heart.png') }}"
|
|
325
|
+ alt="add-to-favorites"
|
|
326
|
+ title="{{ 'element.tag.isfav.title'|trans({'%tagname%':tag.name}, 'elements') }}"
|
|
327
|
+ />
|
|
328
|
+ {% else %}
|
|
329
|
+ <a
|
|
330
|
+ href="{{ path('ajax_tag_add_to_favorites', {
|
|
331
|
+ 'tag_id' : tag.id,
|
|
332
|
+ 'token' : app.user.getPersonalHash(tag.id)
|
|
333
|
+ }) }}"
|
|
334
|
+ class="tag_to_favorites"
|
|
335
|
+ style="display: none;"
|
|
336
|
+ title="{{ 'element.tag.addtofav.title'|trans({}, 'elements') }}"
|
|
337
|
+ >
|
|
338
|
+ <img class="tag_add_to_favorites" src="{{ asset('/img/icon_heart.png') }}" alt="add-to-favorites"/>
|
|
339
|
+ </a>
|
|
340
|
+ {% endif %}
|
287
|
341
|
{% else %}
|
288
|
342
|
<a
|
289
|
|
- href="{{ path('ajax_tag_add_to_favorites', {
|
290
|
|
- 'tag_id' : tag.id,
|
291
|
|
- 'token' : app.user.getPersonalHash(tag.id)
|
292
|
|
- }) }}"
|
293
|
|
- class="tag_to_favorites"
|
|
343
|
+ href="#"
|
|
344
|
+ class="tag_to_favorites mustbeconnected"
|
294
|
345
|
style="display: none;"
|
295
|
346
|
title="{{ 'element.tag.addtofav.title'|trans({}, 'elements') }}"
|
296
|
347
|
>
|
|
@@ -325,10 +376,16 @@
|
325
|
376
|
</a>
|
326
|
377
|
{%endif %}
|
327
|
378
|
{% endautoescape %}
|
328
|
|
-
|
329
|
|
- <a href="#add_comment_{{ element.id }}" class="add_comment">
|
330
|
|
- {{ 'element.comments.add'|trans({}, 'elements') }}
|
331
|
|
- </a>
|
|
379
|
+
|
|
380
|
+ {% if app.user %}
|
|
381
|
+ <a href="#add_comment_{{ element.id }}" class="add_comment">
|
|
382
|
+ {{ 'element.comments.add'|trans({}, 'elements') }}
|
|
383
|
+ </a>
|
|
384
|
+ {% else %}
|
|
385
|
+ <a href="#" class="mustbeconnected add_comment_disabled">
|
|
386
|
+ {{ 'element.comments.add'|trans({}, 'elements') }}
|
|
387
|
+ </a>
|
|
388
|
+ {% endif %}
|
332
|
389
|
|
333
|
390
|
{% endif %}
|
334
|
391
|
|
|
@@ -366,21 +423,23 @@
|
366
|
423
|
<div class="comments_loader">
|
367
|
424
|
<img class="comments_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading"/>
|
368
|
425
|
</div>
|
369
|
|
-
|
370
|
|
- <form
|
371
|
|
- action="{{ path('ajax_add_comment', {'element_id':element.id, 'token':app.user.getPersonalHash(element.id)}) }}"
|
372
|
|
- method="post"
|
373
|
|
- name="add_comment"
|
374
|
|
- style="display: none;"
|
375
|
|
- class="add_comment"
|
376
|
|
- >
|
377
|
|
- {% include "MuzichCommentBundle:Comment:form.html.twig" with {
|
378
|
|
- 'submit_value' : 'element.comments.add_submit'|trans({}, 'elements'),
|
379
|
|
- 'cancel_value' : 'element.comments.add_cancel'|trans({}, 'elements'),
|
380
|
|
- 'following' : element.userFollowComments(app.user.id),
|
381
|
|
- 'own' : (app.user.id == element.owner.id)
|
382
|
|
- } %}
|
383
|
|
- </form>
|
|
426
|
+
|
|
427
|
+ {% if app.user %}
|
|
428
|
+ <form
|
|
429
|
+ action="{{ path('ajax_add_comment', {'element_id':element.id, 'token':app.user.getPersonalHash(element.id)}) }}"
|
|
430
|
+ method="post"
|
|
431
|
+ name="add_comment"
|
|
432
|
+ style="display: none;"
|
|
433
|
+ class="add_comment"
|
|
434
|
+ >
|
|
435
|
+ {% include "MuzichCommentBundle:Comment:form.html.twig" with {
|
|
436
|
+ 'submit_value' : 'element.comments.add_submit'|trans({}, 'elements'),
|
|
437
|
+ 'cancel_value' : 'element.comments.add_cancel'|trans({}, 'elements'),
|
|
438
|
+ 'following' : element.userFollowComments(app.user.id),
|
|
439
|
+ 'own' : (app.user.id == element.owner.id)
|
|
440
|
+ } %}
|
|
441
|
+ </form>
|
|
442
|
+ {% endif %}
|
384
|
443
|
|
385
|
444
|
<a href="#add_comment_{{ element.id }}" class="add_comment">
|
386
|
445
|
{{ 'element.comments.add'|trans({}, 'elements') }}
|