Skip to content
Snippets Groups Projects
Commit 55df6bb7 authored by Andreas Valder's avatar Andreas Valder
Browse files

added more field descriptions

parent 996194dd
No related branches found
No related tags found
No related merge requests found
from server import *
# name: (tablename, idcolumn, [editable_fields], [fields_to_set_at_creation_time])
# field types:
# boolean
# shortstring
......@@ -13,7 +12,7 @@ editable_tables = {
'table': 'courses_data',
'idcolumn': 'id',
'editable_fields': {
'visible': {'type': 'boolean'},
'visible': {'type': 'boolean', 'description': 'Wenn ein Kurs nicht sichtbar ist sind alle Videos davon nicht abrufbar.'},
'listed': {'type': 'boolean', 'description': 'Soll die Veranstaltung auf der Hauptseite gelistet werden?'},
'title': {'type': 'shortstring'},
'short': {'type': 'shortstring', 'description': 'Abkürzung für die Veranstaltung, z.B. für den Drehplan'},
......@@ -32,7 +31,7 @@ editable_tables = {
'table': 'lectures_data',
'idcolumn': 'id',
'editable_fields': {
'visible': {'type': 'boolean'},
'visible': {'type': 'boolean', 'description': 'Wenn eine lecture nicht sichtbar ist sind alle Videos davon nicht abrufbar'},
'title': {'type': 'shortstring'},
'comment': {'type': 'text'},
'internal': {'type': 'text'},
......@@ -43,13 +42,13 @@ editable_tables = {
'jumplist': {'type': ''},
'deleted': {'type': 'boolean'},
'live': {'type': 'boolean', 'description': 'Ist ein Livestream geplant?'},
'norecording': {'type': 'boolean'}},
'norecording': {'type': 'boolean', 'description:', 'Führt dazu, dass der Termin ausgegraut wird.'}},
'creationtime_fields': ['course_id', 'time_created', 'time_updated'] },
'videos': {
'table': 'videos_data',
'idcolumn': 'id',
'editable_fields': {
'visible': {'type': 'boolean'},
'visible': {'type': 'boolean', 'description': 'Ein nicht sichtbares Video kann nicht abgerufen werden.'},
'deleted': {'type': 'boolean'}},
'creationtime_fields': ['created_by', 'time_created', 'time_updated'] },
'chapters': {
......@@ -110,6 +109,7 @@ def parseeditpath(path):
assert column in editable_tables[table]['editable_fields']
type = editable_tables[table]['editable_fields'][column]['type']
return {'table': table, 'id': id, 'column': column, 'type': type, 'tableinfo': editable_tables[table]}
@app.template_filter(name='getfielddescription')
def getfielddescription(path):
p = parseeditpath(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment