Skip to content
Snippets Groups Projects
Commit 2461b44b authored by Jonathan Weth's avatar Jonathan Weth :keyboard: Committed by root
Browse files

Merge pull request #214 from Katharineum/dev

Merge devs
parents 81c9e669 a0c8dc22
No related branches found
No related tags found
No related merge requests found
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
@login_required
def failback(request, *args, **kwargs):
return render(request, "timetable/failback.html")
......@@ -7,7 +7,7 @@ from django.utils import formats
from schoolapps.settings import BASE_DIR
# LaTeX constants
from untisconnect.sub import get_header_information
# from untisconnect.sub import get_header_information
DIR = os.path.join(BASE_DIR, "static", "common", "logo.png")
TEX_HEADER_1 = """\\documentclass[11pt]{article}
......
{% include 'partials/header.html' %}
<main>
<h3>Die Stundenpläne sind aktuell noch nicht einsehbar.</h3>
</main>
{% include 'partials/footer.html' %}
......@@ -15,7 +15,7 @@
<div class="col l4 xl6">
</div>
<div class="col s12 m6 l4 xl3 right align-right">
<a class="waves-effect waves-teal btn-flat btn-flat-medium right" id="print">
<a class="waves-effect waves-teal btn-flat btn-flat-medium right" href="{% url "timetable_substitutions_pdf" %}">
<i class="material-icons center">print</i>
</a>
</div>
......
from django.urls import path
from . import views
from untisconnect.models import Terms
urlpatterns = [
path('', views.all, name='timetable_admin_all'),
path('my', views.my_plan, name='timetable_my_plan'),
path('my/<int:year>/<int:month>/<int:day>/', views.my_plan, name='timetable_my_plan'),
path('quick/', views.quicklaunch, name='timetable_quicklaunch'),
# plan_type = ["teacher", "class", "room"]
path('<str:plan_type>/<int:plan_id>', views.plan, name='timetable_smart_plan'),
path('<str:plan_type>/<int:plan_id>/<str:regular>', views.plan, name='timetable_regular_plan'),
path('<str:plan_type>/<int:plan_id>/<int:year>/<int:calendar_week>', views.plan,
name='timetable_smart_plan_week'),
path('substitutions/', views.substitutions, name='timetable_substitutions'),
path('substitutions/<int:year>/<int:month>/<int:day>/', views.substitutions, name='timetable_substitutions_date'),
path('class.pdf', views.sub_pdf, name="timetable_substitutions_pdf")
]
try:
from . import views
urlpatterns = [
path('', views.all, name='timetable_admin_all'),
path('my', views.my_plan, name='timetable_my_plan'),
path('my/<int:year>/<int:month>/<int:day>/', views.my_plan, name='timetable_my_plan'),
path('quick/', views.quicklaunch, name='timetable_quicklaunch'),
# plan_type = ["teacher", "class", "room"]
path('<str:plan_type>/<int:plan_id>', views.plan, name='timetable_smart_plan'),
path('<str:plan_type>/<int:plan_id>/<str:regular>', views.plan, name='timetable_regular_plan'),
path('<str:plan_type>/<int:plan_id>/<int:year>/<int:calendar_week>', views.plan,
name='timetable_smart_plan_week'),
path('substitutions/', views.substitutions, name='timetable_substitutions'),
path('substitutions/<int:year>/<int:month>/<int:day>/', views.substitutions,
name='timetable_substitutions_date'),
path('class.pdf', views.sub_pdf, name="timetable_substitutions_pdf")
]
except Terms.DoesNotExist:
from . import failback_view
urlpatterns = [
path('', failback_view.failback, name='timetable_admin_all'),
path('my', failback_view.failback, name='timetable_my_plan'),
path('my/<int:year>/<int:month>/<int:day>/', failback_view.failback, name='timetable_my_plan'),
path('quick/', failback_view.failback, name='timetable_quicklaunch'),
path('<str:plan_type>/<int:plan_id>', failback_view.failback, name='timetable_smart_plan'),
path('<str:plan_type>/<int:plan_id>/<str:regular>', failback_view.failback, name='timetable_regular_plan'),
path('<str:plan_type>/<int:plan_id>/<int:year>/<int:calendar_week>', failback_view.failback,
name='timetable_smart_plan_week'),
path('substitutions/', failback_view.failback, name='timetable_substitutions'),
path('substitutions/<int:year>/<int:month>/<int:day>/', failback_view.failback,
name='timetable_substitutions_date'),
path('class.pdf', failback_view.failback, name="timetable_substitutions_pdf")
]
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