Commit 4da62eef authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Clean up

parent e481f59e
......@@ -65,7 +65,6 @@ lwt election_table =
fingerprint;
election;
fn_public_keys;
author = { user_name = "admin"; user_type = Dummy };
featured_p = true;
can_read = Any;
can_vote = Any;
......
......@@ -75,12 +75,12 @@ let election_index = service
()
let election_raw = service
~path:["election"; "raw"]
~path:["election"; "election.json"]
~get_params:uuid
()
let election_public_keys = service
~path:["election"; "public_keys"]
~path:["election"; "public_keys.jsons"]
~get_params:uuid
()
......@@ -95,7 +95,7 @@ let election_cast = service
()
let election_ballots = service
~path:["election"; "ballots"]
~path:["election"; "ballots.jsons"]
~get_params:uuid
()
......
......@@ -175,47 +175,36 @@ let election_view ~election ~user =
h2 [pcdata "Audit Info"];
div [
div [
pcdata "Election URL: ";
code [
a ~service [ pcdata (make_string_uri ~absolute:true ~service ()) ] ()
];
];
div [
pcdata "Election Fingerprint: ";
pcdata "Election fingerprint: ";
code [ pcdata election.Web_common.fingerprint ];
];
div [
pcdata "Election data: ";
a ~service [ pcdata "parameters" ] ();
pcdata ", ";
a ~service:Services.(preapply_uuid election_public_keys election) [
pcdata "trustee public keys"
] ();
pcdata ", ";
a ~service:Services.(preapply_uuid election_ballots election) [
pcdata "Ballot Tracking Center";
pcdata "ballots";
] ();
pcdata ".";
];
div [
a ~service:booth [ pcdata "Voting booth" ] ();
];
]
] in
let nquestions = Array.length election.Web_common.election.e_questions in
let content = [
h1 [ pcdata election.Web_common.election.e_name ];
p [
pcdata "This is an election created by ";
format_user election.Web_common.author;
pcdata " with ";
pcdata (string_of_int nquestions);
Printf.ksprintf pcdata " question%s."
(if nquestions > 1 then "s" else "");
];
p [pcdata election.Web_common.election.e_description];
p permissions;
div [
div [
a ~service:(Services.(preapply_uuid election_vote election)) [
pcdata "Vote in this election";
] ();
];
div [
pcdata "This election ends at the administrator's discretion.";
];
];
audit_info;
] in
......
......@@ -22,7 +22,6 @@ type election_data = {
fingerprint : string;
election : ff_pubkey election;
fn_public_keys : string;
author : user;
featured_p : bool;
can_read : acl;
can_vote : acl;
......
......@@ -18,7 +18,6 @@ type election_data = {
fingerprint : string;
election : ff_pubkey election;
fn_public_keys : string;
author : user;
featured_p : bool;
can_read : acl;
can_vote : acl;
......
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