set cookie to hide banner when no user is logged in
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@142215 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ca58bc998e
commit
5947db3dd8
|
@ -4,6 +4,7 @@
|
|||
|
||||
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.view;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -22,6 +23,7 @@ import com.google.gwt.http.client.URL;
|
|||
import com.google.gwt.json.client.JSONObject;
|
||||
import com.google.gwt.json.client.JSONParser;
|
||||
import com.google.gwt.json.client.JSONValue;
|
||||
import com.google.gwt.user.client.Cookies;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Frame;
|
||||
|
@ -107,6 +109,11 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
|
|||
// the portlet is outside the portal and no user is logged
|
||||
// in show only home and statistics
|
||||
managementPanel.doNotShowUserRelatedInfo();
|
||||
|
||||
// set the cookie to hide the banner
|
||||
Date now = new Date();
|
||||
now.setHours(now.getHours() + 3);
|
||||
Cookies.setCookie("ckan_hide_header", "true", now, ".d4science.org", "/", false);
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
Loading…
Reference in New Issue