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
9ff22054
Commit
9ff22054
authored
Nov 07, 2015
by
Robin Sonnabend
Browse files
previous topic
parent
58056af3
Changes
2
Hide whitespace changes
Inline
Side-by-side
models/database.py
View file @
9ff22054
...
...
@@ -97,6 +97,13 @@ class Topic(db.Model):
if
i
>=
len
(
topics
):
i
=
-
1
return
topics
[
i
].
id
def
get_previous_index
(
self
):
topics
=
self
.
event
.
sorted_topics
()
i
=
topics
.
index
(
self
)
-
1
if
i
>=
len
(
topics
):
i
=
0
return
topics
[
i
].
id
class
Speaker
(
db
.
Model
):
__tablename__
=
"speakers"
...
...
templates/admin_topic_show.html
View file @
9ff22054
...
...
@@ -57,6 +57,7 @@
{% endif %}
<li><a
href=
"{{ url_for("
.
statement_undo
")
}}"
class=
"rede-href"
><i
class=
"material-icons"
role=
"presentation"
>
undo
</i>
Previous
</a></li>
<li><a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_next_index())
}}"
><i
class=
"material-icons"
>
arrow_forward
</i>
Next Topic
</a></li>
<li><a
href=
"{{ url_for("
.
topic_show
",
id=
topic.get_previous_index())
}}"
><i
class=
"material-icons"
>
arrow_backward
</i>
Previous Topic
</a></li>
</ul>
</div>
</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