Merge pull request #49 from emanuelschuetze/master
Some minor changes for 1.3
This commit is contained in:
commit
fb25473abc
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
{{ welcometext|safe|linebreaks }}
|
Loading…
Reference in New Issue
Block a user