This commit is contained in:
Yagami
2020-08-21 15:39:55 +08:00
20 changed files with 475 additions and 131 deletions
+24 -2
View File
@@ -1449,14 +1449,34 @@ class block extends control
$this->display();
}
/**
* Print contribute block.
*
* @access public
* @return void
*/
public function printContributeBlock()
{
$this->view->data = $this->block->getContributeBlockData();
}
/**
* Print recent program block.
*
* @access public
* @return void
*/
public function printRecentprogramBlock()
{
$programs = $this->block->getRecentProject();
$this->loadModel('project');
foreach($programs as $programID => $program)
{
$program->teamCount = count($this->project->getTeamMembers($program->id));
}
$this->view->programs = $programs;
}
public function printProgramteamBlock()
@@ -1607,7 +1627,9 @@ class block extends control
*/
public function printScrumprojectBlock()
{
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
$this->view->projectOverview = $this->dao->select('count(*) total, count(if(status="doing", id, null)) as doing, count(if(status="closed", id, null)) as finish')->from(TABLE_PROJECT)
->where('program')->eq($this->session->program)
->fetch();
}
/**
+21
View File
@@ -26,3 +26,24 @@ body {padding-bottom: 20px;}
#dashboard .block-sm .hide-in-sm {display: none;}
#dashboard .block-dynamic .panel-body{overflow-x:hidden;}
.modal-body{padding: 10px 20px 20px 20px;}
#cards {margin: 0 10px;}
#cards > .col {width: 33.33%;}
#cards .panel {margin: 10px 0; border: 1px solid #DCDCDC; border-radius: 2px; box-shadow: none; height: 146px; cursor: pointer;}
#cards .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);}
#cards .panel-heading {padding: 12px 24px 10px 16px;}
#cards .panel-body {padding: 0 16px 16px;}
#cards .panel-actions {padding: 7px 0;}
#cards .panel-actions .dropdown-menu > li > a {padding-left: 5px; text-align: left;}
#cards .panel-actions .dropdown-menu > li > a > i {opacity: .5; display: inline-block; margin-right: 4px; width: 18px; text-align: center;}
#cards .panel-actions .dropdown-menu > li > a:hover > i {opacity: 1;}
#cards .project-type-label {padding: 1px 2px;}
#cards .project-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;}
#cards .project-infos {font-size: 12px;}
#cards .project-infos > span {display: inline-block; line-height: 12px;}
#cards .project-infos > span > .icon {font-size: 12px; display: inline-block; position: relative; top: -1px}
#cards .project-infos > span + span {margin-left: 15px;}
#cards .project-detail {position: absolute; bottom: 16px; left: 16px; right: 16px; font-size: 12px;}
#cards .project-detail > p {margin-bottom: 8px;}
#cards .project-detail .progress {height: 4px;}
#cards .project-detail .progress-text-left .progress-text {width: 50px; left: -50px;}
+2
View File
@@ -50,6 +50,8 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Name';
+2
View File
@@ -50,6 +50,8 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Name';
+2
View File
@@ -50,6 +50,8 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Nom';
+2
View File
@@ -50,6 +50,8 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Tên';
+2
View File
@@ -51,6 +51,8 @@ $lang->block->openedStories = '创建的需求数';
$lang->block->resolvedTasks = '完成的任务数';
$lang->block->resolvedBugs = '解决Bug数';
$lang->block->openedTestcases = '创建用例数';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = '参数名称';
+2
View File
@@ -50,6 +50,8 @@ $lang->block->openedStories = '創建的需求數';
$lang->block->resolvedTasks = '完成的任務數';
$lang->block->resolvedBugs = '解決Bug數';
$lang->block->openedTestcases = '創建用例數';
$lang->block->cmmi = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
$lang->block->params->name = '參數名稱';
+75
View File
@@ -624,6 +624,12 @@ class blockModel extends model
return $blockPairs;
}
/**
* Get contribute block data.
*
* @access public
* @return array
*/
public function getContributeBlockData()
{
$data = array();
@@ -654,6 +660,75 @@ class blockModel extends model
return $data;
}
public function getRecentProject()
{
$projects = $this->loadModel('program')->getUserPrograms('all', 'id_desc', 3);
if(empty($projects)) return array();
$this->loadModel('project');
foreach($projects as $projectID => $project)
{
$project->teamCount = count($this->project->getTeamMembers($project->id));
}
$projectKeys = array_keys($projects);
$hours = array();
$emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0);
/* Get all tasks and compute totalEstimate, totalConsumed, totalLeft, progress according to them. */
$tasks = $this->dao->select('id, project, estimate, consumed, `left`, status, closedReason')
->from(TABLE_TASK)
->where('project')->in($projectKeys)
->andWhere('parent')->lt(1)
->andWhere('deleted')->eq(0)
->fetchGroup('project', 'id');
/* Compute totalEstimate, totalConsumed, totalLeft. */
foreach($tasks as $projectID => $projectTasks)
{
$hour = (object)$emptyHour;
foreach($projectTasks as $task)
{
if($task->status != 'cancel')
{
$hour->totalEstimate += $task->estimate;
$hour->totalConsumed += $task->consumed;
}
if($task->status != 'cancel' and $task->status != 'closed') $hour->totalLeft += $task->left;
}
$hours[$projectID] = $hour;
}
/* Compute totalReal and progress. */
foreach($hours as $hour)
{
$hour->totalEstimate = round($hour->totalEstimate, 1) ;
$hour->totalConsumed = round($hour->totalConsumed, 1);
$hour->totalLeft = round($hour->totalLeft, 1);
$hour->totalReal = $hour->totalConsumed + $hour->totalLeft;
$hour->progress = $hour->totalReal ? round($hour->totalConsumed / $hour->totalReal, 3) * 100 : 0;
}
/* Process projects. */
foreach($projects as $key => $project)
{
// Process the end time.
$project->end = date(DT_DATE1, strtotime($project->end));
/* Judge whether the project is delayed. */
if($project->status != 'done' and $project->status != 'closed' and $project->status != 'suspended')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
/* Process the hours. */
$project->hours = isset($hours[$project->id]) ? $hours[$project->id] : (object)$emptyHour;
}
return $projects;
}
/**
* Build number params.
*
@@ -0,0 +1,58 @@
<div class='row cell' id='cards'>
<?php foreach ($programs as $projectID => $project):?>
<div class='col'>
<div class='panel'>
<div class='panel-heading'>
<?php if($project->template === 'cmmi'): ?>
<span class='project-type-label label label-warning label-outline'><?php echo $lang->block->cmmi; ?></span>
<?php else: ?>
<span class='project-type-label label label-info label-outline'><?php echo $lang->block->scrum; ?></span>
<?php endif; ?>
<strong class='project-name' title='<?php echo $project->name;?>'><?php echo $project->name;?></strong>
<nav class='panel-actions nav nav-default'>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
<ul class='dropdown-menu pull-right'>
<li><?php common::printIcon('program', 'group', "projectID=$project->id", $project, 'button', 'group');?></li>
<li><?php common::printIcon('program', 'manageMembers', "projectID=$project->id", $project, 'button', 'persons');?></li>
<li><?php common::printicon('program', 'activate', "projectid=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('program', 'edit')) echo html::a($this->createLink("program", "edit", "projectID=$project->id"), "<i class='icon-edit'></i> " . $lang->edit, '', "");?></li>
<li><?php common::printIcon('program', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('program', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php common::printIcon('program', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);?></li>
<li><?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("project", "delete", "projectID=$project->id"), "<i class='icon-trash'></i> " . $lang->delete, 'hiddenwin', "");?></li>
</ul>
</li>
</nav>
</div>
<div class='panel-body'>
<div class='project-infos'>
<span><i class='icon icon-group'></i> <?php printf($lang->program->membersUnit, $project->teamCount); ?></span>
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $project->hours->totalEstimate); ?></span>
<span><i class='icon icon-cost'></i> <?php echo $project->budget . '' . zget($lang->program->unitList, $project->budgetUnit);?></span>
</div>
<?php if($project->template === 'cmmi'): ?>
<div class='project-detail project-stages'>
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
<div class='label label-outline'><?php echo zget($lang->project->statusList, $project->status);?></div>
</div>
<?php else: ?>
<div class='project-detail project-iteration'>
<p class='text-muted'><?php echo $lang->program->lastIteration; ?></p>
<div class='row'>
<div class='col-xs-5'><?php echo $project->name; ?></div>
<div class='col-xs-7'>
<div class="progress progress-text-left">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $project->hours->progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $project->hours->progress;?>%">
<span class="progress-text"><?php echo $project->hours->progress;?>%</span>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach;?>
</div>
@@ -0,0 +1,47 @@
<?php
/**
* The testtask block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package block
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php if(empty($projectOverview)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.status-bars {
display: table;
width: 60%;
height: 140px;
padding: 5px;
padding-top: 50px;
margin: 0;
overflow: hidden;
}
</style>
<div class="panel-body table-row">
<div class="col-4 text-middle text-center">
<div class="tile">
<div class="tile-title">所有阶段</div>
<div class="tile-amount">25</div>
</div>
</div>
<div class="col-8 text-middle">
<ul class="status-bars" style="transform: rotate(90deg);">
<li>
<span class="bar" style="height: 0%"><span class="value">0</span></span>
<span class="title">进行中</span>
</li>
<li>
<span class="bar" style="height: 100%"><span class="value">100</span></span>
<span class="title">已挂起</span>
</li>
</ul>
</div>
</div>
<?php endif;?>
+34 -5
View File
@@ -1,12 +1,41 @@
<?php
$config->issue->create = new stdclass();
$config->issue->edit = new stdclass();
$config->issue->create = new stdclass();
$config->issue->edit = new stdclass();
$config->issue->create->requiredFields = 'title,type,severity';
$config->issue->edit->requiredFields = 'title,type,severity';
$config->issue->create->requiredFields = 'title,type,severity';
$config->issue->edit->requiredFields = 'title,type,severity';
$config->issue->editor = new stdclass();
$config->issue->editor = new stdclass();
$config->issue->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools');
$config->issue->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->cancel = array('id' => 'desc', 'tools' => 'simpleTools');
$config->issue->editor->resolve = array('id' => 'spec,steps,desc,resolutionComment', 'tools' => 'simpleTools');
global $lang;
$config->issue->search['module'] = 'issue';
$config->issue->search['fields']['title'] = $lang->issue->title;
$config->issue->search['fields']['id'] = $lang->issue->id;
$config->issue->search['fields']['pri'] = $lang->issue->pri;
$config->issue->search['fields']['severity'] = $lang->issue->severity;
$config->issue->search['fields']['type'] = $lang->issue->type;
$config->issue->search['fields']['ceratedBy'] = $lang->issue->createdBy;
$config->issue->search['fields']['createdDate'] = $lang->issue->createdDate;
$config->issue->search['fields']['closeBy'] = $lang->issue->closeBy;
$config->issue->search['fields']['closedDate'] = $lang->issue->closedDate;
$config->issue->search['fields']['assignedTo'] = $lang->issue->assignedTo;
$config->issue->search['fields']['assignedDate'] = $lang->issue->assignedDate;
$config->issue->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->issue->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
$config->issue->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->issue->priList);
$config->issue->search['params']['severity'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->issue->severityList);
$config->issue->search['params']['type'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->issue->typeList);
$config->issue->search['params']['ceratedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->issue->search['params']['createdDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->issue->search['params']['closeBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->issue->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->issue->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->issue->search['params']['assignedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
+10 -3
View File
@@ -15,6 +15,7 @@ class issue extends control
* Get issue list data.
*
* @param string $browseType
* @param int param
* @param string orderBy
* @param int recTotal
* @param int recPerPage
@@ -22,13 +23,18 @@ class issue extends control
* @access public
* @return void
*/
public function browse($browseType = 'all', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$browseType = strtolower($browseType);
/* Load pager */
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Build the search form. */
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('issue', 'browse', "browseType=bysearch&queryID=myQueryID");
$this->issue->buildSearchForm($actionURL, $queryID);
$this->view->title = $this->lang->issue->common . $this->lang->colon . $this->lang->issue->browse;
$this->view->position[] = $this->lang->issue->browse;
@@ -36,9 +42,10 @@ class issue extends control
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->issueList = $this->issue->getIssueList($browseType, $orderBy, $pager);
$this->view->issueList = $this->issue->getIssueList($browseType, $queryID, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->display();
@@ -80,7 +87,7 @@ class issue extends control
if($_POST)
{
$results = $this->issue->batchCreate();
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('browse', 'browseType=all')));
}
+1
View File
@@ -31,6 +31,7 @@ $lang->issue->resolved = '解决';
$lang->issue->id = '编号';
$lang->issue->delete = '删除';
$lang->issue->search = '搜索';
$lang->issue->basicInfo = '基本信息';
$lang->issue->active = '激活';
$lang->issue->assign = '指派';
+59 -2
View File
@@ -57,17 +57,53 @@ class issueModel extends model
return $issueID;
}
/**
* Get stakeholder issue list data.
* @param string $owner
* @param string $activityID
* @param object $pager
*
* @access public
* @return object
*/
public function getStakeholderIssue($owner = '', $activityID = 0, $pager = null)
{
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
->where('deleted')->eq('0')
->beginIF($owner)->andWhere('owner')->eq($owner)->fi()
->beginIF($activityID)->andWhere('activity')->eq($activityID)->fi()
->orderBy('id_desc')
->page($pager)
->fetchAll();
return $issueList;
}
/**
* Get question list data.
*
* @param string $browseType
* @param int $queryID
* @param string $orderBy
* @param object $pager
* @access public
* @return object
*/
public function getIssueList($browseType = 'all', $orderBy = 'id_desc', $pager = null)
public function getIssueList($browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null)
{
$issueQuery = '';
if($browseType == 'bysearch')
{
$query = $queryID ? $this->loadModel('search')->getQuery($queryID) : '';
if($query)
{
$this->session->set('issueQuery', $query->sql);
$this->session->set('issueForm', $query->form);
}
if($this->session->issueQuery == false) $this->session->set('issueQuery', ' 1=1');
$issueQuery = $this->session->issueQuery;
}
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
->where('program')->eq($this->session->program)
->andWhere('deleted')->eq('0')
@@ -76,6 +112,7 @@ class issueModel extends model
->beginIF($browseType == 'closed')->andWhere('status')->eq('closed')->fi()
->beginIF($browseType == 'suspended')->andWhere('status')->eq('suspended')->fi()
->beginIF($browseType == 'cancelled')->andWhere('status')->eq('canceled')->fi()
->beginIF($browseType == 'bysearch')->andWhere($issueQuery)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
@@ -83,6 +120,11 @@ class issueModel extends model
return $issueList;
}
public function getActivityList()
{
return $this->dao->select('id,name')->from(TABLE_ACTIVITY)->where('deleted')->eq('0')->orderBy('id_desc')->fetchPairs();
}
public function getBlockIssues($browseType = 'all', $limit = 15, $orderBy = 'id_desc')
{
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
@@ -268,7 +310,7 @@ class issueModel extends model
foreach(explode(',',$this->config->issue->create->requiredFields) as $field)
{
$field = trim($field);
if($field and empty($issue["$field"])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->issue->$field)));
if($field and empty($issue["$field"])) return dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->issue->$field);
}
$issues[] = $issue;
@@ -353,4 +395,19 @@ class issueModel extends model
return $this->dao->lastInsertID();
}
/**
* Build search form.
*
* @param string $actionURL
* @param int $queryID
* @access public
* @return void
*/
public function buildSearchForm($actionURL, $queryID)
{
$this->config->issue->search['actionURL'] = $actionURL;
$this->config->issue->search['queryID'] = $queryID;
$this->loadModel('search')->setSearchParams($this->config->issue->search);
}
}
+19 -12
View File
@@ -20,6 +20,7 @@
echo html::a($this->createLink('issue', 'browse', 'browseType=' . $label), '<span class="text">' . $labelName . '</span>', '', "class='btn btn-link $active'");
}
?>
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->issue->search;?></a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('issue', 'create', '', "<i class='icon icon-plus'></i>" . $lang->issue->create, '', "class='btn btn-primary'");?>
@@ -28,22 +29,23 @@
</div>
<div id="mainContent" class="main-row">
<div class="main-col">
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module="issue"></div>
<?php if($issueList):?>
<form class="main-table" data-ride="table" method="post" id="issueForm">
<table id="issueList" class="table has-sort-head" id="issueTable">
<thead>
<tr>
<?php $vars = "browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class="c-id w-40px"><?php echo common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class="w-40px"><?php echo $lang->issue->type;?></th>
<th class="w-100px"><?php echo $lang->issue->title;?></th>
<th class="w-40px"><?php echo $lang->issue->severity;?></th>
<th class="w-40px"><?php echo $lang->issue->pri;?></th>
<th class="w-60px"><?php echo $lang->issue->assignedTo;?></th>
<th class="w-60px"><?php echo $lang->issue->owner;?></th>
<th class="w-60px"><?php echo $lang->issue->status;?></th>
<th class="w-80px"><?php echo $lang->issue->createdDate;?></th>
<th class="c-actions w-100px"><?php echo $lang->actions;?></th>
<?php $vars = "browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class="c-id w-60px"><?php echo common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class="w-80px"><?php echo $lang->issue->type;?></th>
<th style="width:auto"><?php echo $lang->issue->title;?></th>
<th class="w-60px"><?php echo $lang->issue->severity;?></th>
<th class="w-60px"><?php echo $lang->issue->pri;?></th>
<th class="w-80px"><?php echo $lang->issue->assignedTo;?></th>
<th class="w-80px"><?php echo $lang->issue->owner;?></th>
<th class="w-100px"><?php echo $lang->issue->status;?></th>
<th class="w-140px"><?php echo $lang->issue->createdDate;?></th>
<th class="c-actions w-200px"><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -51,7 +53,7 @@
<tr>
<td class="c-id"><?php printf('%03d', $issue->id);?></td>
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
<td title="<?php echo $issue->title;?>"><?php common::printLink('issue', 'view', "id=$issue->id", $issue->title);?></td>
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php common::printLink('issue', 'view', "id=$issue->id", $issue->title);?></td>
<td title="<?php echo $issue->severity;?>"><?php echo $issue->severity;?></td>
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
<td title="<?php echo zget($users, $issue->assignedTo);?>"><?php echo zget($users, $issue->assignedTo);?></td>
@@ -74,6 +76,11 @@
<?php endforeach;?>
</tbody>
</table>
<?php if($issueList):?>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
<?php else:?>
<div class="table-empty-tip"><?php echo $lang->noData;?></div>
+26 -10
View File
@@ -13,10 +13,10 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class="main-content" id="mainCentent">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->issue->create;?></h2>
</div>
<div class="panel-heading">
<strong><?php echo $lang->issue->create;?></strong>
</div>
<div class="panel-body">
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
<table class="table table-form">
<tbody>
@@ -44,18 +44,34 @@
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->deadline;?></th>
<td><?php echo html::input('deadline', '', 'class="form-control form-date"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->issue->deadline;?></th>
<td><?php echo html::input('deadline', '', 'class="form-control form-date"');?></td>
<td></td>
<td></td>
</tr>
<?php if(isset($owner) && $owner):?>
<tr>
<th><?php echo $lang->issue->owner;?></th>
<td><?php echo html::select('owner', $users, $account, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<?php endif;?>
<?php if(isset($activityID) && $activityID):?>
<tr>
<th><?php echo $lang->issue->activity;?></th>
<td><?php echo html::select('activity', $activity, $activityID, 'class="form-control chosen"');?></td>
<td></td>
<td></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->issue->desc;?></th>
<td colspan="3"><?php echo html::textarea('desc', '', 'row="6"');?></td>
+4 -4
View File
@@ -13,10 +13,10 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div class="main-content" id="mainCentent">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->issue->edit;?></h2>
</div>
<div class="panel-heading">
<strong><?php echo $lang->issue->edit;?></strong>
</div>
<div class="panel-body">
<form method="post" class="main-form form-ajax" enctype="multipart/form-data" id="issueForm">
<table class="table table-form">
<tbody>
+84 -92
View File
@@ -19,7 +19,7 @@ $createLink = $this->createLink('issue', 'create');
$dateFiled = array('deadline', 'resolvedDate', 'createdDate', 'editedDate', 'activateDate', 'closedDate', 'assignedDate');
foreach($issue as $field => $value)
{
if(in_array($field, $dateFiled) && strpos($value, '0000') === 0) $issue->$field = '';
if(in_array($field, $dateFiled) && strpos($value, '0000') === 0) $issue->$field = '';
}
?>
<div id="mainMenu" class="clearfix">
@@ -40,10 +40,6 @@ foreach($issue as $field => $value)
<div class="main-row" id="mainContent">
<div class="main-col col-8">
<div class="cell">
<div class="detail">
<p><strong><?php echo $lang->issue->title;?></strong> - <?php echo $issue->title?></p>
<p><strong><?php echo $lang->issue->deadline;?></strong> - <?php echo $issue->deadline;?></p>
</div>
<div class="detail">
<div class="detail-title"><?php echo $lang->issue->desc;?></div>
<div class="detail-content article-content">
@@ -56,93 +52,89 @@ foreach($issue as $field => $value)
</div>
<div class="side-col col-4">
<div class="cell">
<div class="tabs">
<ul class="nav nav-tabs">
<li class="active">
<a href="#basicInfo" data-toggle="tab"><?php echo $lang->issue->basicInfo;?></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="basicInfo">
<table class="table table-data">
<tbody>
<tr valign="middle">
<th class="thWidth w-100px"><?php echo $lang->issue->id;?></th>
<td><?php echo $issue->id;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->type;?></th>
<td><?php echo zget($lang->issue->typeList, $issue->type);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->severity;?></th>
<td><?php echo $issue->severity;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->pri;?></th>
<td><?php echo $issue->pri;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->resolvedDate;?></th>
<td><?php echo $issue->resolvedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->owner;?></th>
<td><?php echo zget($users, $issue->owner);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo zget($users, $issue->assignedTo);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->createdBy;?></th>
<td><?php echo zget($users, $issue->createdBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->createdDate;?></th>
<td><?php echo $issue->createdDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->editedBy;?></th>
<td><?php echo zget($users, $issue->editedBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->editedDate;?></th>
<td><?php echo $issue->editedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedBy;?></th>
<td><?php echo zget($users, $issue->assignedBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedDate;?></th>
<td><?php echo $issue->assignedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->closedDate;?></th>
<td><?php echo $issue->closedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->activateBy;?></th>
<td><?php echo zget($users, $issue->activateBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->activateDate;?></th>
<td><?php echo $issue->activateDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->closeBy;?></th>
<td><?php echo zget($users, $issue->closeBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->status;?></th>
<td><?php echo zget($lang->issue->statusList, $issue->status);?></td>
</tr>
</tbody>
</table>
</div>
</div>
<details class="detail" open="">
<summary class="detail-title"><?php echo $lang->issue->basicInfo;?></summary>
<div class="detail-content">
<table class="table table-data">
<tbody>
<tr valign="middle">
<th class="thWidth w-100px"><?php echo $lang->issue->id;?></th>
<td><?php echo $issue->id;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->type;?></th>
<td><?php echo zget($lang->issue->typeList, $issue->type);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->severity;?></th>
<td><?php echo $issue->severity;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->pri;?></th>
<td><?php echo $issue->pri;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->deadline;?></th>
<td><?php echo $issue->deadline;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->resolvedDate;?></th>
<td><?php echo $issue->resolvedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->owner;?></th>
<td><?php echo zget($users, $issue->owner);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedTo;?></th>
<td><?php echo zget($users, $issue->assignedTo);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->createdBy;?></th>
<td><?php echo zget($users, $issue->createdBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->createdDate;?></th>
<td><?php echo $issue->createdDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->editedBy;?></th>
<td><?php echo zget($users, $issue->editedBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->editedDate;?></th>
<td><?php echo $issue->editedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedBy;?></th>
<td><?php echo zget($users, $issue->assignedBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->assignedDate;?></th>
<td><?php echo $issue->assignedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->closedDate;?></th>
<td><?php echo $issue->closedDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->activateBy;?></th>
<td><?php echo zget($users, $issue->activateBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->activateDate;?></th>
<td><?php echo $issue->activateDate;?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->closeBy;?></th>
<td><?php echo zget($users, $issue->closeBy);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->status;?></th>
<td><?php echo zget($lang->issue->statusList, $issue->status);?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
+1 -1
View File
@@ -40,7 +40,7 @@ $lang->risk->cancelDate = '取消日期';
$lang->risk->cancelReason = '取消原因';
$lang->risk->resolvedBy = '解决者';
$lang->risk->closedDate = '关闭日期';
$lang->risk->actualClosedDate = '关闭日期';
$lang->risk->actualClosedDate = '实际关闭日期';
$lang->risk->resolution = '解决措施';
$lang->risk->hangupBy = '由谁挂起';
$lang->risk->hangupDate = '挂起日期';