Skip to content
Snippets Groups Projects
Commit adefdf60 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Move fullcalendar v5 to static common

Adapt loading templates
Move plan loader template to AKModel
Add new template to load all css and scripts for availabilities with one call
Use that loader in views with availabilities editors
parent 596a05a5
No related branches found
No related tags found
1 merge request!137Improve scheduling
Showing
with 24 additions and 11 deletions
......@@ -2,8 +2,8 @@
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/>
<script src='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.js' %}'></script>
<link href='{% static 'common/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/>
<script src='{% static 'common/vendor/fullcalendar-scheduler/main.js' %}'></script>
{% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %}
{% if LANGUAGE_CODE != "en" %}
......
{% load static %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}
<link href='{% static 'common/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/>
<script src='{% static 'common/vendor/fullcalendar-scheduler/main.js' %}'></script>
<script src="{% static "common/vendor/moment/moment-with-locales.js" %}"></script>
<script src="{% static "common/js/availabilities.js" %}"></script>
{% with 'common/vendor/fullcalendar/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %}
{% if LANGUAGE_CODE != "en" %}
{# Locale 'en' is included in main.js and does not exist separately #}
<script src="{% static locale_file %}"></script>
{% endif %}
{% endwith %}
......@@ -7,8 +7,8 @@
{% block extrahead %}
{{ block.super }}
{% bootstrap_javascript jquery='slim' %}
{% include "AKPlan/load_fullcalendar.html" %}
<script src="{% static "common/js/availabilities.js" %}"></script>
{% include "AKModel/load_fullcalendar_availabilities.html" %}
<script>
{% get_current_language as LANGUAGE_CODE %}
......
......@@ -3,7 +3,7 @@
{% load i18n %}
{% load tags_AKPlan %}
{% include "AKPlan/load_fullcalendar.html" %}
{% include "AKModel/load_fullcalendar.html" %}
<script>
{% get_current_language as LANGUAGE_CODE %}
......
......@@ -10,7 +10,7 @@
{% endblock %}
{% block imports %}
{% include "AKPlan/load_fullcalendar.html" %}
{% include "AKModel/load_fullcalendar.html" %}
{% block fullcalendar %}{% endblock %}
{% endblock imports %}
......
......@@ -20,7 +20,7 @@
<link rel="stylesheet" href="{% static 'common/css/custom.css' %}">
{% include "AKPlan/load_fullcalendar.html" %}
{% include "AKModel/load_fullcalendar.html" %}
{% get_current_language as LANGUAGE_CODE %}
......
......@@ -11,7 +11,7 @@
{% block extrahead %}
{{ block.super }}
{% include "AKPlan/load_fullcalendar.html" %}
{% include "AKModel/templates/AKModel/load_fullcalendar.html" %}
<style>
.unscheduled-slot {
......
......@@ -12,9 +12,7 @@
<link rel="stylesheet" href="{% static 'common/vendor/chosen-js/chosen.css' %}">
<link rel="stylesheet" href="{% static 'common/css/bootstrap-chosen.css' %}">
{% include "AKPlan/load_fullcalendar.html" %}
<script src="{% static "AKSubmission/vendor/moment/moment-with-locales.js" %}"></script>
<script src="{% static "common/js/availabilities.js" %}"></script>
{% include "AKModel/load_fullcalendar_availabilities.html" %}
<script>
{% get_current_language as LANGUAGE_CODE %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment