From: Michael Tremer Date: Fri, 27 Nov 2020 17:29:31 +0000 (+0000) Subject: people: Encourage people to complete their profile on the profile page X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15bb44ee2699316486875703f4f6f71caa9a1560;p=ipfire.org.git people: Encourage people to complete their profile on the profile page Signed-off-by: Michael Tremer --- diff --git a/src/templates/people/index.html b/src/templates/people/index.html index ad461e15..bbf4ab8b 100644 --- a/src/templates/people/index.html +++ b/src/templates/people/index.html @@ -15,70 +15,29 @@ {% if not current_user.consents_to_promotional_emails %} -
-
-
{{ _("You are currently not subscribed to important updates from the IPFire Project") }}
- -
-
- -
- -
-

- {{ _("Subscribe to receive notifications about important security updates of IPFire and other news from inside the project") }} -

-
- -
-
- {% raw xsrf_form_html() %} - - -
-
-
-
-
- {% end %} - - {% if hints %} -
+
-
- +
+
-
-

{{ _("Tell us more about you!") }}

-

- {{ _("Become a part of our community and allow other people to connect with you!") }} +

+
{{ _("You are currently not subscribed to important updates from the IPFire Project") }}
+ +

+ {{ _("Subscribe to receive notifications about important security updates of IPFire and other news from inside the project") }}

-
- -
{% end %} diff --git a/src/templates/people/user.html b/src/templates/people/user.html index 1ab1a159..7623be21 100644 --- a/src/templates/people/user.html +++ b/src/templates/people/user.html @@ -1,5 +1,7 @@ {% extends "../base.html" %} +{% block title %}{{ account }}{% end block %} + {% block container %} {% import phonenumbers %} @@ -51,6 +53,33 @@ {% if current_user == account or current_user.is_staff() %}
+ {% if account == current_user %} + {# Suggest adding a description #} + {% if not current_user.description %} +
+
{{ _("Tell Us About Yourself" ) }}
+ +

+ {{ _("Add a couple of lines about yourself to your profile so that others get to know you better") }} + + {{ _("Edit Profile") }} +

+
+ + {# Suggest uploading an avatar if this user does not have one #} + {% elif not current_user.has_avatar() %} +
+
{{ _("Upload An Avatar" ) }}
+ +

+ {{ _("A picture says more than a thousand words") }} + + {{ _("Upload Avatar") }} +

+
+ {% end %} + {% end %} +
{% if current_user.is_staff() %} diff --git a/src/web/people.py b/src/web/people.py index 9622aca3..5a3f3da6 100644 --- a/src/web/people.py +++ b/src/web/people.py @@ -22,17 +22,7 @@ COLOUR_DARK = (49,53,60) class IndexHandler(auth.CacheMixin, base.BaseHandler): @tornado.web.authenticated def get(self): - hints = [] - - # Suggest uploading an avatar if this user does not have one - if not self.current_user.has_avatar(): - hints.append("avatar") - - # Suggest adding a description - if not self.current_user.description: - hints.append("description") - - self.render("people/index.html", hints=hints) + self.render("people/index.html") class AvatarHandler(base.BaseHandler):