From 55df6bb72872d56e800b72eb0ac81d022a9f1429 Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Mon, 22 May 2017 12:53:47 +0200 Subject: [PATCH] added more field descriptions --- edit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/edit.py b/edit.py index 556b2cc..1634811 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) -- GitLab