Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2016-03-29 10:51:10 +08:00
29 changed files with 127 additions and 53 deletions
+4
View File
@@ -29,7 +29,11 @@
<tr data-url='<?php echo $sso . $sign . 'referer=' . base64_encode($this->createLink('project', 'task', 'project=' . $project->id)); ?>' <?php echo $appid?>>
<td class='text-left' title='<?php echo $project->name;?>'><?php echo $project->name;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->hours->totalEstimate;?></td>
<td><?php echo $project->hours->totalConsumed;?></td>
<td><?php echo $project->hours->totalLeft;?></td>
+8 -8
View File
@@ -46,18 +46,18 @@
?>
<tr class='text-center'>
<td><?php echo $bugID . html::hidden("bugIDList[$bugID]", $bugID);?></td>
<td><?php echo html::select("types[$bugID]", $typeList, $bugs[$bugID]->type, 'class=form-control');?></td>
<td><?php echo html::select("severities[$bugID]", (array)$lang->bug->severityList, $bugs[$bugID]->severity, 'class=form-control');?></td>
<td><?php echo html::select("pris[$bugID]", (array)$lang->bug->priList, $bugs[$bugID]->pri, 'class=form-control');?></td>
<td><?php echo html::input("titles[$bugID]", $bugs[$bugID]->title, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bugs[$bugID]->assignedTo, "class='form-control chosen'");?></td>
<td><?php echo html::select("statuses[$bugID]", (array)$lang->bug->statusList, $bugs[$bugID]->status, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bugs[$bugID]->resolvedBy, "class='form-control chosen'");?></td>
<td><?php echo html::select("types[$bugID]", $typeList, $bugs[$bugID]->type, 'class=form-control');?></td>
<td><?php echo html::select("severities[$bugID]", (array)$lang->bug->severityList, $bugs[$bugID]->severity, 'class=form-control');?></td>
<td><?php echo html::select("pris[$bugID]", (array)$lang->bug->priList, $bugs[$bugID]->pri, 'class=form-control');?></td>
<td title='<?php echo $bugs[$bugID]->title?>'> <?php echo html::input("titles[$bugID]", $bugs[$bugID]->title, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bugs[$bugID]->assignedTo, "class='form-control chosen'");?></td>
<td><?php echo html::select("statuses[$bugID]", (array)$lang->bug->statusList, $bugs[$bugID]->status, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bugs[$bugID]->resolvedBy, "class='form-control chosen'");?></td>
<td>
<table class='w-p100'>
<tr>
<td class='pd-0'>
<?php echo html::select("resolutions[$bugID]", $this->lang->bug->resolutionList, $bugs[$bugID]->resolution, "class=form-control onchange=setDuplicate(this.value,$bugID)");?>
<?php echo html::select("resolutions[$bugID]", $this->lang->bug->resolutionList, $bugs[$bugID]->resolution, "class=form-control onchange=setDuplicate(this.value,$bugID)");?>
</td>
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bugs[$bugID]->resolution != 'duplicate') echo "style='display:none'";?>>
<?php echo html::input("duplicateBugs[$bugID]", '', "class=form-control placeholder='{$lang->bug->duplicateBug}'");?>
+1 -1
View File
@@ -171,7 +171,7 @@ js::set('refresh', $lang->refresh);
if(empty($contactLists))
{
echo '<span class="input-group-btn">';
echo '<a href="' . $this->createLink('company', 'browse') . '" target="_blank" data-toggle="tooltip" class="btn" title="' . $lang->user->contacts->manage . '"><i class="icon icon-cog"></i></a>';
echo '<a href="' . $this->createLink('my', 'managecontacts', "listID=0&mode=new") . '" target="_blank" data-toggle="tooltip" class="btn" title="' . $lang->user->contacts->manage . '"><i class="icon icon-cog"></i></a>';
echo '<a href="###" onclick="ajaxGetContacts(this)" data-toggle="tooltip" class="btn" title="' . $lang->refresh . '"><i class="icon icon-refresh"></i></a>';
echo '</span>';
}
-4
View File
@@ -2,10 +2,6 @@ function batchEdit()
{
$('#userListForm').attr('action', createLink('user', 'batchEdit', 'dept=' + deptID));
}
function manageContacts()
{
$('#userListForm').attr('action', createLink('user', 'manageContacts'));
}
$(function()
{
setTimeout(function(){fixedTfootAction('#userListForm')}, '100');
+1 -3
View File
@@ -54,8 +54,7 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<tbody>
<?php
$canBatchEdit = common::hasPriv('user', 'batchEdit');
$canManageContacts = common::hasPriv('user', 'manageContacts');
$canBatchEdit = common::hasPriv('user', 'batchEdit');
?>
<?php foreach($users as $user):?>
<tr class='text-center'>
@@ -99,7 +98,6 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<?php
if($canBatchEdit or $canManageContacts) echo html::selectButton();
if($canBatchEdit) echo html::submitButton($lang->edit, 'onclick=batchEdit()', 'btn btn-default');
if($canManageContacts) echo html::submitButton($lang->user->contacts->manage, 'onclick=manageContacts()');
?>
</div>
<?php echo $pager->show();?>
+4
View File
@@ -41,7 +41,11 @@
<td class='text-left'><?php echo html::a($projectLink, $project->name);?></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='project-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->role;?></td>
<td><?php echo $project->join;?></td>
<td><?php echo $project->hours;?></td>
+1 -1
View File
@@ -33,7 +33,7 @@
<?php foreach($productIDList as $productID):?>
<tr class='text-center'>
<td><?php echo sprintf('%03d', $productID) . html::hidden("productIDList[$productID]", $productID);?></td>
<td><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control'");?></td>
<td title='<?php echo $products[$productID]->name?>'><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control'");?></td>
<td><?php echo html::input("codes[$productID]", $products[$productID]->code, "class='form-control'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("POs[$productID]", $poUsers, $products[$productID]->PO, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("QDs[$productID]", $qdUsers, $products[$productID]->QD, "class='form-control chosen'");?></td>
+4
View File
@@ -33,7 +33,11 @@
<td class='text-left'><?php echo html::a($this->createLink('project', 'task', 'project=' . $project->id), $project->name, '_parent');?></td>
<td><?php echo $project->code;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='status-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='status-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->hours->totalEstimate;?></td>
<td><?php echo $project->hours->totalConsumed;?></td>
<td><?php echo $project->hours->totalLeft;?></td>
+1 -1
View File
@@ -26,7 +26,7 @@ function computeEndDate(delta)
if(!beginDate) return;
endDate = convertStringToDate(beginDate).addDays(parseInt(delta));
endDate = endDate.toString('yyyy-M-dd');
endDate = endDate.toString('yyyy-MM-dd');
$('#end').val(endDate);
}
+1 -1
View File
@@ -26,6 +26,6 @@ function computeEndDate(delta)
if(!beginDate) return;
endDate = convertStringToDate(beginDate).addDays(parseInt(delta));
endDate = endDate.toString('yyyy-M-dd');
endDate = endDate.toString('yyyy-MM-dd');
$('#end').val(endDate);
}
+1 -1
View File
@@ -30,7 +30,7 @@
<?php foreach($plans as $plan):?>
<tr>
<td><?php echo $plan->id . html::hidden("id[$plan->id]", $plan->id);?></td>
<td><?php echo html::input("title[$plan->id]", $plan->title, "class='form-control'")?></td>
<td title='<?php echo $plan->title?>'><?php echo html::input("title[$plan->id]", $plan->title, "class='form-control'")?></td>
<td><?php echo html::textarea("desc[$plan->id]", $plan->desc, "class='form-control' rows='1'")?></td>
<td><?php echo html::input("begin[$plan->id]", $plan->begin, "class='form-control form-date'")?></td>
<td><?php echo html::input("end[$plan->id]", $plan->end, "class='form-control form-date'")?></td>
+1
View File
@@ -48,6 +48,7 @@ $lang->project->typeDesc = 'No burndown and story in OPS';
$lang->project->mine = 'I charge : ';
$lang->project->other = 'Other : ';
$lang->project->deleted = 'Deleted';
$lang->project->delayed = 'Delayed';
$lang->project->start = 'Start';
$lang->project->activate = 'Activate';
+1
View File
@@ -48,6 +48,7 @@ $lang->project->typeDesc = "运维{$lang->projectCommon}禁用燃尽图和
$lang->project->mine = '我负责:';
$lang->project->other = '其他:';
$lang->project->deleted = '已删除';
$lang->project->delayed = '已延期';
$lang->project->start = '开始';
$lang->project->activate = '激活';
+14
View File
@@ -713,6 +713,13 @@ class projectModel extends model
// Process the end time.
$project->end = date("Y-m-d", strtotime($project->end));
/* Judge whether the project is delayed. */
if($project->status != 'done')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
/* Process the burns. */
$project->burns = array();
$burnData = isset($burns[$project->id]) ? $burns[$project->id] : array();
@@ -818,6 +825,13 @@ class projectModel extends model
$project = $this->dao->findById((int)$projectID)->from(TABLE_PROJECT)->fetch();
if(!$project) return false;
/* Judge whether the project is delayed. */
if($project->status != 'done')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
$total = $this->dao->select('
SUM(estimate) AS totalEstimate,
SUM(consumed) AS totalConsumed,
+3 -3
View File
@@ -22,7 +22,7 @@
<thead>
<tr class='text-center'>
<th class='w-50px'><?php echo $lang->idAB;?></th>
<th> <?php echo $lang->project->name;?> <span class='required'></span></th>
<th><?php echo $lang->project->name;?> <span class='required'></span></th>
<th class='w-150px'><?php echo $lang->project->code;?> <span class='required'></span></th>
<th class='w-150px'><?php echo $lang->project->PM;?></th>
<th class='w-100px'><?php echo $lang->project->status;?></th>
@@ -35,9 +35,9 @@
<?php foreach($projectIDList as $projectID):?>
<tr class='text-center'>
<td><?php echo sprintf('%03d', $projectID) . html::hidden("projectIDList[$projectID]", $projectID);?></td>
<td><?php echo html::input("names[$projectID]", $projects[$projectID]->name, "class='form-control'");?></td>
<td title='<?php echo $projects[$projectID]->name?>'><?php echo html::input("names[$projectID]", $projects[$projectID]->name, "class='form-control'");?></td>
<td><?php echo html::input("codes[$projectID]", $projects[$projectID]->code, "class='form-control'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("PMs[$projectID]", $pmUsers, $projects[$projectID]->PM, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("PMs[$projectID]", $pmUsers, $projects[$projectID]->PM, "class='form-control chosen'");?></td>
<td><?php echo html::select("statuses[$projectID]", $lang->project->statusList, $projects[$projectID]->status, 'class=form-control');?></td>
<td><?php echo html::input("begins[$projectID]", $projects[$projectID]->begin, "class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
<td><?php echo html::input("ends[$projectID]", $projects[$projectID]->end, "class='form-control form-date' onchange='computeWorkDays(this.id)'");?></td>
+4
View File
@@ -62,7 +62,11 @@
<td class='text-left'><?php echo $project->code;?></td>
<td><?php echo $users[$project->PM];?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='status-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='status-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->hours->totalEstimate;?></td>
<td><?php echo $project->hours->totalConsumed;?></td>
<td><?php echo $project->hours->totalLeft;?></td>
+4
View File
@@ -89,7 +89,11 @@
</tr>
<tr>
<th><?php echo $lang->project->status;?></th>
<?php if(isset($project->delay)):?>
<td class='delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='<?php echo $project->status;?>'><?php $lang->show($lang->project->statusList, $project->status);?></td>
<?php endif;?>
</tr>
<tr>
<th><?php echo $lang->project->PM;?></th>
+9 -9
View File
@@ -27,7 +27,7 @@
<th class='w-30px'> <?php echo $lang->idAB;?></th>
<th class='w-200px'><?php echo $lang->story->module;?></th>
<th class='w-200px'><?php echo $lang->story->planAB;?></th>
<th> <?php echo $lang->story->title;?> <span class='required'></span></th>
<th> <?php echo $lang->story->title;?> <span class='required'></span></th>
<th class='w-50px'> <?php echo $lang->story->estimateAB;?></th>
<th class='w-70px'> <?php echo $lang->priAB;?></th>
<th class='w-100px'> <?php echo $lang->story->source;?></th>
@@ -40,18 +40,18 @@
<?php foreach($storyIDList as $storyID):?>
<tr class='text-center'>
<td><?php echo $storyID . html::hidden("storyIDList[$storyID]", $storyID);?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("modules[$storyID]", $moduleOptionMenus[$stories[$storyID]->product], $stories[$storyID]->module, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("plans[$storyID]", $productPlans[$stories[$storyID]->product], $stories[$storyID]->plan, "class='form-control chosen'");?></td>
<td><?php echo html::input("titles[$storyID]", $stories[$storyID]->title, 'class=form-control'); ?></td>
<td><?php echo html::input("estimates[$storyID]", $stories[$storyID]->estimate, "class='form-control' autocomplete='off'"); ?></td>
<td><?php echo html::select("pris[$storyID]", (array)$lang->story->priList, $stories[$storyID]->pri, 'class=form-control');?></td>
<td><?php echo html::select("sources[$storyID]", $lang->story->sourceList, $stories[$storyID]->source, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'> <?php echo html::select("modules[$storyID]", $moduleOptionMenus[$stories[$storyID]->product], $stories[$storyID]->module, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'> <?php echo html::select("plans[$storyID]", $productPlans[$stories[$storyID]->product], $stories[$storyID]->plan, "class='form-control chosen'");?></td>
<td title='<?php echo $stories[$storyID]->title?>'><?php echo html::input("titles[$storyID]", $stories[$storyID]->title, 'class=form-control'); ?></td>
<td><?php echo html::input("estimates[$storyID]", $stories[$storyID]->estimate, "class='form-control' autocomplete='off'"); ?></td>
<td><?php echo html::select("pris[$storyID]", (array)$lang->story->priList, $stories[$storyID]->pri, 'class=form-control');?></td>
<td><?php echo html::select("sources[$storyID]", $lang->story->sourceList, $stories[$storyID]->source, 'class=form-control');?></td>
<td class='story-<?php echo $stories[$storyID]->status;?>'><?php echo $lang->story->statusList[$stories[$storyID]->status];?></td>
<?php if($stories[$storyID]->status != 'draft'):?>
<td><?php echo html::select("stages[$storyID]", $lang->story->stageList, $stories[$storyID]->stage, 'class=form-control');?></td>
<td><?php echo html::select("stages[$storyID]", $lang->story->stageList, $stories[$storyID]->stage, 'class=form-control');?></td>
<?php else:?>
<td><?php echo html::select("stages[$storyID]", $lang->story->stageList, $stories[$storyID]->stage, 'class="form-control" disabled="disabled"');?></td>
<td><?php echo html::select("stages[$storyID]", $lang->story->stageList, $stories[$storyID]->stage, 'class="form-control" disabled="disabled"');?></td>
<?php endif;?>
<?php if($stories[$storyID]->status == 'closed'):?>
+1 -1
View File
@@ -127,8 +127,8 @@
if(empty($contactLists))
{
echo '<span class="input-group-btn">';
echo '<a data-toggle="tooltip" title="' . $lang->user->contacts->manage . '" href="' . $this->createLink('my', 'managecontacts', "listID=0&mode=new") . '" target="_blank" class="btn"><i class="icon icon-cog"></i></a>';
echo '<a data-toggle="tooltip" title="' . $lang->refresh . '" href="###" class="btn" onclick="ajaxGetContacts(this)"><i class="icon icon-refresh"></i></a>';
echo '<a data-toggle="tooltip" title="' . $lang->user->contacts->manage . '" href="' . $this->createLink('company', 'browse') . '" target="_blank" class="btn"><i class="icon icon-cog"></i></a>';
echo '</span>';
}
?>
+2
View File
@@ -1,6 +1,8 @@
.dropdown-pris > .btn {background-color: #fff;}
#mailto + .chosen-container-multi .chosen-choices {border-top-left-radius: 0; border-bottom-left-radius: 0}
#mailtoGroup .input-group-btn > .btn {margin-left: -1px!important;}
.chosen-container {max-width: 980px}
.minw-80px {min-width: 80px;}
+11 -11
View File
@@ -47,17 +47,17 @@
?>
<tr class='text-center'>
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
<td><?php echo html::input("names[$taskID]", $tasks[$taskID]->name, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $members, $tasks[$taskID]->assignedTo, "class='form-control chosen'");?></td>
<td><?php echo html::select("types[$taskID]", $lang->task->typeList, $tasks[$taskID]->type, 'class=form-control');?></td>
<td><?php echo html::select("statuses[$taskID]", $lang->task->statusList, $tasks[$taskID]->status, 'class=form-control');?></td>
<td><?php echo html::select("pris[$taskID]", (array)$lang->task->priList, $tasks[$taskID]->pri, 'class=form-control');?></td>
<td><?php echo html::input("estimates[$taskID]", $tasks[$taskID]->estimate, "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("consumeds[$taskID]", '', "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("lefts[$taskID]", $tasks[$taskID]->left, "class='form-control text-center' autocomplete='off'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("finishedBys[$taskID]", $members, $tasks[$taskID]->finishedBy, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("closedBys[$taskID]", $members, $tasks[$taskID]->closedBy, "class='form-control chosen'");?></td>
<td title='<?php echo $tasks[$taskID]->name?>'><?php echo html::input("names[$taskID]", $tasks[$taskID]->name, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("assignedTos[$taskID]", $members, $tasks[$taskID]->assignedTo, "class='form-control chosen'");?></td>
<td><?php echo html::select("types[$taskID]", $lang->task->typeList, $tasks[$taskID]->type, 'class=form-control');?></td>
<td><?php echo html::select("statuses[$taskID]", $lang->task->statusList, $tasks[$taskID]->status, 'class=form-control');?></td>
<td><?php echo html::select("pris[$taskID]", (array)$lang->task->priList, $tasks[$taskID]->pri, 'class=form-control');?></td>
<td><?php echo html::input("estimates[$taskID]", $tasks[$taskID]->estimate, "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("consumeds[$taskID]", '', "class='form-control text-center' autocomplete='off'");?></td>
<td><?php echo html::input("lefts[$taskID]", $tasks[$taskID]->left, "class='form-control text-center' autocomplete='off'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("finishedBys[$taskID]", $members, $tasks[$taskID]->finishedBy, "class='form-control chosen'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("closedBys[$taskID]", $members, $tasks[$taskID]->closedBy, "class='form-control chosen'");?></td>
<td><?php echo html::select("closedReasons[$taskID]", $lang->task->reasonList, $tasks[$taskID]->closedReason, 'class=form-control');?></td>
</tr>
<?php endforeach;?>
+10 -1
View File
@@ -94,10 +94,19 @@
</div>
</td>
<td colspan='2'>
<div class='input-group'>
<div id='mailtoGroup' class='input-group'>
<span class='input-group-addon'><?php echo $lang->task->mailto;?></span>
<?php echo html::select('mailto[]', $project->acl == 'private' ? $members : $users, str_replace(' ', '', $task->mailto), "multiple class='form-control'");?>
<?php if($contactLists) echo html::select('', $contactLists, '', "class='form-control chosen' onchange=\"setMailto('mailto', this.value)\"");?>
<?php
if(empty($contactLists))
{
echo '<span class="input-group-btn">';
echo '<a data-toggle="tooltip" title="' . $lang->user->contacts->manage . '" href="' . $this->createLink('my', 'managecontacts', "listID=0&mode=new") . '" target="_blank" class="btn"><i class="icon icon-cog"></i></a>';
echo '<a data-toggle="tooltip" title="' . $lang->refresh . '" href="###" class="btn" onclick="ajaxGetContacts(this)"><i class="icon icon-refresh"></i></a>';
echo '</span>';
}
?>
</div>
</td>
</tr>
+6 -6
View File
@@ -35,12 +35,12 @@
<?php if(!$productID) $moduleOptionMenu = $this->tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', $startModuleID = 0); ?>
<tr class='text-center'>
<td><?php echo $caseID . html::hidden("caseIDList[$caseID]", $caseID);?></td>
<td><?php echo html::select("pris[$caseID]", $lang->testcase->priList, $cases[$caseID]->pri, 'class=form-control');?></td>
<td><?php echo html::select("statuses[$caseID]", (array)$lang->testcase->statusList, $cases[$caseID]->status, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("modules[$caseID]", $moduleOptionMenu, $cases[$caseID]->module, "class='form-control chosen'");?></td>
<td><?php echo html::input("titles[$caseID]", $cases[$caseID]->title, 'class=form-control'); echo "<span class='star'>*</span>";?></td>
<td><?php echo html::select("types[$caseID]", $lang->testcase->typeList, $cases[$caseID]->type, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("stages[$caseID][]", $lang->testcase->stageList, $cases[$caseID]->stage, "class='form-control chosen' multiple data-placeholder='{$lang->testcase->stage}'");?></td>
<td><?php echo html::select("pris[$caseID]", $lang->testcase->priList, $cases[$caseID]->pri, 'class=form-control');?></td>
<td><?php echo html::select("statuses[$caseID]", (array)$lang->testcase->statusList, $cases[$caseID]->status, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'> <?php echo html::select("modules[$caseID]", $moduleOptionMenu, $cases[$caseID]->module, "class='form-control chosen'");?></td>
<td title='<?php echo $cases[$caseID]->title?>'><?php echo html::input("titles[$caseID]", $cases[$caseID]->title, 'class=form-control'); echo "<span class='star'>*</span>";?></td>
<td><?php echo html::select("types[$caseID]", $lang->testcase->typeList, $cases[$caseID]->type, 'class=form-control');?></td>
<td class='text-left' style='overflow:visible'> <?php echo html::select("stages[$caseID][]", $lang->testcase->stageList, $cases[$caseID]->stage, "class='form-control chosen' multiple data-placeholder='{$lang->testcase->stage}'");?></td>
</tr>
<?php endforeach;?>
<?php if(isset($suhosinInfo)):?>
+1
View File
@@ -0,0 +1 @@
#mailtoGroup .input-group-btn > .btn {margin-left: -1px!important;}
+6
View File
@@ -58,3 +58,9 @@ function suitEndDate()
endDate = endDate.toString('yyyy-M-dd');
$('#end').val(endDate);
}
/* If the mouse hover over the manage contacts button, give tip. */
$(function()
{
$('[data-toggle=tooltip]').tooltip();
});
+10 -1
View File
@@ -73,9 +73,18 @@
<tr>
<th><?php echo $lang->testtask->mailto;?></th>
<td colspan='2'>
<div class='input-group'>
<div id='mailtoGroup' class='input-group'>
<?php echo html::select('mailto[]', $users, '', "multiple class='form-control'");?>
<?php if($contactLists) echo html::select('', $contactLists, '', "class='form-control chosen' onchange=\"setMailto('mailto', this.value)\"");?>
<?php
if(empty($contactLists))
{
echo '<span class="input-group-btn">';
echo '<a href="' . $this->createLink('my', 'managecontacts', "listID=0&mode=new") . '" target="_blank" data-toggle="tooltip" class="btn" title="' . $lang->user->contacts->manage . '"><i class="icon icon-cog"></i></a>';
echo '<a href="###" onclick="ajaxGetContacts(this)" data-toggle="tooltip" class="btn" title="' . $lang->refresh . '"><i class="icon icon-refresh"></i></a>';
echo '</span>';
}
?>
</div>
</td>
</tr>
+13 -1
View File
@@ -746,11 +746,23 @@ class userModel extends model
*/
public function getProjects($account)
{
return $this->dao->select('t1.*,t2.*')->from(TABLE_TEAM)->alias('t1')
$projects = $this->dao->select('t1.*,t2.*')->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.account')->eq($account)
->andWhere('t2.deleted')->eq(0)
->fetchAll();
/* Judge whether the project is delayed. */
foreach($projects as $project)
{
if($project->status != 'done')
{
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
}
return $projects;
}
/**
+4
View File
@@ -36,7 +36,11 @@
<td><?php echo html::a($projectLink, $project->name);?></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='project-<?php echo $project->status?>'><?php echo $lang->project->statusList[$project->status];?></td>
<?php endif;?>
<td><?php echo $project->role;?></td>
<td><?php echo $project->join;?></td>
<td><?php echo $project->hours;?></td>
+1
View File
@@ -211,6 +211,7 @@ td.status-active, td[class$="-active"] {color:#229f24;}
td.wait, td[class$="-wait"] {color:#808080;}
td.pause, td[class$="-pause"],
td.suspended, td[class$="-suspended"] {color:#E48600;}
td.delay, td[class$="-delay"] {color:#e84e0f;}
td.closed, td[class$="-closed"],
td.cancel, td[class$="-cancel"] {color:#888;}
td.doing, td[class$="-doing"],