/// <summary> /// Returns link for document view. /// </summary> /// <param name="documentId">Document ID</param> /// <param name="taskTitle">Task title</param> /// <param name="taskType">Type of the task</param> protected string GetDocumentLink(object documentId, object taskTitle, object taskType) { string title = ValidationHelper.GetString(taskTitle, string.Empty); string type = ValidationHelper.GetString(taskType, string.Empty).ToLowerCSafe(); int docId = ValidationHelper.GetInteger(documentId, 0); if ((type != "deletedoc") && (type != "deleteallculutres")) { string viewMode = Convert.ToString((int)ViewModeEnum.LiveSite); // For publish tasks display document in preview mode if ((type == "publishdoc") || (type == "archivedoc")) { viewMode = Convert.ToString((int)ViewModeEnum.Preview); } // Get document url string docUrl = ResolveUrl(TreePathUtils.GetDocumentUrl(docId)) + "?viewmode=" + viewMode; return("<a target=\"_blank\" href=\"" + docUrl + "\">" + HTMLHelper.HTMLEncode(title) + "</a>"); } return(title); }