diff --git a/module/doc/control.php b/module/doc/control.php index 2e2c82ce55..02c83fc19b 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -78,6 +78,8 @@ class doc extends control */ public function browse($libID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $from = 'doc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { + $this->session->set('docList', $this->app->getURI(true), 'doc'); + $this->from = $from; setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true); @@ -116,7 +118,6 @@ class doc extends control { $menuType = (!$type && (in_array($browseType, array_keys($this->lang->doc->fastMenuList)) || $browseType == 'bysearch')) ? $browseType : $type; } - $this->session->set('docList', $this->app->getURI(true), 'doc'); /* Set header and position. */ $this->view->title = $this->lang->doc->common . ($libID ? $this->lang->colon . $this->libs[$libID] : ''); @@ -302,7 +303,16 @@ class doc extends control unset($_GET['onlybody']); die(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent')); } - die(js::locate($this->createLink('doc', 'index'), 'parent')); + + $browseLink = $this->createLink('doc', 'index'); + if(in_array($this->app->openApp, array('product', 'project', 'execution'))) + { + $objectType = $lib->type; + $objectID = $lib->{$objectType}; + $browseLink = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID"); + } + + die(js::locate($browseLink, 'parent')); } } @@ -429,19 +439,18 @@ class doc extends control if(!empty($changes)) $this->action->logHistory($actionID, $changes); } - if($objectType) + $link = $this->session->docList ? $this->session->docList : $this->createLink('doc', 'index'); + if(!empty($objectType) and $objectType != 'doc') { $link = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID&docID=$docID"); } - else - { - $link = $this->createLink('doc', 'view', "docID=$docID"); - } + + if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link)); } /* Get doc and set menu. */ - $doc = $this->doc->getById($docID); + $doc = $this->doc->getById($docID); $libID = $doc->lib; if($doc->contentType == 'markdown') $this->config->doc->markdown->edit = array('id' => 'content', 'tools' => 'toolbar'); @@ -449,28 +458,33 @@ class doc extends control $lib = $this->doc->getLibByID($libID); $type = $lib->type; - /* According the from, set menus. */ - if($this->from == 'product') + /* set menus. */ + if($this->app->openApp == 'product') { - $this->product->setMenu($lib->product); + $this->product->setMenu($objectID); + unset($this->lang->product->menu->doc['subMenu']); } - elseif($this->from == 'project') + else if($this->app->openApp == 'project') { - $this->project->setMenu($lib->project); + $this->project->setMenu($objectID); + unset($this->lang->project->menu->doc['subMenu']); } - else + else if($this->app->openApp == 'execution') { - $this->app->rawMethod = $objectType; + $this->execution->setMenu($objectID); + unset($this->lang->execution->menu->doc['subMenu']); } - - /* Set my menu. */ - if($this->app->openApp == 'my') + else if($this->app->openApp == 'my') { $this->lang->doc->menu = $this->lang->my->menu->contribute; $this->lang->modulePageNav = ''; $this->lang->TRActions = ''; $this->lang->my->menu->contribute['subModule'] = 'doc'; } + else + { + $this->app->rawMethod = $objectType; + } $this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit; $this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name); diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index 35087ff727..ecf94e8282 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -183,13 +183,15 @@ $lang->doc->noOpenedDoc = 'Sie haben kein Dokument erstellt.'; $lang->doc->noCollectedDoc = 'Sie haben kein Dokument gesammelt.'; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; -$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it."; +$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it."; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; $lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.'; $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 8b7d745b78..6d6f5aa734 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -187,13 +187,15 @@ $lang->doc->noOpenedDoc = 'You have not created any documents.'; $lang->doc->noCollectedDoc = 'You have not favorited any documents.'; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; -$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project can access it.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist can access it.'; +$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} can access it."; +$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist can access it."; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'All users can access it.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist can access it.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Only the one who created it can access it.'; $lang->doc->noticeAcl['doc']['open'] = 'Users who can access the document library which the document belongs can access it.'; $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it.'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index 9905f9d826..455118d56b 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -183,13 +183,15 @@ $lang->doc->noOpenedDoc = "Vous n'avez pas ajouté de documents."; $lang->doc->noCollectedDoc = "Vous avez aucun document dans vos favoris."; $lang->doc->errorEmptyLib = 'No data in document library.'; -$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['project']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['project']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; -$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.'; +$lang->doc->noticeAcl['lib']['product']['default'] = 'Les utilisateurs qui ont accès au Product peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['product']['custom'] = 'Les utilisateurs qui ont accès au Product ou les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Les utilisateurs qui ont accès au Projet ou les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['execution']['default'] = "Les utilisateurs qui ont accès au {$lang->executionCommon} peuvent y accéder."; +$lang->doc->noticeAcl['lib']['execution']['custom'] = "Les utilisateurs qui ont accès au {$lang->executionCommon} ou les utilisateurs de la Liste Blanche peuvent y accéder."; +$lang->doc->noticeAcl['lib']['custom']['open'] = 'Tous les utilisateurs peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; +$lang->doc->noticeAcl['lib']['custom']['private'] = 'Seulement le créateur de la Bibliothèque peut y accéder.'; $lang->doc->noticeAcl['doc']['open'] = 'Les utilisateurs qui ont accès à la Bibliothèque à laquelle le document appartient peuvent y accéder.'; $lang->doc->noticeAcl['doc']['custom'] = 'Les utilisateurs de la Liste Blanche peuvent y accéder.'; diff --git a/module/doc/lang/vi.php b/module/doc/lang/vi.php index 2cda874937..ffb2f6e87f 100644 --- a/module/doc/lang/vi.php +++ b/module/doc/lang/vi.php @@ -185,8 +185,10 @@ $lang->doc->errorEmptyLib = 'No data in document library.'; $lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist có thể truy cập nó.'; -$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.'; -$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.'; +$lang->doc->noticeAcl['lib']['project']['default'] = 'Users who can access the selected project có thể truy cập nó.'; +$lang->doc->noticeAcl['lib']['project']['custom'] = 'Users who can access the selected project or users in the whiltelist có thể truy cập nó.'; +$lang->doc->noticeAcl['lib']['execution']['default'] = "Users who can access the selected {$lang->executionCommon} có thể truy cập nó."; +$lang->doc->noticeAcl['lib']['execution']['custom'] = "Users who can access the selected {$lang->executionCommon} or users in the whiltelist có thể truy cập nó."; $lang->doc->noticeAcl['lib']['custom']['open'] = 'Tất cả users có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['custom']['custom'] = 'Users in the whitelist có thể truy cập nó.'; $lang->doc->noticeAcl['lib']['custom']['private'] = 'Chỉ the one who created it có thể truy cập nó.'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index d60d3ec3f0..00e9322c6a 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -187,13 +187,15 @@ $lang->doc->noOpenedDoc = '您还没有创建任何文档。'; $lang->doc->noCollectedDoc = '您还没有收藏任何文档。'; $lang->doc->errorEmptyLib = '文档库暂无数据。'; -$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; -$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; -$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。"; -$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。"; -$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。'; -$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。'; -$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。'; +$lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; +$lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; +$lang->doc->noticeAcl['lib']['project']['default'] = "有所选项目访问权限的用户可以访问。"; +$lang->doc->noticeAcl['lib']['project']['custom'] = "有所选项目访问权限或白名单里的用户可以访问。"; +$lang->doc->noticeAcl['lib']['execution']['default'] = "有所选{$lang->executionCommon}访问权限的用户可以访问。"; +$lang->doc->noticeAcl['lib']['execution']['custom'] = "有所选{$lang->executionCommon}访问权限或白名单里的用户可以访问。"; +$lang->doc->noticeAcl['lib']['custom']['open'] = '所有人都可以访问。'; +$lang->doc->noticeAcl['lib']['custom']['custom'] = '白名单的用户可以访问。'; +$lang->doc->noticeAcl['lib']['custom']['private'] = '只有创建者自己可以访问。'; $lang->doc->noticeAcl['doc']['open'] = '有文档所属文档库访问权限的,都可以访问。'; $lang->doc->noticeAcl['doc']['custom'] = '白名单的用户可以访问。'; diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 33b29e2f66..e84aba8178 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -27,7 +27,7 @@