From e73bde92c1bd89b84d3937d5de73f55564b97a73 Mon Sep 17 00:00:00 2001 From: Dennis Benz Date: Wed, 20 Dec 2023 17:23:15 +0100 Subject: [PATCH] Show tooltip with linked courses in link video dialog, ref #794 --- lib/Models/Playlists.php | 9 +++++++ .../Videos/Actions/VideoLinkToPlaylists.vue | 26 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/lib/Models/Playlists.php b/lib/Models/Playlists.php index 28e984977..d6dc10daf 100644 --- a/lib/Models/Playlists.php +++ b/lib/Models/Playlists.php @@ -321,6 +321,15 @@ public function toSanitizedArray() $data['tags'] = $this->tags->toArray(); + $data['courses'] = []; + if (!empty($this->courses)) { + $data['courses'] = PlaylistSeminars::getCoursesArray( + $this->courses->map(function ($course) { + return $course->id; + }) + ); + } + if (!is_null($data['allow_download'])) { $data['allow_download'] = filter_var( $data['allow_download'], diff --git a/vueapp/components/Videos/Actions/VideoLinkToPlaylists.vue b/vueapp/components/Videos/Actions/VideoLinkToPlaylists.vue index 0f0e95180..f17cfb7bb 100644 --- a/vueapp/components/Videos/Actions/VideoLinkToPlaylists.vue +++ b/vueapp/components/Videos/Actions/VideoLinkToPlaylists.vue @@ -10,12 +10,18 @@ >