show the types when instance is specified in the config portlet part
This commit is contained in:
parent
e2da661c1c
commit
5447c142e3
|
@ -80,7 +80,7 @@ public class PortletViewController {
|
|||
e1.printStackTrace();
|
||||
}
|
||||
model.addAttribute("isRootVO", isRootVO);
|
||||
if (isRootVO) {
|
||||
if (catalogueBaseURL != null && catalogueBaseURL.compareTo("") != 0) { //if the config textbox with catalogueURL is filled in we show the types
|
||||
try {
|
||||
List<CatalogueType> theTypes = parseTypes(catalogueBaseURL+"/type", catalogueURL);
|
||||
Collections.sort(theTypes, Collections.reverseOrder());
|
||||
|
@ -100,7 +100,7 @@ public class PortletViewController {
|
|||
String context = pContext.getCurrentScope(""+groupId);
|
||||
|
||||
DataCatalogueImpl utils = null;
|
||||
if (gm.isRootVO(groupId)) {
|
||||
if (isRootVO) {
|
||||
String gatewaySiteURL = pContext.getGatewayURL(httpServletRequest);
|
||||
if (!gatewaySiteURL.startsWith("https"))
|
||||
gatewaySiteURL = gatewaySiteURL.replaceAll("http:", "https:");
|
||||
|
|
|
@ -1,10 +1,23 @@
|
|||
<%@ page contentType="text/html" pageEncoding="UTF-8"%>
|
||||
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
|
||||
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
|
||||
<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
|
||||
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
|
||||
|
||||
<%@ page import="com.liferay.portal.kernel.util.Constants" %>
|
||||
<%@ page import="com.liferay.portal.kernel.util.GetterUtil" %>
|
||||
<%@ page import="com.liferay.portal.kernel.util.StringPool" %>
|
||||
<%@ page import="com.liferay.portal.util.PortalUtil" %>
|
||||
|
||||
<%
|
||||
String catalogueActualURL = GetterUtil.getString(portletPreferences.getValue("catalogueURL", StringPool.BLANK));
|
||||
pageContext.setAttribute("catalogueActualURL", catalogueActualURL);
|
||||
%>
|
||||
<!-- show the types only when the ckan instance is specified in the config portlet part -->
|
||||
<c:choose>
|
||||
<c:when test="${isRootVO}">
|
||||
|
||||
<c:when test="${not empty catalogueActualURL}">
|
||||
<input type="hidden" value="${catalogueURL}" id="catalogueURL">
|
||||
<table class="catalogue-container">
|
||||
<tr class="catalogue-table-row">
|
||||
|
@ -20,8 +33,8 @@
|
|||
</div>
|
||||
<div>
|
||||
<a href="${catalogueURL}?path=/dataset">See All Items</a> <a
|
||||
href="${catalogueURL}?path=/tags" style="float: right;">See
|
||||
All Tags</a>
|
||||
href="${catalogueURL}?path=/types" style="float: right;">See
|
||||
All Types</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="catalogue-table-cell-max">
|
||||
|
|
Loading…
Reference in New Issue