Commit 238ddd4145db3f4ff2d811c7c8b26a68bedd839f

Authored by michael
1 parent 05731a4e

#3425 the filename is the document title- primary reference, and the soft title is the description


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2768 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
... ... @@ -279,16 +279,19 @@ function renderSortHeadings($sSortBy, $sSortDirection) {
279 279 */
280 280 function renderDocumentList($aResults, $sNoDocumentsMessage, $sNoPermissionMessage, $bDisplayFullPath = false, $bTemplateBrowsing = false) {
281 281 global $default;
282   -
  282 +
283 283 $iFolderCount = count($aResults["folders"]) - 1;
284 284 // loop through the files and display links
285 285 if (count($aResults["documents"]) > 0) {
286 286 for ($i=0; $i<count($aResults["documents"]); $i++) {
287 287 // in order for candy striping to work we need to take the number of folders
288 288 // into account when alternating
289   - $sToRender .= "<tr bgcolor=\"" . getColour($i+$iFolderCount) . "\" width=\"100%\"><td valign=\"bottom\">" . ($bTemplateBrowsing ? displayDocumentLinkForTemplateBrowsing($aResults["documents"][$i], $bDisplayFullPath) : displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath)) . "</td>";
  289 + $sToRender .= "<tr bgcolor=\"" . getColour($i+$iFolderCount) . "\" width=\"100%\"><td valign=\"bottom\">" .
  290 + ($bTemplateBrowsing ? displayDocumentLinkForTemplateBrowsing($aResults["documents"][$i], $bDisplayFullPath) :
  291 + displayDocumentLink($aResults["documents"][$i], $bDisplayFullPath)) . "</td>";
290 292  
291   - $sToRender .= "<td valign=\"bottom\">" . $aResults["documents"][$i]->getFileName() . "</td>";
  293 + // #3425 the title is now the filename, and the description is the title
  294 + $sToRender .= "<td valign=\"bottom\">" . $aResults["documents"][$i]->getName() . "</td>";
292 295 $oCreator = User::get($aResults["documents"][$i]->getCreatorID());
293 296 $sToRender .= "<td valign=\"bottom\">" . ($oCreator ? $oCreator->getName() : "") . "</td>";
294 297 $aDocumentTransaction = DocumentTransaction::getList("transaction_id=1 AND document_id=" . $aResults["documents"][$i]->getID());
... ... @@ -357,7 +360,7 @@ function renderPage($aResults, $sBrowseType, $sSortBy, $sSortDirection, $bTempla
357 360 $sToRender .= renderSortHeadings($sSortBy, $sSortDirection);
358 361 $sToRender .= "<tr><td>\n";
359 362 switch ($sBrowseType) {
360   - case "folder" : $sToRender .= renderFolderResults($aResults, $sSortBy, $sSortDirection, $bTemplateBrowsing); break;
  363 + case "folder" : $sToRender .= renderFolderResults($aResults, $bTemplateBrowsing); break;
361 364 case "category" : $sToRender .= renderCategoryResults($aResults); break;
362 365 case "documentType" : $sToRender .= renderDocumentTypeResults($aResults); break;
363 366 }
... ...
presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc
... ... @@ -55,7 +55,8 @@ function displayDocumentLinkForTemplateBrowsing($oDocument, $bDisplayFullPath =
55 55 $sIconUrl = $oDocument->getMimeTypeIconUrl();
56 56 $sIconPath = ($sIconUrl ? generateImage($sIconUrl) : generateImage("$default->graphicsUrl/unknown.gif"));
57 57  
58   - $sLinkText = $oDocument->getName();
  58 + // #3425 the title is now the filename, and the description is the title
  59 + $sLinkText = $oDocument->getFileName();
59 60 if ($bDisplayFullPath) {
60 61 // prepend folder path
61 62 $sLinkText = Folder::getFolderDisplayPath($oDocument->getFolderID()) . " > " . $sLinkText;
... ... @@ -82,7 +83,8 @@ function displayDocumentLink($oDocument, $bDisplayFullPath = false) {
82 83 $sIconUrl = $oDocument->getMimeTypeIconUrl();
83 84 $sIconPath = ($sIconUrl ? generateImage($sIconUrl) : generateImage("$default->graphicsUrl/unknown.gif"));
84 85  
85   - $sLinkText = $oDocument->getName();
  86 + // #3425 the title is now the filename, and the description is the title
  87 + $sLinkText = $oDocument->getFileName();
86 88 if ($bDisplayFullPath) {
87 89 // prepend folder path
88 90 $sLinkText = Folder::getFolderDisplayPath($oDocument->getFolderID()) . " > " . $sLinkText;
... ...