diff --git a/module/doc/control.php b/module/doc/control.php
index 71cbfeb008..d632d7b599 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -355,7 +355,7 @@ class doc extends control
else if($this->app->openApp == 'execution')
{
$this->execution->setMenu($objectID);
- unset($this->lang->exectuion->menu->doc['subMenu']);
+ unset($this->lang->execution->menu->doc['subMenu']);
}
else
{
@@ -516,7 +516,17 @@ class doc extends control
$type = $docLib->type;
$objectID = $docLib->$type;
}
- $this->locate(inLink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID=$docID"));
+
+ $openApp = $type == 'execution' ? 'execution' : 'doc';
+ $browseLink = inLink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID=$docID#app=$openApp");
+ if($type == 'execution')
+ {
+ die(js::locate($browseLink, 'parent'));
+ }
+ else
+ {
+ $this->locate($browseLink);
+ }
}
if($doc->contentType == 'markdown')
@@ -953,13 +963,14 @@ class doc extends control
{
$libs = $this->doc->getLibsByObject('book', 0);
$this->app->rawMethod = 'book';
- if($libID == 0) $libID = key($libs);
+ if($libID == 0) $libID = reset($libs)->id;
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs, $libID);
if(!$docID) $docID = $this->dao->select('id')->from(TABLE_DOC)
->where('lib')->eq($libID)
->andWhere('type')->eq('article')
->andWhere('deleted')->eq(0)
+ ->orderBy('editedDate_desc,id_desc')
->fetch('id');
$object = new stdclass();
@@ -1046,6 +1057,7 @@ class doc extends control
$this->view->type = $type;
$this->view->version = $version;
$this->view->object = $object;
+ $this->view->objectID = $objectID;
$this->view->objectType = $type;
$this->view->libID = $libID;
$this->view->lib = isset($libs[$libID]) ? $libs[$libID] : new stdclass();
diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php
index cb9b85d325..35087ff727 100644
--- a/module/doc/lang/de.php
+++ b/module/doc/lang/de.php
@@ -183,13 +183,13 @@ $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']['execution']['default'] = 'Users who can access the selected execution can access it.';
-$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution 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']['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 a1cf4294c5..8b7d745b78 100644
--- a/module/doc/lang/en.php
+++ b/module/doc/lang/en.php
@@ -187,13 +187,13 @@ $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']['execution']['default'] = 'Users who can access the selected execution can access it.';
-$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution 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']['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 97cc1f68c0..9905f9d826 100644
--- a/module/doc/lang/fr.php
+++ b/module/doc/lang/fr.php
@@ -183,13 +183,13 @@ $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']['execution']['default'] = 'Les utilisateurs qui ont accès au Projet peuvent y accéder.';
-$lang->doc->noticeAcl['lib']['execution']['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']['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 0e46cd2b46..2cda874937 100644
--- a/module/doc/lang/vi.php
+++ b/module/doc/lang/vi.php
@@ -185,8 +185,8 @@ $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']['execution']['default'] = 'Users who can access the selected execution có thể truy cập nó.';
-$lang->doc->noticeAcl['lib']['execution']['custom'] = 'Users who can access the selected execution 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']['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 8e48737b0d..d60d3ec3f0 100644
--- a/module/doc/lang/zh-cn.php
+++ b/module/doc/lang/zh-cn.php
@@ -187,13 +187,13 @@ $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']['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['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['doc']['open'] = '有文档所属文档库访问权限的,都可以访问。';
$lang->doc->noticeAcl['doc']['custom'] = '白名单的用户可以访问。';
diff --git a/module/doc/lang/zh-tw.php b/module/doc/lang/zh-tw.php
index b9922cc6d0..0edc7c7ba0 100644
--- a/module/doc/lang/zh-tw.php
+++ b/module/doc/lang/zh-tw.php
@@ -182,13 +182,13 @@ $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']['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['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['doc']['open'] = '有文檔所屬文檔庫訪問權限的,都可以訪問。';
$lang->doc->noticeAcl['doc']['custom'] = '白名單的用戶可以訪問。';
diff --git a/module/doc/model.php b/module/doc/model.php
index ca40125a68..ed50765b97 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -1121,7 +1121,12 @@ class docModel extends model
{
if($type == 'custom' or $type == 'book')
{
- $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere('type')->eq($type)->orderBy('`order`, id')->fetchAll('id');
+ $objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)
+ ->where('deleted')->eq(0)
+ ->andWhere('type')->eq($type)
+ ->beginIF($type == 'custom')->orderBy('`order`, id')->fi()
+ ->beginIF($type == 'book')->orderBy('id_desc')->fi()
+ ->fetchAll('id');
}
else if($type != 'product' and $type != 'project' and $type != 'execution')
{
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php
index 92a76527a3..1b6bfbe293 100644
--- a/module/product/view/browse.html.php
+++ b/module/product/view/browse.html.php
@@ -146,7 +146,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';