Class type virtual Wiki_widgets_interface.​interactive_wikibox

class type virtual interactive_wikibox = object..end

A wikibox with which the user can interact Inherits


method display_wikitext_edit_form : 
'a.
bi:box_info ->
classes:string list ->
?rows:int ->
?cols:int ->
previewonly:bool ->
wb:Wiki_types.wikibox ->
string option * int32 ->
(classes *
([> Html5_types.form ] as 'a) Eliom_content.Html5.F.elt)
Lwt.t

Displays the edition form for a wikibox wb containing wikitext. The flag previewonly governs the display of a button "save". If previewonly is true, wb is only previewed, and cannot saved immediately.

The argument content is the text that is displayed in the edit form, or None if for example the box has been deleted and the user has not entered new text yet.

The argument version is the version of the wikibox when the user started edited the box, and is used to check for concurrent modifications.

method display_wikitext_edit_form_help : 
'b.
bi:box_info ->
classes:string list ->
?rows:int ->
?cols:int ->
previewonly:bool ->
wb:Wiki_types.wikibox ->
string option * int32 ->
(classes *
([> `Div | `Form ] as 'b) Eliom_content.Html5.F.elt list)
Lwt.t

Same as display_wikitext_edit_form, but with an help for the syntax of the wiki

method display_css_edit_form : 
'c.
bi:box_info ->
classes:string list ->
?rows:int ->
?cols:int ->
wb:Wiki_types.wikibox ->
wbcss:Wiki_types.wikibox ->
wikipage:Wiki_types.wiki * string option ->
string option * int32 ->
(classes *
([> Html5_types.form ] as 'c) Eliom_content.Html5.F.elt list)
Lwt.t

Displays the edition form for the wikibox wbcss, which is supposed to contain a CSS. The form is supposed to be displayed instead of the wikibox wb. (This information is used to create menu buttons.) The argument wikipage is supposed to be such that the css associated to the wikipage is in wbcss. The arguments version and content are as in display_wikitext_edit_form.

method display_edit_wiki_perm_form : 
'd.
classes:string list ->
?wb:Wiki_types.wikibox ->
Wiki_types.wiki ->
(classes *
([> `H2 | `P | `Table ] as 'd) Eliom_content.Html5.F.elt list)
Lwt.t

Display a form permitting to edit the permissions of the given wiki. The wikibox argument is the wikibox which is overridden if an error occurs

method display_edit_wikibox_perm_form : 
'e.
bi:box_info ->
classes:string list ->
Wiki_types.wikibox ->
(classes *
([> `Form | `P | `PCDATA | `Table ] as 'e) Eliom_content.Html5.F.elt
list)
Lwt.t

Display a form to edit the permissions of the given wikibox

method display_wikitext_history : 
'f 'g.
bi:box_info ->
classes:string list ->
wb:Wiki_types.wikibox ->
< author : < get : unit; nul : Sql.non_nullable; t : Sql.int32_t > Sql.t;
comment : < get : unit; nul : Sql.non_nullable; t : Sql.string_t >
Sql.t;
datetime : < get : unit; nul : Sql.non_nullable; t : Sql.timestamp_t >
Sql.t;
version : < get : unit; nul : Sql.non_nullable; t : Sql.int32_t >
Sql.t >
list ->
(classes *
([> `A of [> Html5_types.pcdata ] as 'f | `Br | `Em | `PCDATA ] as 'g)
Eliom_content.Html5.F.elt list)
Lwt.t

Display the history of the wikibox wb, which is supposed to contain wikitext

method display_css_history : 
'h 'i.
bi:box_info ->
classes:string list ->
wb:Wiki_types.wikibox ->
wbcss:Wiki_types.wikibox ->
wikipage:Wiki_types.wiki * string option ->
< author : < get : unit; nul : Sql.non_nullable; t : Sql.int32_t > Sql.t;
comment : < get : unit; nul : Sql.non_nullable; t : Sql.string_t >
Sql.t;
datetime : < get : unit; nul : Sql.non_nullable; t : Sql.timestamp_t >
Sql.t;
version : < get : unit; nul : Sql.non_nullable; t : Sql.int32_t >
Sql.t >
list ->
(classes *
([> `A of [> Html5_types.pcdata ] as 'h | `Br | `Em | `PCDATA ] as 'i)
Eliom_content.Html5.F.elt list)
Lwt.t

Display the history of the wikibox wb, which is supposed to contain a CSS. See display_css_edit_form for the arguments wbcss and wikipage.

method display_menu_box : 
'a.
bi:box_info ->
classes:string list ->
?active_item:menu_item ->
?special_box:special_box ->
?title:string ->
wb:Wiki_types.wikibox ->
([< Html5_types.div_content_fun > `Div ] as 'a)
Eliom_content.Html5.F.elt list ->
'a Eliom_content.Html5.F.elt list Lwt.t

Adds an interactive menu and a title on top of content. The result of displaying wb is supposed to be the argument content. The argument active_item is used to know which tab to highlight in the menu. The argument special_box is used to specify whether we should add special button (see the documentation for special_box. The classes argument must contain a list of css classes that will be added to the outermost xhtml element.

method display_interactive_wikibox_aux : 
'j.
bi:box_info ->
?classes:string list ->
?rows:int ->
?cols:int ->
?special_box:special_box ->
Wiki_types.wikibox ->
(([> Html5_types.div ] as 'j) Eliom_content.Html5.F.elt list * bool)
Lwt.t

Display the wikibox wb as an interactive wikibox. We return the xhtml code, and the http return code. The options classe and cssmenu are the same as in display_menu_box.

method display_interactive_wikibox : 
'k.
bi:box_info ->
?classes:string list ->
?rows:int ->
?cols:int ->
?special_box:special_box ->
Wiki_types.wikibox ->
([> Html5_types.div ] as 'k) Eliom_content.Html5.F.elt list Lwt.t

Same as interactive_wikibox_aux, except that the http error code is not returned.

method display_overriden_interactive_wikibox : 
'l.
bi:box_info ->
?classes:string list ->
?rows:int ->
?cols:int ->
?special_box:special_box ->
wb_loc:Wiki_types.wikibox ->
override:wikibox_override ->
unit ->
(([> `Div | `P ] as 'l) Eliom_content.Html5.F.elt list * bool) Lwt.t

Display the wikibox wb_loc, but entirely overrides the content according to the argument override. The argument wb_loc is only used to build the interactive menu.

method css_header : 
'm.
?page:string ->
Wiki_types.wiki ->
([> Html5_types.link ] as 'm) Eliom_content.Html5.F.elt list Lwt.t

Returns the css headers for one wiki and optionally one page.

method display_container : 
'n.
wiki:Wiki_types.wiki ->
sectioning:bool ->
menu_style:menu_style ->
page:string * string list ->
gen_box:(sectioning:bool ->
menu_style ->
(Wiki_types.wikibox option *
([< Html5_types.flow5 ] as 'n) Eliom_content.Html5.F.elt list *
page_displayable * string option)
Lwt.t) ->
(Html5_types.html Eliom_content.Html5.F.elt * int) Lwt.t

Adds the container of the wiki around some content. The content is given by the function gen_box, which takes as argument the default style of the menus for the wikiboxes, and returns the html code for the content, an option indicating whether the content originates from a wikibox (and which one), an html error code, and the title for the whole page. The page argument is the url of the page wrt. the root of the wiki. For technical reasons it must be specified as a string, and as the original path (ie. string list). The function returns the entire html page, and the http error code returned by gen_box.

method display_wikipage : 
wiki:Wiki_types.wiki ->
sectioning:bool ->
menu_style:menu_style ->
page:string * string list ->
(Html5_types.html Eliom_content.Html5.F.elt * int) Lwt.t

Displaying of the content of an entire wikipage, ie. both the container (as per display_container) and the content of the wikibox that corresponds to the wikipage.

method display_wikifile : 
wiki:Wiki_types.wiki ->
sectioning:bool ->
menu_style:menu_style ->
template:string ->
file:Ocsigen_local_files.resolved ->
(Html5_types.html Eliom_content.Html5.F.elt * int) Lwt.t

Displaying of the content of an template wikipage, with file as subbox.

method display_wikibox : 
wiki:Wiki_types.wiki ->
sectioning:bool ->
menu_style:menu_style ->
template:string ->
wb:Wiki_types.wikibox ->
(Html5_types.html Eliom_content.Html5.F.elt * int) Lwt.t
method display_all_wikis : 
deleted:bool ->
unit -> Html5_types.flow5 Eliom_content.Html5.F.elt list Lwt.t

Display of the list of all the wikis, as well as of some links to edit their properties

method draw_edit_form : 
page:Wiki_types.wiki * string list option ->
rows:int ->
cols:int ->
Wiki_types.wikibox ->
Html5_types.phrasing Eliom_content.Html5.F.elt list ->
Html5_types.phrasing Eliom_content.Html5.F.elt list ->
Int32.t ->
string ->
bool ->
[ `One of string ] Eliom_parameter.param_name *
(([ `One of Wiki_types.wiki ] Eliom_parameter.param_name *
([ `One of unit ] Eliom_parameter.param_name *
[ `One of string ] Eliom_parameter.param_name Eliom_parameter.listnames)) *
(([ `One of Wiki_types.wikibox ] Eliom_parameter.param_name *
[ `One of int32 ] Eliom_parameter.param_name) *
[ `One of string ] Eliom_parameter.param_name)) ->
Html5_types.form_content Eliom_content.Html5.F.elt list

Display edit form