Commit 5a885893 authored by Julian Rother's avatar Julian Rother
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:julianundandyfrickelnkram/videoagwebsite

parents 5378c7fd 3ba8d7b4
.videopreview li:nth-child(even) { background: #f5f5f5; }
.courses-list li:nth-child(even) { background: #fAfAfA; }
.mejs-container { height: 80% !important; width: 100% !important; position: fixed !important; }
......@@ -7,9 +7,15 @@
<h1 class="panel-title">{{course.title}}</h1>
</div>
<div class="row panel-body">
<span class="col-xs-2">Semester:</span><span class="col-xs-10">{{course.semester}}</span>
<span class="col-xs-2">Veranstalter:</span><span class="col-xs-10">{{course.organizer}}</span>
<span class="col-xs-2">Bemerkungen::</span><span class="col-xs-10">{{course.description|safe}}</span>
<div class="col-xs-12">
<table class="table-condensed">
<tbody>
<tr><td>Semester:</td><td>{{course.semester}}</td></tr>
<tr><td>Veranstalter:</td><td>{{course.organizer}}</td></tr>
<tr><td>Bemerkungen:</td><td>{{course.description|safe}}</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="panel panel-default">
......
......@@ -52,8 +52,10 @@
{% macro player(lecture, videos) %}
<script src="static/mediaelementjs/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="static/mediaelementjs/mediaelementplayer.css" />
<video class="mejs-player" width="640" height="360" style="width: 100%; height: 80%;">
<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}" />
<video class="mejs-player" width="640" height="360" style="width: 100%; height: 100%;">
{% for v in videos %}
<source type="video/mp4" src="https://videoag.fsmpi.rwth-aachen.de/{{ v.path }}" />
{% endfor %}
</video>
<script>
//$('.mejs-player').mediaelementplayer({
......@@ -104,6 +106,22 @@
</noscript>
{% endmacro %}
{%macro video_embed_btn(lectureid) %}
<a class="btn btn-default" id="embedcodebtn" data-container="body" data-toggle="popover" data-placement="bottom">
<span>Einbetten</span>
</a>
<script>
{% set embedcode = '<iframe width="700" height="394" src="https://videoag.fsmpi.rwth-aachen.de/site/embed.php?lecture='+lectureid|string+'" frameborder="0" allowfullscreen="true"></iframe>' %}
$('#embedcodebtn').popover(
{
html:true,
title:'Einbettcode',
content:'<span><input type="text" onclick="this.select()" value="{{embedcode}}"></span>'
}
)
</script>
{% endmacro %}
{% macro lecture_list_item(lecture,videos) %}
<li class="list-group-item">
<div class="row">
......@@ -119,15 +137,17 @@
{{ lecture.comment|safe }}
</span>
<span class="col-sm-3 col-xs-12">
<span class="dropdown pull-right">
{{ video_download_btn(videos) }}
<span class="pull-right">
<span class="dropdown">
{{ video_download_btn(videos) }}
</span>
<a href="/play?lectureid={{lecture.id}}">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-play"></span>
<span>Play</span>
</button>
</a>
</span>
<a href="/play?lectureid={{lecture.id}}" class="pull-right">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-play"></span>
<span>Play</span>
</button>
</a>
</span>
</div>
</li>
......
{% from 'macros.html' import player %}
{% from 'macros.html' import video_download_btn %}
{% from 'macros.html' import video_embed_btn %}
{% set page_border = 0 -%}
{% extends "base.html" %}
{% block content %}
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title">{{ course.title }}: {{ lecture.title}}</h1>
<h1 class="panel-title"><strong>{{ course.title }}</strong>: {{ lecture.title}}</h1>
</div>
<div class="row panel-body">
{{ player(lecture, videos) }}
<div class="panel-body">
<p class="col-xs-12" style="padding: 0px;">
<span><a href="/course?courseid={{course.handle}}" class="btn btn-default" >Zur Veranstaltungsseite</a><span>
<span class="pull-right">
<span>{{ video_embed_btn(lecture.id) }}</span>
<span>{{video_download_btn(videos)}}</span>
</span>
</p>
<div class="row">
<div class="col-xs-12">
{{ player(lecture, videos) }}
</div>
</div>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment