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 %}"> <a href="{% url user_edit user.id %}">
<img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}"> <img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit participant' %}">
</a> </a>
{% if user != request_user and not user.is_superuser %} {% if user != request_user %}
<a href="{% url user_delete user.id %}"> <a href="{% url user_delete user.id %}">
<img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}"> <img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete participant' %}">
</a> </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 %}> <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> <span></span>
</a> </a>

View File

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

View File

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

View File

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