Commit 68d58456 authored by Julian Rother's avatar Julian Rother
Browse files

Implement button for order repairing

parent c51e233d
......@@ -79,19 +79,22 @@
{{ moderator_editor(('featured',item.id,'title'), item.title) }} {{ moderator_checkbox(('featured',item.id,'visible'), item.visible) }}
{% if ismod() %}
<div class="btn-group pull-right" role="group">
{% if not loop.first %}
<a class="btn btn-default" href="{{ url_for('edit', **{'featured.'+item.id|string+'.order': featured[loop.index0-1].order, 'featured.'+featured[loop.index0-1].id|string+'.order': item.order, 'ref': request.url})}}"><span class="glyphicon glyphicon-arrow-up"></span></a>
{% if (loop.first or featured[loop.index0-1].order != item.order) and (loop.last or featured[loop.index0+1].order != item.order) %}
{% if not loop.first %}
<a class="btn btn-default" href="{{ url_for('edit', **{'featured.'+item.id|string+'.order': featured[loop.index0-1].order, 'featured.'+featured[loop.index0-1].id|string+'.order': item.order, 'ref': request.url})}}"><span class="glyphicon glyphicon-arrow-up"></span></a>
{% else %}
<button class="btn btn-default disabled"><span class="glyphicon glyphicon-arrow-up"></span></button>
{% endif %}
{% if not loop.last %}
<a class="btn btn-default" href="{{ url_for('edit', **{'featured.'+item.id|string+'.order': featured[loop.index0+1].order, 'featured.'+featured[loop.index0+1].id|string+'.order': item.order, 'ref': request.url})}}"><span class="glyphicon glyphicon-arrow-down"></span></a>
{% else %}
<button class="btn btn-default disabled"><span class="glyphicon glyphicon-arrow-down"></span></button>
{% endif %}
{% else %}
<button class="btn btn-default disabled"><span class="glyphicon glyphicon-arrow-up"></span></button>
{% endif %}
{% if not loop.last %}
<a class="btn btn-default" href="{{ url_for('edit', **{'featured.'+item.id|string+'.order': featured[loop.index0+1].order, 'featured.'+featured[loop.index0+1].id|string+'.order': item.order, 'ref': request.url})}}"><span class="glyphicon glyphicon-arrow-down"></span></a>
{% else %}
<button class="btn btn-default disabled"><span class="glyphicon glyphicon-arrow-down"></span></button>
<a class="btn btn-default" data-toggle="tooltip" title="Sortierung reparieren" href="{{ url_for('edit', **{'featured.'+item.id|string+'.order': newfeatured, 'ref': request.url})}}"><span class="glyphicon glyphicon-sort-by-attributes"></span></a>
{% endif %}
{{ moderator_delete(['featured',item.id,'deleted']) }}
</div>
{% endif %}
</h1>
</div>
......
Supports Markdown
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