Merge pull request #49 from emanuelschuetze/master

Some minor changes for 1.3
This commit is contained in:
Oskar Hahn 2012-11-22 02:22:06 -08:00
commit fb25473abc
4 changed files with 6 additions and 7 deletions

View File

@ -93,10 +93,12 @@
<a href="{% url user_edit user.id %}">
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
</a>
{% if user != request_user and not user.is_superuser %}
{% if user != request_user %}
<a href="{% url user_delete user.id %}">
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
</a>
{% endif %}
{% if user != request_user and not user.is_superuser %}
<a class="status_link deactivate" href="{% url user_status_deactivate user.id %}" title="{% trans 'Change status to inactive' %}"{% if not user.is_active %} style="display:none"{% endif %}>
<span></span>
</a>

View File

@ -14,7 +14,7 @@
{% endif %}
</li>
{% empty %}
<li>{% trans "None" %}</li>
<li><i>{% trans "None" %}</i></li>
{% endfor %}
</ul>
@ -33,7 +33,7 @@
{% endif %}
</li>
{% empty %}
<li>{% trans "None" %}</li>
<li><i>{% trans "None" %}</i></li>
{% endfor %}
</ul>
{% endif %}
@ -44,6 +44,6 @@
{% for assignment in assignments %}
<li><a href="{% model_url assignment 'view' %}">{{ assignment }}</a></li>
{% empty %}
<li>{% trans "None" %}</li>
<li><i>{% trans "None" %}</i></li>
{% endfor %}
</ul>

View File

@ -208,8 +208,6 @@ class UserDeleteView(DeleteView):
def pre_redirect(self, request, *args, **kwargs):
if self.get_object() == self.request.user:
messages.error(request, _("You can not delete yourself."))
elif self.get_object().is_superuser:
messages.error(request, _("You can not delete the administrator."))
else:
super(DeleteView, self).pre_redirect(request, *args, **kwargs)

View File

@ -1 +0,0 @@
{{ welcometext|safe|linebreaks }}