Browse Source

ne pas afficher suivre/ne pas suivre si c'est son compte

bastien 13 years ago
parent
commit
92f1b235a0
1 changed files with 10 additions and 8 deletions
  1. 10 8
      src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig

+ 10 - 8
src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig View File

20
       {{ 'user.view_favorites'|trans({}, 'users') }}
20
       {{ 'user.view_favorites'|trans({}, 'users') }}
21
     </a>
21
     </a>
22
     
22
     
23
-    <a href="{{ path('follow', { 'type': 'user', 'id': viewed_user.id, 'token': user.personalHash }) }}" 
24
-       class="follow_link button {% if following %}following{% else %}notfollowing{% endif %}" >
25
-      {% if following %}
26
-        {{ 'user.following'|trans({}, 'users') }}
27
-      {% else %}
28
-        {{ 'user.follow'|trans({}, 'users') }}
29
-      {% endif %}
30
-    </a>
23
+    {% if app.user.id != viewed_user.id %}
24
+      <a href="{{ path('follow', { 'type': 'user', 'id': viewed_user.id, 'token': user.personalHash }) }}" 
25
+         class="follow_link button {% if following %}following{% else %}notfollowing{% endif %}" >
26
+        {% if following %}
27
+          {{ 'user.following'|trans({}, 'users') }}
28
+        {% else %}
29
+          {{ 'user.follow'|trans({}, 'users') }}
30
+        {% endif %}
31
+      </a>
32
+    {% endif %}
31
     
33
     
32
   </div>
34
   </div>
33
   
35