Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
AURA
dashboard
Commits
29c6a309
Commit
29c6a309
authored
2 months ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
feat: allow users to delete episodes
refs
#332
parent
964972a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#8873
passed
2 months ago
Stage: test
Stage: release
Pipeline: aura-tests
#8874
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Pages/ShowEpisodeDetails.vue
+27
-2
27 additions, 2 deletions
src/Pages/ShowEpisodeDetails.vue
src/i18n/de.js
+5
-0
5 additions, 0 deletions
src/i18n/de.js
src/i18n/en.js
+5
-0
5 additions, 0 deletions
src/i18n/en.js
with
37 additions
and
2 deletions
src/Pages/ShowEpisodeDetails.vue
+
27
−
2
View file @
29c6a309
<
template
>
<
template
>
<div>
<div>
<PageHeader
:lead=
"show.name"
:title=
"title"
:editing-metadata=
"episode"
/>
<PageHeader
:lead=
"show.name"
:title=
"title"
:editing-metadata=
"episode"
>
<APermissionGuard
show-permissions=
"program.delete_episode"
>
<ConfirmEpisodeDelete
v-slot=
"
{ resolve }">
<AConfirmDialog
:title=
"t('episode.deletion.title')"
:confirm-label=
"t('episode.deletion.confirmLabel')"
@
confirm=
"resolve(true)"
@
cancel=
"resolve(false)"
>
<p>
{{
t
(
'
episode.deletion.description
'
)
}}
</p>
</AConfirmDialog>
</ConfirmEpisodeDelete>
<button
type=
"button"
class=
"btn btn-danger"
@
click=
"deleteEpisode"
>
{{
t
(
'
episode.deletion.title
'
)
}}
</button>
</APermissionGuard>
</PageHeader>
<div
<div
class=
"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 xl:tw-grid-cols-10 tw-items-start tw-gap-6 tw-max-w-[1200px]"
class=
"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 xl:tw-grid-cols-10 tw-items-start tw-gap-6 tw-max-w-[1200px]"
...
@@ -82,8 +99,9 @@ import { ensureDate, useObjectListFromStore } from '@/util'
...
@@ -82,8 +99,9 @@ import { ensureDate, useObjectListFromStore } from '@/util'
import
ASpinnerLabel
from
'
@/components/generic/ASpinnerLabel.vue
'
import
ASpinnerLabel
from
'
@/components/generic/ASpinnerLabel.vue
'
import
{
useMediaFactory
}
from
'
@/stores/media-manager
'
import
{
useMediaFactory
}
from
'
@/stores/media-manager
'
import
FormGroup
from
'
@/components/generic/FormGroup.vue
'
import
FormGroup
from
'
@/components/generic/FormGroup.vue
'
import
{
useTextareaAutosize
}
from
'
@vueuse/core
'
import
{
createTemplatePromise
,
useTextareaAutosize
}
from
'
@vueuse/core
'
import
{
useAPIObjectFieldCopy
}
from
'
@/form
'
import
{
useAPIObjectFieldCopy
}
from
'
@/form
'
import
AConfirmDialog
from
'
@/components/generic/AConfirmDialog.vue
'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
show
:
Show
show
:
Show
...
@@ -115,6 +133,13 @@ const timeslotData = computed(() => {
...
@@ -115,6 +133,13 @@ const timeslotData = computed(() => {
})
})
})
})
const
ConfirmEpisodeDelete
=
createTemplatePromise
<
boolean
>
()
async
function
deleteEpisode
()
{
if
(
!
(
await
ConfirmEpisodeDelete
.
start
()))
return
await
episodeStore
.
remove
(
episode
.
value
.
id
)
}
const
mediaDescription
=
useAPIObjectFieldCopy
(
episodeStore
,
episode
,
'
mediaDescription
'
,
{
const
mediaDescription
=
useAPIObjectFieldCopy
(
episodeStore
,
episode
,
'
mediaDescription
'
,
{
debounce
:
2
,
debounce
:
2
,
})
})
...
...
This diff is collapsed.
Click to expand it.
src/i18n/de.js
+
5
−
0
View file @
29c6a309
...
@@ -93,6 +93,11 @@ export default {
...
@@ -93,6 +93,11 @@ export default {
createNew
:
'
Neue Sendung anlegen
'
,
createNew
:
'
Neue Sendung anlegen
'
,
perPage
:
'
Sendungen pro Seite
'
,
perPage
:
'
Sendungen pro Seite
'
,
},
},
deletion
:
{
title
:
'
Sendung löschen
'
,
description
:
'
Bist du sicher, dass du diese Sendung löschen willst?
'
,
confirmLabel
:
'
Ja, Sendung löschen
'
,
},
assignment
:
{
assignment
:
{
clear
:
'
Zuweisung aufheben
'
,
clear
:
'
Zuweisung aufheben
'
,
clearDescription
:
clearDescription
:
...
...
This diff is collapsed.
Click to expand it.
src/i18n/en.js
+
5
−
0
View file @
29c6a309
...
@@ -92,6 +92,11 @@ export default {
...
@@ -92,6 +92,11 @@ export default {
createNew
:
'
Create new episode
'
,
createNew
:
'
Create new episode
'
,
perPage
:
'
Episodes per page
'
,
perPage
:
'
Episodes per page
'
,
},
},
deletion
:
{
title
:
'
Delete episode
'
,
description
:
'
Are you sure you want to delete this episode?
'
,
confirmLabel
:
'
Yes, delete episode
'
,
},
assignment
:
{
assignment
:
{
clear
:
'
Clear assignment
'
,
clear
:
'
Clear assignment
'
,
clearDescription
:
clearDescription
:
...
...
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