From dd3300fb241cb84ba606cee7e026c4facc4ada3a Mon Sep 17 00:00:00 2001 From: Costantino Perciante Date: Fri, 6 May 2016 16:12:32 +0000 Subject: [PATCH] Portlet's name changed to Settings. It now contains also the leave group option (if available) git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/questions@128511 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 4 +- .settings/com.google.gdt.eclipse.core.prefs | 2 +- ....eclipse.wst.common.project.facet.core.xml | 2 +- pom.xml | 20 +- .../user/questions/client/Questions.java | 2 - .../questions/client/QuestionsService.java | 2 + .../client/QuestionsServiceAsync.java | 5 +- .../questions/client/VREManagersPanel.java | 185 +++++++++++++++--- .../server/QuestionsServiceImpl.java | 169 ++++++++++++++-- src/main/webapp/Questions.css | 18 +- src/main/webapp/WEB-INF/liferay-display.xml | 4 +- .../WEB-INF/liferay-plugin-package.properties | 4 +- src/main/webapp/WEB-INF/liferay-portlet.xml | 5 +- src/main/webapp/WEB-INF/portlet.xml | 10 +- src/main/webapp/WEB-INF/web.xml | 9 +- 15 files changed, 358 insertions(+), 83 deletions(-) diff --git a/.classpath b/.classpath index 5f2c9f4..96c66eb 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -31,5 +31,5 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index abc2687..8e3305e 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/Users/massi/Documents/workspace/questions/target/questions-1.0.0-SNAPSHOT +lastWarOutDir=/home/costantino/workspace/questions/target/questions-2.0.0-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index b3a52d7..2b231e3 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,7 +1,7 @@ - + diff --git a/pom.xml b/pom.xml index 802257a..e328cac 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user questions war - 1.2.0-SNAPSHOT + 2.0.0-SNAPSHOT gCube Questions Ask Managers Portlet gCube Questions Ask Managers Portlet @@ -27,6 +27,7 @@ 2.7.0 distro + 6.2.5 1.7 1.7 ${project.build.directory}/${project.build.finalName} @@ -72,17 +73,24 @@ org.gcube.portlets.user gcube-widgets - provided + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) + compile org.gcube.portal custom-portal-handler + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) provided commons-io commons-io + + org.gcube.common.portal + portal-manager + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) + org.gcube.core common-encryption @@ -130,7 +138,7 @@ org.gcube.portlets.widgets wsmail-widget - [1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT) + [2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) compile @@ -139,6 +147,11 @@ [2.13.0-SNAPSHOT, 3.0.0-SNAPSHOT) compile + + org.gcube.portlets.widgets + session-checker + [1.0.0-SNAPSHOT, 3.0.0-SNAPSHOT) + org.apache.httpcomponents httpclient @@ -147,6 +160,7 @@ com.liferay.portal portal-service + ${liferay.version} provided diff --git a/src/main/java/org/gcube/portlets/user/questions/client/Questions.java b/src/main/java/org/gcube/portlets/user/questions/client/Questions.java index eb00788..104f746 100644 --- a/src/main/java/org/gcube/portlets/user/questions/client/Questions.java +++ b/src/main/java/org/gcube/portlets/user/questions/client/Questions.java @@ -7,8 +7,6 @@ import com.google.gwt.user.client.ui.RootPanel; * Entry point classes define onModuleLoad(). */ public class Questions implements EntryPoint { - - public void onModuleLoad() { RootPanel.get("questionsManagersDiv").add(new VREManagersPanel()); } diff --git a/src/main/java/org/gcube/portlets/user/questions/client/QuestionsService.java b/src/main/java/org/gcube/portlets/user/questions/client/QuestionsService.java index 97edace..fa9e205 100644 --- a/src/main/java/org/gcube/portlets/user/questions/client/QuestionsService.java +++ b/src/main/java/org/gcube/portlets/user/questions/client/QuestionsService.java @@ -13,4 +13,6 @@ import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath("greet") public interface QuestionsService extends RemoteService { ArrayList getManagers(); + String removeUserFromVRE(); + boolean isLeaveButtonAvailable(String currentUrl); } diff --git a/src/main/java/org/gcube/portlets/user/questions/client/QuestionsServiceAsync.java b/src/main/java/org/gcube/portlets/user/questions/client/QuestionsServiceAsync.java index e77a55a..b337d31 100644 --- a/src/main/java/org/gcube/portlets/user/questions/client/QuestionsServiceAsync.java +++ b/src/main/java/org/gcube/portlets/user/questions/client/QuestionsServiceAsync.java @@ -7,7 +7,8 @@ import org.gcube.portal.databook.shared.UserInfo; import com.google.gwt.user.client.rpc.AsyncCallback; public interface QuestionsServiceAsync { - void getManagers(AsyncCallback> callback); - + void removeUserFromVRE(AsyncCallback callback); + void isLeaveButtonAvailable(String currentUrl, + AsyncCallback callback); } diff --git a/src/main/java/org/gcube/portlets/user/questions/client/VREManagersPanel.java b/src/main/java/org/gcube/portlets/user/questions/client/VREManagersPanel.java index 191123b..750cbb3 100644 --- a/src/main/java/org/gcube/portlets/user/questions/client/VREManagersPanel.java +++ b/src/main/java/org/gcube/portlets/user/questions/client/VREManagersPanel.java @@ -4,68 +4,113 @@ import java.util.ArrayList; import java.util.List; import org.gcube.portal.databook.shared.UserInfo; +import org.gcube.portlets.user.gcubewidgets.client.elements.Span; import org.gcube.portlets.user.questions.client.resources.Images; import org.gcube.portlets.user.questions.client.ui.DisplayBadge; +import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.wsmail.client.forms.MailForm; +import com.github.gwtbootstrap.client.ui.AlertBlock; import com.github.gwtbootstrap.client.ui.Button; +import com.github.gwtbootstrap.client.ui.Label; +import com.github.gwtbootstrap.client.ui.constants.AlertType; +import com.github.gwtbootstrap.client.ui.constants.ButtonType; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.RunAsyncCallback; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.Window; +import com.google.gwt.user.client.Window.Location; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HasAlignment; import com.google.gwt.user.client.ui.HasVerticalAlignment; -import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.VerticalPanel; public class VREManagersPanel extends Composite { - + private final QuestionsServiceAsync service = GWT.create(QuestionsService.class); - public static final String DISPLAY_NAME = "Questions? Ask the managers"; private Image loadingImage; private Image postToImage; private Button messageManagers = new Button(); + private Button leaveVreButton = new Button("Leave Group"); + private AlertBlock alertBlockOnLeave = new AlertBlock(); + private static final String leaveAlertMessage = "Are you sure you want to leave this group? " + + "By leaving this group you will no longer receive updates and lose the workspace folder related to the group."; + + // main panel private VerticalPanel mainPanel = new VerticalPanel(); + + // panel for Questions? Ask the managers option + private VerticalPanel askManagersOption = new VerticalPanel(); + + // panel for leave group option + private VerticalPanel leaveVREOption = new VerticalPanel(); + + // list of managers private ArrayList managers; + public VREManagersPanel() { super(); + initWidget(mainPanel); + Images images = GWT.create(Images.class); loadingImage = new Image(images.membersLoader().getSafeUri()); postToImage = new Image(images.postToIcon().getSafeUri()); - - mainPanel.add(loadingImage); - showLoader(); + + // add options subpanels to the main one + mainPanel.add(askManagersOption); // this is always present ... + + // more options label to show the other ones (if present) + final Button showMoreOptions = new Button("Show more options ..."); + showMoreOptions.setType(ButtonType.LINK); + + // handler + showMoreOptions.addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event) { + + // hide the button itself + showMoreOptions.setVisible(false); + + // show other options + leaveVREOption.setVisible(true); + + } + }); + + mainPanel.add(showMoreOptions); + mainPanel.add(leaveVREOption); + + // hide options but askManagersOption + leaveVREOption.setVisible(false); + + // show loaders for the panels + showLoader(askManagersOption); + showLoader(leaveVREOption); + service.getManagers(new AsyncCallback>() { @Override public void onSuccess(ArrayList users) { + askManagersOption.clear(); managers = users; - mainPanel.clear(); - mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); - mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); - mainPanel.setStyleName("questions-frame"); - HTML name = new HTML(DISPLAY_NAME); - - name.setStyleName("questions-title"); - HorizontalPanel hp = new HorizontalPanel(); - hp.add(name); + askManagersOption.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); + askManagersOption.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); + askManagersOption.setStyleName("questions-frame"); postToImage.setStyleName("manager-post-image"); postToImage.setTitle("Message privately to the Managers"); - // hp.add(postToImage); - mainPanel.add(hp); if (users == null || users.isEmpty()) { - mainPanel.add(new HTML("
Ops, something went wrong. Please reload this page.
")); + askManagersOption.add(new HTML("")); } else { for (int i = 0; i < users.size(); i++) { - mainPanel.add(new DisplayBadge(users.get(i))); + askManagersOption.add(new DisplayBadge(users.get(i))); } if (users.size() > 1) messageManagers.setText("Message managers"); @@ -75,18 +120,18 @@ public class VREManagersPanel extends Composite { SimplePanel bPanel = new SimplePanel(); bPanel.setStyleName("manager-action"); bPanel.setWidget(messageManagers); - mainPanel.add(bPanel); + askManagersOption.add(bPanel); } @Override public void onFailure(Throwable caught) { - mainPanel.add(new HTML("
" + + askManagersOption.clear(); + askManagersOption.add(new HTML("
" + "Sorry, looks like something is broken with the server connection
" + "Please check your connection and try refresh this page.
")); } }); - initWidget(mainPanel); messageManagers.addClickHandler(new ClickHandler() { @Override @@ -95,7 +140,7 @@ public class VREManagersPanel extends Composite { for (UserInfo user : managers) { listToLogin.add(user.getUsername()); } - + GWT.runAsync(new RunAsyncCallback() { @Override public void onSuccess() { @@ -107,14 +152,96 @@ public class VREManagersPanel extends Composite { }); } }); + + service.isLeaveButtonAvailable(Location.getHref(), new AsyncCallback() { + + @Override + public void onSuccess(Boolean result) { + leaveVREOption.clear(); + leaveVREOption.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); + if(!result) + addLeaveVREButton(); + + } + + @Override + public void onFailure(Throwable caught) { + leaveVREOption.clear(); + } + }); } + private void addLeaveVREButton(){ - private void showLoader() { - mainPanel.clear(); - mainPanel.setWidth("100%"); - mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER); - mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); - mainPanel.add(loadingImage); + // add leave VRE button + leaveVreButton.addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event) { + + // show alert block + alertBlockOnLeave.setVisible(true); + + } + }); + + // Add Cancel and Confirm Leave buttons + Span cancel = new Span("Cancel"); + Span confirmLeave = new Span("Confirm Leave"); + cancel.setStyleName("cancel-leave-button"); + confirmLeave.setStyleName("cancel-leave-button"); + + // add to main panel + alertBlockOnLeave.setHTML(leaveAlertMessage + "

"); + alertBlockOnLeave.add(cancel); + alertBlockOnLeave.add(new Label(" or ")); + alertBlockOnLeave.add(confirmLeave); + alertBlockOnLeave.setType(AlertType.WARNING); + alertBlockOnLeave.setHeading("WARNING!"); + alertBlockOnLeave.setClose(false); + alertBlockOnLeave.setVisible(false); + leaveVREOption.add(alertBlockOnLeave); + leaveVREOption.add(leaveVreButton); + + // add handlers + cancel.addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event) { + + // just hide alertBlock + alertBlockOnLeave.setVisible(false); + } + }); + + confirmLeave.addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event){ + service.removeUserFromVRE(new AsyncCallback() { + @Override + public void onSuccess(String result) { + if (result != null) + Location.assign(result); + else + CheckSession.showLogoutDialog(); + + } + @Override + public void onFailure(Throwable caught) { + Window.alert("We're sorry we couldn't reach the server, try again later ... " + caught.getMessage()); + } + }); + + } + }); + } + + private void showLoader(VerticalPanel panel) { + panel.clear(); + panel.setWidth("100%"); + panel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER); + panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); + panel.add(loadingImage); } } diff --git a/src/main/java/org/gcube/portlets/user/questions/server/QuestionsServiceImpl.java b/src/main/java/org/gcube/portlets/user/questions/server/QuestionsServiceImpl.java index 081858e..0975704 100644 --- a/src/main/java/org/gcube/portlets/user/questions/server/QuestionsServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/questions/server/QuestionsServiceImpl.java @@ -3,24 +3,26 @@ package org.gcube.portlets.user.questions.server; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.commons.codec.binary.Base64; import org.gcube.application.framework.core.session.ASLSession; import org.gcube.application.framework.core.session.SessionManager; -import org.gcube.portal.custom.communitymanager.OrganizationsUtil; +import org.gcube.common.portal.PortalContext; +import org.gcube.common.portal.mailing.EmailNotification; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portal.databook.client.GCubeSocialNetworking; import org.gcube.portal.databook.shared.UserInfo; +import org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl; import org.gcube.portlets.user.questions.client.QuestionsService; import org.gcube.vomanagement.usermanagement.GroupManager; import org.gcube.vomanagement.usermanagement.UserManager; -import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault; -import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException; -import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayGroupManager; -import org.gcube.vomanagement.usermanagement.impl.liferay.LiferayUserManager; -import org.gcube.vomanagement.usermanagement.model.RoleModel; -import org.gcube.vomanagement.usermanagement.model.UserModel; +import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager; +import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager; +import org.gcube.vomanagement.usermanagement.model.GCubeGroup; +import org.gcube.vomanagement.usermanagement.model.GCubeRole; +import org.gcube.vomanagement.usermanagement.model.GCubeUser; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -70,24 +72,24 @@ public class QuestionsServiceImpl extends RemoteServiceServlet implements Questi if (isWithinPortal()) { _log.trace("Asking user and roles ..."); UserManager userM = new LiferayUserManager(); - HashMap> usersAndRoles = null; + Map> usersAndRoles = null; try { usersAndRoles = userM.listUsersAndRolesByGroup(getCurrentGroupID()); } catch (Exception e) { e.printStackTrace(); } - Set users = usersAndRoles.keySet(); - for (UserModel usr:users) { - List roles = usersAndRoles.get(usr); + Set users = usersAndRoles.keySet(); + for (GCubeUser usr:users) { + List roles = usersAndRoles.get(usr); for (int i = 0; i < roles.size(); i++) { if (roles.get(i).getRoleName().equals("VRE-Manager")) { - String username = usr.getScreenName(); + String username = usr.getUsername(); _log.trace("Found Manager ... " + username); String fullName = usr.getFullname(); String thumbnailURL = "images/Avatar_default.png"; try { - com.liferay.portal.model.User user = UserLocalServiceUtil.getUserByScreenName(OrganizationsUtil.getCompany().getCompanyId(), username); - thumbnailURL = user.isMale() ? "/image/user_male_portrait?img_id="+user.getPortraitId() : "/image/user_female_portrait?img_id="+user.getPortraitId(); + GCubeUser user = userM.getUserByUsername(username); + thumbnailURL = user.getUserAvatarURL(); HashMap vreNames = new HashMap(); String headline = user.getJobTitle(); UserInfo userInfo = new UserInfo(username, fullName, thumbnailURL, headline, getUserProfileLink(username), user.isMale(), false, vreNames); @@ -110,6 +112,58 @@ public class QuestionsServiceImpl extends RemoteServiceServlet implements Questi return toReturn; } + /** + *@return the redirect url if everything goes ok, null otherwise + */ + @Override + public String removeUserFromVRE() { + String username = getASLSession().getUsername(); + if (username.compareTo("test.user") == 0) + return null; + _log.debug("Going to remove user from the current Group: " + getCurrentGroupID() + ". Username is: " + username); + UserManager userM = new LiferayUserManager(); + try { + userM.dismissUserFromGroup(getCurrentGroupID(), userM.getUserId(username)); + sendUserUnregisteredNotification(username, getASLSession().getScope(), + PortalContext.getConfiguration().getGatewayURL(getThreadLocalRequest()), + PortalContext.getConfiguration().getGatewayName(getThreadLocalRequest())); + return "/"; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + @Override + public boolean isLeaveButtonAvailable(String portalURL) { + + if(isWithinPortal()){ + String friendlyURL = ScopeServiceImpl.extractOrgFriendlyURL(portalURL); + GroupManager gm = new LiferayGroupManager(); + GCubeGroup currSite = null; + try { + List groups = gm.listGroups(); + for (GCubeGroup g : groups) { + if (g.getFriendlyURL().compareTo(friendlyURL) == 0) { + long groupId = g.getGroupId(); + String scopeToSet = gm.getInfrastructureScope(groupId); + getASLSession().setScope(scopeToSet); + _log.info("GOT Selected Research Environment: " + scopeToSet); + currSite = g; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + Boolean isMandatory = false; + try{ + isMandatory = (Boolean) gm.readCustomAttr(currSite.getGroupId(), org.gcube.vomanagement.usermanagement.model.CustomAttributeKeys.MANDATORY.getKeyName()); + }catch(Exception e){ + _log.error("Unable to evaluate if the leave button can be added for the current group " + currSite.getGroupName(), e); + } + _log.debug("Is Leave button available in vre " + currSite.getGroupName() + " ? " + isMandatory); + return isMandatory; + }else return true; + } /** * * @return true if you're running into the portal, false if in development @@ -131,22 +185,99 @@ public class QuestionsServiceImpl extends RemoteServiceServlet implements Questi * @throws Exception * @throws CurrentGroupRetrievalException */ - private String getCurrentGroupID() throws Exception { + private long getCurrentGroupID(){ GroupManager groupM = new LiferayGroupManager(); ASLSession session = getASLSession(); _log.debug("The current group NAME is --> " + session.getGroupName()); try { return groupM.getGroupId(session.getGroupName()); - } catch (GroupRetrievalFault e) { + } catch (Exception e) { e.printStackTrace(); } - return null; + return 0; } - + private String getUserProfileLink(String username) { return "profile?"+ new String(Base64.encodeBase64(GCubeSocialNetworking.USER_PROFILE_OID.getBytes()))+"="+new String(Base64.encodeBase64(username.getBytes())); } - + /** + * + * @param scope . + * @param optionalMessage . + */ + public void sendUserUnregisteredNotification(String username, String scope, String portalbasicurl, String gatewayName) { + ArrayList adminEmails = getAdministratorsEmails(scope); + UserManager um = new LiferayUserManager(); + GCubeUser currUser = null; + try { + currUser = um.getUserByUsername(username); + } catch (Exception e) { + } + String name = currUser.getFirstName(); + String lastname = currUser.getLastName(); + + StringBuffer body = new StringBuffer(); + body.append("

Dear manager of "+ scope +",
this email message was automatically generated by " + portalbasicurl +" to inform you that "); + body.append("

"); + body.append("

"); + body.append(""+name + " " + lastname +" has left the following environment: "); + body.append("

"); + body.append("" + scope+""); + body.append("
"); + body.append("
"); + body.append("Username: " + username); + body.append("
"); + body.append("e-mail: " + currUser.getEmail()); + body.append("

"); + + String[] allMails = new String[adminEmails.size()]; + + adminEmails.toArray(allMails); + + EmailNotification mailToAdmin = new EmailNotification(allMails , "Unregistration from VRE", body.toString(), getThreadLocalRequest()); + + mailToAdmin.sendEmail(); + } + + protected static ArrayList getAdministratorsEmails(String scope) { + LiferayUserManager userManager = new LiferayUserManager(); + LiferayGroupManager groupManager = new LiferayGroupManager(); + long groupId = -1; + try { + List allGroups = groupManager.listGroups(); + _log.debug("Number of groups retrieved: " + allGroups.size()); + for (int i = 0; i < allGroups.size(); i++) { + long grId = allGroups.get(i).getGroupId(); + String groupScope = groupManager.getInfrastructureScope(grId); + _log.debug("Comparing: " + groupScope + " " + scope); + if (groupScope.equals(scope)) { + groupId = allGroups.get(i).getGroupId(); + break; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + Map> usersAndRoles = null; + try { + usersAndRoles = userManager.listUsersAndRolesByGroup(groupId); + } catch (Exception e) { + e.printStackTrace(); + } + Set users = usersAndRoles.keySet(); + ArrayList adminEmailsList = new ArrayList(); + for (GCubeUser usr:users) { + List roles = usersAndRoles.get(usr); + for (int i = 0; i < roles.size(); i++) { + if (roles.get(i).getRoleName().equals("VO-Admin") || roles.get(i).getRoleName().equals("VRE-Manager")) { + adminEmailsList.add(usr.getEmail()); + _log.debug("Admin: " + usr.getFullname()); + break; + } + } + } + return adminEmailsList; + } } diff --git a/src/main/webapp/Questions.css b/src/main/webapp/Questions.css index 0cf141c..4d37119 100644 --- a/src/main/webapp/Questions.css +++ b/src/main/webapp/Questions.css @@ -8,11 +8,6 @@ .questions-frame { padding: 10px; - background-color: #FFF; - border-radius: 6px !important; - -moz-border-radius: 6px !important; - -webkit-border-radius: 6px !important; - border: 1px solid #DBDBDB; } .manager-user-photo { @@ -49,7 +44,7 @@ a.manager-person-link { line-height: 18px; } -a.manager-person-link,a.manager-person-link:visited { +a.manager-person-link, a.manager-person-link:visited { cursor: pointer; cursor: hand; font-size: 16x; @@ -63,7 +58,6 @@ a.manager-person-link:hover { text-decoration: underline; } - .manager-headline { font-size: 13px; color: #444444; @@ -74,4 +68,14 @@ a.manager-person-link:hover { .manager-institution { font-size: 11px; color: #444444; +} + +.cancel-leave-button { + font-weight: bold; +} + +.cancel-leave-button:hover { + cursor: pointer; + cursor: hand; + text-decoration: underline; } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/liferay-display.xml b/src/main/webapp/WEB-INF/liferay-display.xml index 64928ca..6b84f14 100644 --- a/src/main/webapp/WEB-INF/liferay-display.xml +++ b/src/main/webapp/WEB-INF/liferay-display.xml @@ -1,8 +1,8 @@ - + - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties index 621b168..366e090 100644 --- a/src/main/webapp/WEB-INF/liferay-plugin-package.properties +++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties @@ -1,4 +1,4 @@ -name=VREManagers +name=VRESettings module-group-id=liferay module-incremental-version=1 tags= @@ -6,4 +6,4 @@ short-description= change-log= page-url=http://www.d4science.org author=D4Science.org -licenses=EUPL \ No newline at end of file +licenses=EUPL diff --git a/src/main/webapp/WEB-INF/liferay-portlet.xml b/src/main/webapp/WEB-INF/liferay-portlet.xml index ea33f62..107e1f0 100644 --- a/src/main/webapp/WEB-INF/liferay-portlet.xml +++ b/src/main/webapp/WEB-INF/liferay-portlet.xml @@ -1,9 +1,8 @@ - - + - VREManagers + VRESettings false false false diff --git a/src/main/webapp/WEB-INF/portlet.xml b/src/main/webapp/WEB-INF/portlet.xml index c7ba5b7..8b78220 100644 --- a/src/main/webapp/WEB-INF/portlet.xml +++ b/src/main/webapp/WEB-INF/portlet.xml @@ -7,8 +7,8 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" > - VREManagers - VRE Managers + VRESettings + VRE Settings org.gcube.portlets.user.questions.server.portlet.VREManagersPortlet view-jsp @@ -19,9 +19,9 @@ text/html - Questions? Ask the Managers - VRE Managers - VRE Managers + Settings + Settings + vre settings administrator diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 2d97450..fb69927 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,9 +1,8 @@ - - - +