Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Page_site

module Page_site : sig..end

Author(s): Boris Yakobowski


An alias for the services that are accepted in the admin menu.

val static_service : 
  (string list, unit, Eliom_service.get_service_kind,
   Eliom_service.attached, Eliom_service.service_kind, [ `WithSuffix ],
   [ `One of string list ] Eliom_parameter.param_name, unit,
   [ `Registrable ], Eliom_registration.http_service)
  Eliom_service.service

The service that answers for Ocsimore static files.

val static_file_uri : path:string list -> Eliom_content.Html5.F.uri

Path to a static file, suitable for inclusion in a <a> tag

val admin_staticdir : string
module Header : sig..end

Allows to add HTML headers required by page components

val add_admin_pages_header : unit -> unit Lwt.t

Function to be called on admin pages, and which add the relevant css (including for the admin menu)

val add_onload_function : string -> unit Lwt.t

Registers the string passed as argument so that it is called when the onload event on the body tag of the page fires. The string must thus be well-formed javascript (without ; at the end)

val html_page : 
  ?body_classes:Html5_types.nmtokens ->
  ?css:Html5_types.link Eliom_content.Html5.F.elt list ->
  ?title:string ->
  ?heading:string ->
  Html5_types.body_content Eliom_content.Html5.F.elt list ->
  Eliom_content.Html5.F.html Lwt.t

Generic headers for an html page. The arguments css is added after the links resulting from the hooks added by the function add_html_header_hook above. The argument body_classes is used for the classes of the body html element.

Functions related to the administration menu

val add_to_admin_menu : 
  name:string ->
  links:(string * menu_link_service * (unit -> bool Lwt.t))
   list ->
  root:menu_link_service -> unit

Adds an entire subsection, labelled by name to the admin menu. The service root is used to represent this section. For the list of links, if the function returns false, the link is not displayed.

val admin_page : 
  ?service:menu_link_service ->
  ?body_classes:string list ->
  ?css:Html5_types.link Eliom_content.Html5.F.elt list ->
  title:string ->
  Html5_types.flow5 Eliom_content.Html5.F.elt list ->
  Eliom_content.Html5.F.html Lwt.t

Displays a complete admin page, with the admin menu and the status bar. If allow_unlogged is false, users that have not logged-in will not be able to see the page

val body_to_div : 
  Html5_types.body_content Eliom_content.Html5.F.elt list ->
  Html5_types.flow5 Eliom_content.Html5.F.elt list
val userid_permissions : 
  (User_sql.Types.userid -> bool Lwt.t) -> bool Lwt.t
val no_permission : 
  unit -> Html5_types.body_content Eliom_content.Html5.F.elt list Lwt.t
val admin_body_content_with_permission_handler : 
  title:('get_params -> 'post_params -> string Lwt.t) ->
  ?service:('get_params ->
   'post_params -> menu_link_service Lwt.t) ->
  permissions:('get_params -> 'post_params -> bool Lwt.t) ->
  display:('get_params ->
   'post_params ->
   [< Html5_types.body_content ] Eliom_content.Html5.F.elt list
   Lwt.t) ->
  'get_params -> 'post_params -> Eliom_content.Html5.F.html Lwt.t

Display a widget#display as a admin_page under certain permissions. Also, some parameters of admin_page are made available here.

val icon : 
  path:string -> text:string -> [> `Img ] Eliom_content.Html5.F.elt
val add_status_function : 
  (unit -> Html5_types.flow5 Eliom_content.Html5.F.elt Lwt.t) -> unit