Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
redeleitsystem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redl
redeleitsystem
Commits
79cc7cfc
Commit
79cc7cfc
authored
9 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Added index page
parent
5b682ddb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
server.py
+6
-12
6 additions, 12 deletions
server.py
static/css/style.css
+4
-0
4 additions, 0 deletions
static/css/style.css
templates/content_index.html
+14
-13
14 additions, 13 deletions
templates/content_index.html
with
24 additions
and
25 deletions
server.py
+
6
−
12
View file @
79cc7cfc
...
...
@@ -11,7 +11,7 @@ import config
from
shared
import
db
,
login_manager
from
utils
import
render_layout
from
models.forms
import
LoginForm
,
NewUserForm
from
models.database
import
User
,
Statement
,
Speaker
,
Topic
from
models.database
import
User
,
Statement
,
Speaker
,
Topic
,
Event
app
=
Flask
(
__name__
)
app
.
config
.
from_object
(
config
)
...
...
@@ -62,20 +62,14 @@ def adduser():
@app.route
(
"
/
"
)
def
index
():
meta
=
[]
return
render_layout
(
"
index.html
"
,
meta
=
meta
)
events
=
Event
.
query
.
all
()
return
render_layout
(
"
index.html
"
,
events
=
events
)
@app.route
(
"
/update
"
)
def
update
():
topics
=
Topic
.
query
.
all
()
meta
=
[]
for
topic
in
topics
:
ls
=
speech
.
query_statements
(
topic
.
mode
,
topic
.
id
)
no_speaker
=
Speaker
(
"
No Speaker
"
,
topic
)
no_statement
=
Statement
(
no_speaker
,
topic
)
meta
.
append
((
ls
[
0
]
if
len
(
ls
)
>
0
else
(
no_statement
,
no_speaker
,
()),
topic
))
return
render_layout
(
"
content_index.html
"
,
meta
=
meta
)
events
=
Event
.
query
.
all
()
return
render_layout
(
"
content_index.html
"
,
events
=
events
)
@app.route
(
"
/update.js
"
)
def
update_js
():
update_interval
=
config
.
UPDATE_INDEX_INTERVAL
or
1
...
...
This diff is collapsed.
Click to expand it.
static/css/style.css
+
4
−
0
View file @
79cc7cfc
...
...
@@ -163,3 +163,7 @@ div.rede-paused-supporting {
.mdl-card
{
min-height
:
0px
;
}
.rede-title-no-decoration
{
text-decoration
:
none
;
}
This diff is collapsed.
Click to expand it.
templates/content_index.html
+
14
−
13
View file @
79cc7cfc
{% for event in events %}
<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"
>
{% if event.current_topic_id != -1 %}
<div
class=
"mdl-card__title"
>
<h3
class=
"mdl-card__title-text"
>
{{ event.current_topic.name }}: {{ event.current_topic.sorted_statements()[0].speaker.name }}
</h3>
<h4
class=
"mdl-card__title-text"
>
<a
href=
"{{ url_for("
speech.index
",
event=
event.id)
}}"
class=
"rede-title-no-decoration"
>
{{ event.name }}
</a>
{% if event.paused %}
(Paused)
{% endif %}
</h4>
</div>
{% if event.get_current_topic() %}
<table
class=
"mdl-data-table mdl-js-table"
>
{% for statement in event.get_current_topic().sorted_statements() %}
<tr>
<td>
statement.speaker.name
</td>
</tr>
{% for topic in event.topics %}
<div
class=
"mdl-card__supporting-text {% if topic.id == event.current_topic_id %}rede-list-point-big{% endif %}"
>
{{ topic.name }}
</div>
{% endfor %}
</table>
{% endif %}
{% else %}
No topic selected
{% endif %}
</div>
{% endfor %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment