Skip to content
Snippets Groups Projects
Commit 9b54d2b6 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'dev' into feature/dashboard

# Conflicts:
#	schoolapps/dashboard/views.py
#	schoolapps/static/common/style.css
#	schoolapps/templates/partials/footer.html
#	schoolapps/timetable/views.py
parents 28fbbe20 aa9e55aa
No related branches found
No related tags found
1 merge request!86Merge school-apps
Showing
with 16253 additions and 15978 deletions
......@@ -5,8 +5,8 @@ venv/
secure*
*.aux
*.log
class.pdf
class.tex
aktuell.pdf
aktuell.tex
.idea/
media/
node_modules/
......
......@@ -10,7 +10,7 @@ sudo apt install python3 python3-dev python3-pip git mariadb-server python3-venv
```
### MySQL-Datenbank
1. Datenbank `schoolapps` (`utf8_general_ci`) anlegen
1. Datenbanken `schoolapps` und `Untis` (`utf8_general_ci`) anlegen
2. Benutzer `www-data` anlegen
3. Benutzer `www-data` alle Rechte auf `schoolapps` geben
4. Benutzer `untis-read` anlegen
......
......@@ -7,7 +7,7 @@ import PropTypes from "prop-types";
const OPTIONS_ONLINE_COMMON = [
"Portal ist nicht erreichbar",
"Fehlermeldung(en) tauchen auf",
"Anmeldung funktiontiert nicht",
"Anmeldung funktioniert nicht",
"Zugangsdaten vergessen"
];
......@@ -21,6 +21,11 @@ const BASIC_OPTIONS = [
name: "Problem mit Beamer/Fernseher",
helpText: "Bitte wähle aus, wo der Beamer bzw. Fernseher steht!"
},
{
id: "printerIssue",
name: "Problem mit einem Drucker",
helpText: "Bitte nenne uns in der Beschreibung das Modell des Druckers, damit wir genau wissen, welchen Drucker du meinst!"
},
{
id: "subMonitorIssue",
name: "Vertretungsplanmonitor funktioniert nicht",
......@@ -142,6 +147,10 @@ const BASIC_OPTIONS = [
{
id: "missingKeys",
name: "Fehlende Tasten auf der Tastatur"
},
{
id: "hardwareMisc",
name: "Andere Hardware defekt / Äußere Schäden"
}
......@@ -322,7 +331,7 @@ class App extends Component {
className="input-field col s12 m12 l4">
<i className={"material-icons prefix"}>list</i>
<select onChange={this._onCategoryChanges} defaultValue={"noCategory"} className={"validate"}
required={true}>
required={true}>-
<option value={"noCategory"} disabled={true}>Keine Kategorie ausgewählt</option>
{BASIC_OPTIONS.map(function (category) {
return <optgroup label={category.name} key={category.id}>
......@@ -349,11 +358,18 @@ class App extends Component {
defaultValue={"Anderer Raum"} show={sO === "presentationDeviceIssue"}/>
</Input>
{/* Section B – Printer Issue */}
<Input label={"Art des Problems"} icon={"bug_report"} show={sO === "printerIssue"}>
<Select onChange={this._onSetB}
values={["Papierstau", "Toner leer", "Papier leer", "Drucker bekommt keine Daten"]}
defaultValue={"Anderes Problem"} show={sO === "subMonitorIssue"}/>
</Input>
{/* Section B – Substitution Monitor Issue */}
<Input label={"Art des Problems"} icon={"bug_report"} show={sO === "subMonitorIssue"}>
<Select onChange={this._onSetB}
values={["Schwarzer Bildschirm", "Tage wechseln nicht (Eingefroren)"]}
defaultValue={"Anderer Raum"} show={sO === "subMonitorIssue"}/>
defaultValue={"Anderes Problem"} show={sO === "subMonitorIssue"}/>
</Input>
{/* Section B – WLAN Issue */}
......@@ -386,6 +402,13 @@ class App extends Component {
defaultValue={"Sonstiges"} show={sO === "presentationDeviceIssue" && step === 2}/>
</Input>
{/* Section C – Presentation Device Issues */}
<Input label={"Ort des Druckers"} icon={"location_on"}
show={sO === "printerIssue" && step === 2}>
<Select onChange={this._onSetC} values={LOCATIONS}
defaultValue={"Anderer Raum"} show={sO === "presentationDeviceIssue"}/>
</Input>
{/* Section C – WLAN Issue */}
<Input label={"Um welches WLAN-Netzwerk handelt es sich?"} icon={"wifi"}
show={sO === "wlanIssue" && step === 2}>
......
......@@ -2,8 +2,4 @@ import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render( < App
rooms = {["A", "B"
]
}
/>, document.getElementById('root'));
ReactDOM.render(<App rooms={["A", "B"]}/>, document.getElementById('root'));
import React, {Component} from 'react';
// import "materialize-css/dist/css/materialize.css";
//import "materialize-css/dist/css/materialize.css";
import M from "materialize-css/dist/js/materialize";
import PropTypes from "prop-types";
......@@ -7,7 +7,7 @@ import PropTypes from "prop-types";
const OPTIONS_ONLINE_COMMON = [
"Portal ist nicht erreichbar",
"Fehlermeldung(en) tauchen auf",
"Anmeldung funktiontiert nicht",
"Anmeldung funktioniert nicht",
"Zugangsdaten vergessen"
];
......@@ -21,6 +21,11 @@ const BASIC_OPTIONS = [
name: "Problem mit Beamer/Fernseher",
helpText: "Bitte wähle aus, wo der Beamer bzw. Fernseher steht!"
},
{
id: "printerIssue",
name: "Problem mit einem Drucker",
helpText: "Bitte nenne uns in der Beschreibung das Modell des Druckers, damit wir genau wissen, welchen Drucker du meinst!"
},
{
id: "subMonitorIssue",
name: "Vertretungsplanmonitor funktioniert nicht",
......@@ -142,6 +147,10 @@ const BASIC_OPTIONS = [
{
id: "missingKeys",
name: "Fehlende Tasten auf der Tastatur"
},
{
id: "hardwareMisc",
name: "Andere Hardware defekt / Äußere Schäden"
}
......@@ -322,7 +331,7 @@ class App extends Component {
className="input-field col s12 m12 l4">
<i className={"material-icons prefix"}>list</i>
<select onChange={this._onCategoryChanges} defaultValue={"noCategory"} className={"validate"}
required={true}>
required={true}>-
<option value={"noCategory"} disabled={true}>Keine Kategorie ausgewählt</option>
{BASIC_OPTIONS.map(function (category) {
return <optgroup label={category.name} key={category.id}>
......@@ -349,11 +358,18 @@ class App extends Component {
defaultValue={"Anderer Raum"} show={sO === "presentationDeviceIssue"}/>
</Input>
{/* Section B – Printer Issue */}
<Input label={"Art des Problems"} icon={"bug_report"} show={sO === "printerIssue"}>
<Select onChange={this._onSetB}
values={["Papierstau", "Toner leer", "Papier leer", "Drucker bekommt keine Daten"]}
defaultValue={"Anderes Problem"} show={sO === "subMonitorIssue"}/>
</Input>
{/* Section B – Substitution Monitor Issue */}
<Input label={"Art des Problems"} icon={"bug_report"} show={sO === "subMonitorIssue"}>
<Select onChange={this._onSetB}
values={["Schwarzer Bildschirm", "Tage wechseln nicht (Eingefroren)"]}
defaultValue={"Anderer Raum"} show={sO === "subMonitorIssue"}/>
defaultValue={"Anderes Problem"} show={sO === "subMonitorIssue"}/>
</Input>
{/* Section B – WLAN Issue */}
......@@ -386,6 +402,13 @@ class App extends Component {
defaultValue={"Sonstiges"} show={sO === "presentationDeviceIssue" && step === 2}/>
</Input>
{/* Section C – Presentation Device Issues */}
<Input label={"Ort des Druckers"} icon={"location_on"}
show={sO === "printerIssue" && step === 2}>
<Select onChange={this._onSetC} values={LOCATIONS}
defaultValue={"Anderer Raum"} show={sO === "presentationDeviceIssue"}/>
</Input>
{/* Section C – WLAN Issue */}
<Input label={"Um welches WLAN-Netzwerk handelt es sich?"} icon={"wifi"}
show={sO === "wlanIssue" && step === 2}>
......
......@@ -142,7 +142,7 @@ def check1(request):
link=request.build_absolute_uri(reverse('aub_details', args=[aub.id]))
)
aub_list = Aub.objects.filter(status=0).order_by('created_at')
aub_list = Aub.objects.filter(status=0).order_by('from_date')
aubs = AUBFilter(request.GET, queryset=aub_list)
return render(request, 'aub/check.html', {'filter': aubs})
......@@ -186,7 +186,7 @@ def check2(request):
link=request.build_absolute_uri(reverse('aub_details', args=[aub.id]))
)
aub_list = Aub.objects.filter(status=1).order_by('created_at')
aub_list = Aub.objects.filter(status=1).order_by('from_date')
aubs = AUBFilter(request.GET, queryset=aub_list)
return render(request, 'aub/check.html', {'filter': aubs})
......
......@@ -14,6 +14,12 @@ from timetable.hints import get_all_hints_by_class_and_time_period, get_all_hint
from timetable.views import get_next_weekday_with_time, get_calendar_week
from untisconnect.api import TYPE_TEACHER, TYPE_CLASS
from untisconnect.plan import get_plan
from django.shortcuts import render, redirect
from django.urls import reverse
from django.http import HttpResponseNotFound
from .models import Activity, register_notification
# from .apps import DashboardConfig
from mailer import send_mail_with_template
from userinformation import UserInformation
from .models import Activity, Notification
......@@ -151,4 +157,4 @@ def api_my_plan_html(request):
def error_404(request, exception):
return render(request, 'common/404.html')
return render(request, 'common/404.html')
\ No newline at end of file
# Generated by Django 2.2.1 on 2019-08-18 07:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('debug', '0002_auto_20190523_1627'),
]
operations = [
migrations.AlterField(
model_name='debuglog',
name='filename',
field=models.FilePathField(blank=True, match='.*.log', path='/home/p-h/git/school-apps/schoolapps/latex', verbose_name='Dateiname zur Logdatei (falls nicht Log-Text)'),
),
]
# Generated by Django 2.2.4 on 2019-09-16 12:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('debug', '0003_auto_20190818_0910'),
]
operations = [
migrations.AlterField(
model_name='debuglog',
name='filename',
field=models.FilePathField(blank=True, match='.*.log', path='/data/Silas/Daten/school-apps/schoolapps/latex', verbose_name='Dateiname zur Logdatei (falls nicht Log-Text)'),
),
]
......@@ -4,4 +4,4 @@ from . import views
urlpatterns = [
path('', views.faq, name='faq'),
path('ask', views.ask, name='ask-faq')
]
\ No newline at end of file
]
from django.shortcuts import render
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from faq.models import FAQSection, FAQQuestion, Question
from faq.forms import FAQForm
......@@ -20,6 +21,7 @@ def faq(request):
}
return render(request, 'faq/faq.html', context)
@login_required
def ask(request):
if request.method == 'POST':
form = FAQForm(request.POST)
......@@ -40,4 +42,4 @@ def ask(request):
else:
form = FAQForm()
return render(request, "faq/ask.html", {"form": form})
\ No newline at end of file
return render(request, "faq/ask.html", {"form": form})
......@@ -21,6 +21,7 @@ from django.contrib.staticfiles.views import serve
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from django.views import defaults
from schoolapps.settings import BASE_DIR
......@@ -32,6 +33,11 @@ def manifest(request):
def serviceworker(request):
return serve(request, "common/pwabuilder-sw.js")
handler404 = 'dashboard.views.error_404'
def custom_page_not_found(request):
return defaults.page_not_found(request, None, "common/404.html")
urlpatterns = [
#############
......@@ -79,9 +85,13 @@ urlpatterns = [
path("pwabuilder-sw.js", serviceworker),
path('martor/', include('martor.urls')),
#######
# 404 #
#######
path('404/', custom_page_not_found, name='404'),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# handler404 = 'dashboard.views.error_404'
......@@ -30,8 +30,10 @@ function selectActiveLink() {
var url_name = currlocation.attr("content");
//console.log(url_name);
$("#" + url_name).addClass("active");
$("#" + url_name).parent().parent().parent().addClass("active");
var selector = ".url-" + url_name;
console.log(selector);
$(selector).addClass("active");
$(selector).parent().parent().parent().addClass("active");
}
$(document).ready(function () {
......
......@@ -81,6 +81,7 @@ header, main, footer {
}
@media only screen and (min-width: 1384px) {
.footer-row-large {
display: flex;
......@@ -532,6 +533,9 @@ i.collapsible-trigger {
.sidenav a:not(.collapsible-header) {
padding: 0 16px;
}
ul.sidenav li.logo > a:hover{
background: None!important;
}
.waves-effect.waves-primary .waves-ripple {
/* The alpha value allows the text and background color
......@@ -559,6 +563,23 @@ i.collapsible-trigger {
/* border-bottom: solid #bdbdbd 2px;*/
/*}*/
/*++++++++
+HOLIDAYS+
++++++++++ */
.holiday-badge{
float: left !important;
position: relative;
margin-left: 0% !important;
left: 50%;
transform: translate(-50%);
width: auto;
height: auto !important;
min-height: 26px;
}
/* Dashboard */
.card-action-badge {
float: left !important;
margin-left: 0 !important;
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
<main>
<blockquote>
<p>{{ a }} → {{ b }} → {{ c }}</p>
<p>{{ arrow_list }}</p>
<p>{{ short_desc }}</p>
<p>{{ long_desc }}</p>
<p>Übermittelt von {{ user.get_full_name }} ({{ user.username }})</p>
......
{{ a }} → {{ b }} → {{ c }}
{{ arrow_list }}
{{ short_desc }}
......
......@@ -8,6 +8,10 @@ from .forms import FeedbackForm
from dashboard.models import Activity
def add_arrows(array: list):
return "".join([item for item in array if item != ""])
def rebus(request):
if request.method == 'POST':
form = REBUSForm(request.POST)
......@@ -20,16 +24,14 @@ def rebus(request):
long_description = form.cleaned_data['long_description']
# Register activity
desc_act = "{} → {} → {} | {}".format(a, b, c, short_description)
desc_act = "{} | {}".format(add_arrows([a, b, c]), short_description)
act = Activity(title="Du hast uns ein Problem gemeldet.", description=desc_act, app="REBUS",
user=request.user)
act.save()
# Send mail
context = {
"a": a,
"b": b,
"c": c,
"arrow_list": add_arrows([a, b, c]),
"short_desc": short_description,
"long_desc": long_description,
"user": request.user
......
{% include 'partials/header.html' %}
{#<!DOCTYPE html>#}
{#<html lang="de">#}
{#<head>#}
{# <meta charset="utf-8">#}
{# <meta http-equiv="X-UA-Compatible" content="IE=edge">#}
{# <meta name="viewport" content="width=device-width,initial-scale=1">#}
{# <meta name="description" content="Selbst programmierte Anwendungen für den Schullaltag am Katharineum zu Lübeck">#}
{# <title>SchoolApps – Katharineum zu Lübeck</title>#}
{##}
{# <!-- Android -->#}
{# <meta name="theme-color" content="#da1f3d">#}
{# <meta name="mobile-web-app-capable" content="yes">#}
{##}
{# <!-- iOS -->#}
{# <meta name="apple-mobile-web-app-title" content="SchoolApps">#}
{# <meta name="apple-mobile-web-app-capable" content="yes">#}
{# <meta name="apple-mobile-web-app-status-bar-style" content="default">#}
{##}
{# <!-- Windows -->#}
{# <meta name="msapplication-navbutton-color" content="#da1f3d">#}
{# <meta name="msapplication-TileColor" content="#da1f3d">#}
{# <meta name="msapplication-TileImage" content="ms-icon-144x144.png">#}
{# <meta name="msapplication-config" content="browserconfig.xml">#}
{##}
{# <!-- Pinned Sites -->#}
{# <meta name="application-name" content="SchoolApps">#}
{# <meta name="msapplication-tooltip" content="SchoolApps">#}
{# <meta name="msapplication-starturl" content="/">#}
{##}
{# <!-- Tap highlighting -->#}
{# <meta name="msapplication-tap-highlight" content="no">#}
{##}
{# <!-- UC Mobile Browser -->#}
{# <meta name="full-screen" content="yes">#}
{# <meta name="browsermode" content="application">#}
{##}
{##}
{# <!-- Main Link Tags -->#}
{# <link href="/static/icons/favicon_16.png" rel="icon" type="image/png" sizes="16x16">#}
{# <link href="/static/icons/favicon_32.png" rel="icon" type="image/png" sizes="32x32">#}
{# <link href="/static/icons/favicon_48.pngg" rel="icon" type="image/png" sizes="48x48">#}
{##}
{# <!-- iOS -->#}
{# <!-- non-retina iPad iOS 7 -->#}
{# <link rel="apple-touch-icon" href="/static/icons/apple_76.png" sizes="76x76">#}
{# <!-- retina iPhone vor iOS 7 -->#}
{# <link rel="apple-touch-icon" href="/static/icons/apple_114.png" sizes="114x114">#}
{# <!-- retina iPad iOS 7 -->#}
{# <link rel="apple-touch-icon" href="/static/icons/apple_152.png" sizes="152x152">#}
{# <!-- retina iPad iOS 7 für iPhone 6 Plus -->#}
{# <link rel="apple-touch-icon" href="/static/icons/apple_180.png" sizes="180x180">#}
{##}
{##}
{# <!-- Pinned Tab -->#}
{##}
{##}
{# <!-- Android -->#}
{# <link href="/static/icons/android_192.png" rel="icon" sizes="192x192">#}
{##}
{# <!-- Others -->#}
{##}
{##}
{##}
{# <!-- Favicon -->#}
{# <link rel="shortcut icon" type="image/x-icon" href="/static/common/favicon.ico">#}
{# <link rel="manifest" href="/static/common/manifest.json">#}
{##}
{# <!--------->#}
{# <!-- CSS -->#}
{# <!--------->#}
{# <link href="/static/css/materialdesignicons-webfont/material-icons.css" rel="stylesheet">#}
{# <link rel="stylesheet" type="text/css" media="screen"#}
{# href="/static/css/materialize.min.css">#}
{# <link rel="stylesheet" type="text/css" href="/static/common/style.css">#}
{# <script src="/static/js/jquery/jquery-3.3.1.slim.min.js"></script>#}
{##}
{##}
{# <!-- location (for "active" in sidenav -->#}
{# <meta name="active-loaction" content="404">#}
{##}
{##}
{#</head>#}
{#<body>#}
{##}
{#<header>#}
{# <!-- Menu button (sidenav) -->#}
{# <div class="container">#}
{# <a href="#" data-target="slide-out" class="top-nav sidenav-trigger hide-on-large-only">#}
{# <i class="material-icons">menu</i>#}
{# </a>#}
{# </div>#}
{##}
{# <!-- Nav bar (logged in as, logout) -->#}
{# <nav class="primary-color">#}
{# <a class="brand-logo" href="/">SchoolApps</a>#}
{# </nav>#}
{##}
{# <div id="print-header" class="row">#}
{# <div class="col s6 logo">#}
{# <img src="/static/common/logo.png">#}
{# </div>#}
{# <div class="col s6 right-align">#}
{# <a href="/"><strong>SchoolApps</strong></a><br>#}
{# Katharineum zu Lübeck#}
{# </div>#}
{# </div>#}
{##}
{# <!-- Main nav (sidenav) -->#}
{# <ul id="slide-out" class="sidenav sidenav-fixed">#}
{# <li class="logo">#}
{# <a id="logo-container" href="/" class="brand-logo">#}
{# <img src="/static/common/logo.png" alt="Logo des Katharineums">#}
{# </a>#}
{# </li>#}
{# </ul>#}
{#</header>#}
{% include "partials/header.html" %}
<main>
<h3>Leider existiert diese Seite nicht. (Fehler 404)</h3>
<p class="flow-text">
Beim Aufrufen dieser Seite ist ein Fehler aufgetreten. Vermutlich existiert sie nicht. Wenn Sie der Meinung
sind, dass diese Seiten eigentlich existieren müsste, wenden Sie sich bitte an den <a
href="mailto:support@katharineum.de">Support</a>.
Beim Aufrufen dieser Seite ist ein Fehler aufgetreten. Wahrscheinlich existiert die gewünschte Seite unter der Adresse "<code id="url"></code>" nicht.
Solltest du der Meinung sein, dass diese Seite eigentlich existieren müsste, wende dich bitte an die
<a href="mailto:support@katharineum.de">Computer-AG</a>.
</p>
</main>
<script>
document.getElementById("url").innerHTML = window.location.pathname;
</script>
{% include 'partials/footer.html' %}
......@@ -16,7 +16,9 @@
<a class="blue-text text-lighten-4 btn-flat no-pad-left" href="https://katharineum-zu-luebeck.de"><i
class="material-icons footer-icon left">home</i> Homepage</a>
<a class="blue-text text-lighten-4 btn-flat" href="https://forum.katharineum.de"><i
class="material-icons footer-icon left">cloud</i> Forum</a>
class="material-icons footer-icon left">account_balance</i> Forum</a>
<a class="blue-text text-lighten-4 btn-flat" href="https://nimbus.katharineum.de"><i
class="material-icons footer-icon left">cloud</i> Nimbus</a>
<a class="blue-text text-lighten-4 btn-flat no-pad-right" href="https://webmail.katharineum.de"><i
class="material-icons footer-icon left">email</i> Webmail</a>
</ul>
......@@ -32,7 +34,9 @@
<a class="blue-text text-lighten-4 btn-flat no-pad-left" href="https://katharineum-zu-luebeck.de"><i
class="material-icons footer-icon left">home</i> Homepage</a>
<a class="blue-text text-lighten-4 btn-flat" href="https://forum.katharineum.de"><i
class="material-icons footer-icon left">cloud</i> Forum</a>
class="material-icons footer-icon left">account_balance</i> Forum</a>
<a class="blue-text text-lighten-4 btn-flat" href="https://nimbus.katharineum.de"><i
class="material-icons footer-icon left">cloud</i> Nimbus</a>
<a class="blue-text text-lighten-4 btn-flat no-pad-right" href="https://webmail.katharineum.de"><i
class="material-icons footer-icon left">email</i> Webmail</a>
</ul>
......
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