people mentions redirect correctly to user profiles
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@79415 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
28ab028a07
commit
bd7c412936
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.user.shareupdates.0-5-0"
|
||||
date="2013-07-18">
|
||||
<Change>Mention people in tags correctly referred to user profiles</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets.user.shareupdates.0-3-0"
|
||||
date="2013-04-19">
|
||||
<Change>Added possibility to mention people in tags</Change>
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.gcube.common.core.utils.logging.GCUBEClientLog;
|
|||
import org.gcube.portal.custom.communitymanager.OrganizationsUtil;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portal.databook.client.GCubeSocialNetworking;
|
||||
import org.gcube.portal.databook.client.util.Encoder;
|
||||
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
|
||||
import org.gcube.portal.databook.server.DatabookStore;
|
||||
import org.gcube.portal.databook.shared.ClientFeed;
|
||||
|
@ -207,7 +208,10 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
|
||||
private String convertMentionPeopleAnchorHTML(String escapedFeedText, ArrayList<PickingUser> taggedPeople) {
|
||||
for (PickingUser tagged : taggedPeople) {
|
||||
String taggedHTML = "<a class=\"link\" style=\"font-size:14px;\" href=\""+GCubeSocialNetworking.USER_PROFILE_LINK+"?uid="+ tagged.getUsername() + "\">"+tagged.getFullName()+"</a> ";
|
||||
String taggedHTML = "<a class=\"link\" style=\"font-size:14px;\" href=\""+GCubeSocialNetworking.USER_PROFILE_LINK
|
||||
+"?"+
|
||||
Encoder.encode(GCubeSocialNetworking.USER_PROFILE_OID)+"="+
|
||||
Encoder.encode(tagged.getUsername())+"\">"+tagged.getFullName()+"</a> ";
|
||||
escapedFeedText = escapedFeedText.replace(tagged.getFullName(), taggedHTML);
|
||||
}
|
||||
return escapedFeedText;
|
||||
|
|
Loading…
Reference in New Issue