Commit e5f2945fb0a8a62c9f1d9ba6f6dce9de8dd4a0ee
1 parent
5f05afaf
- add darker backgrounds to folders in collecti...
- make breadcrumbs not fail on certain sub-ac... - change menu item to "Browse Documents" to i... - show move items on final page. - add missing html CSS ref. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4888 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
8 changed files
with
85 additions
and
12 deletions
browse.php
| @@ -503,6 +503,33 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -503,6 +503,33 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 503 | $aFields[] = new KTStringWidget(_('Reason'), _('The reason for moving these documents and folders, for historical purposes.'), 'sReason', "", $this->oPage, true); | 503 | $aFields[] = new KTStringWidget(_('Reason'), _('The reason for moving these documents and folders, for historical purposes.'), 'sReason', "", $this->oPage, true); |
| 504 | 504 | ||
| 505 | 505 | ||
| 506 | + // now show the items... | ||
| 507 | + $moveSet = $_SESSION['moves'][$move_code]; | ||
| 508 | + $moveItems = array(); | ||
| 509 | + $moveItems['folders'] = array(); | ||
| 510 | + $moveItems['documents'] = array(); | ||
| 511 | + | ||
| 512 | + $folderStr = ''; | ||
| 513 | + $documentStr = ''; | ||
| 514 | + | ||
| 515 | + if (!empty($moveSet['folders'])) { | ||
| 516 | + $folderStr = '<strong>' . _('Folders: ') . '</strong>'; | ||
| 517 | + foreach ($moveSet['folders'] as $iFolderId) { | ||
| 518 | + $oF = Folder::get($iFolderId); | ||
| 519 | + $moveItems['folders'][] = $oF->getName(); | ||
| 520 | + } | ||
| 521 | + $folderStr .= implode(', ', $moveItems['folders']); | ||
| 522 | + } | ||
| 523 | + | ||
| 524 | + if (!empty($moveSet['documents'])) { | ||
| 525 | + $documentStr = '<strong>' . _('Documents: ') . '</strong>'; | ||
| 526 | + foreach ($moveSet['documents'] as $iDocId) { | ||
| 527 | + $oD = Document::get($iDocId); | ||
| 528 | + $moveItems['documents'][] = $oD->getName(); | ||
| 529 | + } | ||
| 530 | + $documentStr .= implode(', ', $moveItems['documents']); | ||
| 531 | + } | ||
| 532 | + | ||
| 506 | $oTemplating = new KTTemplating; | 533 | $oTemplating = new KTTemplating; |
| 507 | $oTemplate = $oTemplating->loadTemplate("ktcore/action/finalise_mass_move"); | 534 | $oTemplate = $oTemplating->loadTemplate("ktcore/action/finalise_mass_move"); |
| 508 | $aTemplateData = array( | 535 | $aTemplateData = array( |
| @@ -510,6 +537,8 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -510,6 +537,8 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 510 | 'form_fields' => $aFields, | 537 | 'form_fields' => $aFields, |
| 511 | 'folder' => $target_folder, | 538 | 'folder' => $target_folder, |
| 512 | 'move_code' => $move_code, | 539 | 'move_code' => $move_code, |
| 540 | + 'folders' => $folderStr, | ||
| 541 | + 'documents' => $documentStr, | ||
| 513 | ); | 542 | ); |
| 514 | return $oTemplate->render($aTemplateData); | 543 | return $oTemplate->render($aTemplateData); |
| 515 | } | 544 | } |
lib/templating/kt3template.inc.php
| @@ -40,7 +40,7 @@ class KTPage { | @@ -40,7 +40,7 @@ class KTPage { | ||
| 40 | var $helpPage = null; | 40 | var $helpPage = null; |
| 41 | 41 | ||
| 42 | /** the "component". Used to set the page header (see documentation for explanation). */ | 42 | /** the "component". Used to set the page header (see documentation for explanation). */ |
| 43 | - var $componentLabel = 'Browse Collections'; | 43 | + var $componentLabel = 'Browse Documents'; |
| 44 | var $componentClass = 'browse_collections'; | 44 | var $componentClass = 'browse_collections'; |
| 45 | 45 | ||
| 46 | /** $contents is the center of the page. In KT < 3, this was CentralPayload. */ | 46 | /** $contents is the center of the page. In KT < 3, this was CentralPayload. */ |
| @@ -86,7 +86,7 @@ class KTPage { | @@ -86,7 +86,7 @@ class KTPage { | ||
| 86 | // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active" | 86 | // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active" |
| 87 | $this->menu = array( | 87 | $this->menu = array( |
| 88 | "dashboard" => $this->_actionHelper(array("name" => _("Dashboard"), "action" => "dashboard", "active" => 0)), | 88 | "dashboard" => $this->_actionHelper(array("name" => _("Dashboard"), "action" => "dashboard", "active" => 0)), |
| 89 | - "browse" => $this->_actionHelper(array("name" => _("Browse Collections"), "action" => "browse", "active" => 0)), | 89 | + "browse" => $this->_actionHelper(array("name" => _("Browse Documents"), "action" => "browse", "active" => 0)), |
| 90 | "administration" => $this->_actionHelper(array("name" => _("DMS Administration"), "action" => "administration", "active" => 0)), | 90 | "administration" => $this->_actionHelper(array("name" => _("DMS Administration"), "action" => "administration", "active" => 0)), |
| 91 | ); | 91 | ); |
| 92 | 92 |
resources/css/kt-contenttypes.css
| @@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
| 22 | .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); } | 22 | .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.png); } |
| 23 | .contenttype.image { background-image: url(../../resources/mimetypes/image.png); } | 23 | .contenttype.image { background-image: url(../../resources/mimetypes/image.png); } |
| 24 | .contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.png); } | 24 | .contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.png); } |
| 25 | +.contenttype.html { background-image: url(../../resources/mimetypes/html.png); } | ||
| 25 | 26 | ||
| 26 | .contenttype.txt, | 27 | .contenttype.txt, |
| 27 | .contenttype.text, | 28 | .contenttype.text, |
resources/css/kt-framing.css
| @@ -577,6 +577,23 @@ a.main_nav_item { | @@ -577,6 +577,23 @@ a.main_nav_item { | ||
| 577 | background-color: #fafafa; | 577 | background-color: #fafafa; |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | +.kt_collection .folder_row.odd td { | ||
| 581 | + background-color: #ededed; | ||
| 582 | +} | ||
| 583 | + | ||
| 584 | +.kt_collection .folder_row td { | ||
| 585 | + background-color: #e5e5e5; | ||
| 586 | +} | ||
| 587 | + | ||
| 588 | +.kt_collection .folder_row td.sort_on { | ||
| 589 | + background-color: #dbdbdb; | ||
| 590 | +} | ||
| 591 | + | ||
| 592 | +.kt_collection .folder_row.odd td.sort_on { | ||
| 593 | + background-color: #e8e8e8; | ||
| 594 | +} | ||
| 595 | + | ||
| 596 | + | ||
| 580 | .kt_collection .odd td | 597 | .kt_collection .odd td |
| 581 | { | 598 | { |
| 582 | background-color: #fafafa; | 599 | background-color: #fafafa; |
resources/css/kt-ie-icons.css
| @@ -2,11 +2,12 @@ | @@ -2,11 +2,12 @@ | ||
| 2 | .ktError p { background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-warning.gif) center left no-repeat; } | 2 | .ktError p { background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-warning.gif) center left no-repeat; } |
| 3 | .ktHelp { background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.gif) top left no-repeat; } | 3 | .ktHelp { background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.gif) top left no-repeat; } |
| 4 | 4 | ||
| 5 | -.ktAction.ktDelete { background: transparent url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-trash.gif) top left no-repeat; } | ||
| 6 | -.ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.gif) top left no-repeat; } | ||
| 7 | -.ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.gif) top left no-repeat; } | ||
| 8 | -.ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.gif) top left no-repeat; } | ||
| 9 | -.ktAction.ktAdd { background: transparent url(../../thirdparty/icon-theme/16x16/actions/add.gif) top left no-repeat; } | 5 | +.ktActionLink.ktDelete, .ktAction.ktDelete { background: transparent url(../../thirdparty/icon-theme/16x16/mimetypes/x-directory-trash.gif) top left no-repeat; } |
| 6 | +.ktActionLink.ktEdit, .ktAction.ktEdit { background: transparent url(../../thirdparty/icon-theme/16x16/actions/document-properties.gif) top left no-repeat; } | ||
| 7 | +.ktActionLink.ktAddUser, .ktAction.ktAddUser { background: transparent url(../../thirdparty/icon-theme/16x16/actions/contact-new.gif) top left no-repeat; } | ||
| 8 | +.ktActionLink.ktAddGroup, .ktAction.ktAddGroup { background: transparent url(../../thirdparty/icon-theme/16x16/actions/group-new.gif) top left no-repeat; } | ||
| 9 | +.ktActionLink.ktAdd, .ktAction.ktAdd { background: transparent url(../../thirdparty/icon-theme/16x16/actions/add.gif) top left no-repeat; } | ||
| 10 | +.ktActionLink.ktDownload, .ktAction.ktDownload { background: transparent url(../../resources/graphics/download.gif) top left no-repeat; } | ||
| 10 | 11 | ||
| 11 | .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); } | 12 | .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); } |
| 12 | .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); } | 13 | .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); } |
| @@ -16,6 +17,7 @@ | @@ -16,6 +17,7 @@ | ||
| 16 | .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.gif); } | 17 | .contenttype.pdf { background-image: url(../../resources/mimetypes/pdf.gif); } |
| 17 | .contenttype.image { background-image: url(../../resources/mimetypes/image.gif); } | 18 | .contenttype.image { background-image: url(../../resources/mimetypes/image.gif); } |
| 18 | .contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.gif); } | 19 | .contenttype.compressed { background-image: url(../../resources/mimetypes/compressed.gif); } |
| 20 | +.contenttype.html { background-image: url(../../resources/mimetypes/html.gif); } | ||
| 19 | 21 | ||
| 20 | .contenttype.txt, | 22 | .contenttype.txt, |
| 21 | .contenttype.text, | 23 | .contenttype.text, |
templates/kt3/document_collection.smarty
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | <tbody> | 16 | <tbody> |
| 17 | {if ($context->itemCount != 0)} | 17 | {if ($context->itemCount != 0)} |
| 18 | {foreach item=folder_row_id from=$context->activeset.folders name=rowiter} | 18 | {foreach item=folder_row_id from=$context->activeset.folders name=rowiter} |
| 19 | - <tr class="{cycle name=rows values=",odd"}"> | 19 | + <tr class="{cycle name=rows values=",odd"} folder_row"> |
| 20 | {foreach item=oColumn from=$context->columns name=coliter} | 20 | {foreach item=oColumn from=$context->columns name=coliter} |
| 21 | <td class="browse_column {$oColumn->name} {if $oColumn->getSortedOn()}sort_on{/if}"> | 21 | <td class="browse_column {$oColumn->name} {if $oColumn->getSortedOn()}sort_on{/if}"> |
| 22 | {$oColumn->renderData($context->getFolderInfo($folder_row_id.id))} | 22 | {$oColumn->renderData($context->getFolderInfo($folder_row_id.id))} |
templates/ktcore/action/finalise_mass_move.smarty
| @@ -7,6 +7,17 @@ | @@ -7,6 +7,17 @@ | ||
| 7 | <input type="hidden" name="fMoveCode" value="{$move_code}" /> | 7 | <input type="hidden" name="fMoveCode" value="{$move_code}" /> |
| 8 | <input type="hidden" name="fFolderId" value="{$folder}" /> | 8 | <input type="hidden" name="fFolderId" value="{$folder}" /> |
| 9 | 9 | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +<div class="field"> | ||
| 13 | +<label>Items to move</label> | ||
| 14 | +<p class="descriptiveText">{i18n}The items that you selected to move.{/i18n}</p> | ||
| 15 | +{if ($folders)}{$folders}<br />{/if} | ||
| 16 | +{if ($documents)}{$documents}{/if} | ||
| 17 | +</div> | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + | ||
| 10 | <p class="descriptiveText">{i18n}Please give these final details.{/i18n}</p> | 21 | <p class="descriptiveText">{i18n}Please give these final details.{/i18n}</p> |
| 11 | 22 | ||
| 12 | {foreach item=oWidget from=$form_fields} | 23 | {foreach item=oWidget from=$form_fields} |
view.php
| @@ -168,7 +168,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -168,7 +168,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 168 | 168 | ||
| 169 | $this->oPage->setSecondaryTitle($oDocument->getName()); | 169 | $this->oPage->setSecondaryTitle($oDocument->getName()); |
| 170 | 170 | ||
| 171 | - $aOptions = array("final" => false); | 171 | + $aOptions = array( |
| 172 | + "documentaction" => "viewDocument", | ||
| 173 | + "folderaction" => "browse", | ||
| 174 | + ); | ||
| 172 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 175 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 173 | $this->oPage->setBreadcrumbDetails(_("history")); | 176 | $this->oPage->setBreadcrumbDetails(_("history")); |
| 174 | $this->addPortlets("History"); | 177 | $this->addPortlets("History"); |
| @@ -224,7 +227,11 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -224,7 +227,11 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 224 | // fixme check perms | 227 | // fixme check perms |
| 225 | $this->oPage->setSecondaryTitle($oDocument->getName()); | 228 | $this->oPage->setSecondaryTitle($oDocument->getName()); |
| 226 | $this->oDocument =& $oDocument; | 229 | $this->oDocument =& $oDocument; |
| 227 | - $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument)); | 230 | + $aOptions = array( |
| 231 | + "documentaction" => "viewDocument", | ||
| 232 | + "folderaction" => "browse", | ||
| 233 | + ); | ||
| 234 | + $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | ||
| 228 | $this->oPage->setBreadcrumbDetails(_("history")); | 235 | $this->oPage->setBreadcrumbDetails(_("history")); |
| 229 | $this->addPortlets("History"); | 236 | $this->addPortlets("History"); |
| 230 | 237 | ||
| @@ -283,7 +290,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -283,7 +290,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 283 | } | 290 | } |
| 284 | $this->oDocument =& $oDocument; | 291 | $this->oDocument =& $oDocument; |
| 285 | $this->oPage->setSecondaryTitle($oDocument->getName()); | 292 | $this->oPage->setSecondaryTitle($oDocument->getName()); |
| 286 | - $aOptions = array("final" => false); | 293 | + $aOptions = array( |
| 294 | + "documentaction" => "viewDocument", | ||
| 295 | + "folderaction" => "browse", | ||
| 296 | + ); | ||
| 287 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 297 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 288 | $this->oPage->setBreadcrumbDetails(_("compare versions")); | 298 | $this->oPage->setBreadcrumbDetails(_("compare versions")); |
| 289 | 299 | ||
| @@ -417,7 +427,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -417,7 +427,10 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 417 | } | 427 | } |
| 418 | $this->oDocument =& $oDocument; | 428 | $this->oDocument =& $oDocument; |
| 419 | $this->oPage->setSecondaryTitle($oDocument->getName()); | 429 | $this->oPage->setSecondaryTitle($oDocument->getName()); |
| 420 | - $aOptions = array("final" => false); | 430 | + $aOptions = array( |
| 431 | + "documentaction" => "viewDocument", | ||
| 432 | + "folderaction" => "browse", | ||
| 433 | + ); | ||
| 421 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 434 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 422 | $this->oPage->setBreadcrumbDetails(_("Select Document Version to compare against")); | 435 | $this->oPage->setBreadcrumbDetails(_("Select Document Version to compare against")); |
| 423 | 436 |