Skip to content
Snippets Groups Projects
Commit de956911 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Added topic header to statement table

parent 1544643f
No related branches found
No related tags found
No related merge requests found
......@@ -286,7 +286,9 @@ def statement_delete():
@login_required
@admin_permission.require()
def statement_undo():
topic_id = request.args.get("topic_id", None)
if statement_id is not None:
statement = Statement.query.filter_by(executed=True).order_by(db.desc(Statement.execution_time)).first()
statement.undo()
db.session.commit()
return redirect(url_for(".topic_show", id=statement.topic.id))
return redirect(url_for(".topic_show", id=topic_id))
......@@ -109,3 +109,17 @@
text-decoration: none;
vertical-align: text-top;
}
th.rede-large-text {
font-size: 18pt;
}
th.rede-medium-text {
font-size: 18pt;
color: darkred;
}
.rede-list-no-bullet {
list-style-type: none;
padding-left: 1pc;
}
......@@ -6,10 +6,14 @@
<div class="mdl-cell mdl-cell--6-col mdl-cell--5-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
<table class="mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--12-col">
<thead>
<tr>
<th class="mdl-data-table__cell-non-numeric rede-large-text">{{ topic.name }}</th>
<th class="mdl-data-table__cell-non-numeric rede-medium-text" colspan=2>{{ topic.mode }}</th>
<th class="mdl-data-table__cell-non-numeric rede-medium-text"><a href="{{ url_for(".topic_edit", id=topic.id) }}"><i class="material-icons">edit</i></a></th>
</tr>
<tr>
<th class="mdl-data-table__cell--non-numeric">Speaker</th>
<th class="mdl-data-table__cell--non-numeric">Topic</th>
<th class="mdl-data-table__cell--non-numeric">Count</th>
<th class="mdl-data-table__cell">Count</th>
<th class="mdl-data-table__cell--non-numeric">Done</th>
<th class="mdl-data-table__cell--non-numeric">Edit</th>
<th class="mdl-data-table__cell--non-numeric">Remove</th>
......@@ -19,8 +23,7 @@
{% for statement in topic.sorted_statements() %}
<tr>
<td class="mdl-data-table__cell--non-numeric">{{ statement.speaker.identifier() }}</td>
<td class="mdl-data-table__cell--non-numeric">{{ statement.topic.name }}</td>
<td class="mdl-data-table__cell--non-numeric">{{ statement.speaker.count(statement.topic) }}</td>
<td class="mdl-data-table__cell">{{ statement.speaker.count(statement.topic) }}</td>
<td class="mdl-data-table__cell--non-numeric">
<a href="{{ url_for(".statement_done", id=statement.id, topic_id=topic.id) }}">
<i class="material-icons">done</i>
......@@ -46,7 +49,7 @@
<div class="mdl-cell mdl-cell--3-col mdl-cell--3-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
{{ 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") }}
<div class="mdl-cell mdl-card mdl-shadow--2dp mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<ul>
<ul class="rede-list-no-bullet">
{% if topic.sorted_statements()|length() > 0 %}
<li>
<a 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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment