Commit 3709ce01 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Add link to tool in election creation page

parent ebc65b88
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
<site path="booth" charset="utf-8"> <site path="booth" charset="utf-8">
<static dir="_SRCDIR_/_build/src/booth" /> <static dir="_SRCDIR_/_build/src/booth" />
</site> </site>
<site path="tool" charset="utf-8">
<static dir="_SRCDIR_/_build/src/tool" />
</site>
<eliom module="_build/src/web/server.cma"> <eliom module="_build/src/web/server.cma">
<auth name="demo"><dummy/></auth> <auth name="demo"><dummy/></auth>
<auth name="local"><password db="demo/password_db.csv"/></auth> <auth name="local"><password db="demo/password_db.csv"/></auth>
......
...@@ -116,6 +116,15 @@ module type CORE_SERVICES = sig ...@@ -116,6 +116,15 @@ module type CORE_SERVICES = sig
[< Eliom_service.registrable > `Registrable ], 'a) [< Eliom_service.registrable > `Registrable ], 'a)
Eliom_service.service Eliom_service.service
val tool :
(unit, unit,
[> `Attached of
([> `Internal of [> `Service ] ], [> `Get ])
Eliom_service.a_s ],
[ `WithoutSuffix ], unit, unit,
[< Eliom_service.registrable > `Unregistrable ], 'a)
Eliom_service.service
end end
module type ELECTION_SERVICES = sig module type ELECTION_SERVICES = sig
......
...@@ -129,6 +129,9 @@ module Make (C : CONFIG) : SITE = struct ...@@ -129,6 +129,9 @@ module Make (C : CONFIG) : SITE = struct
** file "public_keys" ** file "public_creds" ** file "public_keys" ** file "public_creds"
) () ) ()
let tool =
preapply (static_dir ()) ["tool"; "belenios-tool.html"]
let cont = Eliom_reference.eref ~scope let cont = Eliom_reference.eref ~scope
(fun () () -> Eliom_registration.Redirection.send home) (fun () () -> Eliom_registration.Redirection.send home)
......
...@@ -293,6 +293,11 @@ module Make (S : SITE_SERVICES) : TEMPLATES = struct ...@@ -293,6 +293,11 @@ module Make (S : SITE_SERVICES) : TEMPLATES = struct
in in
let content = [ let content = [
h1 [pcdata title]; h1 [pcdata title];
p [
pcdata "You can use the ";
a ~service:S.tool [pcdata "tool"] ();
pcdata " to prepare election files.";
];
div body; div body;
] in ] in
lwt login_box = site_login_box () in lwt login_box = site_login_box () in
......
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