Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Editor-tool link in caption dialog #956

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions vueapp/components/Videos/Actions/CaptionUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<StudipDialog
v-if="showCaptionsDialog"
:title="$gettext('Untertitel hinzufügen')"
:title="$gettext('Untertitel bearbeiten')"
:confirmText="$gettext('Hochladen')"
:confirmClass="uploadButtonClasses"
:closeText="$gettext('Abbrechen')"
Expand Down Expand Up @@ -84,6 +84,11 @@
</div>
</fieldset>

<a v-if="event.publication.annotation_tool" :href="annotation_tool_link" target="_blank">
{{ $gettext('Link zum Opencast Untertiteleditor') }}
<studip-icon shape="share" role="clickable"/>
</a>

<MessageList :float="true" :dialog="true"/>

<MessageBox v-if="fileUploadError" type="error">
Expand All @@ -105,6 +110,7 @@ import MessageList from '@/components/MessageList';
import ProgressBar from '@/components/ProgressBar'
import UploadService from '@/common/upload.service'
import VideoChangeWarning from '@/components/Videos/VideoChangeWarning';
import StudipIcon from '@/components/Studip/StudipIcon'

export default {
name: 'CaptionUpload',
Expand All @@ -115,7 +121,8 @@ export default {
StudipButton,
ProgressBar,
MessageList,
VideoChangeWarning
VideoChangeWarning,
StudipIcon
},

emits: ['done', 'cancel'],
Expand Down Expand Up @@ -147,6 +154,15 @@ export default {

return 'accept';
},

annotation_tool_link() {
let redirectUrl = window.OpencastPlugin.REDIRECT_URL;
let action = '/annotation/' + this.event.token;

if (redirectUrl && this.event.publication.annotation_tool) {
return redirectUrl + action;
}
}
},

methods: {
Expand Down Expand Up @@ -279,7 +295,6 @@ export default {
file: event.target.files[0]
}
}

},

mounted() {
Expand Down
2 changes: 1 addition & 1 deletion vueapp/components/Videos/VideoRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export default {
if (this.event?.state !== 'running' && !this.isLivestream) {
menuItems.push({
id: 7,
label: this.$gettext('Untertitel hinzufügen'),
label: this.$gettext('Untertitel bearbeiten'),
icon: 'accessibility',
emit: 'performAction',
emitArguments: 'CaptionUpload'
Expand Down
Loading