better static page

This commit is contained in:
j 2012-01-09 15:25:52 +05:30 committed by rolux
commit da70450f78
9 changed files with 57 additions and 29 deletions

View file

@ -823,9 +823,8 @@ def item(request, id):
keys = [
'year',
'director',
'country',
'keywords',
'summary'
'topic',
'description'
]
data = []
for key in keys:
@ -848,12 +847,13 @@ def item(request, id):
'settings': settings,
'data': data,
'clips': clips,
'icon': 'poster',
'icon': settings.CONFIG['user']['ui']['icons'] == 'frames' and 'icon' or 'poster',
}
for key in ('title', 'description', 'keywords'):
value = item.get({
'description': 'summary' in keys and 'summary' or 'description'
'description': 'summary' in keys and 'summary' or 'description',
'keywords': 'topic' in keys and 'topic' or 'keywords'
}.get(key, key))
if isinstance(value, list):
value = value = ', '.join(value)

View file

@ -46,7 +46,7 @@
"filters": [
{"id": "source", "title": "Sources", "type": "string"},
{"id": "project", "title": "Projects", "type": "string"},
{"id": "topics", "title": "Topics", "type": "string"},
{"id": "topic", "title": "Topics", "type": "string"},
{"id": "name", "title": "People", "type": "string"},
{"id": "keywords", "title": "Keywords", "type": "string"},
{"id": "language", "title": "Languages", "type": "string"},
@ -517,7 +517,7 @@
{"id": "source", "sort": [{"key": "name", "operator": "+"}]},
{"id": "project", "sort": [{"key": "name", "operator": "+"}]},
{"id": "topic", "sort": [{"key": "items", "operator": "-"}]},
{"id": "people", "sort": [{"key": "items", "operator": "-"}]},
{"id": "name", "sort": [{"key": "items", "operator": "-"}]},
{"id": "keywords", "sort": [{"key": "items", "operator": "-"}]},
{"id": "places", "sort": [{"key": "items", "operator": "-"}]}
],
@ -529,7 +529,7 @@
"itemFind": {"conditions": [], "operator": "&"},
"itemSort": [{"key": "position", "operator": "+"}],
"itemView": "info",
"listColumns": ["title", "director", "location", "source", "language", "duration", "source"],
"listColumns": ["title", "director", "location", "source", "language", "duration"],
"listColumnWidth": {},
"listSelection": [],
"listSort": [{"key": "title", "operator": "+"}],

View file

@ -29,7 +29,7 @@
</head>
<body>
<noscript>
<img src="/{{id}}/poster256.jpg" style="float: left; margin-right: 8px">
<img src="/{{id}}/{{icon}}256.jpg" style="float: left; margin-right: 8px">
<h1>{{title}}</h1>
{% for i in data %}
<div>