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
d067165e
Commit
d067165e
authored
Sep 11, 2015
by
YSelf Tool
Browse files
Deduplication
parent
3ec31735
Changes
6
Show whitespace changes
Inline
Side-by-side
modules/speech.py
View file @
d067165e
...
...
@@ -67,7 +67,7 @@ def update():
else
:
for
event
in
Event
.
query
.
all
():
meta
.
append
((
query_statements
(
mode
,
event
.
id
),
event
))
return
render_template
(
"speech_
update
_show.html"
,
mode
=
mode
,
meta
=
meta
)
return
render_template
(
"speech_
content
_show.html"
,
mode
=
mode
,
meta
=
meta
)
@
speech
.
route
(
"/add"
,
methods
=
[
"GET"
,
"POST"
])
...
...
server.py
View file @
d067165e
...
...
@@ -52,7 +52,7 @@ def update():
no_speaker
=
Speaker
(
"No Speaker"
,
event
)
no_statement
=
Statement
(
no_speaker
,
event
)
meta
.
append
((
ls
[
0
]
if
len
(
ls
)
>
0
else
(
no_statement
,
no_speaker
,
()),
event
))
return
render_template
(
"
update
_index.html"
,
meta
=
meta
)
return
render_template
(
"
content
_index.html"
,
meta
=
meta
)
@
app
.
route
(
"/update.js"
)
def
update_js
():
...
...
templates/
update
_index.html
→
templates/
content
_index.html
View file @
d067165e
File moved
templates/index.html
View file @
d067165e
...
...
@@ -5,35 +5,5 @@
{% endblock %}
{% block content %}
{% for (statement, speaker, count), event in meta %}
<div
class=
"mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone mdl-card"
>
<div
class=
"mdl-card__title"
>
<h3
class=
"mdl-card__title-text"
>
{{ event.name }}: {{ speaker.name }}
</h3>
</div>
<div
class=
"mdl-card__actions"
>
{% if current_user.is_authenticated() and "user" in current_user.roles %}
<a
href=
"{{ url_for("
speech.index
",
event=
event.id,
mode=
"pending"
)
}}"
>
<button
type=
"button"
class=
"mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
>
<i
class=
"material-icons"
role=
"presentation"
>
build
</i>
</button>
</a>
{% endif %}
<a
href=
"{{ url_for("
speech.show
",
event=
event.id,
mode=
"pending"
)
}}"
>
<button
type=
"button"
class=
"mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
>
<i
class=
"material-icons"
role=
"presentation"
>
announcement
</i>
</button>
</a>
<a
href=
"{{ url_for("
speech.show
",
event=
event.id,
mode=
"all"
)
}}"
>
<button
type=
"button"
class=
"mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
>
<i
class=
"material-icons"
role=
"presentation"
>
list
</i>
</button>
</a>
<a
href=
"{{ url_for("
speech.show
",
event=
event.id,
mode=
"past"
)
}}"
>
<button
type=
"button"
class=
"mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
>
<i
class=
"material-icons"
role=
"presentation"
>
schedule
</i>
</button>
</a>
</div>
</div>
{% endfor %}
{% include "content_index.html" %}
{% endblock %}
templates/speech_
update
_show.html
→
templates/speech_
content
_show.html
View file @
d067165e
File moved
templates/speech_show.html
View file @
d067165e
...
...
@@ -6,46 +6,5 @@
{% endblock %}
{% block content %}
{% for statements, event in meta %}
<table
class=
"mdl-data-table mdl-js-table mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone"
>
<thead>
<tr>
<th
class=
"mdl-data-table__cell--non-numeric"
>
Speaker for {{ event.name }}
</th>
{% if mode == "all" or mode == "past" %}
<th
class=
"mdl-data-table__cell--non-numeric"
>
Time
</th>
{% endif %}
</tr>
</thead>
<tbody>
{% if mode == "all" or mode == "past" %}
{% for statement, speaker in statements %}
<tr>
<td
class=
"mdl-data-table__cell--non-numeric"
>
{{ speaker.name }}
</td>
{% if mode == "all" %}
<td
class=
"mdl-data-table__cell--non-numeric"
>
{{ statement.insertion_time.strftime("%d. %B %Y, %H:%M") }}
</td>
{% elif mode == "past" %}
<td
class=
"mdl-data-table__cell--non-numeric"
>
{{ statement.execution_time.strftime("%d. %B %Y, %H:%M") }}
</td>
{% endif %}
</tr>
{% endfor %}
{% elif mode == "pending" %}
{% for statement, speaker, count in statements %}
{% if not statement.executed %}
<tr>
<td
class=
"mdl-data-table__cell--non-numeric"
>
<h5>
{{ speaker.name }}
</h5>
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
</tbody>
</table>
{% endfor %}
{% include "speech_content_show.html" %}
{% endblock %}
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