commit eb712aca9ab54dcb94a50970eb437ec07377c912
parent 700980dda1558520adb8b647ec377148d59e504d
Author: gerco <[email protected]>
Date: Sun, 17 Apr 2022 13:33:24 +0200
kleine veranderingen opmaak en spelling
Diffstat:
5 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/pgmles/forms.py b/pgmles/forms.py
@@ -51,7 +51,7 @@ class NewCourseForm(FlaskForm):
start = StringField('Begin', validators=[ DataRequired() ])
end = StringField('Einde', validators=[ DataRequired() ])
location = StringField('Locatie', validators=[ DataRequired(), Length(min=1, max=100) ])
- submit = SubmitField('Bewerken')
+ submit = SubmitField('Versturen')
class SubscribeForm(FlaskForm):
diff --git a/pgmles/routes.py b/pgmles/routes.py
@@ -117,7 +117,7 @@ def course_overview():
if current_user.type not in [ "admin", "teacher" ]:
abort(403)
courses = [ (c, User.query.filter_by(id=c.id).first() ) for c in Course.query.all() ]
- return render_template('course_overview.html', calendar=make_calendar(), title='Lesoverzicht', courses=courses)
+ return render_template('course_overview.html', calendar=make_calendar(), legend='Lesoverzicht', courses=courses)
@app.route("/course_overview/new_course", methods=['GET', 'POST'])
@@ -133,7 +133,7 @@ def new_course():
db.session.commit()
flash('De les werd toegevoegd!', 'success')
return redirect(url_for('course_overview'))
- return render_template('new_course.html', calendar=make_calendar(), title='Nieuwe les', form=form)
+ return render_template('new_course.html', calendar=make_calendar(), legend='Nieuwe les aanmaken', form=form)
@app.route("/course_overview/course_update/<int:course_id>", methods=['GET', 'POST'])
@@ -163,7 +163,7 @@ def update_course(course_id):
form.start.data = course.start
form.end.data = course.end
form.location.data = course.location
- return render_template('new_course.html', calendar=make_calendar(), form=form, legend='Update Language')
+ return render_template('new_course.html', calendar=make_calendar(), form=form, legend='Les aanpassen')
@app.route("/course/<int:course_id>", methods=[ 'GET', 'POST' ])
def course(course_id):
@@ -209,9 +209,9 @@ def admin():
if form.validate_on_submit():
user = User.query.filter_by(username=form.username.data).first()
if user == None:
- flash(f'Geen gebruker gevonden: {form.username.data}', 'danger')
+ flash(f'Geen gebrukers gevonden met de gebruikersnaam: {form.username.data}!', 'danger')
else:
- flash(f'Gebruiker gevonden: {form.username.data}', 'success')
+ flash(f'Gebruiker gevonden met gebruikersnaam: {form.username.data}!', 'success')
return redirect(url_for('admin_user', user_id= user.id))
return render_template('admin.html', calendar=make_calendar(), form=form)
diff --git a/pgmles/site.db b/pgmles/site.db
Binary files differ.
diff --git a/pgmles/templates/course_overview.html b/pgmles/templates/course_overview.html
@@ -1,14 +1,21 @@
{% extends "layout.html" %}
{% block content %}
-<h1>Course Overview
- <a class="btn btn-secondary btn-sm mt-1 mb-1" href="{{ url_for('new_course') }}">Nieuwe les</a>
-</h1>
+<article class="media content-section">
+ <legend class="border-bottom mb-4"><h1>{{ legend }}</h1></legend>
+</article>
+<article class="media content-section">
+<div class="media-body">
+ <div>
+ <a class="btn btn-secondary btn-sm mt-1 mb-1" href="{{ url_for('new_course') }}">Nieuwe les</a>
+ </div>
+</div>
+</article>
{% for course, teacher in courses %}
<article class="media content-section">
<div class="media-body">
<h2><a class="article-title" href="{{url_for('course', course_id=course.id)}}">{{course.name}} <small>by {{ teacher.username }}</small></a></h2>
<div>
- <a class="btn btn-secondary btn-sm mt-1 mb-1" href="{{ url_for('update_course', course_id = course.id) }}">Bewerkem</a>
+ <a class="btn btn-secondary btn-sm mt-1 mb-1" href="{{ url_for('update_course', course_id = course.id) }}">Bewerken</a>
<button type="button" class="btn btn-danger btn-sm m-1" data-toggle="modal" data-target="#deleteModal">Verwijderen</button>
</div>
</div>
diff --git a/pgmles/templates/new_course.html b/pgmles/templates/new_course.html
@@ -4,7 +4,7 @@
<form method="POST" action="">
{{ form.hidden_tag() }}
<fieldset class="form-group">
- <legend class="border-bottom mb-4">{{ legend }}</legend>
+ <legend class="border-bottom mb-4"><h1>{{ legend }}</h1></legend>
<div class="form-group">
{{ form.name.label(class="form-control-label") }}
{% if form.name.errors %}