* Finish executionlistblock and projectdynamicblock zin page.
This commit is contained in:
@@ -344,6 +344,9 @@ $config->block->size['scrumproject']['projectdynamic'] = array('1' => '8', '2' =
|
||||
|
||||
$config->block->size['execution']['overview'] = array('1' => '3');
|
||||
$config->block->size['execution']['statistic'] = array('2' => '5', '1' => '8');
|
||||
$config->block->size['execution']['list'] = array('2' => '6', '1' => '6');
|
||||
$config->block->size['execution']['task'] = array('2' => '6', '1' => '6');
|
||||
$config->block->size['execution']['build'] = array('2' => '6', '1' => '6');
|
||||
|
||||
$config->block->size['qa']['statistic'] = array('2' => '5', '1' => '8');
|
||||
$config->block->size['qa']['testtask'] = array('2' => '6', '1' => '6');
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
global $app, $lang;
|
||||
$app->loadLang('execution');
|
||||
|
||||
$config->block->execution = new stdclass();
|
||||
$config->block->execution->dtable = new stdclass();
|
||||
$config->block->execution->dtable->fieldList = array();
|
||||
$config->block->execution->dtable->fieldList['name']['name'] = 'name';
|
||||
$config->block->execution->dtable->fieldList['name']['title'] = $lang->execution->name;
|
||||
$config->block->execution->dtable->fieldList['name']['link'] = array('module' => 'execution', 'method' => 'task', 'params' => 'executionID={id}');
|
||||
$config->block->execution->dtable->fieldList['name']['data-toggle'] = 'modal';
|
||||
$config->block->execution->dtable->fieldList['name']['data-size'] = 'lg';
|
||||
$config->block->execution->dtable->fieldList['name']['type'] = 'title';
|
||||
|
||||
$config->block->execution->dtable->fieldList['end']['name'] = 'end';
|
||||
$config->block->execution->dtable->fieldList['end']['title'] = $lang->execution->end;
|
||||
$config->block->execution->dtable->fieldList['end']['type'] = 'date';
|
||||
$config->block->execution->dtable->fieldList['end']['sortType'] = true;
|
||||
|
||||
$config->block->execution->dtable->fieldList['status']['name'] = 'status';
|
||||
$config->block->execution->dtable->fieldList['status']['title'] = $lang->execution->status;
|
||||
$config->block->execution->dtable->fieldList['status']['type'] = 'status';
|
||||
$config->block->execution->dtable->fieldList['status']['statusMap'] = $lang->execution->statusList;
|
||||
|
||||
$config->block->execution->dtable->fieldList['totalEstimate']['name'] = 'totalEstimate';
|
||||
$config->block->execution->dtable->fieldList['totalEstimate']['title'] = $lang->execution->totalEstimate;
|
||||
$config->block->execution->dtable->fieldList['totalEstimate']['type'] = 'number';
|
||||
$config->block->execution->dtable->fieldList['totalEstimate']['sortType'] = true;
|
||||
|
||||
$config->block->execution->dtable->fieldList['totalConsumed']['name'] = 'totalConsumed';
|
||||
$config->block->execution->dtable->fieldList['totalConsumed']['title'] = $lang->execution->totalConsumed;
|
||||
$config->block->execution->dtable->fieldList['totalConsumed']['type'] = 'number';
|
||||
$config->block->execution->dtable->fieldList['totalConsumed']['sortType'] = true;
|
||||
|
||||
$config->block->execution->dtable->fieldList['progress']['name'] = 'progress';
|
||||
$config->block->execution->dtable->fieldList['progress']['title'] = $lang->execution->progress;
|
||||
$config->block->execution->dtable->fieldList['progress']['type'] = 'progress';
|
||||
$config->block->execution->dtable->fieldList['progress']['sortType'] = true;
|
||||
|
||||
$config->block->execution->dtable->fieldList['burns']['name'] = 'burns';
|
||||
$config->block->execution->dtable->fieldList['burns']['title'] = $lang->execution->burn;
|
||||
$config->block->execution->dtable->fieldList['burns']['type'] = 'burn';
|
||||
$config->block->execution->dtable->fieldList['burns']['sortType'] = true;
|
||||
@@ -33,8 +33,8 @@ panel
|
||||
),
|
||||
dtable
|
||||
(
|
||||
set::bordered(false),
|
||||
set::height(318),
|
||||
set::bordered(false),
|
||||
set::horzScrollbarPos('inside'),
|
||||
set::cols(array_values($config->block->build->dtable->fieldList)),
|
||||
set::data(array_values($builds)),
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The execution block view file of block module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yuting Wang <wangyuting@easycorp.ltd>
|
||||
* @package block
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
|
||||
namespace zin;
|
||||
|
||||
panel
|
||||
(
|
||||
set('headingClass', 'border-b'),
|
||||
set::title($block->title),
|
||||
div
|
||||
(
|
||||
'正在开发中...'
|
||||
)
|
||||
);
|
||||
|
||||
render();
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The executionlist block view file of block module of ZenTaoPMS.
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yuting Wang <wangyuting@easycorp.ltd>
|
||||
* @package block
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
|
||||
namespace zin;
|
||||
|
||||
panel
|
||||
(
|
||||
set::title($block->title),
|
||||
set::class('executionlist-block list-block ' . ($longBlock ? 'block-long' : 'block-sm')),
|
||||
set::headingClass('border-b'),
|
||||
to::headingActions
|
||||
(
|
||||
a
|
||||
(
|
||||
set('class', 'text-gray'),
|
||||
set('href', $block->moreLink),
|
||||
$lang->more,
|
||||
icon('caret-right')
|
||||
)
|
||||
),
|
||||
dtable
|
||||
(
|
||||
set::height(318),
|
||||
set::bordered(false),
|
||||
set::horzScrollbarPos('inside'),
|
||||
set::cols(array_values($config->block->execution->dtable->fieldList)),
|
||||
set::data(array_values($executions)),
|
||||
)
|
||||
);
|
||||
|
||||
render();
|
||||
@@ -10,14 +10,59 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
namespace zin;
|
||||
?>
|
||||
<?php if(empty($actions)): ?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<style>
|
||||
.dynamic-block .timeline > li .timeline-text {max-width: 600px; display: block; white-space: nowrap; overflow: hidden; text-overflow: clip; max-height: 20px;}
|
||||
.dynamic-block .panel-body {padding-top: 0;}
|
||||
.dynamic-block .timeline-text {margin-left: -18px;}
|
||||
.dynamic-block .label-action {padding: 0 6px;}
|
||||
.dynamic-block .label-action + a {padding-left: 6px;}
|
||||
.timeline > li:before, .timeline > li > a:after, .timeline > li > div:after {position: absolute; left: -20px; display: block; width: 15px; height: 15px; content: ' '; border-radius: 50%;}
|
||||
.timeline > li > a:after, .timeline > li > div:after {position: absolute; content: ' '; top: 11px; left: -17px; display: block; z-index: 3; width: 9px; height: 9px; background-color: #2e7fff; border-radius: 50%; opacity: 0;}
|
||||
.timeline > li.active > a:after, .timeline > li.active > div:after {opacity: 1;}
|
||||
.timeline > li.active:before {top: 8px; left: -30px; width: 15px; z-index: 3; height: 15px; background-color: #FFF; border: none;}
|
||||
.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-tag-left {padding-left: 115px;}
|
||||
.timeline > li {position: relative; list-style: none;}
|
||||
.timeline > li:before {position: absolute; content: ' '; border-radius: 50%; display: block; top: 12px; left: -26px; z-index: 3; width: 7px; height: 7px; background-color: #c4c4c4; border: none; border: 1px solid #c4c4c4;}
|
||||
.timeline > li > a, .timeline > li > div {display: block; padding: 5px; line-height: 20px;}
|
||||
.timeline > li + li:after {position: absolute; top: -12px; bottom: 20px; left: -23px; z-index: 1; display: block; content: ' '; border-left: 1px solid #eee;}
|
||||
.timeline-tag { position: absolute; top: 5px; left: -115px; font-size: 12px; }
|
||||
|
||||
</style>
|
||||
<ul class="timeline timeline-tag-left no-margin">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach($actions as $action)
|
||||
{
|
||||
$user = zget($users, $action->actor);
|
||||
if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = '';
|
||||
$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>";
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
panel
|
||||
(
|
||||
set('headingClass', 'border-b'),
|
||||
set('class', 'dynamic-block ' . ($longBlock ? 'block-long' : 'block-sm')),
|
||||
set::title($block->title),
|
||||
div
|
||||
(
|
||||
'正在开发中...'
|
||||
rawContent()
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ panel
|
||||
(
|
||||
set::class('task-block list-block ' . ($longBlock ? 'block-long' : 'block-sm')),
|
||||
set::title($block->title),
|
||||
set('headingClass', 'border-b'),
|
||||
set::headingClass('border-b'),
|
||||
to::headingActions
|
||||
(
|
||||
a
|
||||
@@ -34,7 +34,7 @@ panel
|
||||
),
|
||||
dtable
|
||||
(
|
||||
set::id('task'),
|
||||
set::height(318),
|
||||
set::bordered(false),
|
||||
set::horzScrollbarPos('inside'),
|
||||
set::cols(array_values($config->block->task->dtable->fieldList)),
|
||||
|
||||
+13
-2
@@ -1744,7 +1744,7 @@ class blockZen extends block
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function printExecutionBlock(object $block): void
|
||||
protected function printExecutionListBlock(object $block): void
|
||||
{
|
||||
if(!empty($block->params->type) && preg_match('/[^a-zA-Z0-9_]/', $block->params->type)) return;
|
||||
|
||||
@@ -1757,7 +1757,18 @@ class blockZen extends block
|
||||
|
||||
$projectID = $block->module == 'my' ? 0 : (int)$this->session->project;
|
||||
|
||||
$this->view->executionStats = $this->execution->getStatData($projectID, $status, 0, 0, false, 'skipParent', 'id_asc', $pager);
|
||||
$executions = $this->execution->getStatData($projectID, $status, 0, 0, false, 'skipParent', 'id_asc', $pager);
|
||||
if($executions)
|
||||
{
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$execution->totalEstimate = $execution->hours->totalEstimate;
|
||||
$execution->totalLeft = $execution->hours->totalLeft;
|
||||
$execution->progress = $execution->hours->progress;
|
||||
$execution->burns = !empty($execution->burns) ? join(',', $execution->burns) : array();
|
||||
}
|
||||
}
|
||||
$this->view->executions = $executions ? $executions : array();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user