Commit 162cf991 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Enable booth

parent 0f5ce4ca
......@@ -179,12 +179,15 @@ let () = Eliom_registration.Html5.register
with Not_found ->
raise_lwt Eliom_common.Eliom_404)
let () = Eliom_registration.Html5.register
let () = Eliom_registration.Redirection.register
~service:Helios_services.election_vote
(fun uuid () ->
try_lwt
lwt election = get_election_by_uuid uuid in
Helios_templates.not_implemented "Vote"
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 ()))
with Not_found ->
raise_lwt Eliom_common.Eliom_404)
......
......@@ -76,6 +76,10 @@ let election_view = service
~get_params:uuid
()
let election_booth = static_dir_with_params
~get_params:(string "election_url")
()
let election_vote = service
~path:["elections"; "vote"]
~get_params:uuid
......
......@@ -29,6 +29,9 @@
<site path="static" charset="utf-8">
<static dir="_SRCDIR_/helios/static" />
</site>
<site path="booth" charset="utf-8">
<static dir="_SRCDIR_/helios/booth" />
</site>
<eliom module="_build/src/server.cma">
<elections index="_RUNDIR_/lib/elections.json" library="tests/data"/>
</eliom>
......
Supports Markdown
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