Skip to content

Commit 56310b1

Browse files
authored
Add bulkd action delete videos in Workspace video list, (elan-ev#1344)
By checking the domain that is rendering the videos list table so called fragment, we make sure that we are in workspace or contents, then we provide the bulk action properties of select row and select all checkboy as well as the Move to trash bin button in table footer.
1 parent 5a84f01 commit 56310b1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

vueapp/components/Videos/VideosTable.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
:numberOfColumns="numberOfColumns"
8888
:selectedVideos="selectedVideos"
8989
@toggle="toggleVideo"
90-
:selectable="selectable"
90+
:selectable="selectable || isContents"
9191
:isCourse="isCourse"
9292
:canUpload="canUpload"
9393
:showActions="showActions"
@@ -98,7 +98,7 @@
9898
</template>
9999
</draggable>
100100

101-
<tfoot v-if="canEdit || (isCourse && playlist)">
101+
<tfoot v-if="canEdit || (isCourse && playlist) || isContents">
102102
<tr>
103103
<td :colspan="numberOfColumns">
104104
<span class="oc--bulk-actions">
@@ -107,7 +107,7 @@
107107
</StudipButton>
108108
</span>
109109

110-
<span v-if="canEdit && !isCourse && !trashBin">
110+
<span v-if="(canEdit || isContents) && !isCourse && !trashBin">
111111
<StudipButton icon="trash"
112112
@click.prevent="doBulkAction('BulkVideoDelete')"
113113
:class="{
@@ -301,7 +301,7 @@ export default {
301301
},
302302
303303
showCheckbox() {
304-
return (this.selectable || this.canEdit || this.canUpload) && this.userHasSelectableVideos;
304+
return (this.selectable || this.canEdit || this.canUpload || this.isContents) && this.userHasSelectableVideos;
305305
},
306306
307307
isCourse() {
@@ -350,7 +350,16 @@ export default {
350350
351351
serversCheckSuccessful() {
352352
return Object.values(this.isLTIAuthenticated).every(server => server);
353+
},
354+
355+
fragment() {
356+
return this.$route.name;
357+
},
358+
359+
isContents() {
360+
return this.fragment === 'videos';
353361
}
362+
354363
},
355364
356365
methods: {

0 commit comments

Comments
 (0)