Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -1301,11 +1301,22 @@ class block extends control
|
||||
*/
|
||||
public function printScrumdynamicBlock()
|
||||
{
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 30, 1);
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
$this->view->actions = $this->loadModel('action')->getDynamic('all', 'today', 'date_desc', $pager);
|
||||
$actions = array();
|
||||
if(!empty($projects) || !empty($products))
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->beginIF($projects && $products)->where('project')->in(array_keys($projects))->orWhere('product')->in(array_keys($products))->fi()
|
||||
->beginIF($projects && empty($products))->where('project')->in(array_keys($projects))->fi()
|
||||
->beginIF(empty($projects) && $products)->where('product')->in(array_keys($products))->fi()
|
||||
->orderBy('id_desc')
|
||||
->limit(30)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
$this->view->actions = empty($actions) ? array() : $this->loadModel('action')->transformActions($actions);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
}
|
||||
|
||||
@@ -1657,7 +1668,7 @@ class block extends control
|
||||
$num = isset($this->params->num) ? (int)$this->params->num : 15;
|
||||
|
||||
/* Get projects. */
|
||||
$this->view->programs = $this->loadModel('program')->getUserPrograms('all', 'id_desc', $num);
|
||||
$this->view->programs = $this->loadModel('program')->getUserPrograms('doing', 'id_desc', $num);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,9 +119,9 @@ $lang->block->default['cmmi']['program']['5']['params']['num'] = '15';
|
||||
$lang->block->default['cmmi']['program']['5']['params']['orderBy'] = 'id_desc';
|
||||
|
||||
$lang->block->default['cmmi']['program']['6']['title'] = '最新动态';
|
||||
$lang->block->default['cmmi']['program']['6']['block'] = 'dynamic';
|
||||
$lang->block->default['cmmi']['program']['6']['block'] = 'scrumdynamic';
|
||||
$lang->block->default['cmmi']['program']['6']['grid'] = 4;
|
||||
$lang->block->default['cmmi']['program']['6']['source'] = '';
|
||||
$lang->block->default['cmmi']['program']['6']['source'] = 'program';
|
||||
|
||||
$lang->block->default['cmmi']['program']['7']['title'] = '项目风险';
|
||||
$lang->block->default['cmmi']['program']['7']['block'] = 'cmmirisk';
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<div class="panel-body">
|
||||
<div id='cmmiGantt'>
|
||||
<?php if(count($products) > 2): ?>
|
||||
<?php echo html::select('cmmiGanttProductID', $products, $productID, "class='form-control chosen'"); ?>
|
||||
<?php endif;?>
|
||||
<?php if(empty($plans['data'])): ?>
|
||||
<div class='empty-tip'><?php echo $lang->programplan->noData;?></div>
|
||||
<?php else:?>
|
||||
|
||||
@@ -29,23 +29,23 @@
|
||||
<div class="text-left" id="totalInvestment"><strong><?php echo $lang->block->totalInvestment;?></strong></div>
|
||||
<div class="table-row">
|
||||
<div class="col-4 tile">
|
||||
<div class="overview-title"><i class="icon-program-group icon-group"></i><?php echo $lang->block->totalPeople;?></div>
|
||||
<div class="overview-title"><i class="icon-program-group icon-group"></i> <?php echo $lang->block->totalPeople;?></div>
|
||||
<div class="tile-amount">
|
||||
<?php echo $totalData[$programID]->teamCount ? html::a($this->createLink('program', 'manageMembers', 'programID=' . $programID), $totalData[$programID]->teamCount) : 0;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 tile">
|
||||
<div class="overview-title"><i class="icon icon-time"></i><?php echo $lang->block->consumedHours;?></div>
|
||||
<div class="tile-amount"><a href="/my-task-assignedTo.html"><?php echo $totalData[$programID]->consumed;?></a>
|
||||
<div class="overview-title"><i class="icon icon-clock"></i> <?php echo $lang->block->consumedHours;?></div>
|
||||
<div class="tile-amount">
|
||||
<?php echo $totalData[$programID]->consumed ? html::a($this->createLink('project', 'index', 'locate=no'), $totalData[$programID]->consumed) : 0;?>
|
||||
</div>
|
||||
<div class="tile-info">
|
||||
<span class="extra-tips"><?php echo $lang->block->estimatedHours;?> <?php echo $totalData[$programID]->estimate;?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 tile">
|
||||
<div class="overview-title"><i class="icon icon-circle"></i><?php echo $lang->block->spent;?></div>
|
||||
<div class="tile-amount"><a href="/my-task-assignedTo.html">¥0</a>
|
||||
</div>
|
||||
<div class="overview-title"><i class="icon icon-cost"></i> <?php echo $lang->block->spent;?></div>
|
||||
<div class="tile-amount">¥0</div>
|
||||
<div class="tile-info">
|
||||
<span class="extra-tips"><?php echo $lang->block->budget;?> ¥<?php echo $totalData[$programID]->budget;?></span>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@
|
||||
<div class="col-3 total-block">
|
||||
<div><strong><?php echo $lang->block->totalBug;?></strong></div>
|
||||
<div class="tile-amount">
|
||||
<?php echo $totalData[$programID]->allBugs ? html::a($this->createLink('qa', 'index', 'pgm=' . $programID), $totalData[$programID]->allBugs) : 0;?>
|
||||
<?php echo $totalData[$programID]->allBugs ? html::a($this->createLink('qa', 'index'), $totalData[$programID]->allBugs) : 0;?>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $totalData[$programID]->doneBugs;?>" aria-valuemin="0" aria-valuemax="<?php echo $totalData[$programID]->allBugs;?>" style="width: <?php echo floor(($totalData[$programID]->doneBugs/$totalData[$programID]->allBugs)*100).'%';?>"></div>
|
||||
|
||||
@@ -36,36 +36,30 @@
|
||||
<?php else:?>
|
||||
<div class="release-path">
|
||||
<ul class="release-line">
|
||||
<?php foreach($roadmaps as $year => $mapBranches):?>
|
||||
<?php foreach($mapBranches as $plans):?>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<?php if(isset($plan->begin)):?>
|
||||
<li <?php if(date('Y-m-d') < $plan->begin) echo 'class="active"';?>>
|
||||
<a href="<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->title;?>"><?php echo $plan->title;?></span>
|
||||
<?php
|
||||
$plan->begin = date('Y/m/d', strtotime($plan->begin));
|
||||
$plan->end = '-' . date('m/d', strtotime($plan->end));
|
||||
?>
|
||||
<span class="date" title="<?php echo $plan->begin . $plan->end;?>"><?php echo $plan->begin . $plan->end;?></span>
|
||||
<span class="date"><?php echo $lang->block->estimatedHours;?> <?php echo $plan->hour;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php else:?>
|
||||
<li>
|
||||
<a href="<?php echo $this->createLink('release', 'view', "releaseID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->name;?>"><?php echo $plan->name . "($plan->buildName)";?></span>
|
||||
<?php
|
||||
$plan->date = date('Y/m/d', strtotime($plan->date));
|
||||
?>
|
||||
<span class="date" title="<?php echo $plan->date;?>"><?php echo $plan->date;?></span>
|
||||
<?php $estimate = empty($plan->stories) ? 0 : $this->block->getStorysEstimateHours(explode(',', $plan->stories));?>
|
||||
<span class="date"><?php echo $lang->block->consumedHours;?> <?php echo empty($estimate) ? 0 : $estimate;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
<?php foreach($roadmaps as $plan):?>
|
||||
<?php if(isset($plan->begin)):?>
|
||||
<li <?php if(date('Y-m-d') < $plan->begin) echo 'class="active"';?>>
|
||||
<a href="<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->title;?>"><?php echo $plan->title;?></span>
|
||||
<?php
|
||||
$plan->begin = date('Y/m/d', strtotime($plan->begin));
|
||||
$plan->end = '-' . date('m/d', strtotime($plan->end));
|
||||
?>
|
||||
<span class="date" title="<?php echo $plan->begin . $plan->end;?>"><?php echo $plan->begin . $plan->end;?></span>
|
||||
<span class="date"><?php echo $lang->block->estimatedHours;?> <?php echo $plan->hour;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php else:?>
|
||||
<li>
|
||||
<a href="<?php echo $this->createLink('release', 'view', "releaseID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->name;?>"><?php echo $plan->name . "($plan->buildName)";?></span>
|
||||
<?php $plan->date = date('Y/m/d', strtotime($plan->date));?>
|
||||
<span class="date" title="<?php echo $plan->date;?>"><?php echo $plan->date;?></span>
|
||||
<?php $estimate = empty($plan->stories) ? 0 : $this->block->getStorysEstimateHours(explode(',', $plan->stories));?>
|
||||
<span class="date"><?php echo $lang->block->consumedHours;?> <?php echo empty($estimate) ? 0 : $estimate;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1126,7 +1126,6 @@ $lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|
|
||||
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->weekly->menu->browse = '周报|weekly|index|program={PROGRAM}';
|
||||
$lang->weekly->menu->issue = '里程碑报告|milestone|index|program={PROGRAM}';
|
||||
|
||||
$lang->cmmiproduct->menu->plan = array('link' => '排期|productplan|browse|productID={PRODUCT}', 'subModule' => 'productplan');
|
||||
$lang->cmmiproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement';
|
||||
|
||||
@@ -354,11 +354,11 @@ class custom extends control
|
||||
* @return void
|
||||
*/
|
||||
public function estimate()
|
||||
{
|
||||
{
|
||||
$this->lang->custom->menu = new stdclass();
|
||||
$this->lang->navGroup->custom = 'system';
|
||||
if(strtolower($this->server->request_method) == "post")
|
||||
{
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->loadModel('setting')->setItem('system.custom.hourPoint', $data->hourPoint);
|
||||
$this->loadModel('setting')->setItem('system.custom.cost', $data->cost);
|
||||
@@ -368,11 +368,11 @@ class custom extends control
|
||||
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'estimate')));
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadConfig('project');
|
||||
|
||||
$this->view->unit = zget($this->config->custom, 'hourPoint', '1');
|
||||
$this->view->unit = zget($this->config->custom, 'hourPoint', '1');
|
||||
$this->view->cost = zget($this->config->custom, 'cost', '');
|
||||
$this->view->efficiency = zget($this->config->custom, 'efficiency', '');
|
||||
$this->view->hours = zget($this->config->project, 'defaultWorkhours', '');
|
||||
|
||||
@@ -362,7 +362,7 @@ class customModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get system swapper.
|
||||
* Get system swapper.
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @access public
|
||||
@@ -370,8 +370,8 @@ class customModel extends model
|
||||
*/
|
||||
public function getSwapper()
|
||||
{
|
||||
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'scrum' : 'cmmi';
|
||||
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'SCRUM');
|
||||
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'Scrum' : 'CMMI';
|
||||
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
|
||||
|
||||
$output = "<div class='btn-group' id='swapper'><button data-toggle='dropdown' type='button' class='btn btn-limit' title='{$current}'>{$current} <i class='icon icon-swap'></i></button>";
|
||||
$output .= "<ul class='dropdown-menu'><li>" . $link . "</li></ul>";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$config->design = new stdclass();
|
||||
$config->design->editor = new stdclass();
|
||||
$config->design->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->assignto = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
|
||||
$config->design->affectedFixedNum = 7;
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class design extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -238,7 +239,7 @@ class design extends control
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->design->linkCommit($designID);
|
||||
$this->design->linkCommit($designID, $repoID);
|
||||
|
||||
$result['result'] = 'success';
|
||||
$result['message'] = $this->lang->saveSuccess;
|
||||
@@ -294,4 +295,37 @@ class design extends control
|
||||
die(js::locate($this->session->designList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update assign of design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function assignTo($designID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->design->assign($designID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action');
|
||||
if(!empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('design', $designID, 'Assigned', $this->post->comment, $this->post->assignedTo);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('design', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->design->assignedTo;
|
||||
$this->view->position[] = $this->lang->design->assignedTo;
|
||||
|
||||
$this->view->design = $this->design->getById($designID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ $lang->design->reviewObject = 'Review Object';
|
||||
$lang->design->createdBy = 'CreatedBy';
|
||||
$lang->design->createdDate = 'CreatedDate';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->assignTo = 'Assign';
|
||||
$lang->design->noAssigned = 'Unassigned';
|
||||
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
|
||||
@@ -45,6 +45,8 @@ $lang->design->reviewObject = '评审对象';
|
||||
$lang->design->createdBy = '由谁创建';
|
||||
$lang->design->createdDate = '创建时间';
|
||||
$lang->design->basicInfo = '基本信息';
|
||||
$lang->design->assignTo = '指派';
|
||||
$lang->design->noAssigned = '未指派';
|
||||
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
|
||||
+56
-2
@@ -137,10 +137,11 @@ class designModel extends model
|
||||
* LinkCommit a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCommit($designID)
|
||||
public function linkCommit($designID, $repoID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andWhere('relation')->eq('completedin')->exec();
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('BType')->eq('design')->andWhere('relation')->eq('completedfrom')->exec();
|
||||
@@ -156,7 +157,7 @@ class designModel extends model
|
||||
$data->BType = 'commit';
|
||||
$data->BID = $revision;
|
||||
$data->relation = 'completedin';
|
||||
$data->extra = $this->session->repoID;
|
||||
$data->extra = $repoID;
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($data)->autoCheck()->exec();
|
||||
|
||||
@@ -347,4 +348,57 @@ class designModel extends model
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->design->search);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print assignedTo html
|
||||
*
|
||||
* @param int $design
|
||||
* @param int $users
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function printAssignedHtml($design, $users)
|
||||
{
|
||||
$btnTextClass = '';
|
||||
$assignedToText = zget($users, $design->assignedTo);
|
||||
|
||||
if(empty($design->assignedTo))
|
||||
{
|
||||
$btnTextClass = 'text-primary';
|
||||
$assignedToText = $this->lang->design->noAssigned;
|
||||
}
|
||||
if($design->assignedTo == $this->app->user->account) $btnTextClass = 'text-red';
|
||||
|
||||
$btnClass = $design->assignedTo == 'closed' ? ' disabled' : '';
|
||||
$btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}";
|
||||
$assignToLink = helper::createLink('design', 'assignTo', "designID=$design->id", '', true);
|
||||
$assignToHtml = html::a($assignToLink, "<i class='icon icon-hand-right'></i> <span title='" . zget($users, $design->assignedTo) . "' class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='$btnClass'");
|
||||
|
||||
echo !common::hasPriv('design', 'assignTo', $design) ? "<span style='padding-left: 21px' class='{$btnTextClass}'>{$assignedToText}</span>" : $assignToHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return array|bool
|
||||
*/
|
||||
public function assign($designID)
|
||||
{
|
||||
$oldDesign = $this->getByID($designID);
|
||||
|
||||
$design = fixer::input('post')
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->add('editedDate', helper::today())
|
||||
->setDefault('assignedDate', helper::today())
|
||||
->stripTags($this->config->design->editor->assignto['id'], $this->config->allowedTags)
|
||||
->remove('uid,comment,files,label')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->where('id')->eq((int)$designID)->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldDesign, $design);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* The assign of design 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 Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package design
|
||||
* @version $Id: assign.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include "../../common/view/header.html.php";?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $design->id;?></strong></span>
|
||||
<?php echo "<span title='$design->name'>" . $design->name . '</span>';?>
|
||||
</h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->design->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $design->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='3'><?php echo html::submitButton(); ?></td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include "../../common/view/footer.html.php";?>
|
||||
@@ -61,7 +61,7 @@
|
||||
<td style="overflow:hidden"><?php echo $design->commit;?></td>
|
||||
<td><?php echo $design->createdBy;?></td>
|
||||
<td><?php echo substr($design->createdDate, 0, 11);?></td>
|
||||
<td><?php echo $design->assignedTo;?></td>
|
||||
<td><?php echo $this->design->printAssignedHtml($design, $users);?></td>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
$vars = "design={$design->id}";
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('commit', "designID=$designID");?> method='post'>
|
||||
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('commit', "designID=$designID&repoID=$repoID");?> method='post'>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php if(!$design->deleted):?>
|
||||
<?php
|
||||
common::printIcon('design', 'assignTo', "designID=$design->id", $design, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'commit', "designID=$design->id", $design, 'button', 'link', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'edit', "designID=$design->id", $design, 'button', 'fork', '', '', true);
|
||||
common::printIcon('design', 'delete', "designID=$design->id", $design, 'button', 'trash', 'hiddenwin');
|
||||
|
||||
@@ -44,7 +44,6 @@ $lang->moduleOrder[92] = 'durationestimation';
|
||||
$lang->moduleOrder[93] = 'budget';
|
||||
|
||||
$lang->moduleOrder[95] = 'company';
|
||||
$lang->moduleOrder[96] = 'milestone';
|
||||
$lang->moduleOrder[97] = 'stage';
|
||||
$lang->moduleOrder[98] = 'weekly';
|
||||
$lang->moduleOrder[100] = 'dept';
|
||||
@@ -1033,14 +1032,6 @@ $lang->git->methodOrder[5] = 'diff';
|
||||
$lang->git->methodOrder[10] = 'cat';
|
||||
$lang->git->methodOrder[15] = 'apiSync';
|
||||
|
||||
/* Milestone. */
|
||||
$lang->resource->milestone = new stdclass();
|
||||
$lang->resource->milestone->index = 'index';
|
||||
$lang->resource->milestone->saveOtherProblem = 'saveOtherProblem';
|
||||
|
||||
$lang->milestone->methodOrder[0] = 'index';
|
||||
$lang->milestone->methodOrder[5] = 'saveOtherProblem';
|
||||
|
||||
/* Weekly. */
|
||||
$lang->resource->weekly = new stdclass();
|
||||
$lang->resource->weekly->index = 'index';
|
||||
|
||||
@@ -117,7 +117,7 @@ class issue extends control
|
||||
else
|
||||
{
|
||||
$this->issue->delete($issueID);
|
||||
die(js::reload('parent'));
|
||||
die(js::locate(inLink('browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ class issue extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->issue->resolved;
|
||||
$this->view->title = $this->lang->issue->resolve;
|
||||
$this->view->issue = $this->issue->getByID($issue);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
|
||||
@@ -27,15 +27,18 @@ $lang->issue->closedDate = 'ClosedDate';
|
||||
$lang->issue->assignedTo = 'AssignedTo';
|
||||
$lang->issue->assignedBy = 'AssignedBy';
|
||||
$lang->issue->assignedDate = 'AssignedDate';
|
||||
$lang->issue->resolved = 'Resolved';
|
||||
$lang->issue->resolve = 'Resolved';
|
||||
$lang->issue->id = 'ID';
|
||||
|
||||
$lang->issue->view = 'Issue Details';
|
||||
$lang->issue->close = 'Closed';
|
||||
$lang->issue->cancel = 'Cancel';
|
||||
$lang->issue->delete = 'Delete';
|
||||
$lang->issue->search = 'Search';
|
||||
$lang->issue->basicInfo = 'Basic Information';
|
||||
$lang->issue->active = 'Activate';
|
||||
$lang->issue->assign = 'Assign';
|
||||
$lang->issue->create = 'Create Issue';
|
||||
$lang->issue->activate = 'Activate';
|
||||
$lang->issue->assignTo = 'Assign';
|
||||
$lang->issue->create = 'Create';
|
||||
$lang->issue->edit = 'Edit';
|
||||
$lang->issue->batchCreate = 'Batch Create';
|
||||
|
||||
|
||||
@@ -27,24 +27,20 @@ $lang->issue->closedDate = '关闭日期';
|
||||
$lang->issue->assignedTo = '指派给';
|
||||
$lang->issue->assignedBy = '由谁指派';
|
||||
$lang->issue->assignedDate = '指派时间';
|
||||
$lang->issue->resolved = '解决';
|
||||
$lang->issue->resolve = '解决';
|
||||
$lang->issue->id = '编号';
|
||||
|
||||
$lang->issue->view = '问题详情';
|
||||
$lang->issue->close = '关闭';
|
||||
$lang->issue->cancel = '取消';
|
||||
$lang->issue->delete = '删除';
|
||||
$lang->issue->search = '搜索';
|
||||
$lang->issue->basicInfo = '基本信息';
|
||||
$lang->issue->active = '激活';
|
||||
$lang->issue->assign = '指派';
|
||||
$lang->issue->assignTo = '指派问题';
|
||||
$lang->issue->create = '新建问题';
|
||||
$lang->issue->edit = '编辑问题';
|
||||
$lang->issue->activate = '激活';
|
||||
$lang->issue->assignTo = '指派';
|
||||
$lang->issue->create = '新建';
|
||||
$lang->issue->edit = '编辑';
|
||||
$lang->issue->batchCreate = '批量新建';
|
||||
$lang->issue->close = '关闭问题';
|
||||
$lang->issue->cancel = '取消问题';
|
||||
$lang->issue->activate = '激活问题';
|
||||
$lang->issue->resolve = '解决问题';
|
||||
$lang->issue->resolve = '解决问题';
|
||||
$lang->issue->view = '问题概况';
|
||||
|
||||
$lang->issue->labelList['all'] = '全部';
|
||||
$lang->issue->labelList['open'] = '开放';
|
||||
|
||||
@@ -358,6 +358,7 @@ class issueModel extends model
|
||||
$story = fixer::input('post')->remove('issue,color')
|
||||
->setIF($this->post->needNotReview or $this->post->projectID > 0, 'status', 'active')
|
||||
->get();
|
||||
|
||||
$this->dao->insert(TABLE_STORY)->data($story, 'teamMember,storyEstimate,storyDesc,storyPri,labels,files,spec,story,needNotReview')->exec();
|
||||
$id = $this->dao->lastInsertID();
|
||||
$this->dao->insert(TABLE_STORYSPEC)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th class="w-50px"><?php echo $lang->issue->id;?></th>
|
||||
<th class="required"><?php echo $lang->issue->title;?></th>
|
||||
<th class="w-140px required"><?php echo $lang->issue->type;?></th>
|
||||
<th class="w-120px required"><?php echo $lang->issue->severity;?></th>
|
||||
@@ -31,6 +32,7 @@
|
||||
<tbody>
|
||||
<?php for($i = 1;$i <= 10;$i++):?>
|
||||
<tr data-key="<?php echo $i;?>">
|
||||
<td><?php echo $i;?></td>
|
||||
<td>
|
||||
<?php echo html::input("dataList[$i][title]", '', 'id="dataList'.$i.'title" class="form-control" autocomplete="off"')?>
|
||||
</td>
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
<td title="<?php echo $issue->createdDate;?>"><?php echo $issue->createdDate;?></td>
|
||||
<td class="c-actions">
|
||||
<?php
|
||||
echo common::printIcon('issue', 'resolve', "issueID=$issue->id", $issue, 'list', 'checked', '', 'iframe', 'yes', '', $lang->issue->resolved);
|
||||
echo common::printIcon('issue', 'assignTo', "issueID=$issue->id", $issue, 'list', 'hand-right', '', 'iframe', 'yes', '', $lang->issue->assignedTo);
|
||||
echo common::printIcon('issue', 'resolve', "issueID=$issue->id", $issue, 'list', 'checked', '', 'iframe', 'yes', '', $lang->issue->resolve);
|
||||
echo common::printIcon('issue', 'assignTo', "issueID=$issue->id", $issue, 'list', 'hand-right', '', 'iframe', 'yes', '', $lang->issue->assignTo);
|
||||
echo common::printIcon('issue', 'close', "issueID=$issue->id", $issue, 'list', 'off', '', 'iframe', 'yes');
|
||||
echo common::printIcon('issue', 'cancel', "issueID=$issue->id", $issue, 'list', 'ban-circle', '', 'iframe', 'yes');
|
||||
echo common::printIcon('issue', 'activate', "issueID=$issue->id", $issue, 'list', 'magic', '', 'iframe', 'yes', '', $lang->issue->active);
|
||||
echo common::printIcon('issue', 'activate', "issueID=$issue->id", $issue, 'list', 'magic', '', 'iframe', 'yes', '', $lang->issue->activate);
|
||||
echo common::printIcon('issue', 'edit', "issueID=$issue->id", $issue, 'list', 'edit');
|
||||
$deleteClass = common::hasPriv('issue', 'delete') ? 'btn' : 'btn disabled';
|
||||
echo html::a($this->createLink('issue', 'delete', "issueID=$issue->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->issue->delete}' class='$deleteClass'");
|
||||
|
||||
@@ -49,6 +49,24 @@ foreach($issue as $field => $value)
|
||||
</div>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=issue&objectID=$issue->id");?>
|
||||
<div class="cell"><?php include '../../common/view/action.html.php';?></div>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($browseLink);?>
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php if(!$issue->deleted):?>
|
||||
<?php
|
||||
common::printIcon('issue', 'resolve', "issueID=$issue->id", $issue, 'button', 'checked', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('issue', 'assignTo', "issueID=$issue->id", $issue, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('issue', 'cancel', "issueID=$issue->id", $issue, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('issue', 'close', "issueID=$issue->id", $issue, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('issue', 'activate', "issueID=$issue->id", $issue, 'button', '', '', 'iframe showinonlybody', true);
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('issue', 'edit', "issueID=$issue->id", $issue);
|
||||
common::printIcon('issue', 'delete', "issueID=$issue->id", $issue, 'button', 'trash', 'hiddenwin');
|
||||
?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-col col-4">
|
||||
<div class="cell">
|
||||
|
||||
@@ -57,7 +57,7 @@ class program extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$programs = $this->program->getList($status, $orderBy, $pager);
|
||||
$programs = $this->program->getList($status, $orderBy, $pager, true);
|
||||
}
|
||||
|
||||
$this->view->programs = $programs;
|
||||
|
||||
@@ -7,16 +7,17 @@ class programModel extends model
|
||||
* @param varchar $status
|
||||
* @param varchar $orderBy
|
||||
* @param object $pager
|
||||
* @param bool $includeCat
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($status = 'all', $orderBy = 'id_desc', $pager = NULL)
|
||||
public function getList($status = 'all', $orderBy = 'id_desc', $pager = NULL, $includeCat = false)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('iscat')->eq(0)
|
||||
->where('program')->eq(0)
|
||||
->andWhere('template')->ne('')
|
||||
->andWhere('program')->eq(0)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF(!$includeCat)->andWhere('iscat')->eq(0)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
|
||||
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($this->cookie->mine)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php $canOrder = (common::hasPriv('program', 'updateOrder') and strpos($orderBy, 'order') !== false)?>
|
||||
<form class='main-table' id='programForm' method='post' data-ride='table'>
|
||||
<form class='main-table auto-fade-in fade' id='programForm' method='post' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false'>
|
||||
<table class='table has-sort-head table-fixed' id='programList'>
|
||||
<?php $vars = "status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
@@ -8,7 +8,7 @@
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-100px'><?php common::printOrderLink('code', $orderBy, $vars, $lang->program->code);?></th>
|
||||
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->name);?></th>
|
||||
<th class='table-nest-title'><?php common::printOrderLink('name', $orderBy, $vars, $lang->program->name);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->program->status);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->program->begin);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->program->end);?></th>
|
||||
@@ -22,12 +22,12 @@
|
||||
</thead>
|
||||
<tbody class='sortable' id='programTableList'>
|
||||
<?php foreach($programs as $program):?>
|
||||
<tr data-id='<?php echo $program->id ?>' data-order='<?php echo $program->order ?>'>
|
||||
<tr data-id='<?php echo $program->id ?>' data-order='<?php echo $program->order ?>'<?php if($program->isCat) echo " data-nested='true'";?><?php if($program->parent) echo " data-nest-parent='$program->parent' data-nest-path='$program->path'";?>>
|
||||
<td class='c-id'>
|
||||
<?php printf('%03d', $program->id);?>
|
||||
</td>
|
||||
<td class='text-left'><?php echo $program->code;?></td>
|
||||
<td class='text-left pgm-title' title='<?php echo $program->name?>'>
|
||||
<td class='text-left pgm-title table-nest-title' title='<?php echo $program->name?>'>
|
||||
<?php echo html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), $program->name);?>
|
||||
</td>
|
||||
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
|
||||
|
||||
@@ -154,6 +154,12 @@ class repo extends control
|
||||
die(js::confirm($this->lang->repo->notice->delete, $this->repo->createLink('delete', "repoID=$repoID&confirm=yes")));
|
||||
}
|
||||
|
||||
$relationID = $this->dao->select('id')->from(TABLE_RELATION)->where('extra')->eq($repoID)->fetch();
|
||||
if($relationID)
|
||||
{
|
||||
die(js::alert($this->lang->repo->error->deleted));
|
||||
}
|
||||
|
||||
$this->dao->delete()->from(TABLE_REPO)->where('id')->eq($repoID)->exec();
|
||||
$this->dao->delete()->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->exec();
|
||||
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($repoID)->exec();
|
||||
|
||||
@@ -159,6 +159,7 @@ $lang->repo->error->noPriv = 'The program does not have the privilege to
|
||||
$lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding maybe wrong. Please change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has been committed in relation to the design";
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,e.g. utf-8";
|
||||
|
||||
@@ -159,6 +159,7 @@ $lang->repo->error->noPriv = 'The program does not have the privilege to
|
||||
$lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding might be wrong. Please change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has been committed in relation to the design";
|
||||
|
||||
$lang->repo->syncTips = '<strong>You may find the reference about how to set Git sync from <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of comments can be comma separated values, e.g. utf-8.";
|
||||
|
||||
@@ -159,6 +159,7 @@ $lang->repo->error->noPriv = "Le programme n'a pas les privilèges pour b
|
||||
$lang->repo->error->output = "La commande est: %s\nL'erreur est (%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "La version du client est trop ancienne, veuillez mettre à niveau ou changer le client SVN";
|
||||
$lang->repo->error->encoding = "L'encodage est peut-être erroné. Veuillez modifier l'encodage et réessayer.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has been committed in relation to the design";
|
||||
|
||||
$lang->repo->syncTips = '<strong>Vous pouvez trouver la référence sur la façon de définir la synchronisation Git à partir de la page se trouvant <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">ici</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "Les encodages des commentaires de validation peuvent être des valeurs séparées par des virgules,ex: utf-8";
|
||||
|
||||
@@ -159,6 +159,7 @@ $lang->repo->error->noPriv = 'The program does not have the privilege to
|
||||
$lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client";
|
||||
$lang->repo->error->encoding = "The encoding maybe wrong. Vui lòng change the encoding and try again.";
|
||||
$lang->repo->error->deleted = "Deletion of the repository failed. The current repository has been committed in relation to the design";
|
||||
|
||||
$lang->repo->syncTips = '<strong>Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ <a target="_blank" href="https://www.zentao.pm/book/zentaomanual/free-open-source-project-management-software-git-105.html">here</a>.</strong>';
|
||||
$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8";
|
||||
|
||||
@@ -159,6 +159,7 @@ $lang->repo->error->noPriv = '程序没有权限切换到目录 %s';
|
||||
$lang->repo->error->output = "执行命令:%s\n错误结果(%s): %s\n";
|
||||
$lang->repo->error->clientVersion = "客户端版本过低,请升级或更换SVN客户端";
|
||||
$lang->repo->error->encoding = "编码可能错误,请更换编码重试。";
|
||||
$lang->repo->error->deleted = "删除版本库失败,当前版本库已与设计有相关提交";
|
||||
|
||||
$lang->repo->syncTips = '请参照<a target="_blank" href="https://www.zentao.net/book/zentaopmshelp/207.html">这里</a>,设置版本库定时同步。';
|
||||
$lang->repo->encodingsTips = "提交日志的编码,可以用逗号连接起来的多个,比如utf-8。";
|
||||
|
||||
@@ -178,7 +178,7 @@ class risk extends control
|
||||
public function delete($riskID, $confirm = 'no')
|
||||
{
|
||||
$risk = $this->risk->getById($riskID);
|
||||
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
echo js::confirm($this->lang->risk->confirmDelete, $this->createLink('risk', 'delete', "risk=$riskID&confirm=yes"), '');
|
||||
|
||||
+14
-14
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user