', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");?>
diff --git a/module/api/view/index.html.php b/module/api/view/index.html.php
index 2b24026b20..233b24e1dc 100644
--- a/module/api/view/index.html.php
+++ b/module/api/view/index.html.php
@@ -25,7 +25,7 @@
if($libTree and common::hasPriv('api', 'struct')) echo html::a($this->createLink('api', 'struct', "libID=$libID"), "
" . $lang->api->struct, '', "class='btn btn-link'");
if($libTree and common::hasPriv('api', 'releases')) echo html::a($this->createLink('api', 'releases', "libID=$libID", 'html', true), "
" . $lang->api->releases, '', "class='btn btn-link iframe' data-width='800px'");
if($libTree and common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID"), "
" . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'");
- if($libTree and common::hasPriv('api', 'export') and $config->edition != 'open') echo html::a($this->createLink('api', 'export', "libID=$libID&version=$version&release=$release", 'html', true), "
" . $lang->export, '', "class='btn btn-link export' data-width='480px' id='export'");
+ if($libTree and common::hasPriv('api', 'export') and $config->edition != 'open') echo html::a($this->createLink('api', 'export', "libID=$libID&version=$version&release=$release&moduleID=$moduleID", 'html', true), "
" . $lang->export, '', "class='btn btn-link export' data-width='480px' id='export'");
if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), '
' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
if($libTree and common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), '
' . $lang->api->createApi, '', 'class="btn btn-primary"');
?>
@@ -55,7 +55,7 @@
- - doc->libDropdown['addSameModule'];?>
- - doc->libDropdown['addSubModule'];?>
+ - doc->libDropdown['addSameModule'];?>
+ - doc->libDropdown['addSubModule'];?>
- '>doc->libDropdown['editModule'];?>
- ' target='hiddenwin'>doc->libDropdown['delModule'];?>
diff --git a/module/block/config.php b/module/block/config.php
index 2c26b941cd..a87632c071 100644
--- a/module/block/config.php
+++ b/module/block/config.php
@@ -40,3 +40,47 @@ $config->statistic = new stdclass();
$config->statistic->storyStages = array('wait', 'planned', 'developing', 'testing', 'released');
$config->block->workMethods = 'task,story,requirement,bug,testcase,testtask,issue,risk,meeting';
+
+$config->block->modules = array();
+$config->block->modules['project'] = new stdclass();
+$config->block->modules['project']->moreLinkList = new stdclass();
+$config->block->modules['project']->moreLinkList->recentproject = 'project|browse|';
+$config->block->modules['project']->moreLinkList->statistic = 'project|browse|';
+$config->block->modules['project']->moreLinkList->project = 'project|browse|';
+$config->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
+$config->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
+$config->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
+$config->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
+$config->block->modules['project']->moreLinkList->scrumlist = 'project|execution|';
+$config->block->modules['project']->moreLinkList->scrumtest = 'project|testtask|';
+$config->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
+$config->block->modules['project']->moreLinkList->sprint = 'project|execution|';
+$config->block->modules['project']->moreLinkList->projectdynamic = 'project|dynamic|';
+
+$config->block->modules['product'] = new stdclass();
+$config->block->modules['product']->moreLinkList = new stdclass();
+$config->block->modules['product']->moreLinkList->list = 'product|all|';
+$config->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
+
+$config->block->modules['execution'] = new stdclass();
+$config->block->modules['execution']->moreLinkList = new stdclass();
+$config->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
+$config->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
+
+$config->block->modules['qa'] = new stdclass();
+$config->block->modules['qa']->moreLinkList = new stdclass();
+$config->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
+$config->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s';
+$config->block->modules['qa']->moreLinkList->testtask = 'testtask|browse|type=%s';
+
+$config->block->modules['todo'] = new stdclass();
+$config->block->modules['todo']->moreLinkList = new stdclass();
+$config->block->modules['todo']->moreLinkList->list = 'my|todo|type=all';
+
+$config->block->modules['common'] = new stdclass();
+$config->block->modules['common']->moreLinkList = new stdclass();
+$config->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
+
+$config->block->modules['doc'] = new stdclass();
+$config->block->modules['doc']->moreLinkList = new stdclass();
+$config->block->modules['doc']->moreLinkList->docmycollection = 'doc|myspace|type=collect&libID=0&moduleID=0&browseType=all¶m=0&orderBy=editedDate_desc';
diff --git a/module/block/control.php b/module/block/control.php
index 028168b088..040259e31f 100755
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -42,6 +42,7 @@ class block extends control
if($module == 'my')
{
$modules = $this->lang->block->moduleList;
+ unset($modules['doc']);
list($programModule, $programMethod) = explode('-', $this->config->programLink);
list($productModule, $productMethod) = explode('-', $this->config->productLink);
@@ -299,9 +300,9 @@ class block extends control
$block->blockLink = $this->createLink('block', 'printBlock', "id=$block->id&module=$block->module");
$block->moreLink = '';
- if(isset($this->lang->block->modules[$source]->moreLinkList->{$blockID}))
+ if(isset($this->config->block->modules[$source]->moreLinkList->{$blockID}))
{
- list($moduleName, $method, $vars) = explode('|', sprintf($this->lang->block->modules[$source]->moreLinkList->{$blockID}, isset($block->params->type) ? $block->params->type : ''));
+ list($moduleName, $method, $vars) = explode('|', sprintf($this->config->block->modules[$source]->moreLinkList->{$blockID}, isset($block->params->type) ? $block->params->type : ''));
/* The list assigned to me jumps to the work page when click more button. */
$block->moreLink = $this->createLink($moduleName, $method, $vars);
@@ -583,9 +584,9 @@ class block extends control
}
$this->view->moreLink = '';
- if(isset($this->lang->block->modules[$module]->moreLinkList->{$code}))
+ if(isset($this->config->block->modules[$module]->moreLinkList->{$code}))
{
- list($moduleName, $method, $vars) = explode('|', sprintf($this->lang->block->modules[$module]->moreLinkList->{$code}, isset($params->type) ? $params->type : ''));
+ list($moduleName, $method, $vars) = explode('|', sprintf($this->config->block->modules[$module]->moreLinkList->{$code}, isset($params->type) ? $params->type : ''));
$this->view->moreLink = $this->createLink($moduleName, $method, $vars);
}
@@ -2033,6 +2034,123 @@ class block extends control
$this->view->projects = $this->loadModel('project')->getOverviewList('byStatus', $status, $orderBy, $count);
}
+ /**
+ * Print document statistic block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocStatisticBlock()
+ {
+ $this->view->statistic = $this->loadModel('doc')->getStatisticInfo();
+ }
+
+ /**
+ * Print document dynamic block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocDynamicBlock()
+ {
+ /* Load pager. */
+ $this->app->loadClass('pager', $static = true);
+ $pager = new pager(0, 30, 1);
+
+ $this->view->actions = $this->loadModel('doc')->getDynamic($pager);
+ $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter|all');
+ }
+
+ /**
+ * Print my collection of documents block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocMyCollectionBlock()
+ {
+ /* Load pager. */
+ $this->app->loadClass('pager', $static = true);
+ $pager = new pager(0, 6, 1);
+
+ $docList = $this->loadModel('doc')->getDocsByBrowseType('collectedbyme', 0, 0, 'editedDate_desc', $pager);
+ $libList = array();
+ foreach($docList as $doc)
+ {
+ $doc->editedDate = substr($doc->editedDate, 0, 10);
+ $doc->editInterval = helper::getDateInterval($doc->editedDate);
+
+ $libList[] = $doc->lib;
+ }
+
+ $this->view->docList = $docList;
+ }
+
+ /**
+ * Print recent update block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocRecentUpdateBlock()
+ {
+ /* Load pager. */
+ $this->app->loadClass('pager', $static = true);
+ $pager = new pager(0, 6, 1);
+
+ $docList = $this->loadModel('doc')->getDocsByBrowseType('byediteddate', 0, 0, 'editedDate_desc', $pager);
+ $libList = array();
+ foreach($docList as $doc)
+ {
+ $doc->editedDate = substr($doc->editedDate, 0, 10);
+ $doc->editInterval = helper::getDateInterval($doc->editedDate);
+
+ $libList[] = $doc->lib;
+ }
+
+ $this->view->docList = $docList;
+ }
+
+ /**
+ * Print view list block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocViewListBlock()
+ {
+ }
+
+ /**
+ * Print collect list block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printDocCollectListBlock()
+ {
+ }
+
+ /**
+ * Print product's document block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printProductDocBlock()
+ {
+ }
+
+ /**
+ * Print project's document block.
+ *
+ * @access public
+ * @return void
+ */
+ public function printProjectDocBlock()
+ {
+ }
+
/**
* Print guide block
*
diff --git a/module/block/lang/de.php b/module/block/lang/de.php
index 978f144d63..66c9ac1d75 100644
--- a/module/block/lang/de.php
+++ b/module/block/lang/de.php
@@ -332,6 +332,42 @@ $lang->block->default['full']['my']['10']['grid'] = 8;
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
+/* Doc module block. */
+$lang->block->default['doc']['1']['title'] = 'Statistic';
+$lang->block->default['doc']['1']['block'] = 'docstatistic';
+$lang->block->default['doc']['1']['grid'] = 8;
+
+$lang->block->default['doc']['2']['title'] = 'Dynamic';
+$lang->block->default['doc']['2']['block'] = 'docdynamic';
+$lang->block->default['doc']['2']['grid'] = 4;
+
+$lang->block->default['doc']['3']['title'] = 'My Collection';
+$lang->block->default['doc']['3']['block'] = 'docmycollection';
+$lang->block->default['doc']['3']['grid'] = 8;
+
+$lang->block->default['doc']['4']['title'] = 'Recently update';
+$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
+$lang->block->default['doc']['4']['grid'] = 8;
+
+$lang->block->default['doc']['5']['title'] = 'Browse Leaderboard';
+$lang->block->default['doc']['5']['block'] = 'docviewlist';
+$lang->block->default['doc']['5']['grid'] = 4;
+
+if($config->vision == 'rnd')
+{
+ $lang->block->default['doc']['6']['title'] = $lang->productCommon . 'Document';
+ $lang->block->default['doc']['6']['block'] = 'productdoc';
+ $lang->block->default['doc']['6']['grid'] = 8;
+}
+
+$lang->block->default['doc']['7']['title'] = 'Favorite Leaderboard';
+$lang->block->default['doc']['7']['block'] = 'doccollectlist';
+$lang->block->default['doc']['7']['grid'] = 4;
+
+$lang->block->default['doc']['8']['title'] = $lang->projectCommon . 'Document';
+$lang->block->default['doc']['8']['block'] = 'projectdoc';
+$lang->block->default['doc']['8']['grid'] = 8;
+
$lang->block->count = 'Count';
$lang->block->type = 'Type';
$lang->block->orderBy = 'Order by';
@@ -360,6 +396,7 @@ $lang->block->moduleList['project'] = $lang->projectCommon;
$lang->block->moduleList['execution'] = $lang->execution->common;
$lang->block->moduleList['qa'] = 'QA';
$lang->block->moduleList['todo'] = 'Todos';
+$lang->block->moduleList['doc'] = 'Doc';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
@@ -414,6 +451,17 @@ $lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = 'Todos';
+$lang->block->modules['doc'] = new stdclass();
+$lang->block->modules['doc']->availableBlocks = new stdclass();
+$lang->block->modules['doc']->availableBlocks->statistic = 'Statistic';
+$lang->block->modules['doc']->availableBlocks->docdynamic = 'Dynamic';
+$lang->block->modules['doc']->availableBlocks->mycollection = 'My Collection';
+$lang->block->modules['doc']->availableBlocks->recentupdate = 'Recently Update';
+$lang->block->modules['doc']->availableBlocks->viewlist = 'Browse Leaderboard';
+$lang->block->modules['doc']->availableBlocks->productdoc = $lang->productCommon . 'Document';
+$lang->block->modules['doc']->availableBlocks->collectlist = 'Favorite Leaderboard';
+$lang->block->modules['doc']->availableBlocks->projectdoc = $lang->projectCommon . 'Document';
+
$lang->block->orderByList = new stdclass();
$lang->block->orderByList->product = array();
@@ -528,40 +576,6 @@ $lang->block->typeList->testtask['blocked'] = 'Blockiert';
$lang->block->typeList->testtask['done'] = 'Erledigt';
$lang->block->typeList->testtask['all'] = 'Alle';
-$lang->block->modules['project']->moreLinkList = new stdclass();
-$lang->block->modules['project']->moreLinkList->recentproject = "project|browse|";
-$lang->block->modules['project']->moreLinkList->statistic = "project|browse|";
-$lang->block->modules['project']->moreLinkList->project = "project|browse|";
-$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
-$lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
-$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
-$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
-$lang->block->modules['project']->moreLinkList->scrumlist = "project|execution|";
-$lang->block->modules['project']->moreLinkList->scrumtest = 'testtask|browse|';
-$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['project']->moreLinkList->sprint = "project|execution|";
-$lang->block->modules['project']->moreLinkList->projectdynamic = "project|dynamic|";
-
-$lang->block->modules['product']->moreLinkList = new stdclass();
-$lang->block->modules['product']->moreLinkList->list = 'product|all|';
-$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
-
-$lang->block->modules['execution']->moreLinkList = new stdclass();
-$lang->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
-$lang->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
-
-$lang->block->modules['qa']->moreLinkList = new stdclass();
-$lang->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
-$lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s';
-$lang->block->modules['qa']->moreLinkList->testtask = 'testtask|browse|type=%s';
-
-$lang->block->modules['todo']->moreLinkList = new stdclass();
-$lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all';
-
-$lang->block->modules['common'] = new stdclass();
-$lang->block->modules['common']->moreLinkList = new stdclass();
-$lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
-
$lang->block->welcomeList['06:00'] = 'Guten Morgen, %s';
$lang->block->welcomeList['11:30'] = 'Guten Tag, %s';
$lang->block->welcomeList['13:30'] = 'Guten Tag, %s';
diff --git a/module/block/lang/en.php b/module/block/lang/en.php
index 2a19a3bcec..8142c5de78 100644
--- a/module/block/lang/en.php
+++ b/module/block/lang/en.php
@@ -332,6 +332,42 @@ $lang->block->default['full']['my']['10']['grid'] = 8;
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
+/* Doc module block. */
+$lang->block->default['doc']['1']['title'] = 'Statistic';
+$lang->block->default['doc']['1']['block'] = 'docstatistic';
+$lang->block->default['doc']['1']['grid'] = 8;
+
+$lang->block->default['doc']['2']['title'] = 'Dynamic';
+$lang->block->default['doc']['2']['block'] = 'docdynamic';
+$lang->block->default['doc']['2']['grid'] = 4;
+
+$lang->block->default['doc']['3']['title'] = 'My Collection';
+$lang->block->default['doc']['3']['block'] = 'docmycollection';
+$lang->block->default['doc']['3']['grid'] = 8;
+
+$lang->block->default['doc']['4']['title'] = 'Recently update';
+$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
+$lang->block->default['doc']['4']['grid'] = 8;
+
+$lang->block->default['doc']['5']['title'] = 'Browse Leaderboard';
+$lang->block->default['doc']['5']['block'] = 'docviewlist';
+$lang->block->default['doc']['5']['grid'] = 4;
+
+if($config->vision == 'rnd')
+{
+ $lang->block->default['doc']['6']['title'] = $lang->productCommon . 'Document';
+ $lang->block->default['doc']['6']['block'] = 'productdoc';
+ $lang->block->default['doc']['6']['grid'] = 8;
+}
+
+$lang->block->default['doc']['7']['title'] = 'Favorite Leaderboard';
+$lang->block->default['doc']['7']['block'] = 'doccollectlist';
+$lang->block->default['doc']['7']['grid'] = 4;
+
+$lang->block->default['doc']['8']['title'] = $lang->projectCommon . 'Document';
+$lang->block->default['doc']['8']['block'] = 'projectdoc';
+$lang->block->default['doc']['8']['grid'] = 8;
+
$lang->block->count = 'Count';
$lang->block->type = 'Type';
$lang->block->orderBy = 'Order by';
@@ -360,6 +396,7 @@ $lang->block->moduleList['project'] = $lang->projectCommon;
$lang->block->moduleList['execution'] = $lang->execution->common;
$lang->block->moduleList['qa'] = 'Test';
$lang->block->moduleList['todo'] = 'Todo';
+$lang->block->moduleList['doc'] = 'Doc';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
@@ -414,6 +451,17 @@ $lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = 'Todo';
+$lang->block->modules['doc'] = new stdclass();
+$lang->block->modules['doc']->availableBlocks = new stdclass();
+$lang->block->modules['doc']->availableBlocks->docstatistic = 'Statistic';
+$lang->block->modules['doc']->availableBlocks->docdynamic = 'Dynamic';
+$lang->block->modules['doc']->availableBlocks->docmycollection = 'My Collection';
+$lang->block->modules['doc']->availableBlocks->docrecentupdate = 'Recently Update';
+$lang->block->modules['doc']->availableBlocks->docviewlist = 'Browse Leaderboard';
+$lang->block->modules['doc']->availableBlocks->productdoc = $lang->productCommon . 'Document';
+$lang->block->modules['doc']->availableBlocks->doccollectlist = 'Favorite Leaderboard';
+$lang->block->modules['doc']->availableBlocks->projectdoc = $lang->projectCommon . 'Document';
+
$lang->block->orderByList = new stdclass();
$lang->block->orderByList->product = array();
@@ -528,40 +576,6 @@ $lang->block->typeList->testtask['blocked'] = 'Blocked';
$lang->block->typeList->testtask['done'] = 'Done';
$lang->block->typeList->testtask['all'] = 'All';
-$lang->block->modules['project']->moreLinkList = new stdclass();
-$lang->block->modules['project']->moreLinkList->recentproject = "project|browse|";
-$lang->block->modules['project']->moreLinkList->statistic = "project|browse|";
-$lang->block->modules['project']->moreLinkList->project = "project|browse|";
-$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
-$lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
-$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
-$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
-$lang->block->modules['project']->moreLinkList->scrumlist = "project|execution|";
-$lang->block->modules['project']->moreLinkList->scrumtest = 'testtask|browse|';
-$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['project']->moreLinkList->sprint = "project|execution|";
-$lang->block->modules['project']->moreLinkList->projectdynamic = "project|dynamic|";
-
-$lang->block->modules['product']->moreLinkList = new stdclass();
-$lang->block->modules['product']->moreLinkList->list = 'product|all|';
-$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
-
-$lang->block->modules['execution']->moreLinkList = new stdclass();
-$lang->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
-$lang->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
-
-$lang->block->modules['qa']->moreLinkList = new stdclass();
-$lang->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
-$lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s';
-$lang->block->modules['qa']->moreLinkList->testtask = 'testtask|browse|type=%s';
-
-$lang->block->modules['todo']->moreLinkList = new stdclass();
-$lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all';
-
-$lang->block->modules['common'] = new stdclass();
-$lang->block->modules['common']->moreLinkList = new stdclass();
-$lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
-
$lang->block->welcomeList['06:00'] = 'Good morning, %s';
$lang->block->welcomeList['11:30'] = 'Good day, %s';
$lang->block->welcomeList['13:30'] = 'Good afternoon, %s';
diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php
index 0485e43e45..a2147e8d10 100644
--- a/module/block/lang/fr.php
+++ b/module/block/lang/fr.php
@@ -332,6 +332,42 @@ $lang->block->default['full']['my']['10']['grid'] = 8;
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
+/* Doc module block. */
+$lang->block->default['doc']['1']['title'] = 'Statistic';
+$lang->block->default['doc']['1']['block'] = 'docstatistic';
+$lang->block->default['doc']['1']['grid'] = 8;
+
+$lang->block->default['doc']['2']['title'] = 'Dynamic';
+$lang->block->default['doc']['2']['block'] = 'docdynamic';
+$lang->block->default['doc']['2']['grid'] = 4;
+
+$lang->block->default['doc']['3']['title'] = 'My Collection';
+$lang->block->default['doc']['3']['block'] = 'docmycollection';
+$lang->block->default['doc']['3']['grid'] = 8;
+
+$lang->block->default['doc']['4']['title'] = 'Recently update';
+$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
+$lang->block->default['doc']['4']['grid'] = 8;
+
+$lang->block->default['doc']['5']['title'] = 'Browse Leaderboard';
+$lang->block->default['doc']['5']['block'] = 'docviewlist';
+$lang->block->default['doc']['5']['grid'] = 4;
+
+if($config->vision == 'rnd')
+{
+ $lang->block->default['doc']['6']['title'] = $lang->productCommon . 'Document';
+ $lang->block->default['doc']['6']['block'] = 'productdoc';
+ $lang->block->default['doc']['6']['grid'] = 8;
+}
+
+$lang->block->default['doc']['7']['title'] = 'Favorite Leaderboard';
+$lang->block->default['doc']['7']['block'] = 'doccollectlist';
+$lang->block->default['doc']['7']['grid'] = 4;
+
+$lang->block->default['doc']['8']['title'] = $lang->projectCommon . 'Document';
+$lang->block->default['doc']['8']['block'] = 'projectdoc';
+$lang->block->default['doc']['8']['grid'] = 8;
+
$lang->block->count = 'Numéro';
$lang->block->type = 'Type';
$lang->block->orderBy = 'Trié par';
@@ -360,6 +396,7 @@ $lang->block->moduleList['project'] = $lang->projectCommon;
$lang->block->moduleList['execution'] = $lang->execution->common;
$lang->block->moduleList['qa'] = 'Test';
$lang->block->moduleList['todo'] = 'Todo';
+$lang->block->moduleList['doc'] = 'Doc';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
@@ -414,6 +451,17 @@ $lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = 'Todo';
+$lang->block->modules['doc'] = new stdclass();
+$lang->block->modules['doc']->availableBlocks = new stdclass();
+$lang->block->modules['doc']->availableBlocks->docstatistic = 'Statistic';
+$lang->block->modules['doc']->availableBlocks->docdynamic = 'Dynamic';
+$lang->block->modules['doc']->availableBlocks->docmycollection = 'My Collection';
+$lang->block->modules['doc']->availableBlocks->docrecentupdate = 'Recently Update';
+$lang->block->modules['doc']->availableBlocks->docviewlist = 'Browse Leaderboard';
+$lang->block->modules['doc']->availableBlocks->productdoc = $lang->productCommon . 'Document';
+$lang->block->modules['doc']->availableBlocks->doccollectlist = 'Favorite Leaderboard';
+$lang->block->modules['doc']->availableBlocks->projectdoc = $lang->projectCommon . 'Document';
+
$lang->block->orderByList = new stdclass();
$lang->block->orderByList->product = array();
@@ -528,40 +576,6 @@ $lang->block->typeList->testtask['blocked'] = 'Bloquées';
$lang->block->typeList->testtask['done'] = 'Jouées';
$lang->block->typeList->testtask['all'] = 'Toutes';
-$lang->block->modules['project']->moreLinkList = new stdclass();
-$lang->block->modules['project']->moreLinkList->recentproject = "project|browse|";
-$lang->block->modules['project']->moreLinkList->statistic = "project|browse|";
-$lang->block->modules['project']->moreLinkList->project = "project|browse|";
-$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
-$lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
-$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
-$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
-$lang->block->modules['project']->moreLinkList->scrumlist = "project|execution|";
-$lang->block->modules['project']->moreLinkList->scrumtest = 'testtask|browse|';
-$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['project']->moreLinkList->sprint = "project|execution|";
-$lang->block->modules['project']->moreLinkList->projectdynamic = "project|dynamic|";
-
-$lang->block->modules['product']->moreLinkList = new stdclass();
-$lang->block->modules['product']->moreLinkList->list = 'product|all|';
-$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
-
-$lang->block->modules['execution']->moreLinkList = new stdclass();
-$lang->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
-$lang->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
-
-$lang->block->modules['qa']->moreLinkList = new stdclass();
-$lang->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
-$lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s';
-$lang->block->modules['qa']->moreLinkList->testtask = 'testtask|browse|type=%s';
-
-$lang->block->modules['todo']->moreLinkList = new stdclass();
-$lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all';
-
-$lang->block->modules['common'] = new stdclass();
-$lang->block->modules['common']->moreLinkList = new stdclass();
-$lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
-
$lang->block->welcomeList['06:00'] = 'Bonjour, %s';
$lang->block->welcomeList['11:30'] = 'Bonjour, %s';
$lang->block->welcomeList['13:30'] = 'Bonjour, %s';
diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php
index 0af3f1887a..00e89e5900 100644
--- a/module/block/lang/zh-cn.php
+++ b/module/block/lang/zh-cn.php
@@ -332,6 +332,42 @@ $lang->block->default['full']['my']['10']['grid'] = 8;
$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc';
$lang->block->default['full']['my']['10']['params']['count'] = '15';
+/* Doc module block. */
+$lang->block->default['doc']['1']['title'] = '文档统计';
+$lang->block->default['doc']['1']['block'] = 'docstatistic';
+$lang->block->default['doc']['1']['grid'] = 8;
+
+$lang->block->default['doc']['2']['title'] = '文档动态';
+$lang->block->default['doc']['2']['block'] = 'docdynamic';
+$lang->block->default['doc']['2']['grid'] = 4;
+
+$lang->block->default['doc']['3']['title'] = '我的收藏';
+$lang->block->default['doc']['3']['block'] = 'docmycollection';
+$lang->block->default['doc']['3']['grid'] = 8;
+
+$lang->block->default['doc']['4']['title'] = '最近更新';
+$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
+$lang->block->default['doc']['4']['grid'] = 8;
+
+$lang->block->default['doc']['5']['title'] = '浏览排行榜';
+$lang->block->default['doc']['5']['block'] = 'docviewlist';
+$lang->block->default['doc']['5']['grid'] = 4;
+
+if($config->vision == 'rnd')
+{
+ $lang->block->default['doc']['6']['title'] = $lang->productCommon . '文档';
+ $lang->block->default['doc']['6']['block'] = 'productdoc';
+ $lang->block->default['doc']['6']['grid'] = 8;
+}
+
+$lang->block->default['doc']['7']['title'] = '收藏排行榜';
+$lang->block->default['doc']['7']['block'] = 'doccollectlist';
+$lang->block->default['doc']['7']['grid'] = 4;
+
+$lang->block->default['doc']['8']['title'] = $lang->projectCommon . '文档';
+$lang->block->default['doc']['8']['block'] = 'projectdoc';
+$lang->block->default['doc']['8']['grid'] = 8;
+
$lang->block->count = '数量';
$lang->block->type = '类型';
$lang->block->orderBy = '排序';
@@ -360,6 +396,7 @@ $lang->block->moduleList['project'] = $lang->projectCommon;
$lang->block->moduleList['execution'] = $lang->execution->common;
$lang->block->moduleList['qa'] = '测试';
$lang->block->moduleList['todo'] = '待办';
+$lang->block->moduleList['doc'] = '文档';
$lang->block->modules['project'] = new stdclass();
$lang->block->modules['project']->availableBlocks = new stdclass();
@@ -414,6 +451,17 @@ $lang->block->modules['todo'] = new stdclass();
$lang->block->modules['todo']->availableBlocks = new stdclass();
$lang->block->modules['todo']->availableBlocks->list = '待办列表';
+$lang->block->modules['doc'] = new stdclass();
+$lang->block->modules['doc']->availableBlocks = new stdclass();
+$lang->block->modules['doc']->availableBlocks->docstatistic = '文档统计';
+$lang->block->modules['doc']->availableBlocks->docdynamic = '文档动态';
+$lang->block->modules['doc']->availableBlocks->docmycollection = '我的收藏';
+$lang->block->modules['doc']->availableBlocks->docrecentupdate = '最近更新';
+$lang->block->modules['doc']->availableBlocks->docviewlist = '浏览排行榜';
+$lang->block->modules['doc']->availableBlocks->productdoc = $lang->productCommon . '文档';
+$lang->block->modules['doc']->availableBlocks->doccollectlist = '收藏排行榜';
+$lang->block->modules['doc']->availableBlocks->projectdoc = $lang->projectCommon . '文档';
+
$lang->block->orderByList = new stdclass();
$lang->block->orderByList->product = array();
@@ -528,40 +576,6 @@ $lang->block->typeList->testtask['blocked'] = '阻塞版本';
$lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
-$lang->block->modules['project']->moreLinkList = new stdclass();
-$lang->block->modules['project']->moreLinkList->recentproject = 'project|browse|';
-$lang->block->modules['project']->moreLinkList->statistic = 'project|browse|';
-$lang->block->modules['project']->moreLinkList->project = 'project|browse|';
-$lang->block->modules['project']->moreLinkList->cmmireport = 'weekly|index|';
-$lang->block->modules['project']->moreLinkList->cmmiestimate = 'workestimation|index|';
-$lang->block->modules['project']->moreLinkList->cmmiissue = 'issue|browse|';
-$lang->block->modules['project']->moreLinkList->cmmirisk = 'risk|browse|';
-$lang->block->modules['project']->moreLinkList->scrumlist = 'project|execution|';
-$lang->block->modules['project']->moreLinkList->scrumtest = 'project|testtask|';
-$lang->block->modules['project']->moreLinkList->scrumproduct = 'product|all|';
-$lang->block->modules['project']->moreLinkList->sprint = 'project|execution|';
-$lang->block->modules['project']->moreLinkList->projectdynamic = 'project|dynamic|';
-
-$lang->block->modules['product']->moreLinkList = new stdclass();
-$lang->block->modules['product']->moreLinkList->list = 'product|all|';
-$lang->block->modules['product']->moreLinkList->story = 'my|story|type=%s';
-
-$lang->block->modules['execution']->moreLinkList = new stdclass();
-$lang->block->modules['execution']->moreLinkList->list = 'execution|all|status=%s&executionID=';
-$lang->block->modules['execution']->moreLinkList->task = 'my|task|type=%s';
-
-$lang->block->modules['qa']->moreLinkList = new stdclass();
-$lang->block->modules['qa']->moreLinkList->bug = 'my|bug|type=%s';
-$lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s';
-$lang->block->modules['qa']->moreLinkList->testtask = 'testtask|browse|type=%s';
-
-$lang->block->modules['todo']->moreLinkList = new stdclass();
-$lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all';
-
-$lang->block->modules['common'] = new stdclass();
-$lang->block->modules['common']->moreLinkList = new stdclass();
-$lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
-
$lang->block->welcomeList['06:00'] = '%s,早上好!';
$lang->block->welcomeList['11:30'] = '%s,中午好!';
$lang->block->welcomeList['13:30'] = '%s,下午好!';
diff --git a/module/block/model.php b/module/block/model.php
index fcb3d99bab..43f59e77f7 100644
--- a/module/block/model.php
+++ b/module/block/model.php
@@ -264,14 +264,14 @@ class blockModel extends model
$blocks = $this->lang->block->default[$type]['project'];
/* Mark project block has init. */
- $this->loadModel('setting')->setItem("$account.$module.{$type}common.blockInited@$vision", true);
+ $this->loadModel('setting')->setItem("$account.$module.{$type}common.blockInited@$vision", '1');
}
else
{
$blocks = $module == 'my' ? $this->lang->block->default[$flow][$module] : $this->lang->block->default[$module];
/* Mark this app has init. */
- $this->loadModel('setting')->setItem("$account.$module.common.blockInited@$vision", true);
+ $this->loadModel('setting')->setItem("$account.$module.common.blockInited@$vision", '1');
}
$this->loadModel('setting')->setItem("$account.$module.block.initVersion", $this->config->block->version);
@@ -558,6 +558,7 @@ class blockModel extends model
if($module == 'project') return $this->getProjectStatisticParams();
if($module == 'execution') return $this->getExecutionStatisticParams();
if($module == 'qa') return $this->getQaStatisticParams();
+ if($module == 'doc') return $this->getDocStatisticParams();
$params = new stdclass();
$params = $this->appendCountParams($params);
@@ -628,6 +629,17 @@ class blockModel extends model
return json_encode($params);
}
+ /**
+ * Get document statistic params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocStatisticParams()
+ {
+ return false;
+ }
+
/**
* Get recent project pararms.
*
@@ -718,7 +730,7 @@ class blockModel extends model
$params = $this->appendCountParams();
$params->type['name'] = $this->lang->block->type;
- $params->type['options'] = $this->lang->issue->labelList;
+ $params->type['options'] = $this->lang->issue->featureBar['browse'];
$params->type['control'] = 'select';
$params->orderBy['name'] = $this->lang->block->orderBy;
@@ -1061,6 +1073,83 @@ class blockModel extends model
return false;
}
+ /**
+ * Get document dynamic params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocDynamicParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get my collection params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocMyCollectionParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get recent update params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocRecentUpdateParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get view list params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocViewlistParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get product document params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getProductDocParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get collect list params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getDocCollectListParams()
+ {
+ return false;
+ }
+
+ /**
+ * Get project document params.
+ *
+ * @access public
+ * @return bool
+ */
+ public function getProjectDocParams()
+ {
+ return false;
+ }
+
/**
* Get the total estimated man hours required.
*
diff --git a/module/block/view/doccollectlistblock.html.php b/module/block/view/doccollectlistblock.html.php
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/module/block/view/docdynamicblock.html.php b/module/block/view/docdynamicblock.html.php
new file mode 100644
index 0000000000..a0285848b6
--- /dev/null
+++ b/module/block/view/docdynamicblock.html.php
@@ -0,0 +1,37 @@
+
+block->emptyTip;?>
+
+
+
+
+ actor);
+ $class = $action->major ? 'active' : '';
+ if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";
+ echo "";
+ if($action->objectLink) printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName, $action->objectName);
+ if(!$action->objectLink) printf($lang->block->noLinkDynamic, $action->date, $action->objectName, $user, $action->actionLabel, $action->objectLabel, ' ' . $action->objectName);
+ echo "
";
+ $i++;
+ }
+ ?>
+
+
+
diff --git a/module/block/view/docmycollectionblock.html.php b/module/block/view/docmycollectionblock.html.php
new file mode 100644
index 0000000000..6084f45588
--- /dev/null
+++ b/module/block/view/docmycollectionblock.html.php
@@ -0,0 +1,80 @@
+
+ * @package block
+ * @version $Id$
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/module/block/view/docrecentupdateblock.html.php b/module/block/view/docrecentupdateblock.html.php
new file mode 100644
index 0000000000..3eb28be883
--- /dev/null
+++ b/module/block/view/docrecentupdateblock.html.php
@@ -0,0 +1,80 @@
+
+ * @package block
+ * @version $Id$
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/module/block/view/docstatisticblock.html.php b/module/block/view/docstatisticblock.html.php
new file mode 100644
index 0000000000..ce54c45dcf
--- /dev/null
+++ b/module/block/view/docstatisticblock.html.php
@@ -0,0 +1,79 @@
+
+ * @package block
+ * @version $Id$
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+
+
+
totalDocs;?>
+
doc->allDoc;?>
+
+
+
todayEditedDocs;?>
+
doc->todayEdited;?>
+
+
+
+
+
+
+
+
myEditedDocs;?>
+
doc->docEdited;?>
+
+
+
+
diff --git a/module/block/view/docviewlistblock.html.php b/module/block/view/docviewlistblock.html.php
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php
index 46466a6ce6..c378b7fa4a 100644
--- a/module/block/view/dynamic.html.php
+++ b/module/block/view/dynamic.html.php
@@ -2,7 +2,7 @@
block->emptyTip;?>
+
+
+
+ " . $lang->goback, "id='backBtn'", 'btn btn-link')?>
+
+
+ $crumb):?>
+
+ >
'?>
+
+
+
+
+
+ createLink('doc', $exportMethod, "libID=$libID&moduleID=0&docID=$docID"), " " . $lang->export, 'hiddenwin', "class='btn btn-link' id='docExport'");
+ if(common::hasPriv('doc', 'create')) echo $this->doc->printCreateBtn($lib, $moduleID);
+ ?>
+
+