Merge branch 'tsj_task' into 'master'
* Code f or dynamic See merge request easycorp/zentaopms!7374
This commit is contained in:
@@ -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,';
|
||||
|
||||
@@ -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]))
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 "<li class='$class'><div>";
|
||||
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);
|
||||
|
||||
@@ -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 "<li $class><div>";
|
||||
$class = $action->major ? 'active' : '';
|
||||
if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";
|
||||
echo "<li class='$class'><div>";
|
||||
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 "</div></li>";
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -63,7 +63,9 @@
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if($action->action == 'adjusttasktowait') continue;?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<?php $class = $action->major ? 'active' : '';?>
|
||||
<?php if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
|
||||
<li <?php if($action->major) echo "class='$class'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -80,7 +80,9 @@
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if($action->action == 'adjusttasktowait') continue;?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<?php $class = $action->major ? 'active' : '';?>
|
||||
<?php if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
|
||||
<li <?php if($action->major) echo "class='$class'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if($action->action == 'adjusttasktowait') continue;?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<?php $class = $action->major ? 'active' : '';?>
|
||||
<?php if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
|
||||
<li <?php if($action->major) echo "class='$class'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -78,7 +78,9 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<?php $class = $action->major ? 'active' : '';?>
|
||||
<?php if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
|
||||
<li <?php if($action->major) echo "class='$class'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
@@ -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;}
|
||||
|
||||
@@ -79,7 +79,9 @@
|
||||
<?php if($direction == 'next') $actions = array_reverse($actions);?>
|
||||
<?php foreach($actions as $i => $action):?>
|
||||
<?php if(empty($firstAction)) $firstAction = $action;?>
|
||||
<li <?php if($action->major) echo "class='active'";?>>
|
||||
<?php $class = $action->major ? 'active' : '';?>
|
||||
<?php if(in_array($action->action, array('releaseddoc', 'collected'))) $class .= " {$action->action}";?>
|
||||
<li <?php if($action->major) echo "class='$class'";?>>
|
||||
<div>
|
||||
<span class="timeline-tag"><?php echo $action->time?></span>
|
||||
<span class="timeline-text">
|
||||
|
||||
Reference in New Issue
Block a user