Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
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
Video AG Infrastruktur
website
Commits
d644e637
There was an error fetching the commit references. Please try again later.
Commit
d644e637
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
added a way to suggest chapters,
#22
parent
2cd50ae9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server.py
+7
-1
7 additions, 1 deletion
server.py
templates/lecture.html
+14
-0
14 additions, 0 deletions
templates/lecture.html
with
21 additions
and
1 deletion
server.py
+
7
−
1
View file @
d644e637
...
...
@@ -386,7 +386,13 @@ def suggest_chapter(lectureid):
time
=
request
.
values
[
'
time
'
]
text
=
request
.
values
[
'
text
'
]
assert
(
time
and
text
)
time
=
int
(
time
)
try
:
x
=
datetime
.
strptime
(
time
,
'
%H:%M:%S
'
)
time
=
timedelta
(
hours
=
x
.
hour
,
minutes
=
x
.
minute
,
seconds
=
x
.
second
).
total_seconds
()
time
=
int
(
time
)
except
ValueError
:
flash
(
'
Falsches Zeitformat,
"
%H:%M:%S
"
wird erwartet. Z.B.
"
01:39:42
"
für eine Kapitel bei Stunde 1, Minute 39, Sekunde 42
'
)
submitter
=
None
if
not
ismod
():
submitter
=
request
.
environ
[
'
REMOTE_ADDR
'
]
...
...
This diff is collapsed.
Click to expand it.
templates/lecture.html
+
14
−
0
View file @
d644e637
...
...
@@ -16,6 +16,7 @@
</div>
<div
class=
"col-sm-6 col-xs-12"
>
<ul
class=
"list-inline pull-right"
>
<li><button
class=
"btn btn-default"
id=
"hintnewchapter"
>
Kapitelmarker vorschlagen
</button></li>
<li>
{{ video_embed_btn(lecture.id) }}
</li>
<li
class=
"dropdown"
>
{{ video_download_btn(videos) }}
</li>
</ul>
...
...
@@ -25,8 +26,21 @@
<div
class=
"col-xs-12"
style=
"padding: 0px"
>
{{ player(lecture, videos) }}
</div>
<div
class=
"col-xs-12"
style=
"padding-top: 10px;"
>
</div>
</div>
</div>
</div>
<script>
$
(
function
()
{
$
(
"
#hintnewchapter
"
).
popover
(
{
html
:
true
,
title
:
'
Kapitelmarkierung vorschlagen
'
,
content
:
'
<form method="post" action="{{url_for(
'
suggest_chapter
'
, ref=request.url, lectureid=lecture.id)}}"><input placeholder="00:00.000" name="time" type="text"><br><input placeholder="Kapitel" name="text" type="texz"><br><input type="submit" value="Vorschlagen"></form>
'
})
});
</script>
{% endblock %}
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