فهرست منبع

Only set isActualUser in the block where it's needed

See https://github.com/composer/packagist/pull/1031#discussion_r332588385
Colin O'Dell 5 سال پیش
والد
کامیت
cd35b16a1f

+ 1 - 1
src/Packagist/WebBundle/Resources/views/user/favorites.html.twig

@@ -2,9 +2,9 @@
 
 {% import "PackagistWebBundle::macros.html.twig" as macros %}
 
+{% block content %}
 {% set isActualUser = app.user and app.user.username is same as(user.username) %}
 
-{% block content %}
 <h2 class="title">
     {{ user.username }}
     <small>

+ 1 - 1
src/Packagist/WebBundle/Resources/views/user/packages.html.twig

@@ -2,9 +2,9 @@
 
 {% import "PackagistWebBundle::macros.html.twig" as macros %}
 
-{% set isActualUser = app.user and app.user.username is same as(user.username) %}
 
 {% block content %}
+{% set isActualUser = app.user and app.user.username is same as(user.username) %}
 <h2 class="title">
     {{ user.username }}
     <small>

+ 1 - 2
src/Packagist/WebBundle/Resources/views/user/profile.html.twig

@@ -2,8 +2,6 @@
 
 {% import "PackagistWebBundle::macros.html.twig" as macros %}
 
-{% set isActualUser = app.user and app.user.username is same as(user.username) %}
-
 {% block head_additions %}
     {% if user.hasRole('ROLE_SPAMMER') %}
         <meta name="robots" content="noindex, nofollow">
@@ -11,6 +9,7 @@
 {% endblock %}
 
 {% block content %}
+{% set isActualUser = app.user and app.user.username is same as(user.username) %}
 <h2 class="title">
     {{ user.username }}
     <small>