diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx index 5904c3223371697249bb90e9197dd92caea52a9c..dc24e69e9859fa061b20a7bedd09c106df1f51c3 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx @@ -521,7 +521,7 @@ class PresentationUploader extends Component { renderPresentationItem(item) { const { disableActions, oldCurrentId } = this.state; - const { intl } = this.props; + const { intl, allowDownloadable } = this.props; const isActualCurrent = item.id === oldCurrentId; const isUploading = !item.upload.done && item.upload.progress > 0; @@ -537,6 +537,10 @@ class PresentationUploader extends Component { [styles.tableItemAnimated]: isProcessing, }; + const itemActions = { + [styles.notDownloadable]: !allowDownloadable, + }; + const hideRemove = this.isDefault(item); const formattedDownloadableLabel = item.isDownloadable ? intl.formatMessage(intlMessages.isDownloadable) @@ -573,16 +577,19 @@ class PresentationUploader extends Component { {this.renderPresentationItemStatus(item)} </td> {hasError ? null : ( - <td className={styles.tableItemActions}> - <Button - className={isDownloadableStyle} - label={formattedDownloadableLabel} - aria-label={formattedDownloadableAriaLabel} - hideLabel - size="sm" - icon={item.isDownloadable ? 'download' : 'download-off'} - onClick={() => this.toggleDownloadable(item)} - /> + <td className={cx(styles.tableItemActions, itemActions)}> + {allowDownloadable ? ( + <Button + className={isDownloadableStyle} + label={formattedDownloadableLabel} + aria-label={formattedDownloadableAriaLabel} + hideLabel + size="sm" + icon={item.isDownloadable ? 'download' : 'download-off'} + onClick={() => this.toggleDownloadable(item)} + /> + ) : null + } <Checkbox ariaLabel={`${intl.formatMessage(intlMessages.setAsCurrentPresentation)} ${item.filename}`} checked={item.isCurrent} diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/container.jsx index 000733f83f14dbbf2a156a2b088a14f006307dea..8f94ee6ad73745b355aa438885de0dcb28c0f2bb 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/container.jsx @@ -11,7 +11,11 @@ const PresentationUploaderContainer = props => ( export default withTracker(() => { const PRESENTATION_CONFIG = Meteor.settings.public.presentation; const currentPresentations = Service.getPresentations(); - const { dispatchDisableDownloadable, dispatchEnableDownloadable, dispatchTogglePresentationDownloadable } = Service; + const { + dispatchDisableDownloadable, + dispatchEnableDownloadable, + dispatchTogglePresentationDownloadable, + } = Service; return { presentations: currentPresentations, @@ -19,6 +23,7 @@ export default withTracker(() => { fileSizeMin: PRESENTATION_CONFIG.uploadSizeMin, fileSizeMax: PRESENTATION_CONFIG.uploadSizeMax, fileValidMimeTypes: PRESENTATION_CONFIG.uploadValidMimeTypes, + allowDownloadable: PRESENTATION_CONFIG.allowDownloadable, handleSave: presentations => Service.persistPresentationChanges( currentPresentations, presentations, diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/styles.scss b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/styles.scss index 0b676868a7b08af392d0fc41b14ccdd81b994282..e1ba89b2943b97795397502046bb10be2690c0bb 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/styles.scss +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/styles.scss @@ -79,6 +79,10 @@ } } +.notDownloadable { + min-width: 48px; +} + .tableItemIcon > i { font-size: 1.35rem; } diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index b4a102a77fe00b5867bd3a50ca1ffb9883fe25c8..266723178ba3cbc2404692ef16906b0daf7cf94b 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -178,6 +178,7 @@ public: echoTestNumber: '9196' relayOnlyOnReconnect: false presentation: + allowDownloadable: true defaultPresentationFile: default.pdf panZoomThrottle: 32 uploadEndpoint: "/bigbluebutton/presentation/upload"