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

Merge pull request #22 from Katharineum/master

Timetable quicklaunch update
parents 1cc3f582 667f6c95
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -2,7 +2,6 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/../bwinf-36-2/.idea/bwinf-36-2.iml" filepath="$PROJECT_DIR$/../bwinf-36-2/.idea/bwinf-36-2.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/school-apps.iml" filepath="$PROJECT_DIR$/.idea/school-apps.iml" />
</modules>
</component>
......
......@@ -8,11 +8,14 @@
<option name="manageScript" value="manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/schoolapps" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Python 3.5 (school-apps)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jquery-3.2.1" level="application" />
......@@ -20,6 +23,15 @@
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/schoolapps/templates" />
<option value="$MODULE_DIR$/schoolapps/timetable/templates" />
<option value="$MODULE_DIR$/schoolapps/untisconnect/templates" />
<option value="$MODULE_DIR$/schoolapps/aub/templates" />
<option value="$MODULE_DIR$/schoolapps/dashboard/templates" />
</list>
</option>
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebResourcesPaths">
<contentEntries>
<entry url="file://$PROJECT_DIR$">
<entryData>
<resourceRoots>
<path value="file://$PROJECT_DIR$/schoolapps/static" />
</resourceRoots>
</entryData>
</entry>
</contentEntries>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -14,6 +14,7 @@ keine
### Ideen (unbestätigt)
- Elternsprechtag
- Bundesjungendspiele
- Chat
## Installation
### Grundsystem
```
......@@ -38,6 +39,7 @@ python3 -m venv env
source env/bin/activate
pip install mysqlclient
pip install django
pip install django-cors-headers
```
- `example_secure_settings.py` zu `secure_settings.py` kopieren und anpassen
......
......@@ -130,4 +130,9 @@ span.badge.new::after {
}
.btn-flat-medium i {
font-size: 2rem;
}
\ No newline at end of file
}
.btn-timetable-quicklaunch {
margin: 1%;
width: 30%;
}
\ No newline at end of file
......@@ -112,6 +112,8 @@
</li>
<li><a class="subheader grey lighten-3">Stundenplan</a></li>
<li><a href="{% url 'timetable_admin_all' %}">Übersicht</a></li>
<li><a href="{% url 'timetable_quicklaunch' %}">Schnellzugriff</a></li>
<li><a href="{% url 'timetable_substitutions' %}">Vertretungsplan</a></li>
<li>
<div class="divider"></div>
</li>
......
{% include 'partials/header.html' %}
<main>
<h3>Übersicht</h3>
<div class="row">
<div class="col s12 m4">
<h4>Lehrkräfte</h4>
{% for teacher in teachers %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
href="{% url 'timetable_plan' 'teacher' teacher.id %}">
{{ teacher.shortcode }}
</a><!-- Shortcode -->
{% endfor %}
</div>
<div class="col s12 m4">
<h4>Klassen</h4>
{% for class in classes %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
href="{% url 'timetable_plan' 'class' class.id %}">
{{ class.name }}
</a>
{% endfor %}
</div>
<div class="col s12 m4">
<h4>Räume</h4>
{% for room in rooms %}
<a class="waves-effect waves-light btn btn-timetable-quicklaunch"
href="{% url 'timetable_plan' 'room' room.id %}">
{{ room.shortcode }}
</a>
{% endfor %}
</div>
</div>
</main>
{% include 'partials/footer.html' %}
{% include 'partials/header.html' %}
<main>
<h3>Vertretungen</h3>
<p class="flow-text">
Leider ist der Vertretungsplan noch nicht in Betrieb. Nutzen Sie solange die <a
href="https://info.katharineum.de/aktuell.pdf">alte Version</a>. Vielen Dank!
</p>
</main>
{% include 'partials/footer.html' %}
......@@ -2,6 +2,8 @@ from django.urls import path
from . import views
urlpatterns = [
path('', views.admin_all, name='timetable_admin_all'),
path('<str:plan_type>/<int:plan_id>', views.plan, name='timetable_plan')
path('', views.all, name='timetable_admin_all'),
path('quick', views.quicklaunch, name='timetable_quicklaunch'),
path('<str:plan_type>/<int:plan_id>', views.plan, name='timetable_plan'),
path('substitutions', views.substitutions, name='timetable_substitutions'),
]
......@@ -10,9 +10,7 @@ except Exception:
pass
# Create your views here.
@login_required
def admin_all(request):
def get_all_context():
teachers = get_all_teachers()
classes = get_all_classes()
rooms = get_all_rooms()
......@@ -23,9 +21,21 @@ def admin_all(request):
'rooms': rooms,
'subjects': subjects
}
return context
@login_required
def all(request):
context = get_all_context()
return render(request, 'timetable/all.html', context)
@login_required
def quicklaunch(request):
context = get_all_context()
return render(request, 'timetable/quicklaunch.html', context)
@login_required
def plan(request, plan_type, plan_id):
if plan_type == 'teacher':
......@@ -49,3 +59,8 @@ def plan(request, plan_type, plan_id):
}
return render(request, 'timetable/plan.html', context)
@login_required
def substitutions(request):
return render(request, 'timetable/substitution.html')
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