diff --git a/AKPlan/templates/AKPlan/load_fullcalendar.html b/AKModel/templates/AKModel/load_fullcalendar.html similarity index 77% rename from AKPlan/templates/AKPlan/load_fullcalendar.html rename to AKModel/templates/AKModel/load_fullcalendar.html index 6c2a93c81cf8874d10d2e3360476b4eb14d0fff1..5be1b149f4a2fdd3890f10da6757953fe6bf1871 100644 --- a/AKPlan/templates/AKPlan/load_fullcalendar.html +++ b/AKModel/templates/AKModel/load_fullcalendar.html @@ -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" %} diff --git a/AKModel/templates/AKModel/load_fullcalendar_availabilities.html b/AKModel/templates/AKModel/load_fullcalendar_availabilities.html new file mode 100644 index 0000000000000000000000000000000000000000..2d2186684e981f5b4e7fcae7f6b2253e59b32e7b --- /dev/null +++ b/AKModel/templates/AKModel/load_fullcalendar_availabilities.html @@ -0,0 +1,15 @@ +{% 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 %} diff --git a/AKModel/templates/admin/AKModel/room_change_form.html b/AKModel/templates/admin/AKModel/room_change_form.html index f2db1fbcaf09bb2d28c771f93f46f6e70d166bf2..aac03532656c41b442bfae811350c08719df10f0 100644 --- a/AKModel/templates/admin/AKModel/room_change_form.html +++ b/AKModel/templates/admin/AKModel/room_change_form.html @@ -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 %} diff --git a/AKPlan/templates/AKPlan/plan_akslot.html b/AKPlan/templates/AKPlan/plan_akslot.html index b13ba8e9e1923b8078fcf1f28ca6419aacee579c..06bce88a9c5d0186f8fdfef64ed0c4e51e78f99f 100644 --- a/AKPlan/templates/AKPlan/plan_akslot.html +++ b/AKPlan/templates/AKPlan/plan_akslot.html @@ -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 %} diff --git a/AKPlan/templates/AKPlan/plan_base.html b/AKPlan/templates/AKPlan/plan_base.html index 7234dad49ddafd712f0264870a7015a7a343cdc0..351e39d0367d5a4a57774cb27d74d4bb4e207a79 100644 --- a/AKPlan/templates/AKPlan/plan_base.html +++ b/AKPlan/templates/AKPlan/plan_base.html @@ -10,7 +10,7 @@ {% endblock %} {% block imports %} - {% include "AKPlan/load_fullcalendar.html" %} + {% include "AKModel/load_fullcalendar.html" %} {% block fullcalendar %}{% endblock %} {% endblock imports %} diff --git a/AKPlan/templates/AKPlan/plan_wall.html b/AKPlan/templates/AKPlan/plan_wall.html index 5d09ece0c18be3c5054b802a8261ac763273b087..93aa070c461b3372d6dc03603f2ab4139669d870 100644 --- a/AKPlan/templates/AKPlan/plan_wall.html +++ b/AKPlan/templates/AKPlan/plan_wall.html @@ -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 %} diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html index 77db3f58d57c52b4bc38bc3287b0d50f91e20ed5..76be09082387fbc1f65695fe2ee11084a25122ba 100644 --- a/AKScheduling/templates/admin/AKScheduling/scheduling.html +++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html @@ -11,7 +11,7 @@ {% block extrahead %} {{ block.super }} - {% include "AKPlan/load_fullcalendar.html" %} + {% include "AKModel/templates/AKModel/load_fullcalendar.html" %} <style> .unscheduled-slot { diff --git a/AKSubmission/templates/AKSubmission/submit_new.html b/AKSubmission/templates/AKSubmission/submit_new.html index 60e387f7b410e3d9e0e6d1456cb9f39678b49ba2..b3699b3c90c500f8479ee8166dbf01deb1c300c9 100644 --- a/AKSubmission/templates/AKSubmission/submit_new.html +++ b/AKSubmission/templates/AKSubmission/submit_new.html @@ -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 %} diff --git a/AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/locales/de.js b/static_common/common/vendor/fullcalendar-scheduler/locales/de.js similarity index 100% rename from AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/locales/de.js rename to static_common/common/vendor/fullcalendar-scheduler/locales/de.js diff --git a/AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.css b/static_common/common/vendor/fullcalendar-scheduler/main.css similarity index 100% rename from AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.css rename to static_common/common/vendor/fullcalendar-scheduler/main.css diff --git a/AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.js b/static_common/common/vendor/fullcalendar-scheduler/main.js similarity index 100% rename from AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.js rename to static_common/common/vendor/fullcalendar-scheduler/main.js diff --git a/AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.min.css b/static_common/common/vendor/fullcalendar-scheduler/main.min.css similarity index 100% rename from AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.min.css rename to static_common/common/vendor/fullcalendar-scheduler/main.min.css diff --git a/AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.min.js b/static_common/common/vendor/fullcalendar-scheduler/main.min.js similarity index 100% rename from AKPlan/static/AKPlan/vendor/fullcalendar-scheduler/main.min.js rename to static_common/common/vendor/fullcalendar-scheduler/main.min.js