From 39af41bdbabb64c2c1e1ff4d373ef8cb549972db Mon Sep 17 00:00:00 2001 From: Kálmán Viktor <kviktor@cloud.bme.hu> Date: Wed, 11 Mar 2015 12:28:36 +0100 Subject: [PATCH] dashboard: profile fixes - fix top right buttons having no padding - profile pic has better positioning - link groups --- circle/bower.json | 2 +- circle/dashboard/static/dashboard/dashboard.less | 8 +++++--- circle/dashboard/templates/dashboard/profile.html | 31 +++++++++++++++++-------------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/circle/bower.json b/circle/bower.json index 458c729..31877ce 100644 --- a/circle/bower.json +++ b/circle/bower.json @@ -12,7 +12,7 @@ ], "dependencies": { "bootstrap": "~3.2.0", - "fontawesome": "~4.2.0", + "fontawesome": "~4.3.0", "jquery": "~2.1.1", "no-vnc": "*", "jquery-knob": "~1.2.9", diff --git a/circle/dashboard/static/dashboard/dashboard.less b/circle/dashboard/static/dashboard/dashboard.less index 6104ec3..2247fa6 100644 --- a/circle/dashboard/static/dashboard/dashboard.less +++ b/circle/dashboard/static/dashboard/dashboard.less @@ -651,9 +651,11 @@ textarea[name="new_members"] { padding-left: 28px; } -.dashboard-profile-vm-list a, .dashboard-profile-vm-list a:hover { - text-decoration: none; - color: #555; +.dashboard-profile-vm-list, .dashboard-profile-group-list { + a, a:hover { + text-decoration: none; + color: #555; + } } #group-detail-user-table td:nth-child(2) a, diff --git a/circle/dashboard/templates/dashboard/profile.html b/circle/dashboard/templates/dashboard/profile.html index f581499..c1d3922 100644 --- a/circle/dashboard/templates/dashboard/profile.html +++ b/circle/dashboard/templates/dashboard/profile.html @@ -11,24 +11,28 @@ <div class="col-md-{% if perms.auth.change_user %}8{% else %}12{% endif %}"> <div class="panel panel-default"> <div class="panel-heading"> - {% if request.user.is_superuser %} - <a href="{{ login_token }}" - class="pull-right btn btn-danger btn-xs" - title="{% trans "Log in as this user. Recommended to open in an incognito window." %}"> - {% trans "Login as this user" %}</a> - {% endif %} - <a class="pull-right btn btn-default btn-xs" href="{% url "dashboard.views.user-list" %}">{% trans "Back" %}</a> + <div class="pull-right"> + {% if request.user.is_superuser %} + <a href="{{ login_token }}" class="btn btn-danger btn-xs" + title="{% trans "Log in as this user. Recommended to open in an incognito window." %}"> + <i class="fa fa-user-secret"></i> + {% trans "Login as this user" %} + </a> + {% endif %} + <a class="btn btn-default btn-xs" href="{% url "dashboard.views.user-list" %}"> + {% trans "Back" %}</a> + </div> <h3 class="no-margin"> <i class="fa fa-user"></i> {% include "dashboard/_display-name.html" with user=profile show_org=True %} </h3> </div> <div class="panel-body"> - <div> - <div class="" style="float: left"> + <div class="row"> + <div class="col-sm-4"> <img id="dashboard-profile-avatar" src="{{ avatar_url }}" class="img-rounded"/> </div> - <div class="" style="padding-left: 215px;"> + <div class="col-sm-8"> <p>{% trans "Username" %}: {{ profile.username }}</p> <p>{% trans "Organization ID" %}: {{ profile.profile.org_id|default:"-" }}</p> <p>{% trans "First name" %}: {{ profile.first_name|default:"-" }}</p> @@ -48,7 +52,6 @@ <a href="{% url "dashboard.views.profile-preferences" %}">{% trans "Change my preferences" %}</a> {% endif %} </div> - <div class="clearfix"></div> </div> {% if perm_group_list %} @@ -57,11 +60,11 @@ <i class="fa fa-group"></i> {% trans "Groups" %} </h4> <ul class="dashboard-profile-group-list"> - {% for g in groups %} - <li>{{ g.name }}</li> + {% for g in groups %} + <li><a href="{{ g.profile.get_absolute_url }}">{{ g.name }}</a></li> {% empty %} {% trans "This user is not in any group." %} - {% endfor %} + {% endfor %} </ul> {% endif %} -- libgit2 0.26.0