Browse Source

Merge pull request #1033 from colinodell/template-tweaks

Template tweaks
Jordi Boggiano 5 years ago
parent
commit
55a361f234

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

@@ -2,19 +2,19 @@
 
 {% 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>
-        {%- if not isActualUser %}
+    {%- if not isActualUser %}
+        <small>
             member since: {{ user.createdAt|date('M d, Y') }}
             {%- if is_granted('ROLE_ADMIN') %}
                 <a href="mailto:{{ user.email }}">{{ user.email }}</a>
             {%- endif %}
-        {%- endif %}
-    </small>
+        </small>
+    {%- endif %}
 </h2>
 
 <section class="row">

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

@@ -2,19 +2,19 @@
 
 {% 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>
-        {%- if not isActualUser %}
+    {%- if not isActualUser %}
+        <small>
             member since: {{ user.createdAt|date('M d, Y') }}
             {%- if is_granted('ROLE_ADMIN') %}
                 <a href="mailto:{{ user.email }}">{{ user.email }}</a>
             {%- endif %}
-        {%- endif %}
-    </small>
+        </small>
+    {%- endif %}
 </h2>
 
 <section class="row">

+ 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>