Skip to content

Commit 61d53eb

Browse files
committed
show video title in block manager
1 parent 48e3f54 commit 61d53eb

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

blocks/OpenCastBlock/OpenCastBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public function author_view()
152152

153153
public function preview_view()
154154
{
155-
156-
return;
155+
$content = json_decode($this->opencast_content);
156+
return array('content' => ($content->title ?: 'Video-ID: ' . $content->id));
157157
}
158158

159159
private function getAttrArray()

blocks/OpenCastBlock/js/author_view.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export default AuthorView.extend({
7474
let $opencast_content = {};
7575
$opencast_content.id = this.$(".cw-opencast-content option:selected").attr('data-opencastid');
7676
$opencast_content.useplayer = this.$('.cw-opencast-useocplayer:checked').val();
77+
$opencast_content.title = this.$(".cw-opencast-content option:selected").attr('data-episodetitle');
78+
7779
switch($opencast_content.useplayer) {
7880
case 'theodul':
7981
default:

blocks/OpenCastBlock/templates/author_view.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
data-urlmp4="{{url_mp4}}"
1212
data-urlopencasttheodul="{{url_opencast_theodul}}"
1313
data-urlopencastpaella="{{url_opencast_paella}}"
14-
data-opencastid="{{id}}">
14+
data-opencastid="{{id}}"
15+
data-episodetitle="{{title}}">
1516
{{title}}
1617
</option>
1718
{{/episodes}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
<p class="OpenCastBlock-preview-content">{{content}}</p>

0 commit comments

Comments
 (0)