Przeglądaj źródła

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

bastien 13 lat temu
rodzic
commit
92f1b235a0

+ 10 - 8
src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig Wyświetl plik

@@ -20,14 +20,16 @@
20 20
       {{ 'user.view_favorites'|trans({}, 'users') }}
21 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 34
   </div>
33 35