Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
06fbfc2e
Commit
06fbfc2e
authored
14 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
merged voter list and bboard
parent
794170d9
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
helios/templates/election_view.html
+2
-2
2 additions, 2 deletions
helios/templates/election_view.html
helios/templates/voters_list.html
+7
-3
7 additions, 3 deletions
helios/templates/voters_list.html
helios/views.py
+9
-1
9 additions, 1 deletion
helios/views.py
with
18 additions
and
6 deletions
helios/templates/election_view.html
+
2
−
2
View file @
06fbfc2e
...
...
@@ -59,7 +59,7 @@ this election is <u>not</u> featured on the front page.
<p
align=
"center"
style=
"font-size: 1.5em;"
>
<a
href=
"{% url helios.views.one_election_questions election.uuid %}"
>
questions ({% if election.questions %}{{election.questions|length}}{% else %}0{% endif %})
</a>
|
<a
href=
"{% url helios.views.voters_list_pretty election.uuid %}"
>
voters
</a>
<a
href=
"{% url helios.views.voters_list_pretty election.uuid %}"
>
voters
&
ballots
</a>
|
<a
href=
"{% url helios.views.list_trustees_view election.uuid %}"
>
trustees ({{trustees|length}})
</a>
</p>
...
...
@@ -241,7 +241,7 @@ You are <em>not eligible</em> to vote in this election, because registration is
{% endif %}
<p
style=
"font-size: 1.3em;"
>
<a
href=
"{% url helios.views.
one_election_bboard
election.uuid %}"
>
Ballot Tracking Center
</a>
|
<a
href=
"{% url helios.views.
voters_list_pretty
election.uuid %}"
>
Ballot Tracking Center
</a>
|
<a
href=
"{% url helios.views.one_election_audited_ballots election.uuid %}"
>
Audited Ballots
</a>
</p>
...
...
This diff is collapsed.
Click to expand it.
helios/templates/voters_list.html
+
7
−
3
View file @
06fbfc2e
...
...
@@ -21,7 +21,11 @@
<p>
{% if q %}
<p><em>
searching for
<u>
{{q}}
</u>
.
</em>
[
<a
href=
"?"
>
clear search
</a>
]
</p>
{% else %}
<form
method=
"get"
action=
"{% url helios.views.voters_list_pretty election.uuid %}"
><b>
search
</b>
:
<input
type=
"text"
name=
"q"
/>
<input
type=
"submit"
value=
"search"
/></form>
{% endif %}
</p>
<br
/>
{% if admin_p and upload_p %}
...
...
@@ -56,13 +60,13 @@ Prior Bulk Uploads:
{% if voters %}
{% if voters_page.has_previous %}
<a
href=
"./list?page={{voters_page.previous_page_number}}&limit={{limit}}"
>
previous {{limit}}
</a>
<a
href=
"./list?page={{voters_page.previous_page_number}}&limit={{limit}}
&q={{q|urlencode}}
"
>
previous {{limit}}
</a>
{% endif %}
Voters {{voters_page.start_index}} - {{voters_page.end_index}} (of {{total_voters}})
{% if voters_page.has_next %}
<a
href=
"./list?page={{voters_page.next_page_number}}&limit={{limit}}"
>
next {{limit}}
</a>
<a
href=
"./list?page={{voters_page.next_page_number}}&limit={{limit}}
&q={{q|urlencode}}
"
>
next {{limit}}
</a>
{% endif %}
<table
class=
"pretty"
>
...
...
@@ -99,7 +103,7 @@ Voters {{voters_page.start_index}} - {{voters_page.end_index}} (of {{total_voter
</table>
{% else %}
<em>
no voters
yet
</em>
<em>
no voters
.
</em>
{% endif %}
{% endblock %}
This diff is collapsed.
Click to expand it.
helios/views.py
+
9
−
1
View file @
06fbfc2e
...
...
@@ -838,6 +838,7 @@ def voters_list_pretty(request, election):
# for django pagination support
page
=
int
(
request
.
GET
.
get
(
'
page
'
,
1
))
limit
=
int
(
request
.
GET
.
get
(
'
limit
'
,
50
))
q
=
request
.
GET
.
get
(
'
q
'
,
''
)
order_by
=
'
voter_id
'
...
...
@@ -849,6 +850,13 @@ def voters_list_pretty(request, election):
# load a bunch of voters
voters
=
Voter
.
get_by_election
(
election
,
order_by
=
order_by
)
if
q
!=
''
:
if
election
.
use_voter_aliases
:
voters
=
voters
.
filter
(
alias__icontains
=
q
)
else
:
voters
=
voters
.
filter
(
name__icontains
=
q
)
total_voters
=
voters
.
count
()
voter_paginator
=
Paginator
(
voters
,
limit
)
...
...
@@ -858,7 +866,7 @@ def voters_list_pretty(request, election):
'
voters
'
:
voters_page
.
object_list
,
'
admin_p
'
:
admin_p
,
'
email_voters
'
:
helios
.
VOTERS_EMAIL
,
'
limit
'
:
limit
,
'
total_voters
'
:
total_voters
,
'
upload_p
'
:
helios
.
VOTERS_UPLOAD
,
'
upload_p
'
:
helios
.
VOTERS_UPLOAD
,
'
q
'
:
q
,
'
voter_files
'
:
voter_files
})
@election_admin
(
frozen
=
False
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment