From 29108557dbea204d73063e2406ae0c478fb78279 Mon Sep 17 00:00:00 2001 From: oplantalech Date: Thu, 13 Dec 2018 17:22:38 +0100 Subject: [PATCH 1/2] Add parameter to remove What's New section --- .../java/org/mskcc/cbio/portal/util/GlobalProperties.java | 7 +++++++ .../src/main/webapp/WEB-INF/jsp/global/frontend_config.jsp | 1 + 2 files changed, 8 insertions(+) diff --git a/core/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.java b/core/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.java index ee38f6dc7ca..78f9fac9ef9 100644 --- a/core/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.java +++ b/core/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.java @@ -111,6 +111,7 @@ public class GlobalProperties { public static final String SKIN_RIGHT_NAV_SHOW_DATA_SETS = "skin.right_nav.show_data_sets"; public static final String SKIN_RIGHT_NAV_SHOW_EXAMPLES = "skin.right_nav.show_examples"; public static final String SKIN_RIGHT_NAV_SHOW_TESTIMONIALS = "skin.right_nav.show_testimonials"; + public static final String SKIN_RIGHT_NAV_SHOW_WHATS_NEW = "skin.right_nav.show_whats_new"; private static String skinAuthorizationMessage; @Value("${skin.authorization_message:Access to this portal is only available to authorized users.}") public void setSkinAuthorizationMessage(String property) { skinAuthorizationMessage = property; } @@ -717,6 +718,12 @@ public static boolean showRightNavTestimonials() return showFlag == null || Boolean.parseBoolean(showFlag); } + public static boolean showRightNavWhatsNew() + { + String showFlag = portalProperties.getProperty(SKIN_RIGHT_NAV_SHOW_WHATS_NEW); + return showFlag == null || Boolean.parseBoolean(showFlag); + } + public static String getAuthorizationMessage() { return skinAuthorizationMessage; diff --git a/portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jsp b/portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jsp index 75aad786bbb..015dead26c5 100644 --- a/portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jsp +++ b/portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jsp @@ -23,6 +23,7 @@ window.legacySupportFrontendConfig = { skinRightNavShowDatasets : <%=GlobalProperties.showRightNavDataSets()%>, skinRightNavShowExamples : <%=GlobalProperties.showRightNavExamples()%>, skinRightNavShowTestimonials : <%=GlobalProperties.showRightNavTestimonials()%>, + skinRightNavShowWhatsNew : <%=GlobalProperties.showRightNavWhatsNew()%>, skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>', skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>', skinRightNavWhatsNewBlurb : '<%=GlobalProperties.getRightNavWhatsNewBlurb()%>', From 68fd88d9b6b0063bfbd4fa8d0120b6d0940c2226 Mon Sep 17 00:00:00 2001 From: oplantalech Date: Fri, 14 Dec 2018 10:02:56 +0100 Subject: [PATCH 2/2] Add documentation and the new property in portal.properties.EXAMPLE --- docs/portal.properties-Reference.md | 57 ++++++++++++++++++++ src/main/resources/portal.properties.EXAMPLE | 1 + 2 files changed, 58 insertions(+) diff --git a/docs/portal.properties-Reference.md b/docs/portal.properties-Reference.md index e4ab26f4ceb..7d1c0bb8602 100644 --- a/docs/portal.properties-Reference.md +++ b/docs/portal.properties-Reference.md @@ -1,6 +1,7 @@ This page describes the main properties within portal.properties. - [Database Settings](#database-settings) +- [cBioPortal Customization](#cbioportal-customization) - [Segment File URL](#segment-file-url) - [Bitly API Username and Key](#bitly-api-username-and-key) - [Google Analytics](#google-analytics) @@ -34,6 +35,62 @@ db.tomcat_resource_name is required in order to work with the tomcat database co db.tomcat_resource_name=jdbc/cbioportal ``` +# cBioPortal Customization + +## Hide tabs (pages) +Settings controlling which tabs (pages) to hide. Set them to `false` if you want to hide those tabs, otherwise set the properties to `true`. + +``` +skin.show_data_tab= +skin.show_web_api_tab= +skin.show_r_matlab_tab= +skin.show_tutorials_tab= +skin.show_faqs_tab= +skin.show_news_tab= +skin.show_tools_tab= +skin.show_about_tab= +``` +*Note: `skin.show_tools_tab` refers to the `Visualize Your Data` tab, while `skin.show_data_tab` refers to the `Data Sets` tab. + +## Hide sections in the right navigation bar +Settings controlling what to show in the right navigation bar. Set them to `false` if you want to hide those sections, otherwise set the properties to `true`. + +``` +#Cancer Studies section: +skin.right_nav.show_data_sets= + +#Example Queries section: +skin.right_nav.show_examples= + +#Testimonials section: +skin.right_nav.show_testimonials= + +#What's New section +skin.right_nav.show_whats_new= +``` + +## Control the content of specific sections +Setting controlling the blurb: you can add any HTML code here that you want to visualize. This will be shown between the cBioPortal menu and the Query selector in the main page. +``` +skin.blurb= +``` + +Setting controlling the footer: you can add any HTML code here that you want to visualize. If the field is left empty, the default footer (from www.cbioportal.org) will be shown. +``` +skin.footer= +``` + +Settings controlling the "What's New" blurb in the right navigation bar: you can add any HTML code here that you want to visualize. If the field is left empty, the Twitter timeline will be shown (as long as `skin.right_nav.show_whats_new` is `true`, otherwise this section will not be displayed). + +``` +skin.right_nav.whats_new_blurb= +``` + +Add a custom logo in the right side of the menu. Place here the full name of the logo file (e.g. `logo.png`). This file should be saved in `$PORTAL_HOME/portal/images/`. +``` +skin.right_logo= +``` + # Segment File URL This is a root URL to where segment files can be found. This is used when you want to provide segment file viewing via external tools such as [IGV](http://www.broadinstitute.org/igv/). diff --git a/src/main/resources/portal.properties.EXAMPLE b/src/main/resources/portal.properties.EXAMPLE index 92a9d767f2b..5741bb908d5 100644 --- a/src/main/resources/portal.properties.EXAMPLE +++ b/src/main/resources/portal.properties.EXAMPLE @@ -62,6 +62,7 @@ skin.login.saml.registration_html=Sign in with MSK skin.right_nav.show_data_sets=true skin.right_nav.show_examples=true skin.right_nav.show_testimonials=true +skin.right_nav.show_whats_new=true # settings controlling what to show in the right navigation bar skin.study_view.link_text=To build your own case set, try out our enhanced Study View.