added support for framed portlets

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/custom-portal-handler@92533 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-03-02 22:52:03 +00:00
parent cc283b934c
commit ab14dd8d3a
4 changed files with 32 additions and 4 deletions

View File

@ -60,7 +60,6 @@
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.0.6</version>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>

View File

@ -227,7 +227,8 @@ public class OrganizationsUtil {
subLayout.setTypeSettings(typeSettings);
//actually update the sub layout
LayoutLocalServiceUtil.updateLayout(subLayout.getGroupId(), subLayout.isPrivateLayout(), subLayout.getLayoutId(), subLayout.getTypeSettings());
removePortletFrame(subtab, subLayout);
if (! subtab.isUseBorder())
removePortletFrame(subtab, subLayout);
_log.debug("Added subtab " + subtab.getCaption() + " to layout for parent: " + layout.getName());
}
}
@ -240,8 +241,8 @@ public class OrganizationsUtil {
//actually update the layout
LayoutLocalServiceUtil.updateLayout(layout.getGroupId(), layout.isPrivateLayout(), layout.getLayoutId(), layout.getTypeSettings());
_log.debug("Added tab " + tab.getCaption() + " to layout for Group: " + siteLayout.getName());
removePortletFrame(tab, layout);
if (! tab.isUseBorder())
removePortletFrame(tab, layout);
}
return layout.getLayoutId();
}

View File

@ -18,6 +18,10 @@ public final class PortletsIdManager {
*
*/
public static final String GCUBE_USERS_MANAGE = "usersManagement";
/**
*
*/
public static final String GCUBE_ADD_USERS_MANAGE = "addusers";
/**
*
*/

View File

@ -26,6 +26,10 @@ public class GCUBELayoutTab {
* the last part of the URL after last slash, autogenerated if not set
*/
String friendlyURL;
/**
* set to false if you don't want to show the border
*/
boolean useBorder;
/**
* set to true if you don't want to show the tab
*/
@ -54,6 +58,7 @@ public class GCUBELayoutTab {
this.portlets = portlets;
this.type = type;
this.hidden = false;
this.useBorder = false;
}
/**
*
@ -78,6 +83,19 @@ public class GCUBELayoutTab {
toPass.add(portlet);
this.portlets = toPass;
}
/**
*
* @param caption the tab caption
* @param type the type of the layout
* @param portlet a single <class>GCUBEPortlet</class> to place in the layout
*/
public GCUBELayoutTab(String caption, GCUBELayoutType type, GCUBEPortlet portlet, boolean useFrame) {
this(caption, type, new ArrayList<GCUBEPortlet>());
ArrayList<GCUBEPortlet> toPass = new ArrayList<GCUBEPortlet>();
toPass.add(portlet);
this.portlets = toPass;
this.useBorder = useFrame;
}
/**
* method to add children tabs
* @param subtab
@ -171,6 +189,12 @@ public class GCUBELayoutTab {
this.hidden = hidden;
}
public boolean isUseBorder() {
return useBorder;
}
public void setUseBorder(boolean useBorder) {
this.useBorder = useBorder;
}
/**
* create the layout with portlets in it
*