- {% else %}
- {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeBackground) or user.perms.manageProfileImages %}
- {{ pic(route('user.background', profile.id), '.container') }}
- {% endif %}
-
-
-
-
- {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeHeader) or user.perms.manageProfileImages %}
- {{ pic(route('user.header', profile.id), '.profile__header') }}
- {% endif %}
-
- {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeAvatar) or user.perms.manageProfileImages %}
- {{ pic(route('user.avatar', profile.id), '.avatar') }}
- {% endif %}
-
- {% if profile.lastfm %}
+ {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeBackground) or user.perms.manageProfileImages %}
+ {{ profile_image_changer(route('user.background', profile.id), '.container') }}
+ {% endif %}
+
+
+
+ {% include 'user/profile_header.twig' %}
+
+
+ {% if profile.lastfm %}
@@ -297,80 +129,66 @@
- {% endif %}
-
-
- {% include 'profile/userpage.twig' %}
+ {% endif %}
+
+ {% for name, data in sections %}
+
+ {% include 'profile/' ~ name ~ '.twig' %}
-
- {% include 'profile/friends.twig' %}
-
-
- {% include 'profile/groups.twig' %}
-
-
- {% include 'profile/topics.twig' %}
-
-
- {% include 'profile/posts.twig' %}
-
-
- {% include 'profile/comments.twig' %}
-
-
-
+ {% endfor %}
+
+
+
+
+
Topics
+
{{ profile.forumStats.topics }}
+
+
+
Posts
+
{{ profile.forumStats.posts }}
+
+
+
Friends
+
{{ profile.friends(2)|length }}
+
+
+
+ {% if user.perms.viewUserLinks or user.perms.viewUserDetails %}
-
-
Topics
-
{{ profile.forumStats.topics }}
-
-
-
Posts
-
{{ profile.forumStats.posts }}
-
-
-
Friends
-
{{ profile.friends(2)|length }}
-
+ {% for id, data in fields %}
+ {% if data.value != null %}
+
- {% endif %}
- Account Standing
- {% if not profile.activated %}
-
Deactivated
- {% elseif profile.restricted %}
-
Restricted
- {% elseif false %}
-
Bad
- {% else %}
-
Good
- {% endif %}
-
+ {% elseif user.id == 0 %}
+
Log in to view the full profile!
+ {% else %}
+
You aren't allowed to view profile details!
+ {% endif %}
+ Account Standing
+ {% if not profile.activated %}
+
Inactive
+ {% elseif profile.restricted %}
+
Restricted
+ {% elseif false %}
+
Bad
+ {% else %}
+
Good
+ {% endif %}
- {% endif %}
+
{% endblock %}
diff --git a/resources/views/yuuno/user/profile_header.twig b/resources/views/yuuno/user/profile_header.twig
new file mode 100644
index 0000000..60b5ff4
--- /dev/null
+++ b/resources/views/yuuno/user/profile_header.twig
@@ -0,0 +1,60 @@
+{% from 'user/profile_macros.twig' import profile_image_changer %}
+
+
+
+ {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeHeader) or user.perms.manageProfileImages %}
+ {{ profile_image_changer(route('user.header', profile.id), '.profile__header') }}
+ {% endif %}
+
+ {% if (user.id == profile.id and not user.restricted and user.activated and user.perms.changeAvatar) or user.perms.manageProfileImages %}
+ {{ profile_image_changer(route('user.avatar', profile.id), '.avatar') }}
+ {% endif %}
+