Added assignment context menu (more actions). Fixed 'back to election' link.

This commit is contained in:
Emanuel Schuetze 2013-02-04 13:18:10 +01:00
parent e822efdc81
commit 36f5c97dbe
2 changed files with 25 additions and 1 deletions

View File

@ -11,7 +11,7 @@
{{ ballotnumber }}. {% trans "ballot" %}
</small>
<small class="pull-right">
<a href="{% url 'assignment_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
<a href="{% url 'assignment_view' assignment.id %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to election" %}</a>
<!-- activate projector -->
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' assignment.sid %}" class="activate_link btn {% if assignment.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show motion' %}">

View File

@ -24,6 +24,30 @@
<i class="icon-facetime-video {% if assignment.active %}icon-white{% endif %}"></i>
</a>
{% endif %}
<div class="btn-group">
<a data-toggle="dropdown" href="#" class="btn btn-mini dropdown-toggle">
{% trans 'More actions' %}
<span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<!-- edit -->
<li><a href="{% url 'assignment_edit' assignment.id %}"><i class="icon-edit"></i> {% trans 'Edit election' %}</a></li>
<!-- delete -->
<li><a href="{% url 'assignment_delete' assignment.id %}"><i class="icon-remove"></i> {% trans 'Delete election' %}</a></li>
<!-- edit poll -->
{% if perms.assignment.can_manage_assignment %}
{% for poll in motion.polls %}
<li><a href="{% url 'assignment_poll_view' poll.id %}"><i class="icon-edit"></i> {{ forloop.counter }}. {% trans "Ballot" %}</a></li>
{% endfor %}
{% endif %}
<!-- create agenda item -->
{% if perms.agenda.can_manage_agenda %}
<li>
<a href="{% url 'assignment_create_agenda' assignment.id %}"><i class="icon-plus"></i> {% trans 'New agenda item' %}</a>
</li>
{% endif %}
</ul>
</div>
</small>
</h1>