diff --git a/module/action/config.php b/module/action/config.php
index d7e9abdb8f..df791bb285 100755
--- a/module/action/config.php
+++ b/module/action/config.php
@@ -63,6 +63,7 @@ $config->action->majorList['product'] = array('opened', 'edited');
$config->action->majorList['program'] = array('opened', 'edited');
$config->action->majorList['project'] = array('opened', 'edited');
$config->action->majorList['execution'] = array('opened', 'edited');
+$config->action->majorList['doc'] = array('releaseddoc', 'collected');
$config->action->needGetProjectType = 'build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design,opportunity,trainplan,gapanalysis,researchplan,researchreport,';
$config->action->needGetRelateField = ',branch,story,productplan,release,task,build,bug,testcase,case,testtask,testreport,doc,doclib,issue,risk,opportunity,trainplan,gapanalysis,team,whitelist,researchplan,researchreport,meeting,kanbanlane,kanbancolumn,module,review,';
diff --git a/module/action/model.php b/module/action/model.php
index cc3f9d8f59..bbbcb8bdcf 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -1307,11 +1307,13 @@ class actionModel extends model
$shadowProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('shadow')->eq(1)->fetchPairs();
$projectMultiples = $this->dao->select('id,type,multiple')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
$docList = $this->loadModel('doc')->getPrivDocs();
- $docLibList = $this->doc->getLibs();
+ $apiList = $this->loadModel('api')->getPrivApis();
+ $docLibList = $this->doc->getLibs('hasApi');
foreach($actions as $i => $action)
{
if($action->objectType == 'doc' and !isset($docList[$action->objectID])) unset($actions[$i]);
+ if($action->objectType == 'api' and !isset($apiList[$action->objectID])) unset($actions[$i]);
if($action->objectType == 'doclib' and !isset($docLibList[$action->objectID])) unset($actions[$i]);
if($action->objectType == 'product' AND isset($shadowProducts[$action->objectID]))
{
diff --git a/module/api/model.php b/module/api/model.php
index db6c44d62b..8f3dd3312f 100644
--- a/module/api/model.php
+++ b/module/api/model.php
@@ -1031,4 +1031,18 @@ class apiModel extends model
return array($normalObjects, $closedObjects);
}
+
+ /**
+ * Get priv Apis..
+ *
+ * @access public
+ * @return array
+ */
+ public function getPrivApis()
+ {
+ $libs = $this->loadModel('doc')->getLibs('api');
+ return $this->dao->select('id')->from(TABLE_API)
+ ->where('lib')->in(array_keys($libs))
+ ->fetchAll('id');
+ }
}
diff --git a/module/block/view/docdynamicblock.html.php b/module/block/view/docdynamicblock.html.php
index d3a2c6a51d..a0285848b6 100644
--- a/module/block/view/docdynamicblock.html.php
+++ b/module/block/view/docdynamicblock.html.php
@@ -23,7 +23,8 @@
foreach($actions as $action)
{
$user = zget($users, $action->actor);
- $class = in_array($action->action, array('releaseddoc', 'collected')) ? "active {$action->action}" : '';
+ $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);
diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php
index 4a936125a4..c378b7fa4a 100644
--- a/module/block/view/dynamic.html.php
+++ b/module/block/view/dynamic.html.php
@@ -10,6 +10,9 @@
.block-dynamic .label-action {padding: 0 6px;}
.block-dynamic .label-action + a {padding-left: 6px;}
.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
.timeline > li > div:after {left: -27px;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
.timeline > li > div > .timeline-text > a {color: #313C52;}
@@ -24,8 +27,9 @@
$user = zget($users, $action->actor);
if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = '';
if($action->objectType == 'sonarqubeproject') $action->objectName = $action->extra;
- $class = $action->major ? "class='active'" : '';
- echo "
";
+ $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 "
";
diff --git a/module/company/css/dynamic.css b/module/company/css/dynamic.css
index db83b01397..0be403bb0b 100644
--- a/module/company/css/dynamic.css
+++ b/module/company/css/dynamic.css
@@ -29,6 +29,9 @@
.label-action {padding: 0 4px;}
.label-id {margin-left: 4px;}
.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
.timeline > li > div:after {left: -27px;}
.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php
index b3e4814405..986090e95d 100644
--- a/module/company/view/dynamic.html.php
+++ b/module/company/view/dynamic.html.php
@@ -63,7 +63,9 @@
$action):?>
action == 'adjusttasktowait') continue;?>
-
major) echo "class='active'";?>>
+ major ? 'active' : '';?>
+ action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
+ major) echo "class='$class'";?>>
time?>
diff --git a/module/doc/model.php b/module/doc/model.php
index c1cc8082a9..c958e291d6 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -64,7 +64,7 @@ class docModel extends model
/**
* Get libraries.
*
- * @param string $type
+ * @param string $type all|includeDeleted|hasApi|mine|product|project|execution|custom
* @param string $extra
* @param string $appendLibs
* @param int $objectID
@@ -90,7 +90,7 @@ class docModel extends model
$stmt = $this->dao->select('*')->from(TABLE_DOCLIB)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
- ->beginIF($type)->andWhere('type')->eq($type)->fi()
+ ->beginIF($type != 'hasApi')->andWhere('type')->eq($type)->fi()
->beginIF(!$type)->andWhere('type')->ne('api')->fi()
->beginIF($objectID and strpos(',product,project,execution,', ",$type,") !== false)->andWhere($type)->eq($objectID)->fi()
->orderBy('id_asc')
@@ -723,7 +723,7 @@ class docModel extends model
* @param int $module
* @param string $mode normal|all
* @access public
- * @return void
+ * @return array
*/
public function getPrivDocs($libIdList = array(), $module = 0, $mode = 'normal')
{
@@ -3357,7 +3357,7 @@ class docModel extends model
public function getDynamic($pager = null)
{
$actions = $this->dao->select('*')->from(TABLE_ACTION)
- ->where('objectType')->in('doclib,doc')
+ ->where('objectType')->in('doclib,doc,api')
->andWhere('vision')->eq($this->config->vision)
->orderBy('date_desc')
->page($pager)
diff --git a/module/execution/css/dynamic.css b/module/execution/css/dynamic.css
index 33b2c09989..8ef4ebd3a6 100644
--- a/module/execution/css/dynamic.css
+++ b/module/execution/css/dynamic.css
@@ -26,6 +26,9 @@
.label-action {padding: 0 4px;}
.label-id {margin-left: 4px;}
.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
.timeline > li > div:after {left: -27px;}
.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
diff --git a/module/execution/view/dynamic.html.php b/module/execution/view/dynamic.html.php
index 4de97a121d..edd375b54a 100755
--- a/module/execution/view/dynamic.html.php
+++ b/module/execution/view/dynamic.html.php
@@ -80,7 +80,9 @@
$action):?>
action == 'adjusttasktowait') continue;?>
- major) echo "class='active'";?>>
+ major ? 'active' : '';?>
+ action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
+ major) echo "class='$class'";?>>
time?>
diff --git a/module/my/css/dynamic.css b/module/my/css/dynamic.css
index 4f445adaab..e95b8699ac 100644
--- a/module/my/css/dynamic.css
+++ b/module/my/css/dynamic.css
@@ -25,6 +25,9 @@
.label-action {padding: 0 4px;}
.label-id {margin-left: 4px;}
.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
.timeline > li > div:after {left: -27px;}
.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
diff --git a/module/my/view/dynamic.html.php b/module/my/view/dynamic.html.php
index 56a2ee5219..83b94cf810 100644
--- a/module/my/view/dynamic.html.php
+++ b/module/my/view/dynamic.html.php
@@ -50,7 +50,9 @@
$action):?>
action == 'adjusttasktowait') continue;?>
- major) echo "class='active'";?>>
+ major ? 'active' : '';?>
+ action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
+ major) echo "class='$class'";?>>
time?>
diff --git a/module/product/css/dynamic.css b/module/product/css/dynamic.css
index 620a0e8cfa..8ef4ebd3a6 100644
--- a/module/product/css/dynamic.css
+++ b/module/product/css/dynamic.css
@@ -25,8 +25,11 @@
.timeline-text {margin-left: -18px;}
.label-action {padding: 0 4px;}
.label-id {margin-left: 4px;}
-.timeline >li.active:before {left: -30px;}
-.timeline >li > div:after {left: -27px;}
+.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
+.timeline > li > div:after {left: -27px;}
.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
.timeline > li > div > .timeline-text > a {color: #313C52;}
diff --git a/module/product/view/dynamic.html.php b/module/product/view/dynamic.html.php
index e4c6ec2f71..61948f0229 100755
--- a/module/product/view/dynamic.html.php
+++ b/module/product/view/dynamic.html.php
@@ -78,7 +78,9 @@
$action):?>
- major) echo "class='active'";?>>
+ major ? 'active' : '';?>
+ action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
+ major) echo "class='$class'";?>>
time?>
diff --git a/module/project/css/dynamic.css b/module/project/css/dynamic.css
index 33b2c09989..8ef4ebd3a6 100644
--- a/module/project/css/dynamic.css
+++ b/module/project/css/dynamic.css
@@ -26,6 +26,9 @@
.label-action {padding: 0 4px;}
.label-id {margin-left: 4px;}
.timeline > li.active:before {left: -30px;}
+.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;}
+.timeline > li.collected > div:after {background-color: #FFAF65;}
+.timeline > li.releaseddoc > div:after {background-color: #66A2FF;}
.timeline > li > div:after {left: -27px;}
.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;}
diff --git a/module/project/view/dynamic.html.php b/module/project/view/dynamic.html.php
index 27c7245032..24cab33978 100755
--- a/module/project/view/dynamic.html.php
+++ b/module/project/view/dynamic.html.php
@@ -79,7 +79,9 @@
$action):?>
- major) echo "class='active'";?>>
+ major ? 'active' : '';?>
+ action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
+ major) echo "class='$class'";?>>
time?>