@@ -42,7 +42,6 @@ <h1>{{ ballot.post.label }}</h1>
4242
4343
4444{% block content %}
45-
4645< div class ="row ">
4746 < div class ="columns large-9 ">
4847 < div class ="ballot_status ">
@@ -76,6 +75,9 @@ <h2>Candidates unknown</h2>
7675 We don’t know of any candidates in {{ ballot.post.label }} for the {{ ballot.election.name }} yet.
7776 We expect the official list of candidates to be published on or after
7877 < strong > {{ ballot.expected_sopn_date }}</ strong > .</ p >
78+ < p class ="clearfix ">
79+ {% include "elections/includes/_ballot_add_candidate.html" with position='left' %}
80+ </ p >
7981 {% endif %}
8082 </ div >
8183
@@ -182,61 +184,46 @@ <h2>Candidates unknown</h2>
182184 {% endif %}
183185 </ tr >
184186 {% endfor %}
187+
188+ {% if membership_edits_allowed or not user.is_authenticated and not ballot.has_sopn%}
189+ < tr >
190+ < td colspan ="3 ">
191+ {% include "elections/includes/_ballot_add_candidate.html" %}
192+ </ td >
193+ </ tr >
194+
195+ {% endif %}
196+
197+
185198 </ tbody >
186199 </ table >
187200 {% endif %}
201+
202+ < div class ="ballot-ctas ">
188203 {% if user_can_record_results and has_any_winners %}
189204 < form action ="{% url 'retract-winner' ballot_paper_id=ballot.ballot_paper_id %} " method ="post ">
190205 {% csrf_token %}
191206 < input type ="submit " class ="button alert small " value ="Unset the current winners, if incorrect ">
192207 </ form >
193208 {% endif %}
194-
195- < div class ="ballot-ctas ">
196-
197209 {% include "elections/includes/_ballot_suggest_locking.html" %}
198210 {% include "elections/includes/_ballot_lock_form.html" %}
199211
200212 {% if user_can_review_photos and ballot.get_absolute_queued_image_review_url %}
201213 < p > This ballot has candidate photos awaiting approval.< a href ="{{ ballot.get_absolute_queued_image_review_url }} "> Do you have time to review them?</ a > </ p >
202214 {% endif %}
203-
204- {% if membership_edits_allowed %}
205- < p class ="right-align ">
206- < a class ="show-new-candidate-form button {% if ballot.has_sopn %}secondary{% endif %} " href ="{% url 'person-create' ballot_paper_id=ballot.ballot_paper_id %} ">
207- Add a new candidate
208- </ a >
209- </ p >
210- {% elif not user.is_authenticated and not ballot.has_sopn %}
211- < p >
212-
213- < a href ="{% url 'wombles:login' %}?next={{ request.path }} " class ="button ">
214- Sign in to add a new candidate
215- </ a >
216- </ p >
217- {% endif %}
218215 </ div >
219216
220- {% if membership_edits_allowed %}
221- {% if add_candidate_form %}
222- < div class ="candidates__new " {% if add_candidate_form.errors %}style ="display: block "{% endif %} >
223- < h4 > Add a new candidate</ h4 >
224- < form id ="new-candidate-form " name ="new-candidate-form " action ="{% url 'person-create' ballot_paper_id=ballot.ballot_paper_id %} " method ="post ">
225- {% with form=add_candidate_form identifiers_formset=identifiers_formset %}
226- {% include 'candidates/_person_form.html' %}
227- {% endwith %}
228- </ form >
229- </ div >
230- {% endif %}
231217
232- {# Only include these if the user can alter memberships #}
233- {% include "elections/includes/_ballot_candidates_might_stand.html" %}
234- {% include "elections/includes/_ballot_candidates_not_standing.html" %}
235- {% endif %}
236218 {% if ballot.has_results and ballot.resultset %}
237219 {% include "elections/includes/_ballot_results_table.html" with results=ballot.resultset %}
238220 {% endif %}
239221
222+ {# Only include these if the user can alter memberships #}
223+ {% include "elections/includes/_ballot_candidates_might_stand.html" %}
224+ {% include "elections/includes/_ballot_candidates_not_standing.html" %}
225+
226+
240227 {% if user.is_authenticated and logged_actions %}
241228 < h2 id ="history "> History for this ballot</ h2 >
242229 {% for action in logged_actions %}
0 commit comments