From 6aedfb52199ab0dc14ddeb292040cf6dc9ad1928 Mon Sep 17 00:00:00 2001 From: "xiaokong1937@gmail.com" <763691951@qq.com> Date: Mon, 5 Sep 2016 22:20:50 +0800 Subject: [PATCH] fix small template erros --- apps/users/templates/users/_user.html | 4 ++-- apps/users/templates/users/user_edit.html | 3 ++- apps/users/templates/users/user_list.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/users/templates/users/_user.html b/apps/users/templates/users/_user.html index b8acec82c..937b25005 100644 --- a/apps/users/templates/users/_user.html +++ b/apps/users/templates/users/_user.html @@ -14,7 +14,7 @@ <div class="col-sm-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> - <h5>{% trans 'Create user' %}</h5> + <h5>{% block user_template_title %}{% trans 'Create user' %}{% endblock %}</h5> <div class="ibox-tools"> <a class="collapse-link"> <i class="fa fa-chevron-up"></i> @@ -94,4 +94,4 @@ }); }) </script> -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/apps/users/templates/users/user_edit.html b/apps/users/templates/users/user_edit.html index fb3725a75..4d7c842d3 100644 --- a/apps/users/templates/users/user_edit.html +++ b/apps/users/templates/users/user_edit.html @@ -1,5 +1,6 @@ {% extends 'users/_user.html' %} {% load i18n %} +{% block user_template_title %}{% trans "Edit user" %}{% endblock %} {% block username %} <div class="form-group"> <label for="{{ form.username.id_for_label }}" class="col-sm-2 control-label">{% trans 'Username' %}</label> @@ -16,4 +17,4 @@ <input id="password" name="password" type="password" class="form-control"> </div> </div> -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/apps/users/templates/users/user_list.html b/apps/users/templates/users/user_list.html index 51fbfa57b..67654b794 100644 --- a/apps/users/templates/users/user_list.html +++ b/apps/users/templates/users/user_list.html @@ -34,7 +34,7 @@ <td class="text-center" title="{% for user_group in user.group.all %} {{ user_group.name }} {% endfor %}"> {{ user.groups.all|join_queryset_attr:"name" }} </td> <th class="text-center">{{ user.name }}</th> <td class="text-center"> - {% if user.is_expired %} + {% if user.is_expired and user.is_active %} <i class="fa fa-times text-danger"></i> {% else %} <i class="fa fa-check text-navy"></i>