#198: Optimized submenu of application and assignment.
This commit is contained in:
parent
8ec3099620
commit
b81469703b
@ -39,21 +39,18 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{# delete application #}
|
{# delete application #}
|
||||||
{% if "delete" in actions %}
|
{% if "delete" in actions %}
|
||||||
<li><a href="{% url application_delete application.id %}">{%trans 'Delete application' %}</a></li>
|
<li><a href="{% url application_delete application.id %}"><img src="{% static 'images/icons/delete.png' %}"> {%trans 'Delete application' %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# PDF #}
|
{# PDF #}
|
||||||
<li><a href="{% url print_application application.id %}"><img src="{% static 'images/icons/pdf.png' %}"> {%trans 'Application as PDF' %}</a></li>
|
<li><a href="{% url print_application application.id %}"><img src="{% static 'images/icons/pdf.png' %}"> {%trans 'Application as PDF' %}</a></li>
|
||||||
{# activate and polls #}
|
{# activate and polls #}
|
||||||
{% if perms.projector.can_manage_projector %}
|
{% if perms.projector.can_manage_projector %}
|
||||||
<li><a href="{% url projector_activate_slide application.sid %}"><img src="{% static 'images/icons/projector.png' %}"> {%trans 'Show Application' %}</a></li>
|
<li><a href="{% url projector_activate_slide application.sid %}"><img src="{% static 'images/icons/projector.png' %}"> {%trans 'Show Application' %}</a></li>
|
||||||
{% if "genpoll" in actions %}
|
|
||||||
<li><a href='{% url application_gen_poll application.id %}'><img src="{% static 'images/icons/statistics.png' %}"> {%trans 'New vote' %}</a></li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if perms.application.can_manage_application %}
|
||||||
{% for poll in application.polls %}
|
{% for poll in application.polls %}
|
||||||
{% url application_poll_view poll.id as url_applicationpollview %}
|
{% url application_poll_view poll.id as url_applicationpollview %}
|
||||||
<li class="{% if request.path == url_applicationpollview %}selected{% endif %}"><a href="{% url application_poll_view poll.id %}">{% trans "View Vote" %} {% if forloop.counter > 1 %}(#{{ forloop.counter }}){% endif %}</a></li>
|
<li class="{% if request.path == url_applicationpollview %}selected{% endif %}"><a href="{% url application_poll_view poll.id %}">{{ forloop.counter }}. {% trans "Vote" %}</a></li>
|
||||||
{% url print_application_poll poll.id as url_applicationedit %}
|
|
||||||
<li><a href="{% url print_application_poll poll.id %}"><img src="{% static 'images/icons/pdf.png' %}"> {%trans 'Ballot paper' %} {% if forloop.counter > 1 %}(#{{ forloop.counter }}){% endif %}</a></li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
<form action="" method="post" class="small-form">{% csrf_token %}
|
<form action="" method="post" class="small-form">{% csrf_token %}
|
||||||
{{ pre_form }}
|
{{ pre_form }}
|
||||||
<span id="poll_id" style="display:none">{{ poll.id }}</span>
|
<span id="poll_id" style="display:none">{{ poll.id }}</span>
|
||||||
|
<span style="float:right;">
|
||||||
|
<a href='{% url print_application_poll poll.id %}'>
|
||||||
|
<button class="button" type="button" onclick="window.location='{% url print_application_poll poll.id %}'">
|
||||||
|
<span class="icon pdf">{%trans 'Ballot paper as PDF' %}</span>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
<table class="table" style="width: auto;">
|
<table class="table" style="width: auto;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Option" %}</th>
|
<th>{% trans "Option" %}</th>
|
||||||
|
@ -46,15 +46,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# polls #}
|
{# polls #}
|
||||||
{% if assignment.profile.count > 0 and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
|
{% if perms.assignment.can_manage_assignment %}
|
||||||
<li><a href='{% url assignment_gen_poll assignment.id %}'><img src="{% static 'images/icons/statistics.png' %}"> {%trans 'New vote' %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if perms.projector.can_manage_projector %}
|
|
||||||
{% for poll in polls %}
|
{% for poll in polls %}
|
||||||
{% url assignment_poll_view poll.id as url_assignmentpollview %}
|
{% url assignment_poll_view poll.id as url_assignmentpollview %}
|
||||||
<li class="{% if request.path == url_assignmentpollview %}selected{% endif %}"><a href="{% url assignment_poll_view poll.id %}">{% trans "View Vote" %} {% if forloop.counter > 1 %}(#{{ forloop.counter }}){% endif %}</a></li>
|
<li class="{% if request.path == url_assignmentpollview %}selected{% endif %}"><a href="{% url assignment_poll_view poll.id %}">{{ forloop.counter }}. {% trans "ballot" %}</a></li>
|
||||||
{% url print_assignment_poll poll.id as url_assignmentedit %}
|
|
||||||
<li><a href="{% url print_assignment_poll poll.id %}"><img src="{% static 'images/icons/pdf.png' %}"> {%trans 'Ballot paper' %} {% if forloop.counter > 1 %}(#{{ forloop.counter }}){% endif %}</a></li>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i>
|
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i>
|
||||||
<form action="" method="post" class="small-form">{% csrf_token %}
|
<form action="" method="post" class="small-form">{% csrf_token %}
|
||||||
|
<span style="float:right;">
|
||||||
|
<a href='{% url print_assignment_poll poll.id %}'>
|
||||||
|
<button class="button" type="button" onclick="window.location='{% url print_assignment_poll poll.id %}'">
|
||||||
|
<span class="icon pdf">{%trans 'Ballot paper as PDF' %}</span>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
<table style="width:auto">
|
<table style="width:auto">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Option</th>
|
<th>Option</th>
|
||||||
|
Loading…
Reference in New Issue
Block a user