Commit 201650858bc3e3d7de03a05f24ed3718a1da7bee
1 parent
647ddec1
#3425 display document.fileName in document browse paths for consistency
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2771 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
12 additions
and
7 deletions
lib/documentmanagement/Document.inc
| ... | ... | @@ -733,8 +733,9 @@ class Document { |
| 733 | 733 | */ |
| 734 | 734 | function getDisplayPath($bDisplayIcon = false) { |
| 735 | 735 | $sFolderPath = Folder::getFolderDisplayPath($this->iFolderID); |
| 736 | + // #3425 for consistency | |
| 736 | 737 | return ($bDisplayIcon ? $this->getIcon() : "") . |
| 737 | - ($sFolderPath == "" ? "Deleted Folder" : $sFolderPath) . " > " . $this->sName; | |
| 738 | + ($sFolderPath == "" ? "Deleted Folder" : $sFolderPath) . " > " . $this->sFileName; | |
| 738 | 739 | } |
| 739 | 740 | |
| 740 | 741 | /** | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc
| ... | ... | @@ -35,7 +35,8 @@ function displayDocumentPath($iDocumentID) { |
| 35 | 35 | $oDocument = Document::get($iDocumentID); |
| 36 | 36 | if ($oDocument) { |
| 37 | 37 | $iFolderID = $oDocument->getFolderID(); |
| 38 | - $sDocumentName = $oDocument->getName(); | |
| 38 | + // #3425 for consistency | |
| 39 | + $sDocumentName = $oDocument->getFileName(); | |
| 39 | 40 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 40 | 41 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 41 | 42 | $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->rootUrl/control.php?action=browse") . " > " . $sDocumentName; | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewUI.inc
| ... | ... | @@ -34,11 +34,11 @@ function renderDocumentPath($oDocument, $bDisplayActions = false) { |
| 34 | 34 | $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); |
| 35 | 35 | $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); |
| 36 | 36 | |
| 37 | - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; | |
| 37 | + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > "; | |
| 38 | + // #3425 for consistency | |
| 39 | + $sDocumentPath .= $oDocument->getFileName(); | |
| 38 | 40 | if ($bDisplayActions) { |
| 39 | - $sDocumentPath .= "<a onClick=\"alert('This will view a copy of the current version of this document in the DMS. Any changes to this file will not be managed in the DMS.'); return true;\" href=\"" . generateControllerUrl("downloadDocument", "fDocumentID=" . $oDocument->getID() . "&fForInlineView=1") . "\">" . $oDocument->getName() . "</a>"; | |
| 40 | - } else { | |
| 41 | - $sDocumentPath .= $oDocument->getName(); | |
| 41 | + $sDocumentPath = "<a onClick=\"alert('This will view a copy of the current version of this document in the DMS. Any changes to this file will not be managed in the DMS.'); return true;\" href=\"" . generateControllerUrl("downloadDocument", "fDocumentID=" . $oDocument->getID() . "&fForInlineView=1") . "\">" . $sDocumentPath . "</a>"; | |
| 42 | 42 | } |
| 43 | 43 | return "<table border=\"0\" cellpadding=\"5\" width=\"610\"><tr bgcolor=\"$sTDBGColour\"><td width=\"87%\">$sDocumentPath</td>" . ($bDisplayActions ? "<td width=\"15%\" align=\"center\" valign=\"middle\"><strong>Actions</strong></td>" : "") . "</tr></table>\n"; |
| 44 | 44 | } |
| ... | ... | @@ -539,7 +539,10 @@ function displayPublishButton($oDocument, $bEdit) { |
| 539 | 539 | } |
| 540 | 540 | return "<tr><td align=\"left\">" . displayButton("viewDocument", "fDocumentID=" . $oDocument->getID() . "&fForPublish=1", "publish", $sDisabledText) . "</td></tr>\n"; |
| 541 | 541 | } |
| 542 | - | |
| 542 | + | |
| 543 | +/** | |
| 544 | + * Displays document action buttons | |
| 545 | + */ | |
| 543 | 546 | function displayActionButtons($oDocument, $bEdit) { |
| 544 | 547 | $sToRender .= displayViewButton($oDocument, $bEdit); |
| 545 | 548 | $sToRender .= displayEmailButton($oDocument); | ... | ... |