* adjust for kanban in lite.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
ALTER TABLE `zt_project` ADD `vision` varchar(10) NOT NULL DEFAULT 'common' AFTER `order`;
|
||||
ALTER TABLE `zt_product` ADD `vision` varchar(10) NOT NULL DEFAULT 'common' AFTER `order`;
|
||||
ALTER TABLE `zt_doclib` ADD `vision` varchar(10) NOT NULL DEFAULT 'common' AFTER `order`;
|
||||
ALTER TABLE `zt_task` ADD `vision` varchar(10) NOT NULL DEFAULT 'common' AFTER `deleted`;
|
||||
ALTER TABLE `zt_project` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `order`;
|
||||
ALTER TABLE `zt_product` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `order`;
|
||||
ALTER TABLE `zt_doclib` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `order`;
|
||||
ALTER TABLE `zt_task` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `deleted`;
|
||||
|
||||
@@ -28,24 +28,24 @@ $lang->my->dividerMenu = ',calendar,';
|
||||
$lang->project->target = '目标';
|
||||
|
||||
/* Scrum menu. */
|
||||
$lang->scrum->menu = new stdclass();
|
||||
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
|
||||
$lang->scrum->menu->execution = array('link' => "$lang->executionKanban|project|execution|status=all&projectID=%s", 'subModule' => 'kanban');
|
||||
$lang->scrum->menu->story = array('link' => "{$lang->project->target}|projectstory|story|projectID=%s", 'subModule' => 'projectstory,tree', 'alias' => 'story,track');
|
||||
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=project&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist,team');
|
||||
$lang->kanban->menu = new stdclass();
|
||||
$lang->kanban->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
|
||||
$lang->kanban->menu->execution = array('link' => "$lang->executionKanban|project|execution|status=all&projectID=%s", 'subModule' => 'execution');
|
||||
$lang->kanban->menu->story = array('link' => "{$lang->project->target}|projectstory|story|projectID=%s", 'subModule' => 'projectstory,tree', 'alias' => 'story,track');
|
||||
$lang->kanban->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=project&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->kanban->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
$lang->kanban->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist,team');
|
||||
|
||||
$lang->scrum->dividerMenu = ',execution,settings,';
|
||||
$lang->kanban->dividerMenu = ',execution,settings,';
|
||||
|
||||
/* Scrum menu order. */
|
||||
$lang->scrum->menuOrder = array();
|
||||
$lang->scrum->menuOrder[5] = 'index';
|
||||
$lang->scrum->menuOrder[10] = 'execution';
|
||||
$lang->scrum->menuOrder[15] = 'story';
|
||||
$lang->scrum->menuOrder[20] = 'doc';
|
||||
$lang->scrum->menuOrder[25] = 'dynamic';
|
||||
$lang->scrum->menuOrder[30] = 'settings';
|
||||
$lang->kanban->menuOrder = array();
|
||||
$lang->kanban->menuOrder[5] = 'index';
|
||||
$lang->kanban->menuOrder[10] = 'execution';
|
||||
$lang->kanban->menuOrder[15] = 'story';
|
||||
$lang->kanban->menuOrder[20] = 'doc';
|
||||
$lang->kanban->menuOrder[25] = 'dynamic';
|
||||
$lang->kanban->menuOrder[30] = 'settings';
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->kanban = array('link' => "看板|execution|kanban|executionID=%s");
|
||||
@@ -55,12 +55,12 @@ $lang->execution->menu->gantt = array('link' => "甘特图|execution|gantt|ex
|
||||
$lang->execution->menu->tree = array('link' => "树状图|execution|tree|executionID=%s");
|
||||
$lang->execution->menu->group = array('link' => "分组视图|execution|groupTask|executionID=%s");
|
||||
|
||||
$lang->scrum->menu->doc['subMenu'] = new stdclass();
|
||||
$lang->kanban->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->scrum->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->scrum->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->scrum->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
$lang->kanban->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->kanban->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->kanban->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->kanban->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
|
||||
unset($lang->doc->menu->product);
|
||||
unset($lang->doc->menu->api);
|
||||
|
||||
66
extension/lite/execution/ext/control/all.php
Normal file
66
extension/lite/execution/ext/control/all.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
helper::importControl('execution');
|
||||
class myExecution extends execution
|
||||
{
|
||||
public function all($status = 'all', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->app->loadLang('my');
|
||||
$this->app->loadLang('product');
|
||||
$this->app->loadLang('stage');
|
||||
$this->app->loadLang('programplan');
|
||||
|
||||
$from = $this->app->tab;
|
||||
if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true), 'execution');
|
||||
|
||||
if($from == 'project')
|
||||
{
|
||||
$projects = $this->project->getPairsByProgram();
|
||||
$projectID = $this->project->saveState($projectID, $projects);
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$this->view->project = $project;
|
||||
$this->project->setMenu($projectID);
|
||||
}
|
||||
|
||||
if($this->app->viewType == 'mhtml')
|
||||
{
|
||||
if($this->app->rawModule == 'project' and $this->app->rawMethod == 'execution')
|
||||
{
|
||||
$projects = $this->project->getPairsByProgram();
|
||||
$projectID = $this->project->saveState($projectID, $projects);
|
||||
$this->project->setMenu($projectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$executionID = $this->execution->saveState(0, $this->executions);
|
||||
$this->execution->setMenu($executionID);
|
||||
}
|
||||
}
|
||||
|
||||
/* Load pager and get tasks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $this->lang->execution->allExecutions;
|
||||
$this->view->position[] = $this->lang->execution->allExecutions;
|
||||
|
||||
$executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager);
|
||||
$executionTeams = array();
|
||||
foreach($executionStats as $execution) $executionTeams[$execution->id] = $this->execution->getTeamMembers($execution->id);
|
||||
|
||||
$this->view->executionStats = $executionStats;
|
||||
$this->view->executionTeams = $executionTeams;
|
||||
$this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projects = array('') + $this->project->getPairsByProgram();
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->status = $status;
|
||||
$this->view->from = $from;
|
||||
$this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
$this->view->usersAvatar = $this->user->getAvatarPairs();
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
12
extension/lite/execution/ext/control/kanban.php
Normal file
12
extension/lite/execution/ext/control/kanban.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
helper::importControl('execution');
|
||||
class myExecution extends execution
|
||||
{
|
||||
public function kanban($executionID, $browseType = 'all', $orderBy = 'id_asc', $groupBy = 'default')
|
||||
{
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$this->loadModel('project')->setMenu($execution->project);
|
||||
|
||||
parent::kanban($executionID, $browseType, $orderBy, $groupBy);
|
||||
}
|
||||
}
|
||||
114
extension/lite/execution/ext/view/create.html.php
Normal file
114
extension/lite/execution/ext/view/create.html.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of execution 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 execution
|
||||
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if(isset($tips)):?>
|
||||
<?php $defaultURL = $this->createLink('execution', 'kanban', 'executionID=' . $executionID);?>
|
||||
<?php die(js::locate($defaultURL));?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/date.js');?>
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('holders', $lang->execution->placeholder);?>
|
||||
<?php js::set('errorSameProducts', $lang->execution->errorSameProducts);?>
|
||||
<?php js::set('errorSameBranches', $lang->execution->errorSameBranches);?>
|
||||
<?php js::set('productID', empty($productID) ? 0 : $productID);?>
|
||||
<?php js::set('isStage', $isStage);?>
|
||||
<?php js::set('copyExecutionID', $copyExecutionID);?>
|
||||
<?php js::set('systemMode', $config->systemMode);?>
|
||||
<?php js::set('projectCommon', $lang->project->common);?>
|
||||
<?php js::set('multiBranchProducts', $multiBranchProducts);?>
|
||||
<?php js::set('systemMode', $config->systemMode);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->execution->create;?></h2>
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->projectName;?></th>
|
||||
<td class="col-main"><?php echo html::select("project", $allProjects, $projectID, "class='form-control chosen' required onchange='refreshPage(this.value)'");?></td>
|
||||
<td colspan='2'></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->execution->name;?></th>
|
||||
<td class="col-main">
|
||||
<?php echo html::input('name', $name, "class='form-control' required");?>
|
||||
<?php echo html::hidden('begin', date('Y-m-d'));?>
|
||||
<?php echo html::hidden('end', date('Y-m-d'));?>
|
||||
<?php echo html::hidden('days', '1');?>
|
||||
</td>
|
||||
<td colspan='2'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->code;?></th>
|
||||
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->execution->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'wait');?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields('', 'table', 'columns=3');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->owner;?></th>
|
||||
<td><?php echo html::select('PM', $pmUsers, empty($copyExecution) ? '' : $copyExecution->PM, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->team;?></th>
|
||||
<td colspan='3'><?php echo html::select('teamMembers[]', $users, '', "class='form-control chosen' multiple"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->desc;?></th>
|
||||
<td colspan='3'>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=execution&link=desc');?>
|
||||
<?php echo html::textarea('desc', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->execution->acl;?></th>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('acl', $lang->execution->aclList, $acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
</tr>
|
||||
<tr class="hidden" id="whitelistBox">
|
||||
<th><?php echo $lang->whitelist;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('whitelist[]', $users, $whitelist, 'class="form-control chosen" multiple');?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo $gobackLink ? html::a($gobackLink, $lang->goback, '', 'class="btn btn-wide"') : html::backButton();?>
|
||||
<?php
|
||||
unset($allProducts[0]);
|
||||
echo html::hidden("products[]", key($allProducts));
|
||||
?>
|
||||
<?php echo html::hidden("PO", '');?>
|
||||
<?php echo html::hidden("QD", '');?>
|
||||
<?php echo html::hidden("RD", '');?>
|
||||
<?php echo html::hidden("type", 'kanban');?>
|
||||
<?php echo html::hidden("vision", 'lite');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
10
extension/lite/execution/ext/view/edit.lite.html.hook.php
Normal file
10
extension/lite/execution/ext/view/edit.lite.html.hook.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
$('#begin').closest('tr').hide();
|
||||
$('#days').closest('tr').hide();
|
||||
$('#productsBox').closest('tr').hide();
|
||||
$('#plansBox').closest('tr').hide();
|
||||
$('#PO').closest('.input-group').hide();
|
||||
$('#QD').closest('.input-group').hide();
|
||||
$('#RD').closest('.input-group').hide();
|
||||
$('#PM').closest('.input-group').find('.input-group-addon').hide();
|
||||
</script>
|
||||
@@ -4,12 +4,28 @@ class project extends control
|
||||
public function execution($status = 'all', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
$this->app->loadLang('execution');
|
||||
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->status = $status;
|
||||
$this->view->kanbans = $this->loadModel('kanban')->getKanbanByProject($projectID, $status == 'doing' ? 'active' : $status);
|
||||
$this->view->usersAvatar = $this->loadModel('user')->getAvatarPairs();
|
||||
$kanbanList = $this->loadModel('execution')->getList($projectID, 'all', $status);
|
||||
|
||||
$executionActions = array();
|
||||
foreach($kanbanList as $kanbanID => $kanban)
|
||||
{
|
||||
foreach($this->config->execution->statusActions as $action)
|
||||
{
|
||||
if($this->execution->isClickable($kanban, $action)) $executionActions[$kanbanID][] = $action;
|
||||
}
|
||||
if($this->execution->isClickable($kanban, 'delete')) $executionActions[$kanbanID][] = 'delete';
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->project->kanban;
|
||||
|
||||
$this->view->kanbanList = array_values($kanbanList);
|
||||
$this->view->memberGroup = $this->execution->getMembersByIdList(array_keys($kanbanList));
|
||||
$this->view->usersAvatar = $this->loadModel('user')->getAvatarPairs();
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->status = $status;
|
||||
$this->view->executionActions = $executionActions;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
7
extension/lite/project/ext/js/index/lite.js
Normal file
7
extension/lite/project/ext/js/index/lite.js
Normal file
@@ -0,0 +1,7 @@
|
||||
$('#cards').on('click', '.panel', function(e)
|
||||
{
|
||||
if(!$(e.target).closest('.kanban-actions').length)
|
||||
{
|
||||
location.href = $(this).data('url');
|
||||
}
|
||||
});
|
||||
@@ -5,6 +5,6 @@ $('.panel-actions').remove();
|
||||
$('.project-name').removeClass('has-prefix');
|
||||
$('.project-type-label').remove();
|
||||
$('.icon-project-manageProducts.icon-link').parent().remove();
|
||||
$('.create-project-btn').attr('href', createLink('project', 'create')).removeAttr('data-toggle');
|
||||
$('.table-empty-tip .btn').attr('href', createLink('project', 'create')).removeAttr('data-toggle');
|
||||
$('.create-project-btn').attr('href', createLink('project', 'create', 'model=kanban')).removeAttr('data-toggle');
|
||||
$('.table-empty-tip .btn').attr('href', createLink('project', 'create', 'model=kanban')).removeAttr('data-toggle');
|
||||
</script>
|
||||
|
||||
@@ -11,18 +11,22 @@
|
||||
?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/header.html.php';?>
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/sortable.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='clearfix' id='mainMenu'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
|
||||
<?php echo html::a($this->createLink('project', 'execution', "status=$key&projectID=$projectID"), "<span class='text'>{$label}</span>" . ($status == $key ? ' <span class="label label-light label-badge">' . count($kanbans) . '</span>' : ''), '', "class='btn btn-link" . ($status == $key ? ' btn-active-text' : '') . "' id='{$key}Tab' data-app='project'");?>
|
||||
<?php endforeach;?>
|
||||
<?php
|
||||
foreach($lang->project->featureBar as $label => $labelName)
|
||||
{
|
||||
$active = $status == $label ? 'btn-active-text' : '';
|
||||
echo html::a($this->createLink('project', 'execution', "status=$label&projectID=$projectID"), '<span class="text">' . $labelName . '</span> ' . ($status == $label ? "<span class='label label-light label-badge'>" . (int)count($kanbanList) . '</span>' : ''), '', "class='btn btn-link $active'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php if(common::hasPriv('kanban', 'create')) echo html::a($this->createLink('kanban', 'create', "projectID=$projectID", 'html', true), "<i class='icon icon-sm icon-plus'></i> " . $lang->execution->createKanban, '', "class='btn btn-primary create-execution-btn iframe' data-app='project'");?>
|
||||
<?php common::printLink('execution', 'create', "projectID=$projectID", '<i class="icon icon-plus"></i> ' . $lang->project->createKanban, '', 'class="btn btn-primary"');?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class="main-row fade cell">
|
||||
<?php if(empty($kanbans)):?>
|
||||
<?php if(empty($kanbanList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->execution->noExecution;?></span>
|
||||
@@ -33,40 +37,39 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='kanban-cards'>
|
||||
<?php foreach($kanbans as $index => $kanban):?>
|
||||
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('kanban', 'view', "kanbanID=$kanban->id");?>'>
|
||||
<?php foreach($kanbanList as $index => $kanban):?>
|
||||
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', 'kanban', "kanbanID=$kanban->id");?>'>
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<span class="label kanban-status-<?php echo $kanban->status;?>"><?php echo zget($lang->execution->statusList, $kanban->status);?></span>
|
||||
<strong class="kanban-name" title='<?php echo $kanban->name;?>'><?php echo $kanban->name;?></strong>
|
||||
<div class='kanban-actions' id='kanban-actions-<?php echo $kanban->id;?>'>
|
||||
<?php $canActions = (common::hasPriv('execution','edit') or (!empty($executionActions) and isset($executionActions[$kanban->id])));?>
|
||||
<?php if($canActions):?>
|
||||
<div class='kanban-actions kanban-actions<?php echo $kanban->id;?>'>
|
||||
<div class='dropdown'>
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");?>
|
||||
<ul class='dropdown-menu <?php echo ($index + 1) % 4 == 0 ? 'pull-left' : 'pull-right';?>'>
|
||||
<?php
|
||||
if(common::hasPriv('kanban','edit'))
|
||||
if(common::hasPriv('execution','edit'))
|
||||
{
|
||||
$this->app->loadLang('kanban');
|
||||
echo '<li>';
|
||||
common::printLink('kanban', 'edit', "kanbanID={$kanban->id}", '<i class="icon icon-edit"></i> ' . $lang->kanban->edit, '', "class='iframe' data-width='75%'", '', true);
|
||||
common::printLink('execution', 'edit', "executionID={$kanban->id}", '<i class="icon icon-edit"></i> ' . $lang->kanban->edit, '', "class='iframe' data-width='75%'", '', true);
|
||||
echo '</li>';
|
||||
}
|
||||
if(common::hasPriv('kanban','close'))
|
||||
if(!empty($executionActions[$kanban->id]))
|
||||
{
|
||||
$class = $kanban->status == 'closed' ? 'disabled' : '';
|
||||
echo "<li class='{$class}'>";
|
||||
common::printLink('kanban', 'close', "kanbanID={$kanban->id}", '<i class="icon icon-off"></i> ' . $lang->kanban->close, '', "class='iframe {$class}' data-width='75%'", '', true);
|
||||
echo '</li>';
|
||||
}
|
||||
if(common::hasPriv('kanban','delete'))
|
||||
{
|
||||
echo '<li>';
|
||||
common::printLink('kanban', 'delete', "kanbanID={$kanban->id}", '<i class="icon icon-trash"></i> ' . $lang->kanban->delete, 'hiddenwin');
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
if(in_array('start', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'start', "executionID={$kanban->id}", '', true), '<i class="icon icon-play"></i>' . $lang->execution->start, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
|
||||
if(in_array('putoff', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'putoff', "executionID=$kanban->id", '', true), '<i class="icon icon-calendar"></i>' . $lang->execution->putoff, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
|
||||
if(in_array('suspend', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'suspend', "executionID=$kanban->id", '', true), '<i class="icon icon-pause"></i>' . $lang->execution->suspend, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
|
||||
if(in_array('close', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'close', "executionID=$kanban->id", '', true), '<i class="icon icon-off"></i>' . $lang->execution->close, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
|
||||
if(in_array('activate', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'activate', "executionID=$kanban->id", '', true), '<i class="icon icon-magic"></i>' . $lang->execution->activate, '', "class='iframe btn btn-link text-left' data-width='75%'") . '</li>';
|
||||
if(in_array('delete', $executionActions[$kanban->id])) echo '<li>' . html::a(helper::createLink('execution', 'delete', "executionID=$kanban->id&confirm=no&kanban=yes", '', true), '<i class="icon icon-trash"></i>' . $lang->kanban->delete, '', "target='hiddenwin'") . '</li>';
|
||||
}?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="kanban-desc">
|
||||
|
||||
@@ -107,10 +107,10 @@ $lang->block->budget = '预算';
|
||||
$lang->block->left = '剩余';
|
||||
|
||||
$lang->block->titleList['flowchart'] = '流程图';
|
||||
$lang->block->titleList['statistic'] = '项目统计';
|
||||
$lang->block->titleList['statistic'] = '项目统计';
|
||||
$lang->block->titleList['recentproject'] = '我近期参与的项目';
|
||||
$lang->block->titleList['assigntome'] = '待处理';
|
||||
$lang->block->titleList['projectteam'] = '项目人力投入';
|
||||
$lang->block->titleList['projectteam'] = '项目人力投入';
|
||||
$lang->block->titleList['project'] = '项目列表';
|
||||
$lang->block->titleList['dynamic'] = '最新动态';
|
||||
$lang->block->titleList['list'] = '我的待办';
|
||||
@@ -162,6 +162,7 @@ $lang->block->default['scrum']['project']['4']['grid'] = 4;
|
||||
$lang->block->default['scrum']['project']['5']['title'] = '最新动态';
|
||||
$lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic';
|
||||
$lang->block->default['scrum']['project']['5']['grid'] = 4;
|
||||
$lang->block->default['kanban'] = $lang->block->default['scrum'];
|
||||
|
||||
$lang->block->default['product']['1']['title'] = $lang->productCommon . '统计';
|
||||
$lang->block->default['product']['1']['block'] = 'statistic';
|
||||
|
||||
@@ -243,7 +243,7 @@ class project extends control
|
||||
if(!$projectID) $this->locate($this->createLink('project', 'browse'));
|
||||
setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
if($project->model == 'kanban')
|
||||
if($project->model == 'kanban' and $this->config->vision != 'lite')
|
||||
{
|
||||
$kanbanList = $this->loadModel('execution')->getList($projectID, 'all', $browseType);
|
||||
|
||||
@@ -703,7 +703,7 @@ class project extends control
|
||||
if(!defined('RUN_MODE') || RUN_MODE != 'api') $projectID = $this->project->saveState((int)$projectID, $this->project->getPairsByProgram());
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
if(empty($project) || strpos('scrum,waterfall', $project->model) === false)
|
||||
if(empty($project) || strpos('scrum,waterfall,kanban', $project->model) === false)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
die(js::error($this->lang->notFound) . js::locate($this->createLink('project', 'browse')));
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($project->model != 'kanban'):?>
|
||||
<?php if($project->model != 'kanban' or $config->vision == 'lite'):?>
|
||||
<?php echo $this->fetch('block', 'dashboard', "module=project&type={$project->model}&projectID={$project->id}");?>
|
||||
<?php else:?>
|
||||
<div class='clearfix' id='mainMenu'>
|
||||
|
||||
Reference in New Issue
Block a user