diff --git a/edit.py b/edit.py index 556b2ccdd56e93f60e0f87dc1a825a6531d82a1f..1634811919d39612b3f9b63cb898179d2900f66a 100644 --- a/edit.py +++ b/edit.py @@ -1,6 +1,5 @@ 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)