Commit 84d12881 authored by Stephane Glondu's avatar Stephane Glondu
Browse files

Show names in listing of elections in setup mode

parent 206ff824
......@@ -266,7 +266,7 @@ let () = Html5.register ~service:admin
and setup_elections =
Ocsipersist.fold_step (fun k v accu ->
if v.se_owner = u
then return (uuid_of_string k :: accu)
then return ((uuid_of_string k, v.se_questions.t_name) :: accu)
else return accu
) election_stable []
in return @@ Some (elections, setup_elections)
......
......@@ -207,8 +207,8 @@ let admin ~elections () =
match setup_elections with
| [] -> p [pcdata "You own no such elections!"]
| _ -> ul @@
List.map (fun k ->
li [a ~service:election_setup [pcdata (Uuidm.to_string k)] k]
List.map (fun (k, title) ->
li [a ~service:election_setup [pcdata title] k]
) setup_elections
in
let content = [
......
......@@ -22,7 +22,7 @@
open Web_signatures
val home : featured:(module WEB_ELECTION) list -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val admin : elections:((module WEB_ELECTION) list * Uuidm.t list) option -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val admin : elections:((module WEB_ELECTION) list * (Uuidm.t * string) list) option -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
val new_election_failure : [ `Exists | `Exception of exn ] -> unit -> [> `Html ] Eliom_content.Html5.F.elt Lwt.t
......
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