diff --git a/src/main/java/org/gcube/portlets/user/sbdportlets/AccessConfigurationAction.java b/src/main/java/org/gcube/portlets/user/sbdportlets/AccessConfigurationAction.java index b4eb1fd..f3ba60c 100644 --- a/src/main/java/org/gcube/portlets/user/sbdportlets/AccessConfigurationAction.java +++ b/src/main/java/org/gcube/portlets/user/sbdportlets/AccessConfigurationAction.java @@ -27,7 +27,10 @@ public class AccessConfigurationAction extends DefaultConfigurationAction { _log.info("exploratoryName3-Title = " + exploratoryName3Title + " in ConfigurationAction.processAction() saved correctly"); String exploratoryName4Title = prefs.getValue("exploratoryName4-Title", ""); _log.info("exploratoryName4-Title = " + exploratoryName4Title + " in ConfigurationAction.processAction() saved correctly"); + String exploratoryName5Title = prefs.getValue("exploratoryName5-Title", ""); + _log.info("exploratoryName5-Title = " + exploratoryName5Title + " in ConfigurationAction.processAction() saved correctly"); + long exploratoryName1DocumentId = Long.parseLong(prefs.getValue("exploratoryName1-DocumentId", "0")); _log.info("exploratoryName1-DocumentId = " + exploratoryName1DocumentId + " in ConfigurationAction.processAction() saved correctly"); long exploratoryName2DocumentId = Long.parseLong(prefs.getValue("exploratoryName2-DocumentId", "0")); @@ -36,6 +39,8 @@ public class AccessConfigurationAction extends DefaultConfigurationAction { _log.info("exploratoryName3-DocumentId = " + exploratoryName3DocumentId + " in ConfigurationAction.processAction() saved correctly"); long exploratoryName4DocumentId = Long.parseLong(prefs.getValue("exploratoryName4-DocumentId", "0")); _log.info("exploratoryName4-DocumentId = " + exploratoryName4DocumentId + " in ConfigurationAction.processAction() saved correctly"); + long exploratoryName5DocumentId = Long.parseLong(prefs.getValue("exploratoryName5-DocumentId", "0")); + _log.info("exploratoryName4-DocumentId = " + exploratoryName5DocumentId + " in ConfigurationAction.processAction() saved correctly"); String exploratory1Url = prefs.getValue("exploratory1-Url", ""); @@ -46,6 +51,8 @@ public class AccessConfigurationAction extends DefaultConfigurationAction { _log.info("exploratory3-Url = " + exploratory3Url + " in ConfigurationAction.processAction() saved correctly"); String exploratory4Url = prefs.getValue("exploratory4-Url", ""); _log.info("exploratory4-Url = " + exploratory4Url + " in ConfigurationAction.processAction() saved correctly"); + String exploratory5Url = prefs.getValue("exploratory5-Url", ""); + _log.info("exploratory5-Url = " + exploratory5Url + " in ConfigurationAction.processAction() saved correctly"); } diff --git a/src/main/webapp/html/accessexploratory/config.jsp b/src/main/webapp/html/accessexploratory/config.jsp index 6759d91..4035268 100644 --- a/src/main/webapp/html/accessexploratory/config.jsp +++ b/src/main/webapp/html/accessexploratory/config.jsp @@ -12,16 +12,19 @@ Here you can customise the icon to show besides the Exploratory name String exploratoryName2Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName2-Title", StringPool.BLANK)); String exploratoryName3Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName3-Title", StringPool.BLANK)); String exploratoryName4Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName4-Title", StringPool.BLANK)); + String exploratoryName5Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName5-Title", StringPool.BLANK)); long exploratoryName1DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName1-DocumentId", StringPool.BLANK)); long exploratoryName2DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName2-DocumentId", StringPool.BLANK)); long exploratoryName3DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName3-DocumentId", StringPool.BLANK)); long exploratoryName4DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName4-DocumentId", StringPool.BLANK)); + long exploratoryName5DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName5-DocumentId", StringPool.BLANK)); String exploratory1Url = GetterUtil.getString(portletPreferences.getValue("exploratory1-Url", StringPool.BLANK)); String exploratory2Url = GetterUtil.getString(portletPreferences.getValue("exploratory2-Url", StringPool.BLANK)); String exploratory3Url = GetterUtil.getString(portletPreferences.getValue("exploratory3-Url", StringPool.BLANK)); String exploratory4Url = GetterUtil.getString(portletPreferences.getValue("exploratory4-Url", StringPool.BLANK)); + String exploratory5Url = GetterUtil.getString(portletPreferences.getValue("exploratory5-Url", StringPool.BLANK)); String displayName_cfg = ""; @@ -32,10 +35,11 @@ Here you can customise the icon to show besides the Exploratory name value="<%=Constants.UPDATE%>" /> - +

Enter the Exploratory in the following:

@@ -120,7 +124,7 @@ Here you can customise the icon to show besides the Exploratory name - +
+ + + + + + + +
+ + +
+
diff --git a/src/main/webapp/html/accessexploratory/view.jsp b/src/main/webapp/html/accessexploratory/view.jsp index ae52eec..60ef30f 100644 --- a/src/main/webapp/html/accessexploratory/view.jsp +++ b/src/main/webapp/html/accessexploratory/view.jsp @@ -18,6 +18,8 @@ GetterUtil.getString(portletPreferences.getValue("exploratoryName3-Title", StringPool.BLANK))); pageContext.setAttribute("exploratoryName4Title", GetterUtil.getString(portletPreferences.getValue("exploratoryName4-Title", StringPool.BLANK))); + pageContext.setAttribute("exploratoryName5Title", + GetterUtil.getString(portletPreferences.getValue("exploratoryName5-Title", StringPool.BLANK))); long exploratoryName1DocumentId = GetterUtil .getLong(portletPreferences.getValue("exploratoryName1-DocumentId", StringPool.BLANK)); @@ -27,6 +29,8 @@ .getLong(portletPreferences.getValue("exploratoryName3-DocumentId", StringPool.BLANK)); long exploratoryName4DocumentId = GetterUtil .getLong(portletPreferences.getValue("exploratoryName4-DocumentId", StringPool.BLANK)); + long exploratoryName5DocumentId = GetterUtil + .getLong(portletPreferences.getValue("exploratoryName5-DocumentId", StringPool.BLANK)); String url1 = GetterUtil.getString(portletPreferences.getValue("exploratory1-Url", StringPool.BLANK)); pageContext.setAttribute("exploratory1Url", Utils.getVREFriendlyURL(currentUser, url1)); @@ -39,6 +43,9 @@ String url4 = GetterUtil.getString(portletPreferences.getValue("exploratory4-Url", StringPool.BLANK)); pageContext.setAttribute("exploratory4Url", Utils.getVREFriendlyURL(currentUser, url4)); + + String url5 = GetterUtil.getString(portletPreferences.getValue("exploratory5-Url", StringPool.BLANK)); + pageContext.setAttribute("exploratory5Url", Utils.getVREFriendlyURL(currentUser, url5)); String content1 = ""; if (exploratoryName1DocumentId > 0) { @@ -74,6 +81,14 @@ Node node = document.selectSingleNode("/root/static-content"); content4 = node.getText(); } + String content5 = ""; + if (exploratoryName5DocumentId > 0) { + JournalArticle article = JournalArticleLocalServiceUtil.getArticle(groupId, + "" + exploratoryName5DocumentId); + Document document = SAXReaderUtil.read(article.getContent()); + Node node = document.selectSingleNode("/root/static-content"); + content5 = node.getText(); + } %>
@@ -185,4 +200,32 @@
+
+ + +
+

+ + ${exploratoryName5Title} +

+
+
+ <% + if (content5.length() > 225) + out.println(HtmlUtil.stripHtml(content5.substring(0, 222) + " ...")); + %> + + +
+ +
+
+ +
+
\ No newline at end of file