From c429f1621081911b78e1426fc7dd55c46abb10bb Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 13 Mar 2003 11:51:04 +0000 Subject: [PATCH] added ie ssl hack for inline viewing (#1665) and logic for displaying the web publishing button (#1658) --- presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc index 1a90cb1..d258a95 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc @@ -29,7 +29,13 @@ function renderDocumentPath($oDocument) { global $default; $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\" target=\"View document\">" . $oDocument->getName() . ""; + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; + // IE ssl download hack- don't use ssl to download + if ($default->phpSniff->property("browser") == "ie") { + $sDocumentPath .= "serverName . "$default->rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\" target=\"View document\">" . $oDocument->getName() . ""; + } else { + $sDocumentPath .= "rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\" target=\"View document\">" . $oDocument->getName() . ""; + } return "
$sDocumentPath
\n"; } @@ -181,11 +187,20 @@ function getEditPage($oDocument) { $sToRender .= "\t\tgraphicsUrl/widgets/approve.gif\" border=\"0\"/>\n"; $sToRender .= "\t\trootUrl/control.php?action=collaborationStepReject&fDocumentID=$iDocumentID\">graphicsUrl/widgets/reject.gif\" border=\"0\"/>\n"; $sToRender .= "\t\t\n"; - } else if (!$oDocument->hasCollaboration() || Document::documentCollaborationDone($oDocument->getID())) { - // only display publish button if there is no collaboration or collaboration is complete - if (!Document::documentIsPendingWebPublishing($iDocumentID) && ($_SESSION["userID"] == $oDocument->getCreatorID())) { - $sToRender .= "graphicsUrl/widgets/publish.gif\" border=\"0\"/>\n"; - } + } + // only display for unpublished documents + if (Document::documentIsPendingWebPublishing($iDocumentID)) { + // if there is collaboration + if ($oDocument->hasCollaboration()) { + // only display publish button if collaboration is complete and you're the last user in the collaboration process + if (Document::documentCollaborationDone($oDocument->getID()) && ($_SESSION["userID"] == Document::getLastCollaboratorID($iDocumentID))) { + $sToRender .= "graphicsUrl/widgets/publish.gif\" border=\"0\"/>\n"; + } + } else if ($_SESSION["userID"] == $oDocument->getCreatorID()) { + // no collaboration for this folder, so only the originator can request publication + // ??: or an administrator? + $sToRender .= "graphicsUrl/widgets/publish.gif\" border=\"0\"/>\n"; + } } $sToRender .= "\t"; $sToRender .= "\t"; -- libgit2 0.21.4