diff --git a/lib/pager/pager.class.php b/lib/pager/pager.class.php index 50e9f01746..1dd0dac22a 100644 --- a/lib/pager/pager.class.php +++ b/lib/pager/pager.class.php @@ -52,7 +52,7 @@ class pager extends basePager { /* 如果设置了请求的原始方法名,则把其赋值给$this->methodName。*/ /* If the original method name of the request is set, assign it to $this->methodName. */ - if(isset($this->app->rawMethod) and $this->app->rawModule != 'doc') + if(isset($this->app->rawMethod)) { $this->methodName = $this->app->rawMethod; } diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 10f33be06f..4cbb6a8d31 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -335,9 +335,9 @@ $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index"); $lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent'); $lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my'); $lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect'); -$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'product'); -if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'project'); -if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'execution'); +$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product'); +if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project'); +if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution'); $lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom'); $lang->doc->dividerMenu = ',product,'; diff --git a/module/doc/control.php b/module/doc/control.php index e7489c8cad..95d1ff7c62 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -776,8 +776,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('product', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'product'; } else if($type == 'project') { @@ -787,8 +785,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('project', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'project'; } else if($type == 'execution') { @@ -797,8 +793,6 @@ class doc extends control $libs = $this->doc->getLibsByObject('execution', $objectID); $this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs); - - $this->app->rawMethod = 'execution'; } $openApp = strpos('doc,product,project,execution', $this->app->openApp) !== false ? $this->app->openApp : 'doc'; @@ -1230,6 +1224,7 @@ class doc extends control $this->view->title = $title; $this->view->type = $type; + $this->view->libs = $libs; $this->view->objectID = $objectID; $this->view->libID = $libID; $this->view->moduleTree = $moduleTree; diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index d0d1663b6a..e39bbd0237 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'Dateiname'; $lang->doc->filePath = 'Dateipfad'; $lang->doc->extension = 'Erweiterung'; $lang->doc->size = 'Größe der Anlage'; +$lang->doc->source = 'Source'; $lang->doc->download = 'Download'; $lang->doc->acl = 'Rechte'; $lang->doc->fileName = 'Files'; @@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces $lang->doc->placeholder = new stdclass(); $lang->doc->placeholder->url = 'Url'; +$lang->doc->summary = "Total files on this page: %s , total size: %s, %s"; +$lang->doc->ge = ':'; +$lang->doc->point = '.'; + $lang->doclib = new stdclass(); $lang->doclib->name = 'Name'; $lang->doclib->control = 'Zugriffskontrolle'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 85839271bf..15f88c2f59 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -40,6 +40,7 @@ $lang->doc->fileTitle = 'File Name'; $lang->doc->filePath = 'File Path'; $lang->doc->extension = 'Extension'; $lang->doc->size = 'Files Size'; +$lang->doc->source = 'Source'; $lang->doc->download = 'Download'; $lang->doc->acl = 'Right'; $lang->doc->fileName = 'Files'; @@ -217,6 +218,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can acces $lang->doc->placeholder = new stdclass(); $lang->doc->placeholder->url = 'URL'; +$lang->doc->summary = "Total files on this page: %s , total size: %s, %s"; +$lang->doc->ge = ':'; +$lang->doc->point = '.'; + $lang->doclib = new stdclass(); $lang->doclib->name = 'Name'; $lang->doclib->control = 'Access Control'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 3776a77a2d..2f2c81cd50 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'Nom du Fichier'; $lang->doc->filePath = 'Chemin Fichier'; $lang->doc->extension = 'Extension'; $lang->doc->size = 'Taille de la pièce jointe'; +$lang->doc->source = 'Source'; $lang->doc->download = 'Téléchargement'; $lang->doc->acl = 'Droit'; $lang->doc->fileName = 'Fichiers'; @@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Seulement celui qui a ajouté le docu $lang->doc->placeholder = new stdclass(); $lang->doc->placeholder->url = 'URL'; +$lang->doc->summary = "Total files on this page: %s , total size: %s, %s"; +$lang->doc->ge = ':'; +$lang->doc->point = '.'; + $lang->doclib = new stdclass(); $lang->doclib->name = 'Nom'; $lang->doclib->control = "Contrôle d'Accès"; diff --git a/module/doc/lang/vi.php b/module/doc/lang/vi.php index 5753c6396e..69aef83cf5 100644 --- a/module/doc/lang/vi.php +++ b/module/doc/lang/vi.php @@ -39,6 +39,7 @@ $lang->doc->fileTitle = 'File tên'; $lang->doc->filePath = 'File Path'; $lang->doc->extension = 'Extension'; $lang->doc->size = 'Cỡ miếng'; +$lang->doc->source = 'Source'; $lang->doc->download = 'Tải về'; $lang->doc->acl = 'Right'; $lang->doc->fileName = 'Files'; @@ -212,6 +213,10 @@ $lang->doc->noticeAcl['doc']['private'] = 'Chỉ the one who created it có th $lang->doc->placeholder = new stdclass(); $lang->doc->placeholder->url = 'URL'; +$lang->doc->summary = "Total files on this page: %s , total size: %s, %s"; +$lang->doc->ge = ':'; +$lang->doc->point = '.'; + $lang->doclib = new stdclass(); $lang->doclib->name = 'Tên'; $lang->doclib->control = 'Quyền truy cập'; diff --git a/module/doc/lang/zh-tw.php b/module/doc/lang/zh-tw.php index 49258a638e..5f016ddea8 100644 --- a/module/doc/lang/zh-tw.php +++ b/module/doc/lang/zh-tw.php @@ -11,7 +11,7 @@ */ /* 欄位列表。*/ $lang->doc->common = '文檔'; -$lang->doc->id = '文檔編號'; +$lang->doc->id = '文檔'; $lang->doc->product = '所屬' . $lang->productCommon; $lang->doc->project = '所屬項目'; $lang->doc->execution = '所屬' . $lang->executionCommon; @@ -36,10 +36,11 @@ $lang->doc->fileObject = '所屬對象'; $lang->doc->whiteList = '白名單'; $lang->doc->contentType = '文檔格式'; $lang->doc->separator = ""; -$lang->doc->fileTitle = '附件名'; +$lang->doc->fileTitle = '附件名稱'; $lang->doc->filePath = '地址'; $lang->doc->extension = '類型'; $lang->doc->size = '附件大小'; +$lang->doc->source = '來源'; $lang->doc->download = '下載'; $lang->doc->acl = '權限'; $lang->doc->fileName = '附件'; @@ -205,6 +206,10 @@ $lang->doc->noticeAcl['doc']['private'] = '只有創建者自己可以訪問。' $lang->doc->placeholder = new stdclass(); $lang->doc->placeholder->url = '相應的連結地址'; +$lang->doc->summary = "本頁共 %s 個附件,共計 %s,其中%s。"; +$lang->doc->ge = '個'; +$lang->doc->point = '、'; + $lang->doclib = new stdclass(); $lang->doclib->name = '文檔庫名稱'; $lang->doclib->control = '訪問控制'; diff --git a/module/doc/model.php b/module/doc/model.php index 595e66e427..17f88c28c7 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1069,7 +1069,7 @@ class docModel extends model } else { - $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('`order`, id')->fetchAll('id'); + $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->andWhere('type')->eq($type)->orderBy('`order`, id')->fetchAll('id'); } if($type == 'product') @@ -1302,7 +1302,6 @@ class docModel extends model ->orWhere("(objectType = 'story' and objectID in ($storyIdList))") ->orWhere("(objectType = 'bug' and objectID in ($bugIdList))") ->orWhere("(objectType = 'release' and objectID in ($releaseIdList))") - ->orWhere("(objectType = 'productplan' and objectID in ($planIdList))") ->orWhere("(objectType = 'testreport' and objectID in ($testReportIdList))") ->orWhere("(objectType = 'testcase' and objectID in ($caseIdList))") ->markRight(1) @@ -1793,6 +1792,12 @@ class docModel extends model return $html; } + /** + * Build collect button from document. + * + * @access public + * @return string + */ public function buildCollectButton4Doc() { $allLibs = array_keys($this->getLibs('all')); @@ -2053,7 +2058,7 @@ class docModel extends model $selected = $key == $libID ? 'selected' : ''; $output .= html::a(inlink($methodName, "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->openApp}'"); } - if($type != 'custom') + if($type != 'custom' and $type != 'book') { $selected = empty($libID) ? 'selected' : ''; $output .= html::a(inlink('showFiles', "type=$type&objectID=$objectID"), $this->lang->doclib->files, '', "class='$selected' data-app='{$this->app->openApp}'"); @@ -2160,7 +2165,7 @@ class docModel extends model foreach($moduleDocs[$module->id] as $doc) { if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id; - $treeMenu[$module->id] = '