Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit a22d1533 authored by Stephane Glondu's avatar Stephane Glondu

Drop WEB_ELECTION_RO

parent 5c63d973
......@@ -475,15 +475,11 @@ module type WEB_PARAMS = sig
val dir : string
end
module type WEB_ELECTION_RO = sig
module type WEB_ELECTION = sig
include ELECTION_DATA
include WEB_PARAMS
module E : ELECTION with type elt = G.t
module S : ELECTION_SERVICES
end
module type WEB_ELECTION = sig
include WEB_ELECTION_RO
module B : WEB_BALLOT_BOX
module H : AUTH_HANDLERS_PUBLIC
end
......@@ -560,11 +556,11 @@ end
module type TEMPLATES = sig
val home :
featured:(module WEB_ELECTION_RO) list ->
featured:(module WEB_ELECTION) list ->
unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val admin :
elections:(module WEB_ELECTION_RO) list ->
elections:(module WEB_ELECTION) list ->
unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val new_election :
......@@ -593,7 +589,7 @@ module type TEMPLATES = sig
[> `Html ] Eliom_content.Html5.F.elt Lwt.t
module Login (S : AUTH_SERVICES) : LOGIN_TEMPLATES
module Election (W : WEB_ELECTION_RO) : ELECTION_TEMPLATES
module Election (W : WEB_ELECTION) : ELECTION_TEMPLATES
end
......
......@@ -417,10 +417,7 @@ module Make (C : CONFIG) : SITE = struct
| None ->
lwt featured =
Ocsipersist.get featured >>=
Lwt_list.map_p (fun x ->
let module W = (val SMap.find x !election_table : WEB_ELECTION) in
return (module W : WEB_ELECTION_RO)
)
Lwt_list.map_p (fun x -> return @@ SMap.find x !election_table)
in
T.home ~featured () >>= Html5.send
| Some x ->
......@@ -439,7 +436,7 @@ module Make (C : CONFIG) : SITE = struct
SMap.fold (fun _ w accu ->
let module W = (val w : WEB_ELECTION) in
if W.metadata.e_owner = Some u then (
(module W : WEB_ELECTION_RO) :: accu
w :: accu
) else (
accu
)
......
......@@ -103,7 +103,7 @@ module Make (S : SITE_SERVICES) : TEMPLATES = struct
]))
let format_election kind election =
let module W = (val election : WEB_ELECTION_RO) in
let module W = (val election : WEB_ELECTION) in
let e = W.election.e_params in
let service =
match kind with
......@@ -495,7 +495,7 @@ module Make (S : SITE_SERVICES) : TEMPLATES = struct
let login_box = pcdata "" in
base ~title ~login_box ~content
module Election (W : WEB_ELECTION_RO) = struct
module Election (W : WEB_ELECTION) = struct
let election_login_box =
let auth = (module W.S : AUTH_SERVICES) in
......
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