Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
KIF
AKPlanning
Merge requests
!10
Port/Rewrite Plan
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Port/Rewrite Plan
feature-plan-new
into
master
Overview
0
Commits
16
Pipelines
0
Changes
2
Merged
Benjamin Hättasch
requested to merge
feature-plan-new
into
master
4 years ago
Overview
0
Commits
16
Pipelines
0
Changes
2
Expand
1
0
Merge request reports
Viewing commit
87ee2d0f
Prev
Next
Show latest version
2 files
+
74
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
87ee2d0f
Add calendar view for slots to AK detail page
· 87ee2d0f
Benjamin Hättasch
authored
5 years ago
AKPlan/templates/AKPlan/plan_akslot.html
0 → 100644
+
62
−
0
Options
{% load static %}
{% load tz %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<link
href=
'{% static '
AKPlan
/
fullcalendar
/
core
/
main.min.css
'
%}'
rel=
'stylesheet'
/>
<link
href=
'{% static '
AKPlan
/
fullcalendar
/
daygrid
/
main.min.css
'
%}'
rel=
'stylesheet'
/>
<link
href=
'{% static '
AKPlan
/
fullcalendar
/
timegrid
/
main.min.css
'
%}'
rel=
'stylesheet'
/>
<script
src=
'{% static '
AKPlan
/
fullcalendar
/
core
/
main.min.js
'
%}'
></script>
{% with 'AKPlan/fullcalendar/core/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %}
<script
src=
"{% static locale_file %}"
></script>
{% endwith %}
<script
src=
'{% static '
AKPlan
/
fullcalendar
/
daygrid
/
main.min.js
'
%}'
></script>
<script
src=
'{% static '
AKPlan
/
fullcalendar
/
timegrid
/
main.min.js
'
%}'
></script>
<script
src=
'{% static '
AKPlan
/
fullcalendar
/
bootstrap
/
main.min.js
'
%}'
></script>
<script>
document
.
addEventListener
(
'
DOMContentLoaded
'
,
function
()
{
var
calendarEl
=
document
.
getElementById
(
'
akSlotCalendar
'
);
var
calendar
=
new
FullCalendar
.
Calendar
(
calendarEl
,
{
plugins
:
[
'
timeGrid
'
,
'
bootstrap
'
],
// Adapt to timezone of the connected event
timeZone
:
'
{{ ak.event.timezone }}
'
,
defaultView
:
'
timeGrid
'
,
// Adapt to user selected loclae
locale
:
'
{{ LANGUAGE_CODE }}
'
,
// No header, not buttons
header
:
{
left
:
''
,
center
:
''
,
right
:
''
},
aspectRatio
:
2.5
,
themeSystem
:
'
bootstrap
'
,
// Only show calendar view for the dates of the connected event
visibleRange
:
{
start
:
'
{{ ak.event.start | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}
'
,
end
:
'
{{ ak.event.end | timezone:ak.event.timezone | date:"Y-m-d H:i:s"}}
'
,
},
allDaySlot
:
false
,
nowIndicator
:
true
,
eventTextColor
:
'
#fff
'
,
eventColor
:
'
#127ba3
'
,
// Create entries for all scheduled slots
events
:
[
{
%
for
slot
in
ak
.
akslot_set
.
all
%
}
{
%
if
slot
.
start
%
}
{
'
title
'
:
'
{{ slot.room }}
'
,
'
start
'
:
'
{{ slot.start | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}
'
,
'
end
'
:
'
{{ slot.end | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}
'
},
{
%
endif
%
}
{
%
endfor
%
}
]
});
calendar
.
render
();
});
</script>
Loading