Commit c351faf0 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Add link to booth in audit info

parent 162cf991
......@@ -234,6 +234,8 @@ let dummy_login ~service =
~content:[div [form]]
let election_view ~election =
let service = Eliom_service.preapply Helios_services.election_raw election.election.e_uuid in
let booth = Helios_services.make_booth election.election.e_uuid in
let audit_info = [
(* FIXME: unsafe_data *)
unsafe_data "<a href=\"#\" onclick=\"$('#auditbody').slideToggle(250);\">Audit Info</a>";
......@@ -243,19 +245,27 @@ let election_view ~election =
] [
br ();
pcdata "Election URL:";
pre ~a:[a_style "font-size: 1.2em;"] [
let service = Eliom_service.preapply Helios_services.election_raw election.election.e_uuid in
br ();
code ~a:[a_style "font-size: 1.2em;"] [
a ~service [ pcdata (make_string_uri ~absolute:true ~service ()) ] ()
];
br ();
br ();
pcdata "Election Fingerprint:";
pre ~a:[a_style "font-size: 1.3em; font-weight: bold;"] [
br ();
code ~a:[a_style "font-size: 1.3em; font-weight: bold;"] [
pcdata election.xelection.Helios_services.fingerprint;
];
br ();
br ();
(* FIXME: Ballot Tracking Center *)
(* FIXME: Audited Ballots *)
(* FIXME: result *)
(* FIXME: voting booth *)
p ~a:[a_style "font-size: 1.2em;"] [
pcdata "Review the ";
a ~service:booth [ pcdata "voting booth" ] ();
pcdata ".";
];
]
] in
let content = [
......
......@@ -183,11 +183,7 @@ let () = Eliom_registration.Redirection.register
~service:Helios_services.election_vote
(fun uuid () ->
try_lwt
lwt election = get_election_by_uuid uuid in
let service = Eliom_service.preapply Helios_services.election_raw uuid in
return (Eliom_service.preapply Helios_services.election_booth
(["booth"; "vote.html"],
Eliom_uri.make_string_uri ~absolute_path:true ~service ()))
return (Helios_services.make_booth uuid)
with Not_found ->
raise_lwt Eliom_common.Eliom_404)
......
......@@ -80,6 +80,13 @@ let election_booth = static_dir_with_params
~get_params:(string "election_url")
()
let make_booth uuid =
let service = Eliom_service.preapply election_raw uuid in
Eliom_service.preapply election_booth (
["booth"; "vote.html"],
Eliom_uri.make_string_uri ~absolute_path:true ~service ()
)
let election_vote = service
~path:["elections"; "vote"]
~get_params:uuid
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment