updated to support 6 exploratories

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/sbd-uploadshare-portlet@176715 82a268e6-3cf1-43bd-a215-b396298e98cf
master
Massimiliano Assante 5 years ago
parent 446b3b7d82
commit aadfc31147

@ -13,18 +13,22 @@ Here you can customise the icon to show besides the Exploratory name
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));
String exploratoryName6Title = GetterUtil.getString(portletPreferences.getValue("exploratoryName6-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));
long exploratoryName6DocumentId = GetterUtil.getLong(portletPreferences.getValue("exploratoryName6-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 exploratory6Url = GetterUtil.getString(portletPreferences.getValue("exploratory6-Url", StringPool.BLANK));
String displayName_cfg = "";
@ -178,6 +182,33 @@ Here you can customise the icon to show besides the Exploratory name
</tr>
</table>
</aui:field-wrapper>
<aui:field-wrapper cssClass="field-group">
<table>
<tr>
<td><aui:input name="preferences--exploratoryName6-Title--"
type="text" cssClass="text long-field" showRequiredLabel="true"
label="Exploratory Name 6" inlineField="true" inlineLabel="left"
placeholder="Exploratory"
helpMessage="Display Name of the Exploratory"
value="<%=exploratoryName6Title%>" required="false" /></td>
<td><aui:input
name="preferences--exploratoryName6-DocumentId--" type="text"
cssClass="text long-field" showRequiredLabel="true"
label="Exploratory Document Id 6" inlineField="true"
inlineLabel="left" placeholder="ID"
helpMessage="ID taken from Liferay CMS in this Site"
value="<%=exploratoryName6DocumentId%>" required="false">
<aui:validator name="digits"></aui:validator>
</aui:input></td>
<td><aui:input name="preferences--exploratory6-Url--"
type="text" cssClass="text long-field" showRequiredLabel="true"
label="URL of the VRE 6" inlineField="true" inlineLabel="left"
placeholder="url" helpMessage="URL" value="<%=exploratory6Url%>"
required="false">
</aui:input></td>
</tr>
</table>
</aui:field-wrapper>
<aui:button-row>
<aui:button type="submit" />
</aui:button-row>

@ -20,6 +20,8 @@
GetterUtil.getString(portletPreferences.getValue("exploratoryName4-Title", StringPool.BLANK)));
pageContext.setAttribute("exploratoryName5Title",
GetterUtil.getString(portletPreferences.getValue("exploratoryName5-Title", StringPool.BLANK)));
pageContext.setAttribute("exploratoryName6Title",
GetterUtil.getString(portletPreferences.getValue("exploratoryName6-Title", StringPool.BLANK)));
long exploratoryName1DocumentId = GetterUtil
.getLong(portletPreferences.getValue("exploratoryName1-DocumentId", StringPool.BLANK));
@ -31,6 +33,8 @@
.getLong(portletPreferences.getValue("exploratoryName4-DocumentId", StringPool.BLANK));
long exploratoryName5DocumentId = GetterUtil
.getLong(portletPreferences.getValue("exploratoryName5-DocumentId", StringPool.BLANK));
long exploratoryName6DocumentId = GetterUtil
.getLong(portletPreferences.getValue("exploratoryName6-DocumentId", StringPool.BLANK));
String url1 = GetterUtil.getString(portletPreferences.getValue("exploratory1-Url", StringPool.BLANK));
pageContext.setAttribute("exploratory1Url", Utils.getVREFriendlyURL(currentUser, url1));
@ -46,6 +50,10 @@
String url5 = GetterUtil.getString(portletPreferences.getValue("exploratory5-Url", StringPool.BLANK));
pageContext.setAttribute("exploratory5Url", Utils.getVREFriendlyURL(currentUser, url5));
String url6 = GetterUtil.getString(portletPreferences.getValue("exploratory6-Url", StringPool.BLANK));
pageContext.setAttribute("exploratory6Url", Utils.getVREFriendlyURL(currentUser, url6));
String content1 = "";
if (exploratoryName1DocumentId > 0) {
@ -89,6 +97,15 @@
Node node = document.selectSingleNode("/root/static-content");
content5 = node.getText();
}
String content6 = "";
if (exploratoryName6DocumentId > 0) {
JournalArticle article = JournalArticleLocalServiceUtil.getArticle(groupId,
"" + exploratoryName6DocumentId);
Document document = SAXReaderUtil.read(article.getContent());
Node node = document.selectSingleNode("/root/static-content");
content6 = node.getText();
}
%>
<c:if test="${not empty exploratoryName1Title}">
<div class="asset-abstract">
@ -228,4 +245,32 @@
<div class="asset-metadata"></div>
</div>
</div>
</c:if>
<!-- SIXTH -->
<c:if test="${not empty exploratoryName6Title}">
<div class="asset-abstract">
<h3 class="asset-title">
<a href="${exploratory6Url}"><img alt="" src="${icondocURL}">
${exploratoryName6Title}</a>
</h3>
<div class="asset-content">
<div class="asset-summary" style="margin-left: 25px;">
<span id="asset-summarypre6"> <%
if (content6.length() > 225)
out.println(HtmlUtil.stripHtml(content6.substring(0, 222) + " ..."));
%>
<div>
<a
href="javascript:switchView('#asset-summarypre6', '#asset-summary-6');">Read
More » </a>
</div>
</span>
<div class="asset-more">
<div id="asset-summary-6" class="asset-summary"
style="display: none;"><%=content6%></div>
</div>
</div>
<div class="asset-metadata"></div>
</div>
</div>
</c:if>
Loading…
Cancel
Save