diff --git a/Plugin/DefaultConfiguration.json b/Plugin/DefaultConfiguration.json index 406c4c6..a673e26 100644 --- a/Plugin/DefaultConfiguration.json +++ b/Plugin/DefaultConfiguration.json @@ -48,6 +48,8 @@ "EnableSettings": true, // Enables the settings menu/interface "EnableLinkToLegacyUi": true, // Enables a link to the legacy Orthanc UI "EnableChangePassword": true, // Enables the 'change password' button in the side bar. Only applicable if Keycloak is enabled + "EnableQuickViewerButton": true, // Enables a button in the study list to directly open a viewer + "EnableQuickReportButton": true, // Enables a button in the study list to directly open a PDF report if available in the study "EnableEditLabels": true, // Enables labels management (create/delete/assign/unassign) "AvailableLabels": [], // If not empty, this list prevents the creation of new labels and only allows add/remove of the listed labels. diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index 513466e..90f8c9a 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -666,6 +666,8 @@ void GetOE2Configuration(OrthancPluginRestOutput* output, LOG(INFO) << "Overriding \"Enable...\" in UiOptions with the permissions from the auth-service for this user-profile"; UpdateUiOptions(uiOptions["EnableStudyList"], permissions, "all|view"); + UpdateUiOptions(uiOptions["EnableQuickViewerButton"], permissions, "all|view"); + UpdateUiOptions(uiOptions["EnableQuickReportButton"], permissions, "all|view"); UpdateUiOptions(uiOptions["EnableUpload"], permissions, "all|upload"); UpdateUiOptions(uiOptions["EnableAddSeries"], permissions, "all|upload"); UpdateUiOptions(uiOptions["EnableDicomModalities"], permissions, "all|q-r-remote-modalities"); diff --git a/WebApplication/src/components/StudyItem.vue b/WebApplication/src/components/StudyItem.vue index d454470..9f501bc 100644 --- a/WebApplication/src/components/StudyItem.vue +++ b/WebApplication/src/components/StudyItem.vue @@ -146,16 +146,16 @@ export default { } }, hasPdfReportIconPlaceholder() { - return this.studiesSourceType == SourceType.LOCAL_ORTHANC && !this.hasPdfReportIcon; + return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickReportButton && !this.hasPdfReportIcon; }, hasPdfReportIcon() { - return this.study.RequestedTags.SOPClassesInStudy && this.study.RequestedTags.SOPClassesInStudy.indexOf("1.2.840.10008.5.1.4.1.1.104.1") != -1; + return this.study.RequestedTags.SOPClassesInStudy && this.study.RequestedTags.SOPClassesInStudy.indexOf("1.2.840.10008.5.1.4.1.1.104.1") != -1 && this.uiOptions.EnableQuickReportButton; }, hasPrimaryViewerIconPlaceholder() { - return this.studiesSourceType == SourceType.LOCAL_ORTHANC && !this.hasPrimaryViewerIcon; + return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickViewerButton && !this.hasPrimaryViewerIcon; }, hasPrimaryViewerIcon() { - return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.primaryViewerUrl; + return this.studiesSourceType == SourceType.LOCAL_ORTHANC && this.primaryViewerUrl && this.uiOptions.EnableQuickViewerButton; }, primaryViewerUrl() { return resourceHelpers.getPrimaryViewerUrl("study", this.study.ID, this.study.MainDicomTags.StudyInstanceUID); diff --git a/WebApplication/src/components/StudyList.vue b/WebApplication/src/components/StudyList.vue index 85f2cd5..6b28168 100644 --- a/WebApplication/src/components/StudyList.vue +++ b/WebApplication/src/components/StudyList.vue @@ -155,10 +155,10 @@ export default { return this.uiOptions.DateFormat; }, hasPrimaryViewerIcon() { - return this.sourceType == SourceType.LOCAL_ORTHANC; + return this.sourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickViewerButton; }, hasPdfReportIcon() { - return this.sourceType == SourceType.LOCAL_ORTHANC; + return this.sourceType == SourceType.LOCAL_ORTHANC && this.uiOptions.EnableQuickReportButton; } }, watch: { diff --git a/WebApplication/src/store/modules/configuration.js b/WebApplication/src/store/modules/configuration.js index 01c89e9..5df230b 100644 --- a/WebApplication/src/store/modules/configuration.js +++ b/WebApplication/src/store/modules/configuration.js @@ -41,7 +41,9 @@ const mutations = { if (uiOptions.StudyListColumns.indexOf('seriesCount') != -1 || uiOptions.StudyListColumns.indexOf('seriesAndInstancesCount') != -1) { state.requestedTagsForStudyList.push('NumberOfStudyRelatedSeries') } - state.requestedTagsForStudyList.push('SOPClassesInStudy'); // to detect PDF files + if (uiOptions.EnableQuickReportButton) { + state.requestedTagsForStudyList.push('SOPClassesInStudy'); // to detect PDF files + } }, setUserProfile(state, { profile }) { state.userProfile = profile; diff --git a/release-notes.md b/release-notes.md index a2f9796..4a23693 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,6 +1,15 @@ Pending changes =============== +Changes: + - new configuration "EnableQuickViewerButton" to enable/disable a button + to open a viewer directly from the study list (default value: true). + - new configuration "EnableQuickReportButton" to enable/disable a button + to open a PDF report directly from the study list if available in the study. + (default value: false). Note that, with Orthanc version up to 1.12.4, this + option may slow down the display of the study list. + + Fixes: - When modifying studies, dates selected from the DatePicker were not always taken into account. - Primary viewer icon was not visible when using an external OHIF viewer.