From b28c89ded69a75d83aaa8d7c8b274cec4f52a0f6 Mon Sep 17 00:00:00 2001 From: kaiyou <pierre@jaury.eu> Date: Sun, 20 Dec 2020 11:01:01 +0100 Subject: [PATCH] Simplify the profile picker --- hiboo/profile/templates/profile_pick.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hiboo/profile/templates/profile_pick.html b/hiboo/profile/templates/profile_pick.html index ad129ec..a1ddb19 100644 --- a/hiboo/profile/templates/profile_pick.html +++ b/hiboo/profile/templates/profile_pick.html @@ -10,16 +10,14 @@ <div class="col-md-4 col-s-6 col-xs-12"> <div class="box box-widget widget-user-2"> <div class="widget-user-header bg-{{ macros.colors[loop.index0 % 7] }}"> - {% if profile.status == "active" %} + {% if profile.status == profile.ACTIVE %} <form method="POST" action="{{ utils.url_or_intent("account.home") }}" class="form"> {{ form.hidden_tag() }} <input type="hidden" name="profile_uuid" value="{{ profile.uuid }}"> <input type="submit" value="Sign in" style="opacity: 0.8" class="btn btn-lg btn-flat bg-gray text-black pull-right"> </form> - {% elif profile.status == "blocked" %} - <span class="btn btn-lg btn-flat bg-red text-black pull-right">{% trans %}Blocked{% endtrans %}</span> - {% elif profile.status == "request" %} - <span class="btn btn-lg btn-flat bg-orange text-black pull-right">{% trans %}Awaiting approval{% endtrans %}</span> + {% else %} + <span class="btn btn-lg btn-flat bg-gray text-black pull-right">{{ profile.STATUSES[profile.status][1] | capitalize }}</span> {% endif %} <h3 class="widget-header-username">{{ profile.username }}</h3> <h5 class="widget-header-desc">{{ profile.comment or "No profile description" }} </h5> -- GitLab