Minor fix
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@129134 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b657904c94
commit
14a6f9f61b
|
@ -79,9 +79,9 @@ public class SocialMailingUtil {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
String attachmentsNotice = "";
|
||||
|
||||
|
||||
if (notification2Save.getType() == NotificationType.MESSAGE) {
|
||||
body.append("<div>").append(WRITE_ABOVE_MESSAGE_REPLY).append("</div><br />");
|
||||
attachmentsNotice = "<br/><p>Please note that email replies do not support attachments.</p>";
|
||||
|
@ -167,7 +167,7 @@ public class SocialMailingUtil {
|
|||
if (notification2Save.getType() == NotificationType.MESSAGE) {
|
||||
body.append(WRITE_ABOVE_MESSAGE_REPLY).append("\n\n");
|
||||
attachmentsNotice = "\n\nPlease note that email replies do not support attachments.\n\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
body.append("Dear ").append(userFirstName).append(",") //dear <user>
|
||||
|
@ -432,34 +432,35 @@ public class SocialMailingUtil {
|
|||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(feed.getTime()) + "</p>"
|
||||
+"</div>";
|
||||
|
||||
for (int i = 0; i < comments.size(); i++) {
|
||||
if(comments != null)
|
||||
for (int i = 0; i < comments.size(); i++) {
|
||||
|
||||
String commentTextNoHtml = comments.get(i).getText().replaceAll("&", "&");
|
||||
String commentTextNoHtml = comments.get(i).getText().replaceAll("&", "&");
|
||||
|
||||
if((commentKey != null && comments.get(i).getKey().equals(commentKey)) && !(notification2Save.getType() == NotificationType.POST_ALERT)){
|
||||
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||
+ "border-left: 3px solid #ccc; font-style: italic; font-weight:bold\">"
|
||||
+ comments.get(i).getFullName()
|
||||
+ ": "
|
||||
+ commentTextNoHtml
|
||||
+ "<p style=\"font-family:Lucida Grande,"
|
||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||
+"</div>";
|
||||
if((commentKey != null && comments.get(i).getKey().equals(commentKey)) && !(notification2Save.getType() == NotificationType.POST_ALERT)){
|
||||
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||
+ "border-left: 3px solid #ccc; font-style: italic; font-weight:bold\">"
|
||||
+ comments.get(i).getFullName()
|
||||
+ ": "
|
||||
+ commentTextNoHtml
|
||||
+ "<p style=\"font-family:Lucida Grande,"
|
||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||
+"</div>";
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||
+ "border-left: 3px solid #ccc; font-style: italic;\">"
|
||||
+ comments.get(i).getFullName()
|
||||
+ ": "
|
||||
+ commentTextNoHtml
|
||||
+ "<p style=\"font-family:Lucida Grande,"
|
||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||
+"</div>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
htmlPost += "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||
+ "border-left: 3px solid #ccc; font-style: italic;\">"
|
||||
+ comments.get(i).getFullName()
|
||||
+ ": "
|
||||
+ commentTextNoHtml
|
||||
+ "<p style=\"font-family:Lucida Grande,"
|
||||
+ "Verdana,Bitstream Vera Sans,Arial,sans-serif; "
|
||||
+ "white-space: nowrap; font-size: smaller; color: #999;\">" + formatter.format(comments.get(i).getTime()) + "</p>"
|
||||
+"</div>";
|
||||
}
|
||||
|
||||
return htmlPost;
|
||||
}catch(Exception e){
|
||||
|
@ -479,7 +480,7 @@ public class SocialMailingUtil {
|
|||
protected static String buildPlainTextDiscussion(Notification notification2Save, Feed feed, List<Comment> comments, String commentKey){
|
||||
|
||||
try{
|
||||
|
||||
|
||||
if(notification2Save.getType().equals(NotificationType.POST_ALERT) || feed == null)
|
||||
return "";
|
||||
|
||||
|
|
Loading…
Reference in New Issue