// create timestamp as permalink
String date = new DateFormatter(new Date()).timeAgo(msg.getPostedTime());
Widget dateLink;
String permalinkUrl = activityLinkBuilder.buildActivityPermalink(msg.getId(), destinationStream.getType(),
destinationStream.getUniqueIdentifier());
dateLink = new InlineHyperlink(date, permalinkUrl);
dateLink.addStyleName(StaticResourceBundle.INSTANCE.coreCss().messageTimestampLink());
timestampActions.add(dateLink);
if (msg.getAppName() != null)
{
String appSource = msg.getAppSource();
if (appSource != null)
{
FlowPanel viaPanel = new FlowPanel();
viaPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().viaMetadata());
viaPanel.add(new InlineLabel("via "));
viaPanel.add(new Anchor(msg.getAppName(), appSource));
timestampActions.add(viaPanel);
}
else
{
InlineLabel viaLine = new InlineLabel("via " + msg.getAppName());
viaLine.addStyleName(StaticResourceBundle.INSTANCE.coreCss().viaMetadata());
timestampActions.add(viaLine);
}
// TODO: If appSource is not supplied, the link should go to the respective galleries for apps and plugins.
// However, the app galery requires knowing the start page tab id, and the worthwhile plugin gallery is only
// available to coordinators.
}
ComplexPanel actionsPanel = new FlowPanel();
actionsPanel.addStyleName(StaticResourceBundle.INSTANCE.coreCss().messageActionsArea());
// Show comments
InlineHyperlink showCommentsLink = new InlineHyperlink("Show Comments", permalinkUrl);
actionsPanel.add(showCommentsLink);
// Share
if (verbRenderer.getAllowShare() && msg.isShareable())
{