added support for mentions notifications

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/notifications@73593 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-04-18 10:31:29 +00:00
parent aa242a5649
commit 9709a3e227
5 changed files with 13 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/notifications-0.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/notifications-0.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/notifications-0.1.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/notifications-0.2.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,6 +1,6 @@
#Fri Jan 04 14:59:05 CET 2013
#Thu Apr 18 12:31:11 CEST 2013
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/Users/massi/Documents/workspace/notifications/target/notifications-0.1.0-SNAPSHOT
lastWarOutDir=/Users/massi/Documents/workspace/notifications/target/notifications-0.2.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>notifications</artifactId>
<packaging>war</packaging>
<version>0.1.0-SNAPSHOT</version>
<version>0.2.0-SNAPSHOT</version>
<name>gCube Notifications Portlet</name>
<properties>

View File

@ -70,6 +70,12 @@ public class SingleNotificationView extends Composite {
notificationImage.setResource(getImageType(toShow.getType()));
switch (toShow.getType()) {
case MENTION:
case LIKE:
case COMMENT:
case OWN_COMMENT:
goApp.setHTML("<a class=\"link\" href=\""+toShow.getUri()+"\"> See this Post.</a>");
break;
case DOCUMENT_WORKFLOW_STEP_REQUEST_TASK:
goApp.setHTML("<a class=\"link\" href=\""+toShow.getUri()+"\"> See this Document Workflow.</a>");
//remove the Sender of the notification because it is sent by the user that performs the last forward

View File

@ -61,8 +61,8 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
if (user == null) {
user = "test.user";
//user = "leonardo.candela";
// user = "massimiliano.assante";
user = "massimiliano.assante";
_log.warn("USER IS NULL setting "+user+" and Running OUTSIDE PORTAL");
withinPortal = false;
}