{
+ const marginTop = props.marginTop !== null ? props.marginTop : 104;
+ return {
+ marginTop: `${marginTop}px`,
+ height: `calc(100vh - ${marginTop}px)`,
+ };
+ });
+
+ return { innerStyle, outerStyle };
},
props: {
offline: { type: Boolean, default: false },
+ marginTop: { type: Number, default: null },
},
};
@@ -45,8 +57,6 @@
.studio-page-outer {
width: 100%;
- height: calc(100vh - 104px);
- margin-top: 104px;
margin-bottom: 16px;
overflow-x: hidden;
overflow-y: auto;
diff --git a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
index 65c886f2c7..ea652809fe 100644
--- a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
+++ b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
@@ -1,6 +1,6 @@
-
{{ channel ? channel.name : '' }}
-
-
-
-
-
-
-
- {{ $tr('downloadButton') }}
-
-
-
+
+
+
+
+
+
-
-
- {{ $tr('downloadPDF') }}
-
-
- {{ $tr('downloadCSV') }}
-
-
-
-
+
+
-
-
+
+
@@ -61,16 +43,16 @@
import { mapActions, mapGetters } from 'vuex';
import { channelExportMixin } from './mixins';
import DetailsPanel from 'shared/views/details/DetailsPanel.vue';
+ import StudioLargeLoader from 'shared/views/StudioLargeLoader';
+ import StudioImmersiveModal from 'shared/views/StudioImmersiveModal';
import { routerMixin } from 'shared/mixins';
- import LoadingText from 'shared/views/LoadingText';
- import FullscreenModal from 'shared/views/FullscreenModal';
export default {
name: 'ChannelDetailsModal',
components: {
DetailsPanel,
- LoadingText,
- FullscreenModal,
+ StudioLargeLoader,
+ StudioImmersiveModal,
},
mixins: [routerMixin, channelExportMixin],
props: {
@@ -98,6 +80,12 @@
}
return { ...this.channel, ...this.details };
},
+ downloadOptions() {
+ return [
+ { label: this.$tr('downloadPDF'), value: 'pdf' },
+ { label: this.$tr('downloadCSV'), value: 'csv' },
+ ];
+ },
backLink() {
return {
name: this.$route.query.last,
@@ -135,6 +123,13 @@
},
methods: {
...mapActions('channel', ['loadChannel', 'loadChannelDetails']),
+ handleDownloadSelect(option) {
+ if (option.value === 'pdf') {
+ this.generatePDF();
+ } else if (option.value === 'csv') {
+ this.generateCSV();
+ }
+ },
async generatePDF() {
this.$analytics.trackEvent('channel_details', 'Download PDF', {
id: this.channelId,
@@ -187,14 +182,24 @@