Modified to support a fourth exploratory
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/sbd-uploadshare-portlet@165297 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e3bb17d065
commit
8ee023f3bf
|
@ -25,6 +25,8 @@ public class AccessConfigurationAction extends DefaultConfigurationAction {
|
|||
_log.info("exploratoryName2-Title = " + exploratoryName2Title + " in ConfigurationAction.processAction() saved correctly");
|
||||
String exploratoryName3Title = prefs.getValue("exploratoryName3-Title", "");
|
||||
_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");
|
||||
|
||||
long exploratoryName1DocumentId = Long.parseLong(prefs.getValue("exploratoryName1-DocumentId", "0"));
|
||||
_log.info("exploratoryName1-DocumentId = " + exploratoryName1DocumentId + " in ConfigurationAction.processAction() saved correctly");
|
||||
|
@ -32,6 +34,9 @@ public class AccessConfigurationAction extends DefaultConfigurationAction {
|
|||
_log.info("exploratoryName2-DocumentId = " + exploratoryName2DocumentId + " in ConfigurationAction.processAction() saved correctly");
|
||||
long exploratoryName3DocumentId = Long.parseLong(prefs.getValue("exploratoryName3-DocumentId", "0"));
|
||||
_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");
|
||||
|
||||
|
||||
String exploratory1Url = prefs.getValue("exploratory1-Url", "");
|
||||
_log.info("exploratory1-Url = " + exploratory1Url + " in ConfigurationAction.processAction() saved correctly");
|
||||
|
@ -39,6 +44,8 @@ public class AccessConfigurationAction extends DefaultConfigurationAction {
|
|||
_log.info("exploratory2-Url = " + exploratory2Url + " in ConfigurationAction.processAction() saved correctly");
|
||||
String exploratory3Url = prefs.getValue("exploratory3-Url", "");
|
||||
_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");
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,14 +11,17 @@ Here you can customise the icon to show besides the Exploratory name
|
|||
String exploratoryName1Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName1-Title", StringPool.BLANK));
|
||||
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));
|
||||
|
||||
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));
|
||||
|
||||
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 displayName_cfg = "";
|
||||
|
@ -116,6 +119,33 @@ Here you can customise the icon to show besides the Exploratory name
|
|||
</aui:input></td>
|
||||
</tr>
|
||||
</table>
|
||||
</aui:field-wrapper>
|
||||
<aui:field-wrapper cssClass="field-group">
|
||||
<table>
|
||||
<tr>
|
||||
<td><aui:input name="preferences--exploratoryName4-Title--"
|
||||
type="text" cssClass="text long-field" showRequiredLabel="true"
|
||||
label="Exploratory Name 4" inlineField="true" inlineLabel="left"
|
||||
placeholder="Exploratory"
|
||||
helpMessage="Display Name of the Exploratory"
|
||||
value="<%=exploratoryName4Title%>" required="false" /></td>
|
||||
<td><aui:input
|
||||
name="preferences--exploratoryName4-DocumentId--" type="text"
|
||||
cssClass="text long-field" showRequiredLabel="true"
|
||||
label="Exploratory Document Id 4" inlineField="true"
|
||||
inlineLabel="left" placeholder="ID"
|
||||
helpMessage="ID taken from Liferay CMS in this Site"
|
||||
value="<%=exploratoryName4DocumentId%>" required="false">
|
||||
<aui:validator name="digits"></aui:validator>
|
||||
</aui:input></td>
|
||||
<td><aui:input name="preferences--exploratory4-Url--"
|
||||
type="text" cssClass="text long-field" showRequiredLabel="true"
|
||||
label="URL of the VRE 4" inlineField="true" inlineLabel="left"
|
||||
placeholder="url" helpMessage="URL" value="<%=exploratory4Url%>"
|
||||
required="false">
|
||||
</aui:input></td>
|
||||
</tr>
|
||||
</table>
|
||||
</aui:field-wrapper>
|
||||
<aui:button-row>
|
||||
<aui:button type="submit" />
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
GetterUtil.getString(portletPreferences.getValue("exploratoryName2-Title", StringPool.BLANK)));
|
||||
pageContext.setAttribute("exploratoryName3Title",
|
||||
GetterUtil.getString(portletPreferences.getValue("exploratoryName3-Title", StringPool.BLANK)));
|
||||
pageContext.setAttribute("exploratoryName4Title",
|
||||
GetterUtil.getString(portletPreferences.getValue("exploratoryName4-Title", StringPool.BLANK)));
|
||||
|
||||
long exploratoryName1DocumentId = GetterUtil
|
||||
.getLong(portletPreferences.getValue("exploratoryName1-DocumentId", StringPool.BLANK));
|
||||
|
@ -23,6 +25,8 @@
|
|||
.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));
|
||||
|
||||
String url1 = GetterUtil.getString(portletPreferences.getValue("exploratory1-Url", StringPool.BLANK));
|
||||
pageContext.setAttribute("exploratory1Url", Utils.getVREFriendlyURL(currentUser, url1));
|
||||
|
@ -33,6 +37,9 @@
|
|||
String url3 = GetterUtil.getString(portletPreferences.getValue("exploratory3-Url", StringPool.BLANK));
|
||||
pageContext.setAttribute("exploratory3Url", Utils.getVREFriendlyURL(currentUser, url3));
|
||||
|
||||
String url4 = GetterUtil.getString(portletPreferences.getValue("exploratory4-Url", StringPool.BLANK));
|
||||
pageContext.setAttribute("exploratory4Url", Utils.getVREFriendlyURL(currentUser, url4));
|
||||
|
||||
String content1 = "";
|
||||
if (exploratoryName1DocumentId > 0) {
|
||||
JournalArticle article = JournalArticleLocalServiceUtil.getArticle(groupId,
|
||||
|
@ -59,6 +66,14 @@
|
|||
Node node = document.selectSingleNode("/root/static-content");
|
||||
content3 = node.getText();
|
||||
}
|
||||
String content4 = "";
|
||||
if (exploratoryName4DocumentId > 0) {
|
||||
JournalArticle article = JournalArticleLocalServiceUtil.getArticle(groupId,
|
||||
"" + exploratoryName4DocumentId);
|
||||
Document document = SAXReaderUtil.read(article.getContent());
|
||||
Node node = document.selectSingleNode("/root/static-content");
|
||||
content4 = node.getText();
|
||||
}
|
||||
%>
|
||||
<c:if test="${not empty exploratoryName1Title}">
|
||||
<div class="asset-abstract">
|
||||
|
@ -143,3 +158,31 @@
|
|||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- FOURTH -->
|
||||
<c:if test="${not empty exploratoryName4Title}">
|
||||
<div class="asset-abstract">
|
||||
<h3 class="asset-title">
|
||||
<a href="${exploratory4Url}"><img alt="" src="${icondocURL}">
|
||||
${exploratoryName4Title}</a>
|
||||
</h3>
|
||||
<div class="asset-content">
|
||||
<div class="asset-summary" style="margin-left: 25px;">
|
||||
<span id="asset-summarypre4"> <%
|
||||
if (content4.length() > 225)
|
||||
out.println(HtmlUtil.stripHtml(content4.substring(0, 222) + " ..."));
|
||||
%>
|
||||
<div>
|
||||
<a
|
||||
href="javascript:switchView('#asset-summarypre4', '#asset-summary-4');">Read
|
||||
More » </a>
|
||||
</div>
|
||||
</span>
|
||||
<div class="asset-more">
|
||||
<div id="asset-summary-4" class="asset-summary"
|
||||
style="display: none;"><%=content4%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="asset-metadata"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
Loading…
Reference in New Issue