Commit 2cd50ae9 authored by Andreas Valder's avatar Andreas Valder

made psa editing responsive, closes #33

parent a6cde562
......@@ -12,34 +12,40 @@
<div class="row">
<div class="col-xs-12">
{% for msg in get_announcements() %}
<div class="alert alert-{{levels.get(msg.level, ('info', ''))[0]}}" role="alert">
<ul class="list-unstyled">
<li>{{ valueeditor(('announcements',msg.id,'text'), msg.text|safe) }}</li>
<li class="pull-right">{{ valuedeletebtn(('announcements',msg.id,'deleted')) }}</li>
<li class="pull-right" style="padding-right: 5px;">
{% if not msg.visible %}
<a href="{{ url_for('edit', prefix='announcements.'+msg.id|string+'.', ref=request.url, visible=1) }}" class="btn btn-primary">Veröffentlichen</a>
{% elif msg.time_expire and msg.time_expire < datetime.now() %}
<a href="#" class="btn btn-danger disabled">Abgelaufen</a>
{% elif msg.time_publish and msg.time_publish > datetime.now() %}
<a href="#" class="btn btn-default disabled">Geplant</a>
{% else %}
<a href="#" class="btn btn-success disabled">Öffentlich</a>
{% endif %}
</li>
<li class="dropdown pull-right" style="padding-right: 5px;">
<span class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">{{levels.get(msg.level, ('', 'Unbekannt'))[1]}} <span class="caret"></span></span>
<ul class="dropdown-menu">
{% for level, descr in levels.items() %}
<li><a href="{{ url_for('edit', prefix='announcements.'+(msg.id|string)+'.', ref=request.url, level=level) }}">{{ descr[1] }}</a></li>
{% endfor %}
</ul>
</li>
<li>
Aktiv von {{ valueeditor(('announcements',msg.id,'time_publish'), msg.time_publish) }}
bis {{ valueeditor(('announcements',msg.id,'time_expire'), msg.time_expire) }}
</li>
</ul>
<div class="alert alert-{{levels.get(msg.level, ('info', ''))[0]}} row" role="alert">
<div class="col-xs-12" style="padding: 0px;">
<div class="pull-right">{{ valuedeletebtn(('announcements',msg.id,'deleted')) }}</div>
<div>{{ valueeditor(('announcements',msg.id,'text'), msg.text) }}</div>
</div>
<div class="col-xs-12" style="padding: 0px;">
<ul class="list-inline">
<li>
{% if not msg.visible %}
<a href="{{ url_for('edit', prefix='announcements.'+msg.id|string+'.', ref=request.url, visible=1) }}" class="btn btn-primary">Veröffentlichen</a>
{% elif msg.time_expire and msg.time_expire < datetime.now() %}
<a href="#" class="btn btn-danger disabled">Abgelaufen</a>
{% elif msg.time_publish and msg.time_publish > datetime.now() %}
<a href="#" class="btn btn-default disabled">Geplant</a>
{% else %}
<a href="#" class="btn btn-success disabled">Öffentlich</a>
{% endif %}
</li>
<li class="dropdown">
<span class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">{{levels.get(msg.level, ('', 'Unbekannt'))[1]}} <span class="caret"></span></span>
<ul class="dropdown-menu">
{% for level, descr in levels.items() %}
<li><a href="{{ url_for('edit', prefix='announcements.'+(msg.id|string)+'.', ref=request.url, level=level) }}">{{ descr[1] }}</a></li>
{% endfor %}
</ul>
</li>
<li>
Aktiv von {{ valueeditor(('announcements',msg.id,'time_publish'), msg.time_publish) }}
</li>
<li>
bis {{ valueeditor(('announcements',msg.id,'time_expire'), msg.time_expire) }}
</li>
</ul>
</div>
</div>
{% endfor %}
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment