Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ocaml-edt
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Coquery
ocaml-edt
Commits
0a9b3dd7
Commit
0a9b3dd7
authored
8 months ago
by
Emmanuel Coquery
Browse files
Options
Downloads
Patches
Plain Diff
HTML simple page fix
parent
17cd634d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Timetable.ml
+9
-6
9 additions, 6 deletions
lib/Timetable.ml
with
9 additions
and
6 deletions
lib/Timetable.ml
+
9
−
6
View file @
0a9b3dd7
...
...
@@ -24,7 +24,8 @@ let week_start_of_date d : date =
let
offset
=
1
-
int_of_day
day
in
add
d
(
Period
.
day
offset
)
(* let as_iso (d : date) : string = CalendarLib.Printer.Date.sprint "%F" d *)
let
to_isostring
(
dt
:
CalendarLib
.
Calendar
.
t
)
:
string
=
CalendarLib
.
Printer
.
Calendar
.
sprint
"%FT%T"
dt
(* type 'a cell = { rowspan : int; colspan : int; content : 'a }
type 'a line = { headers : string cell list; cells : 'a cell list }
...
...
@@ -130,8 +131,8 @@ module Make (R : ResourcesT) = struct
[
(
"id"
,
`String
(
"evt"
^
string_of_int
id
));
(
"title"
,
`String
(
R
.
title
c
.
resources
));
(
"start"
,
`String
(
Pr
.
sprint
"%FT%T"
c
.
start
));
(
"end"
,
`String
(
Pr
.
sprint
"%FT%T"
(
ends
c
)));
(
"start"
,
`String
(
to_isostring
c
.
start
));
(
"end"
,
`String
(
to_isostring
(
ends
c
)));
]
in
`List
...
...
@@ -150,7 +151,7 @@ module Make (R : ResourcesT) = struct
let
tpl
=
{
|
<!
DOCTYPE
html
>
<
html
lang
=
'
en
'
>
<
html
lang
=
'
fr
-
FR
'
>
<
head
>
<
meta
charset
=
'
utf
-
8
'
/>
<
script
src
=
'
https
://
cdn
.
jsdelivr
.
net
/
npm
/
fullcalendar
@
6
.
1
.
15
/
index
.
global
.
min
.
js'
></
script
>
...
...
@@ -161,7 +162,9 @@ module Make (R : ResourcesT) = struct
var
calendarEl
=
document
.
getElementById
(
'
calendar'
);
var
calendar
=
new
FullCalendar
.
Calendar
(
calendarEl
,
{
initialView
:
'
timeGridWeek'
,
events
:
data
events
:
data
,
locale
:
'
fr'
,
aspectRatio
:
2
});
calendar
.
render
()
;
});
...
...
@@ -169,7 +172,7 @@ module Make (R : ResourcesT) = struct
</
script
>
</
head
>
<
body
>
<
div
id
=
'
calendar'
></
div
>
<
div
id
=
'
calendar'
style
=
'
width
:
80
%;
padding
:
20
px
;
'
></
div
>
</
body
>
</
html
>
|
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment