/**
* Navigate to the Dashboard of the Social Workspace if the document belong
* to one of it, else navigate to the default view of the current document.
*/
public String backToDashboard() throws ClientException {
DocumentModel currentDocument = navigationContext.getCurrentDocument();
DocumentModel sourceDocument = currentDocument;
if (currentDocument.isProxy()) {
sourceDocument = documentManager.getSourceDocument(currentDocument.getRef());
}
SocialWorkspace socialWorkspace = socialWorkspaceService.getDetachedSocialWorkspace(sourceDocument);
if (socialWorkspace != null) {
DocumentModel dashboardSpacesRoot = documentManager.getDocument(new PathRef(
socialWorkspace.getDashboardSpacesRootPath()));
webActions.setCurrentTabIds(SocialWorkspaceActions.MAIN_TABS_COLLABORATION);
return navigationContext.navigateToDocument(dashboardSpacesRoot,
COLLABORATION_VIEW_ID);
} else {