Some template style work.

This commit is contained in:
Emanuel Schuetze 2013-02-04 13:06:36 +01:00
parent 033ecd9497
commit e822efdc81
4 changed files with 50 additions and 45 deletions

View File

@ -25,8 +25,9 @@
<p><b>{% trans "Short description (for ballot paper)" %}:</b> {{ assignment.polldescription }}</p> <p><b>{% trans "Short description (for ballot paper)" %}:</b> {{ assignment.polldescription }}</p>
{% endif %} {% endif %}
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i> <p>
{% trans "Special values" %}: <span class="badge badge-success">-1</span> = {% trans 'majority' %} | <span class="badge">-2</span> = {% trans 'undocumented' %}
</p>
<form action="" method="post" class="small-form">{% csrf_token %} <form action="" method="post" class="small-form">{% csrf_token %}
<table class="table table-striped table-bordered" style="width: auto;"> <table class="table table-striped table-bordered" style="width: auto;">
<tr> <tr>

View File

@ -98,7 +98,7 @@
{% endif %} {% endif %}
{% if perms.assignment.can_manage_assignments and blocked_candidates and assignment.status != "fin" %} {% if perms.assignment.can_manage_assignments and blocked_candidates and assignment.status != "fin" %}
<h3>{% trans "Blocked Candidates" %}</h3> <h4>{% trans "Blocked Candidates" %}</h4>
<ul> <ul>
{% for person in blocked_candidates %} {% for person in blocked_candidates %}
<li> <li>

View File

@ -39,49 +39,50 @@
</small> </small>
</h1> </h1>
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i> <p>
{% trans "Special values" %}: <span class="badge badge-success">-1</span> = {% trans 'majority' %} | <span class="badge">-2</span> = {% trans 'undocumented' %}
<form action="" method="post" class="small-form">{% csrf_token %} </p>
{{ pre_form }} <form action="" method="post" class="small-form">{% csrf_token %}
<span id="poll_id" style="display:none">{{ poll.id }}</span> {{ pre_form }}
<table class="table table-striped table-bordered" style="width: auto;"> <span id="poll_id" style="display:none">{{ poll.id }}</span>
<table class="table table-striped table-bordered" style="width: auto;">
<tr>
<th>{% trans "Option" %}</th>
<th>{% trans "Votes" %}</th>
</tr>
{% for value in forms.0 %}
<tr> <tr>
<th>{% trans "Option" %}</th> <td>{{ value.label }}</td>
<th>{% trans "Votes" %}</th> <td>{{ value.errors }}{{ value }}</td>
</tr> </tr>
{% for value in forms.0 %} {% endfor %}
<tr> <tr>
<td>{{ value.label }}</td> <td>{% trans "Invalid votes" %}</td>
<td>{{ value.errors }}{{ value }}</td> <td>{{ pollform.votesinvalid.errors }}{{ pollform.votesinvalid }}</td>
</tr> </tr>
{% endfor %} <tr class="total warning">
<tr> <td>{% trans "Votes cast" %}</td>
<td>{% trans "Invalid votes" %}</td> <td>{{ pollform.votescast.errors }}{{ pollform.votescast }}</td>
<td>{{ pollform.votesinvalid.errors }}{{ pollform.votesinvalid }}</td> </tr>
</tr> </table>
<tr class="total warning"> {{ post_form }}
<td>{% trans "Votes cast" %}</td> <!-- ballot paper button -->
<td>{{ pollform.votescast.errors }}{{ pollform.votescast }}</td> <p>
</tr> <a href="{% url 'print_motion_poll' poll.id %}" class="btn">
</table> <i class="icon-print"></i> {% trans 'Ballot paper as PDF' %}
{{ post_form }} </a>
<!-- ballot paper button --> </p>
<p> <!-- Control buttons -->
<a href="{% url 'print_motion_poll' poll.id %}" class="btn"> <div class="control-group">
<i class="icon-print"></i> {% trans 'Ballot paper as PDF' %} <button type="submit" class="btn btn-primary">
{% trans 'Save' %}
</button>
<button type="submit" name="apply" class="btn">
{% trans 'Apply' %}
</button>
<a href="{% url 'motion_view' motion.id %}" class="btn">
{% trans 'Cancel' %}
</a> </a>
</p> </div>
<!-- Control buttons --> </form>
<div class="control-group">
<button type="submit" class="btn btn-primary">
{% trans 'Save' %}
</button>
<button type="submit" name="apply" class="btn">
{% trans 'Apply' %}
</button>
<a href="{% url 'motion_view' motion.id %}" class="btn">
{% trans 'Cancel' %}
</a>
</div>
</form>
{% endblock %} {% endblock %}

View File

@ -116,6 +116,9 @@ tr.total td {
input, textarea { input, textarea {
width: 320px; width: 320px;
} }
.small-form input {
width: 33px;
}
textarea { textarea {
height: 100px; height: 100px;
} }