Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
redl
redeleitsystem
Commits
8f882ac0
Commit
8f882ac0
authored
Nov 08, 2015
by
Robin Sonnabend
Browse files
Better looking next/previous arrows
parent
88be719a
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/admin.py
View file @
8f882ac0
...
...
@@ -149,7 +149,8 @@ def topic_show():
form
.
topic
.
data
=
topic
.
id
statements
=
topic
.
sorted_statements
()
topics
=
topic
.
event
.
sorted_topics
()
return
render_layout
(
"admin_topic_show.html"
,
topic
=
topic
,
form
=
form
,
statements
=
statements
,
topics
=
topics
)
can_undo
=
len
(
Statement
.
query
.
filter_by
(
executed
=
True
,
topic_id
=
topic_id
).
order_by
(
db
.
desc
(
Statement
.
execution_time
)).
all
())
>
0
return
render_layout
(
"admin_topic_show.html"
,
topic
=
topic
,
form
=
form
,
statements
=
statements
,
topics
=
topics
,
can_undo_statement
=
can_undo
)
return
redirect
(
url_for
(
".index"
))
...
...
templates/admin_topic_show.html
View file @
8f882ac0
...
...
@@ -66,12 +66,22 @@
{{ render_form(form, action_url=url_for(".statement_new"), action_text="Add", title="Add Statement", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone", btn_list=[("","Add Statement","add_statement"), ("mdl-button--colored","Add Meta","add_meta_statement")] ) }}
<div
class=
"mdl-cell mdl-card mdl-shadow--2dp mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone"
>
<ul
class=
"rede-list-no-bullet"
>
{% if topic.sorted_statements()|length() > 0 %}
<li>
<a
id=
"next-statement-button"
href=
"{{ url_for("
.
statement_done
",
id=
topic.sorted_statements()[0].id,
topic_id=
topic.id)
}}"
class=
"rede-href"
><i
class=
"material-icons"
role=
"presentation"
>
redo
</i>
Next
</a>
<table
style=
"width: 100%"
>
<tr>
<td>
{% if can_undo_statement %}
<a
href=
"{{ url_for("
.
statement_undo
",
topic_id=
topic.id)
}}"
class=
"rede-href"
><i
class=
"material-icons"
role=
"presentation"
>
undo
</i>
Previous
</a>
{% endif %}
</td>
<td>
{% if topic.sorted_statements()|length() > 0 %}
<a
id=
"next-statement-button"
href=
"{{ url_for("
.
statement_done
",
id=
topic.sorted_statements()[0].id,
topic_id=
topic.id)
}}"
class=
"rede-href"
>
Next
<i
class=
"material-icons"
role=
"presentation"
>
redo
</i></a>
{% endif %}
</td>
<tr>
</table>
</li>
{% endif %}
<li><a
href=
"{{ url_for("
.
statement_undo
",
topic_id=
topic.id)
}}"
class=
"rede-href"
><i
class=
"material-icons"
role=
"presentation"
>
undo
</i>
Previous
</a></li>
<li>
<form
action=
"{{ url_for("
.
pause
",
id=
topic.event.id,
original=
topic.id)
}}"
method=
"POST"
>
<button
class=
"mdl-button"
>
...
...
@@ -133,16 +143,16 @@
{% endfor %}
</table>
<table
style=
"width:100%"
>
<tr>
<td>
<a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_previous_index())
}}"
><i
class=
"material-icons"
style=
"heigth: 16pt; width:16pt;"
>
arrow_backward
</i>
Previous
</a>
</td>
<td>
<a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_next_index())
}}"
>
Next
<i
class=
"material-icons"
style=
"height:16pt; width:16pt;"
>
arrow_forward
</i></a>
</td>
</tr>
<tr>
<td>
<a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_previous_index())
}}"
><i
class=
"material-icons"
style=
"heigth: 16pt; width:16pt;"
>
arrow_backward
</i>
Previous
</a>
</td>
<td>
<a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_next_index())
}}"
>
Next
<i
class=
"material-icons"
style=
"height:16pt; width:16pt;"
>
arrow_forward
</i></a>
</td>
</tr>
</table>
</div>
</div>
</div>
{% if topic.event.paused %}
<div
class=
"mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone mdl-card mdl-shadow--2dp"
>
...
...
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