Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
R
redeleitsystem
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
redl
redeleitsystem
Commits
8f882ac0
Commit
8f882ac0
authored
Nov 08, 2015
by
Robin Sonnabend
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better looking next/previous arrows
parent
88be719a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
modules/admin.py
modules/admin.py
+2
-1
templates/admin_topic_show.html
templates/admin_topic_show.html
+23
-13
No files found.
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
Markdown
is supported
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