diff --git a/AKPlan/templates/AKPlan/plan_base.html b/AKPlan/templates/AKPlan/plan_base.html new file mode 100644 index 0000000000000000000000000000000000000000..e97b7dac646f8ec53af975983d22363b6d6855c3 --- /dev/null +++ b/AKPlan/templates/AKPlan/plan_base.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% load fontawesome_5 %} +{% load i18n %} +{% load static %} + +{% block imports %} + {% get_current_language as LANGUAGE_CODE %} + + <link href='{% static 'AKPlan/fullcalendar/core/main.css' %}' rel='stylesheet' /> + + <script src='{% static 'AKPlan/fullcalendar/core/main.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/bootstrap/main.js' %}'></script> + + {% block fullcalendar %}{% endblock %} +{% endblock imports %} + +{% block footer_custom %} + {% if event.contact_email %} + <h4> + <a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" "far" %} {% trans "Write to organizers of this event for questions and comments" %}</a> + </h4> + {% endif %} +{% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_breadcrumbs.html b/AKPlan/templates/AKPlan/plan_breadcrumbs.html new file mode 100644 index 0000000000000000000000000000000000000000..c5ca3c1afc4b3ac75f0872c60e5530068b9e439f --- /dev/null +++ b/AKPlan/templates/AKPlan/plan_breadcrumbs.html @@ -0,0 +1,14 @@ +{% load i18n %} +{% load tags_AKModel %} + +<li class="breadcrumb-item"> + {% if 'AKDashboard'|check_app_installed %} + <a href="{% url 'dashboard:dashboard' %}">AKPlanning</a> + {% else %} + AKPlanning + {% endif %} +</li> +<li class="breadcrumb-item">{{ event.slug }}</li> +<li class="breadcrumb-item"> + <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> +</li> diff --git a/AKPlan/templates/AKPlan/plan_index.html b/AKPlan/templates/AKPlan/plan_index.html index bb8214e3784ea1abd08174e6b4787f2cf8b58d64..520c678ea094546c975909d115db338ac73eb3f1 100644 --- a/AKPlan/templates/AKPlan/plan_index.html +++ b/AKPlan/templates/AKPlan/plan_index.html @@ -1,28 +1,21 @@ -{% extends "base.html" %} +{% extends "AKPlan/plan_base.html" %} {% load fontawesome_5 %} {% load i18n %} -{% load tags_AKModel %} {% load static %} {% load tz %} -{% block imports %} +{% block fullcalendar %} {% get_current_language as LANGUAGE_CODE %} - <link href='{% static 'AKPlan/fullcalendar/core/main.css' %}' rel='stylesheet' /> <link href='{% static 'AKPlan/fullcalendar/timeline/main.css' %}' rel='stylesheet' /> <link href='{% static 'AKPlan/fullcalendar/resource-timeline/main.css' %}' rel='stylesheet' /> <link href='{% static 'AKPlan/fullcalendar/resource-timeline/main.min.css' %}' rel='stylesheet' /> - <script src='{% static 'AKPlan/fullcalendar/core/main.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/timeline/main.js' %}'></script> <script src='{% static 'AKPlan/fullcalendar/resource-common/main.js' %}'></script> <script src='{% static 'AKPlan/fullcalendar/resource-timeline/main.js' %}'></script> - <script src='{% static 'AKPlan/fullcalendar/bootstrap/main.js' %}'></script> <script> document.addEventListener('DOMContentLoaded', function() { @@ -90,20 +83,11 @@ plan.render(); }); </script> -{% endblock imports %} +{% endblock %} {% block breadcrumbs %} - <li class="breadcrumb-item"> - {% if 'AKDashboard'|check_app_installed %} - <a href="{% url 'dashboard:dashboard' %}">AKPlanning</a> - {% else %} - AKPlanning - {% endif %} -</li> -<li class="breadcrumb-item">{{ event.slug }}</li> - <li class="breadcrumb-item"><a - href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a></li> + {% include "AKPlan/plan_breadcrumbs.html" %} {% endblock %} @@ -136,12 +120,3 @@ </div> {% endtimezone %} {% endblock %} - - -{% block footer_custom %} - {% if event.contact_email %} - <h4> - <a href="mailto:{{ event.contact_email }}">{% fa5_icon "envelope" "far" %} {% trans "Write to organizers of this event for questions and comments" %}</a> - </h4> - {% endif %} -{% endblock %}