Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
68d58456
Commit
68d58456
authored
Apr 11, 2017
by
Julian Rother
Browse files
Implement button for order repairing
parent
c51e233d
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/index.html
View file @
68d58456
...
...
@@ -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>
...
...
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