Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Karwacik
website
Commits
55df6bb7
Commit
55df6bb7
authored
May 22, 2017
by
Andreas Valder
Browse files
added more field descriptions
parent
996194dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
edit.py
View file @
55df6bb7
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment