Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->activate;?></small>
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('page', 'assignedto');
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->assignBug;?></small>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->close;?></small>
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('page', 'confirmbug');
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->confirmBug;?></small>
|
||||
|
||||
@@ -53,9 +53,9 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -31,7 +31,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', 'class="bug-title"');?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "class='bug-title' title='$bug->title'");?>
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->bug->edit;?></small>
|
||||
</h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
@@ -106,9 +106,9 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$bug->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=bug¤tModuleID=0&branch=$bug->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '_blank');?>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '_blank', "title='$bug->title'");?>
|
||||
<small class='text-muted'> <?php echo $lang->arrow . $lang->bug->linkBugs;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ js::set('productID' , $bug->product);
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $bug->id;?></span>
|
||||
<?php echo isonlybody() ? $bug->title : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
<?php echo isonlybody() ? ('<span title="' . $bug->title . '">' . $bug->title . '</span>') : html::a($this->createLink('bug', 'view', 'bug=' . $bug->id), $bug->title);?>
|
||||
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->bug->resolve;?></small>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label-id'><?php echo $build->id;?></span>
|
||||
<?php echo html::a($this->createLink('build', 'view', 'build=' . $build->id), $build->name);?>
|
||||
<?php echo html::a($this->createLink('build', 'view', 'build=' . $build->id), $build->name, '', "title='$build->name'");?>
|
||||
<small><?php echo $lang->arrow . $lang->build->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
|
||||
<script>
|
||||
var noResultsMatch = '<?php echo $lang->noResultsMatch;?>';
|
||||
var chooseUsersToMail = '<?php echo $lang->chooseUsersToMail;?>';
|
||||
var defaultChosenOptions = {no_results_text: noResultsMatch, width:'100%', allow_single_deselect: true, disable_search_threshold: 1, placeholder_text_single: ' ', placeholder_text_multiple: ' ', search_contains: true};
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#mailto").attr('data-placeholder', chooseUsersToMail);
|
||||
$("#mailto, #productID").chosen(defaultChosenOptions).on('chosen:showing_dropdown', function()
|
||||
{
|
||||
var $this = $(this);
|
||||
var $chosen = $this.next('.chosen-container').removeClass('chosen-up');
|
||||
var $drop = $chosen.find('.chosen-drop');
|
||||
});
|
||||
$("#mailto, #productID").chosen($.defaultChosenOptions).on('chosen:showing_dropdown');
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $doc->id;?></span>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title);?>
|
||||
<?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $doc->title, '', "title='$doc->title'");?>
|
||||
<small> <?php echo $lang->arrow . ' ' . $lang->doc->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<div class="detail-content article-content">
|
||||
<div class="detail no-margin no-padding">
|
||||
<div class="detail-content article-content no-margin no-padding">
|
||||
<?php
|
||||
$content = $doc->content;
|
||||
if($doc->type == 'url')
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $entry->name;?>'>
|
||||
<?php echo $entry->name;?>
|
||||
<span class='label label-info'><?php echo $lang->entry->log;?></span>
|
||||
</h2>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
|
||||
<strong><?php echo $title;?></strong>
|
||||
<strong title='<?php echo $title;?>'><?php echo $title;?></strong>
|
||||
<small class='text-danger'><?php echo html::icon('cog');?> <?php echo $lang->extension->uninstall;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix' title='EXTENSION'><?php echo html::icon($lang->icons['extension']);?></span>
|
||||
<strong><?php echo $title;?></strong>
|
||||
<strong title='<?php echo $title;?>'><?php echo $title;?></strong>
|
||||
</h2>
|
||||
</div>
|
||||
<?php if($error):?>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
<small><?php echo $lang->arrow . $lang->group->edit;?></small>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
</h2>
|
||||
|
||||
@@ -13,9 +13,8 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label-id'><?php echo $group->id;?></span>
|
||||
<?php echo $group->name;?>
|
||||
<small> <?php echo $lang->arrow . $lang->group->manageView;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -558,11 +558,12 @@ class product extends control
|
||||
$output = html::select($field, $plans, $planID, "class='form-control chosen'");
|
||||
if(count($plans) == 1 and $needCreate)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), $this->lang->productplan->create, '_blank');
|
||||
$output .= ' ';
|
||||
$output .= html::a("javascript:loadProductPlans($productID)", $this->lang->refresh);
|
||||
$output .= '</span>';
|
||||
$output .= "<div class='input-group-btn'>";
|
||||
$output .= html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$this->lang->productplan->create}'");
|
||||
$output .= '</div>';
|
||||
$output .= "<div class='input-group-btn'>";
|
||||
$output .= html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$this->lang->refresh}' onclick='loadProductPlans($productID)'");
|
||||
$output .= '</div>';
|
||||
}
|
||||
die($output);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,23 @@
|
||||
$(function()
|
||||
{
|
||||
$('.popoverStage').mouseover(function(){$(this).popover('show')});
|
||||
$('.popoverStage').mouseout(function(){$(this).popover('hide')});
|
||||
|
||||
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
|
||||
|
||||
// Fix state dropdown menu position
|
||||
$('.c-stage > .dropdown').each(function()
|
||||
{
|
||||
var $this = $(this);
|
||||
var menuHeight = $(this).find('.dropdown-menu').outerHeight();
|
||||
var $tr = $this.closest('tr');
|
||||
var height = 0;
|
||||
while(height < menuHeight)
|
||||
{
|
||||
var $next = $tr.next('tr');
|
||||
if(!$next.length) break;
|
||||
height += $next.outerHeight;
|
||||
}
|
||||
if(height < menuHeight)
|
||||
{
|
||||
$this.addClass('dropup');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $product->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $product->name : html::a($this->createLink('product', 'view', "productID=$product->id"), $product->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$product->name'>" . $product->name . '</span>') : html::a($this->createLink('product', 'view', "productID=$product->id"), $product->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->product->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
if(count($lines) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line"), $lang->tree->manageLine, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=line", '', true), $lang->tree->manageLine, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductLines({$rootID})", $lang->refresh, '', "class='refresh'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $product->id;?></span>
|
||||
<?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name);?>
|
||||
<?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name, '', "title='$product->name'");?>
|
||||
<small><?php echo $lang->arrow . ' ' . $lang->product->edit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -49,6 +49,7 @@ class productplan extends control
|
||||
$planID = $this->productplan->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('productplan', $planID, 'opened');
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$product&branch=$branch")));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></strong></h2>
|
||||
<h2><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title, '', "title='$plan->title'");?></strong></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
|
||||
@@ -1014,7 +1014,9 @@ class project extends control
|
||||
}
|
||||
}
|
||||
|
||||
$this->project->setMenu($this->projects, key($this->projects));
|
||||
$projectID = key($this->projects);
|
||||
if($this->session->project) $projectID = $this->session->project;
|
||||
$this->project->setMenu($this->projects, $projectID);
|
||||
|
||||
$this->view->title = $this->lang->project->create;
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->project->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->project->fixFirst;?></h2>
|
||||
<h2><?php echo $lang->project->fixFirst;?></h2>
|
||||
</div>
|
||||
<form target='hiddenwin' method='post'>
|
||||
<table class='table table-form'>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->putoff;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $project->id;?></strong></span>
|
||||
<?php echo isonlybody() ? $project->name : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$project->name'>" . $project->name . '</span>') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->project->suspend;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
+33
-8
@@ -495,11 +495,29 @@ class storyModel extends model
|
||||
->join('mailto', ',')
|
||||
->join('linkStories', ',')
|
||||
->join('childStories', ',')
|
||||
->remove('files,labels,comment,contactListMenu')
|
||||
->remove('files,labels,comment,contactListMenu,stages')
|
||||
->get();
|
||||
if(isset($story->plan) and is_array($story->plan)) $story->plan = trim(join(',', $story->plan), ',');
|
||||
if(empty($_POST['product'])) $story->branch = $oldStory->branch;
|
||||
if(empty($_POST['branch'])) $story->branch = 0;
|
||||
if(!empty($_POST['stages']))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_STORYSTAGE)->where('story')->eq($storyID)->exec();
|
||||
|
||||
$stageList = join(',', array_keys($this->lang->story->stageList));
|
||||
$minStagePos = strlen($stageList);
|
||||
$minStage = '';
|
||||
foreach($this->post->stages as $branch => $stage)
|
||||
{
|
||||
$this->dao->insert(TABLE_STORYSTAGE)->set('story')->eq($storyID)->set('branch')->eq($branch)->set('stage')->eq($stage)->exec();
|
||||
if(strpos($stageList, $stage) !== false and strpos($stageList, $stage) < $minStagePos)
|
||||
{
|
||||
$minStage = $stage;
|
||||
$minStagePos = strpos($stageList, $stage);
|
||||
}
|
||||
}
|
||||
$story->stage = $minStage;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_STORY)
|
||||
->data($story)
|
||||
@@ -2344,15 +2362,22 @@ class storyModel extends model
|
||||
echo $story->estimate;
|
||||
break;
|
||||
case 'stage':
|
||||
echo "<div" . (isset($storyStages[$story->id]) ? " class='popoverStage' data-toggle='popover' data-placement='bottom' data-target='\$next'" : '') . "'>";
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
if(isset($storyStages[$story->id])) echo "<span><i class='icon icon-caret-down'></i></span>";
|
||||
echo '</div>';
|
||||
if(isset($storyStages[$story->id]))
|
||||
{
|
||||
echo "<div class='popover'>";
|
||||
foreach($storyStages[$story->id] as $storyBranch => $storyStage) echo $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '<br />';
|
||||
echo "</div>";
|
||||
echo "<div class='dropdown dropdown-hover'>";
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
echo "<span class='caret'></span>";
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
|
||||
{
|
||||
echo '<li class="text-ellipsis">' . $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
echo '</div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this->lang->story->stageList[$story->stage];
|
||||
}
|
||||
break;
|
||||
case 'taskCount':
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<div class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=story¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
@@ -60,13 +60,13 @@
|
||||
<div class='input-group' id='planIdBox'>
|
||||
<?php
|
||||
echo html::select('plan', $plans, $planID, "class='form-control chosen'");
|
||||
if(count($plans) != 1)
|
||||
if(count($plans) == 1)
|
||||
{
|
||||
echo "<div class='input-group-btn'>";
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch"), "<i class='icon icon-plus'></i>", '_blank', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->productplan->create}'");
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$productID&branch=$branch", '', true), "<i class='icon icon-plus'></i>", '', "class='btn btn-icon' data-toggle='modal' data-type='iframe' data-width='95%' title='{$lang->productplan->create}'");
|
||||
echo '</div>';
|
||||
echo "<div class='input-group-btn'>";
|
||||
echo html::a("javascript:loadProductPlans($productID)", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon' data-toggle='tooltip' title='{$lang->refresh}'");
|
||||
echo html::a("#", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$lang->refresh}' onclick='loadProductPlans($productID)'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story¤tModuleID=0&branch=$story->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$story->product&view=story¤tModuleID=0&branch=$story->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($story->product)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($story->product)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
@@ -102,8 +102,8 @@
|
||||
if(count($plans) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch"), $lang->productplan->create, '_blank');
|
||||
echo html::a("javascript:loadProductPlans($story->product)", $lang->refresh);
|
||||
echo html::a($this->createLink('productplan', 'create', "productID=$story->product&branch=$story->branch", '', true), $lang->productplan->create, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductPlans($story->product)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
@@ -126,7 +126,21 @@
|
||||
<?php if($story->status != 'draft'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<td><?php echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php
|
||||
if($story->stages and $branches)
|
||||
{
|
||||
foreach($story->stages as $branch => $stage)
|
||||
{
|
||||
if(isset($branches[$branch])) echo '<p>' . $branches[$branch] . html::select("stages[$branch]", $lang->story->stageList, $stage, "class='form-control chosen'") . '</p>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $story->id;?></span>
|
||||
<?php echo isonlybody() ? $story->title : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php echo isonlybody() ? ("<span title='$story->title'>" . $story->title . '</span>') : html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->story->linkStory;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = 'Please enter "Left Hour"';
|
||||
$lang->task->error->work = '"Remark" must be less than %d characteres.';
|
||||
$lang->task->error->skipClose = 'Task: %s is not “Done” or “Cancelled”. Do you want to close it?';
|
||||
$lang->task->error->consumed = 'Task: %s Hour must be more than 0. Ignore changes to this Task.';
|
||||
$lang->task->error->assignedTo = 'Multiple task in the current state cannot be assigned to member who outside the task team.';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->task->error->left = '请填写"剩余"';
|
||||
$lang->task->error->work = '"备注"必须小于%d个字符';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
|
||||
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
|
||||
$lang->task->error->assignedTo = '当前状态的多人任务不能指派给任务团队外的成员。';
|
||||
|
||||
/* Report. */
|
||||
$lang->task->report = new stdclass();
|
||||
|
||||
+14
-4
@@ -505,12 +505,16 @@ class taskModel extends model
|
||||
$currentTask->finishedBy = '';
|
||||
$currentTask->finishedDate = '0000-00-00';
|
||||
}
|
||||
if($oldTask->assignedTo != $teams[count($teams) - 1] && isset($team[$currentTask->assignedTo]) && $oldTask->status == 'wait') $currentTask->status = 'doing';
|
||||
|
||||
if($currentTask->left == 0 && $oldTask->left != 0 && $currentTask->consumed != 0)
|
||||
{
|
||||
$currentTask->status = 'done';
|
||||
$currentTask->finishedBy = $this->app->user->account;
|
||||
$currentTask->finishedDate = $now;
|
||||
if($oldTask->assignedTo == $teams[count($teams) - 1] && $team[$oldTask->assignedTo]->left == 0 && $team[$oldTask->assignedTo]->consumed != 0)
|
||||
{
|
||||
$currentTask->status = 'done';
|
||||
$currentTask->finishedBy = $this->app->user->account;
|
||||
$currentTask->finishedDate = $now;
|
||||
}
|
||||
}
|
||||
|
||||
return $currentTask;
|
||||
@@ -581,6 +585,12 @@ class taskModel extends model
|
||||
$teams = array();
|
||||
if($this->post->multiple)
|
||||
{
|
||||
if(strpos(',done,closed,cancel,', ",{$task->status},") === false && !in_array($this->post->assignedTo, $this->post->team))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->assignedTo;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($this->post->team as $row => $account)
|
||||
{
|
||||
if(empty($account) or isset($team[$account])) continue;
|
||||
@@ -616,7 +626,7 @@ class taskModel extends model
|
||||
->checkIF($task->estimate != false, 'estimate', 'float')
|
||||
->checkIF($task->left != false, 'left', 'float')
|
||||
->checkIF($task->consumed != false, 'consumed', 'float')
|
||||
->checkIF($task->status != 'wait' and $task->left == 0 and $task->status != 'cancel' and $task->status != 'closed', 'status', 'equal', 'done')
|
||||
->checkIF($task->status != 'wait' and empty($teams) and $task->left == 0 and $task->status != 'cancel' and $task->status != 'closed', 'status', 'equal', 'done')
|
||||
|
||||
->batchCheckIF($task->status == 'wait' or $task->status == 'doing', 'finishedBy, finishedDate,canceledBy, canceledDate, closedBy, closedDate, closedReason', 'empty')
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->activate;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -15,19 +15,17 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->transfer);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . (empty($task->team) ? $lang->task->assign : $lang->task->transfer);?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->cancel;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->close;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small> <?php echo $lang->arrow . $lang->task->finish;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -14,10 +14,18 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->pause);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->pause;?></small>
|
||||
<?php endif;?>
|
||||
@@ -40,6 +48,7 @@
|
||||
</form>
|
||||
<hr class='small' />
|
||||
<div class='main'><?php include '../../common/view/action.html.php';?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -18,19 +18,17 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<?php if(!empty($task->team) && $task->assignedTo != $this->app->user->account):?>
|
||||
<div style="padding: 0 50px 0 0">
|
||||
<div class="alert with-icon no-margin">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
<div class="alert with-icon">
|
||||
<i class="icon-exclamation-sign"></i>
|
||||
<div class="content">
|
||||
<p><?php echo sprintf($lang->task->deniedNotice, '<strong>' . $task->assignedToRealName . '</strong>', $lang->task->logEfforts);?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->logEfforts;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<?php echo isonlybody() ? $task->name : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php echo isonlybody() ? ("<span title='$task->name'>" . $task->name . '</span>') : html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name);?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->task->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php echo $lang->testcase->batchCreate;?>
|
||||
<?php if($this->session->currentProductType !== 'normal') echo '<span class="label label-info">' . $branches[$branch] . '</span>';?>
|
||||
<?php if($story):?>
|
||||
<small class='text'><?php echo $lang->arrow . $story->title ?></small>
|
||||
<small class='text' title='<?php echo $story->title ?>'><?php echo $lang->arrow . $story->title ?></small>
|
||||
<?php endif;?>
|
||||
</h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
echo html::select('module', $moduleOptionMenu, $currentModuleID, "onchange='loadModuleRelated();' class='form-control chosen'");
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-btn'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$branch"), "<i class='icon icon-cog'></i>", '_blank', "data-toggle='tooltip' class='btn' title='{$lang->tree->manage}'");
|
||||
echo html::a("javascript:loadProductModules($productID)", "<i class='icon icon-refresh'></i>", '', "data-toggle='tooltip' class='btn' title='{$lang->refresh}'");
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -152,9 +152,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$libID&view=caselib¤tModuleID=0&branch=$case->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$libID&view=caselib¤tModuleID=0&branch=$case->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadLibModules($libID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadLibModules($libID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
@@ -180,9 +180,9 @@
|
||||
if(count($moduleOptionMenu) == 1)
|
||||
{
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$case->branch"), $lang->tree->manage, '_blank');
|
||||
echo html::a($this->createLink('tree', 'browse', "rootID=$productID&view=case¤tModuleID=0&branch=$case->branch", '', true), $lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
echo ' ';
|
||||
echo html::a("javascript:loadProductModules($productID)", $lang->refresh);
|
||||
echo html::a("#", $lang->refresh, '', "class='refresh' onclick='loadProductModules($productID)'");
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->testreport->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->testreport->createdDate);?></th>
|
||||
<?php if($config->global->flow != 'onlyTest'):?>
|
||||
<th class='w-250px text-left'><?php common::printOrderLink('project', $orderBy, $vars, $lang->testreport->project);?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-250px text-left'><?php echo $lang->testreport->testtask;?></th>
|
||||
<th class='c-actions-2'> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
@@ -48,8 +50,10 @@
|
||||
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
|
||||
<td><?php echo zget($users, $report->createdBy);?></td>
|
||||
<td><?php echo substr($report->createdDate, 2);?></td>
|
||||
<?php $projectName = '#' . $report->project . $projects[$report->project];?>
|
||||
<?php if($config->global->flow != 'onlyTest'):?>
|
||||
<?php $projectName = $report->project ? '#' . $report->project . $projects[$report->project] : '';?>
|
||||
<td class='text-left' title='<?php echo $projectName?>'><?php echo $projectName;?></td>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$taskName = '';
|
||||
foreach(explode(',', $report->tasks) as $taskID) $taskName .= '#' . $taskID . $tasks[$taskID] . ' ';
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<span class='input-group-addon'> ~ </span>
|
||||
<?php echo html::input('end', $end, "class='form-control form-date'")?>
|
||||
<?php
|
||||
echo html::hidden('product', $productIdList) . html::hidden('project', $project->id) . html::hidden('tasks', $tasks);
|
||||
echo html::hidden('product', $productIdList) . ($config->global->flow != 'onlyTest' ? html::hidden('project', $project->id) : '') . html::hidden('tasks', $tasks);
|
||||
echo html::hidden('objectID', $objectID) . html::hidden('objectType', $objectType);
|
||||
?>
|
||||
</div>
|
||||
@@ -55,11 +55,13 @@
|
||||
<td colspan='2'><?php echo html::input('title', $reportTitle, "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($config->global->flow != 'onlyTest'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->goal?></th>
|
||||
<td colspan='2'><?php echo $project->desc?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->profile?></th>
|
||||
<td colspan='2'>
|
||||
|
||||
@@ -31,9 +31,7 @@
|
||||
<?php echo html::input('begin', $report->begin, "class='form-control form-date'")?>
|
||||
<span class='input-group-addon'> ~ </span>
|
||||
<?php echo html::input('end', $report->end, "class='form-control form-date'")?>
|
||||
<?php
|
||||
echo html::hidden('product', $productIdList) . html::hidden('project', $report->project) . html::hidden('tasks', $tasks);
|
||||
?>
|
||||
<?php echo html::hidden('product', $productIdList) . ($config->global->flow != 'onlyTest' ? html::hidden('project', $project->id) : '') . html::hidden('tasks', $tasks);?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -54,11 +52,13 @@
|
||||
<td colspan='2'><?php echo html::input('title', $report->title, "class='form-control'")?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($config->global->flow != 'onlyTest'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->goal?></th>
|
||||
<td colspan='2'><?php echo $project->desc?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->profile?></th>
|
||||
<td colspan='2'>
|
||||
|
||||
@@ -60,10 +60,12 @@
|
||||
<th><?php echo $lang->testreport->members?></th>
|
||||
<td colspan='2'><?php foreach(explode(',', $report->members) as $member)echo zget($users, $member) . ' ';?></td>
|
||||
</tr>
|
||||
<?php if($config->global->flow != 'onlyTest' && !empty($project)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->goal?></th>
|
||||
<td colspan='2'><?php echo $project->desc?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testreport->profile?></th>
|
||||
<td colspan='2'>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $testtask->id;?></span>
|
||||
<?php echo isonlybody() ? $testtask->name : html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
|
||||
<?php echo isonlybody() ? ("<span title='$testtask->name'>" . $testtask->name . '</span>') : html::a($this->createLink('testtask', 'view', 'taskID=' . $testtask->id), $testtask->name, '_blank');?>
|
||||
<?php if(!isonlybody()):?>
|
||||
<small><?php echo $lang->arrow . $lang->testtask->start;?></small>
|
||||
<?php endif;?>
|
||||
|
||||
+48
-32
@@ -447,60 +447,76 @@ class todoModel extends model
|
||||
public function createByCycle($todoList)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$today = helper::today();
|
||||
$lastCycleList = $this->dao->select('*')->from(TABLE_TODO)->where('type')->eq('cycle')->andWhere('idvalue')->in(array_keys($todoList))->orderBy('date_asc')->fetchAll('idvalue');
|
||||
foreach($todoList as $todoID => $todo)
|
||||
{
|
||||
$todo->config = json_decode($todo->config);
|
||||
if(!empty($todo->config->end) and time() > strtotime($todo->config->end)) continue;
|
||||
$lastCycle = zget($lastCycleList, $todoID, '');
|
||||
$time = time();
|
||||
for($i = 0; $i <= $todo->config->beforeDays; $i++)
|
||||
$begin = $todo->config->begin;
|
||||
$end = $todo->config->end;
|
||||
$beforeDays = (int)$todo->config->beforeDays;
|
||||
if(!empty($beforeDays) && $beforeDays > 0) $begin = date('Y-m-d', strtotime("$begin -{$beforeDays} days"));
|
||||
if($today < $begin or (!empty($end) && $today > $end)) continue;
|
||||
|
||||
$newTodo = new stdclass();
|
||||
$newTodo->account = $todo->account;
|
||||
$newTodo->begin = $todo->begin;
|
||||
$newTodo->end = $todo->end;
|
||||
$newTodo->type = 'cycle';
|
||||
$newTodo->idvalue = $todoID;
|
||||
$newTodo->pri = $todo->pri;
|
||||
$newTodo->name = $todo->name;
|
||||
$newTodo->desc = $todo->desc;
|
||||
$newTodo->status = 'wait';
|
||||
$newTodo->private = $todo->private;
|
||||
|
||||
$date = '';
|
||||
$start = strtotime($begin);
|
||||
$finish = strtotime("$today +{$beforeDays} days");
|
||||
foreach(range($start, $finish, 86400) as $today)
|
||||
{
|
||||
$newDate = '';
|
||||
$newTodo = new stdclass();
|
||||
$newTodo->account = $todo->account;
|
||||
$newTodo->begin = $todo->begin;
|
||||
$newTodo->end = $todo->end;
|
||||
$newTodo->type = 'cycle';
|
||||
$newTodo->idvalue = $todoID;
|
||||
$newTodo->pri = $todo->pri;
|
||||
$newTodo->name = $todo->name;
|
||||
$newTodo->desc = $todo->desc;
|
||||
$newTodo->status = 'wait';
|
||||
$newTodo->private = $todo->private;
|
||||
$today = date('Y-m-d', $today);
|
||||
$lastCycle = zget($lastCycleList, $todoID, '');
|
||||
|
||||
$date = date('Y-m-d', $time + $i * 24 * 3600);
|
||||
if($todo->config->type == 'day')
|
||||
{
|
||||
if(empty($lastCycle)) $newDate = date('Y-m-d', $time + ($todo->config->day - 1) * 24 * 3600);
|
||||
if(!empty($lastCycle->date)) $newDate = date('Y-m-d', strtotime($lastCycle->date) + $todo->config->day * 24 * 3600);
|
||||
$day = (int)$todo->config->day;
|
||||
if($day <= 0) continue;
|
||||
|
||||
if(empty($lastCycle)) $date = date('Y-m-d', strtotime("{$today} +" . ($day - 1) . " days"));
|
||||
if(!empty($lastCycle->date)) $date = date('Y-m-d', strtotime("{$lastCycle->date} +{$day} days"));
|
||||
}
|
||||
elseif($todo->config->type == 'week')
|
||||
{
|
||||
$week = date('w', strtotime($date));
|
||||
$week = date('w', strtotime($today));
|
||||
if(strpos(",{$todo->config->week},", ",{$week},") !== false)
|
||||
{
|
||||
if(empty($lastCycle)) $newDate = $date;
|
||||
if($lastCycle->date < $date) $newDate = $date;
|
||||
if(empty($lastCycle)) $date = $today;
|
||||
if($lastCycle->date < $today) $date = $today;
|
||||
}
|
||||
}
|
||||
elseif($todo->config->type == 'month')
|
||||
{
|
||||
$day = date('j', strtotime($date));
|
||||
$day = date('j', strtotime($today));
|
||||
if(strpos(",{$todo->config->month},", ",{$day},") !== false)
|
||||
{
|
||||
if(empty($lastCycle)) $newDate = $date;
|
||||
if($lastCycle->date < $date) $newDate = $date;
|
||||
if(empty($lastCycle)) $date = $today;
|
||||
if($lastCycle->date < $today) $date = $today;
|
||||
}
|
||||
}
|
||||
|
||||
if($date == $newDate)
|
||||
{
|
||||
$newTodo->date = $newDate;
|
||||
$this->dao->insert(TABLE_TODO)->data($newTodo)->exec();
|
||||
$this->action->create('todo', $this->dao->lastInsertID(), 'opened', '', '', $newTodo->account);
|
||||
$lastCycleList[$todoID] = $newTodo;
|
||||
}
|
||||
if(!$date) continue;
|
||||
if($date < $todo->config->begin) continue;
|
||||
if($date < date('Y-m-d')) continue;
|
||||
if($date > date('Y-m-d', $finish)) continue;
|
||||
if(!empty($end) && $date > $end) continue;
|
||||
|
||||
$newTodo->date = $date;
|
||||
|
||||
$this->dao->insert(TABLE_TODO)->data($newTodo)->exec();
|
||||
$this->action->create('todo', $this->dao->lastInsertID(), 'opened', '', '', $newTodo->account);
|
||||
|
||||
$lastCycleList[$todoID] = $newTodo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,6 +296,9 @@ class tree extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->tree->manageChild($rootID, $viewType);
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', '', "function(){parent.parent.$('a.refresh').click()}"));
|
||||
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
@@ -357,9 +360,9 @@ class tree extends control
|
||||
if(count($optionMenu) == 1 and $needManage)
|
||||
{
|
||||
$output .= "<span class='input-group-addon'>";
|
||||
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch"), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '_blank');
|
||||
$output .= html::a($this->createLink('tree', 'browse', "rootID=$rootID&view=$viewType¤tModuleID=0&branch=$branch", '', true), $viewType == 'line' ? $this->lang->tree->manageLine : $this->lang->tree->manage, '', "class='text-primary' data-toggle='modal' data-type='iframe' data-width='95%'");
|
||||
$output .= ' ';
|
||||
$output .= $viewType == 'line' ? html::a("javascript:loadProductLines($rootID)", $this->lang->refresh) : html::a("javascript:loadProductModules($rootID)", $this->lang->refresh);
|
||||
$output .= $viewType == 'line' ? html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductLines($rootID)'") : html::a("#", $this->lang->refresh, '', "class='refresh' onclick='loadProductModules($rootID)'");
|
||||
$output .= '</span>';
|
||||
}
|
||||
die($output);
|
||||
|
||||
@@ -17,3 +17,5 @@
|
||||
#modulesTree li > .list-toggle {top: 0}
|
||||
|
||||
#childrenForm table tr > td.text-middle span{display:block; float:left;}
|
||||
|
||||
.body-modal #mainMenu{display: none;}
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
</a>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class="text" title='<?php echo $root->name;?>'>
|
||||
<?php $rootName = $viewType == 'line' ? '' : $root->name;?>
|
||||
<span class="text" title='<?php echo $rootName;?>'>
|
||||
<?php
|
||||
if($viewType == 'doc')
|
||||
{
|
||||
|
||||
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