Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -1237,14 +1237,19 @@ class block extends control
|
||||
$this->app->loadLang('todo');
|
||||
$stmt = $this->dao->select('*')->from(TABLE_TODO)
|
||||
->where("(assignedTo = '{$this->app->user->account}' or (assignedTo = '' and account='{$this->app->user->account}'))")
|
||||
->andWhere('status')->ne('done')
|
||||
->andWhere('cycle')->eq(0)
|
||||
->orderBy('`date`');
|
||||
if(isset($params->todoNum)) $stmt->limit($params->todoNum);
|
||||
$todos = $stmt->fetchAll();
|
||||
|
||||
foreach($todos as $todo)
|
||||
foreach($todos as $key => $todo)
|
||||
{
|
||||
if($todo->status == 'done' and $todo->finishedBy == $this->app->user->account)
|
||||
{
|
||||
unset($todos[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$todo->begin = date::formatTime($todo->begin);
|
||||
$todo->end = date::formatTime($todo->end);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ $config->bug->search['params']['openedBy'] = array('operator' => '=',
|
||||
$config->bug->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->bug->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
|
||||
$config->bug->search['params']['mailto'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->bug->search['params']['mailto'] = array('operator' => 'include', 'control' => 'select', 'values' => 'users');
|
||||
|
||||
$config->bug->search['params']['openedBuild'] = array('operator' => 'include', 'control' => 'select', 'values' => 'builds');
|
||||
$config->bug->search['params']['resolvedBuild'] = array('operator' => '=', 'control' => 'select', 'values' => 'builds');
|
||||
|
||||
@@ -177,8 +177,10 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->mailto;?></th>
|
||||
<td>
|
||||
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control chosen" multiple');?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists');?>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control chosen" multiple');?>
|
||||
<div class='input-group-btn'><?php echo $this->fetch('my', 'buildContactLists');?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<?php endif;?>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $bug->id?></span>
|
||||
<span class="text" style='color: <?php echo $bug->color; ?>'><?php echo $bug->title;?></span>
|
||||
<span class="text" title="<?php echo $bug->title;?>" style='color: <?php echo $bug->color; ?>'><?php echo $bug->title;?></span>
|
||||
<?php if($bug->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->bug->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -28,7 +28,7 @@ tbody tr td:first-child input{display:none;}
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $build->id;?></span>
|
||||
<span class='text'><?php echo $build->name;?></span>
|
||||
<span class='text' title='<?php echo $build->name;?>'><?php echo $build->name;?></span>
|
||||
<?php if($build->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->build->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1312,19 +1312,19 @@ EOD;
|
||||
if($module == 'effort' and ($method == 'batchcreate' or $method == 'createforobject')) return true;
|
||||
|
||||
// limited project
|
||||
$limitedProject = false;
|
||||
if(!empty($module) && $module == 'task' && !empty($object->project) or
|
||||
!empty($module) && $module == 'project' && !empty($object->id))
|
||||
{
|
||||
$limitedProject = false;
|
||||
$objectID = '';
|
||||
if(!empty($object->id)) $objectID = $object->id;
|
||||
if(!empty($object->id) && !empty($object->project)) $objectID = $object->project;
|
||||
|
||||
$limitedProjects = !empty($_SESSION['limitedProjects']) ? $_SESSION['limitedProjects'] : '';
|
||||
if(strpos(",{$limitedProjects},", ",$objectID,") !== false) $limitedProject = true;
|
||||
if(empty($app->user->rights['rights']['my']['limited']) && !$limitedProject) return true;
|
||||
}
|
||||
|
||||
if(empty($app->user->rights['rights']['my']['limited']) && !$limitedProject) return true;
|
||||
|
||||
if(!is_null($method) && strpos($method, 'batch') === 0) return false;
|
||||
if(!is_null($method) && strpos($method, 'link') === 0) return false;
|
||||
|
||||
+24
-16
@@ -48,7 +48,7 @@ class docModel extends model
|
||||
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= "<div class='btn-group'>";
|
||||
$selectHtml .= "<a data-toggle='dropdown' class='btn'>" . $mainLib . " <span class='caret'></span></a>";
|
||||
$selectHtml .= "<a data-toggle='dropdown' class='btn btn-limit' title=$mainLib>" . $mainLib . " <span class='caret'></span></a>";
|
||||
$selectHtml .= "<ul class='dropdown-menu'>";
|
||||
foreach($this->lang->doc->fastMenuList as $key => $fastMenu)
|
||||
{
|
||||
@@ -68,12 +68,13 @@ class docModel extends model
|
||||
if($type == 'project') $currentLib = $projectID;
|
||||
if($currentLib)
|
||||
{
|
||||
$allLibGroups = $this->getAllLibGroups();
|
||||
$currentGroups = $allLibGroups[$type];
|
||||
$allLibGroups = $this->getAllLibGroups();
|
||||
$currentGroups = $allLibGroups[$type];
|
||||
$currentLibName = is_array($currentGroups[$currentLib]) ? $currentGroups[$currentLib]['name'] : $currentGroups[$currentLib];
|
||||
|
||||
$selectHtml .= "<div class='btn-group angle-btn'>";
|
||||
$selectHtml .= "<div class='btn-group'>";
|
||||
$selectHtml .= '<a data-toggle="dropdown" class="btn">' . (is_array($currentGroups[$currentLib]) ? $currentGroups[$currentLib]['name'] : $currentGroups[$currentLib]) . ' <span class="caret"></span></a>';
|
||||
$selectHtml .= "<a data-toggle='dropdown' class='btn btn-limit' title=$currentLibName>" . $currentLibName . ' <span class="caret"></span></a>';
|
||||
$selectHtml .='<ul class="dropdown-menu">';
|
||||
if($type == 'custom')
|
||||
{
|
||||
@@ -816,6 +817,13 @@ class docModel extends model
|
||||
if(!empty($object->product) and !empty($acls['products']) and !in_array($object->product, $acls['products'])) return false;
|
||||
if(!empty($object->project) and !empty($acls['projects']) and !in_array($object->project, $acls['projects'])) return false;
|
||||
|
||||
if(isset($object->lib))
|
||||
{
|
||||
static $libs;
|
||||
if(empty($libs)) $libs = $this->getLibs('all');
|
||||
if(!isset($libs[$object->lib])) return false;
|
||||
}
|
||||
|
||||
if($object->acl == 'open') return true;
|
||||
|
||||
$account = ',' . $this->app->user->account . ',';
|
||||
@@ -831,14 +839,7 @@ class docModel extends model
|
||||
if(strpos(",$object->groups,", ",$groupID,") !== false) return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($object->lib))
|
||||
{
|
||||
static $libs;
|
||||
if(empty($libs)) $libs = $this->getLibs('all');
|
||||
if(!isset($libs[$object->lib])) return false;
|
||||
|
||||
}
|
||||
if(isset($object->lib)) return false;
|
||||
|
||||
if($object->project)
|
||||
{
|
||||
@@ -1137,19 +1138,26 @@ class docModel extends model
|
||||
*/
|
||||
public function statLibCounts($idList)
|
||||
{
|
||||
$moduleCounts= $this->dao->select("root, count(id) as moduleCount")->from(TABLE_MODULE)
|
||||
$moduleCounts = $this->dao->select("root, count(id) as moduleCount")->from(TABLE_MODULE)
|
||||
->where('type')->eq('doc')
|
||||
->andWhere('root')->in($idList)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->groupBy('root')
|
||||
->fetchPairs();
|
||||
|
||||
$docCounts= $this->dao->select("lib, count(id) as docCount")->from(TABLE_DOC)
|
||||
$docs = $this->dao->select("id,lib,acl,users,groups")->from(TABLE_DOC)
|
||||
->where('lib')->in($idList)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('module')->eq(0)
|
||||
->groupBy('lib')
|
||||
->fetchPairs();
|
||||
->fetchAll();
|
||||
|
||||
$docCounts = array();
|
||||
foreach($docs as $doc)
|
||||
{
|
||||
if(!$this->checkPriv($doc)) continue;
|
||||
if(!isset($docCounts[$doc->lib])) $docCounts[$doc->lib] = 0;
|
||||
$docCounts[$doc->lib] ++;
|
||||
}
|
||||
|
||||
$itemCounts = array();
|
||||
foreach($idList as $libID)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<?php echo html::a($browseLink, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-link'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $doc->id;?></span><span class="text"><?php echo $doc->title;?></span>
|
||||
<span class="label label-id"><?php echo $doc->id;?></span><span class="text" title='<?php echo $doc->title;?>'><?php echo $doc->title;?></span>
|
||||
<?php if($doc->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->doc->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $plan->id;?></span>
|
||||
<?php echo $plan->title;?>
|
||||
<span title='<?php echo $plan->name;?>' class='text'><?php echo $plan->title;?></span>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branches[$branch] . '</span>';?>
|
||||
<span class='label label-info label-badge'>
|
||||
<?php echo ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? $lang->productplan->future : $plan->begin . '~' . $plan->end;?>
|
||||
|
||||
@@ -2078,15 +2078,6 @@ class projectModel extends model
|
||||
|
||||
$statusVar = 'status' . ucfirst($task->status);
|
||||
$$statusVar ++;
|
||||
|
||||
if(!empty($task->children))
|
||||
{
|
||||
$taskSum += count($task->children);
|
||||
foreach($task->children as $child)
|
||||
{
|
||||
if($child->status == 'wait') $statusWait ++;
|
||||
}
|
||||
}
|
||||
$taskSum ++;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $release->id;?></span>
|
||||
<?php echo $release->name;?>
|
||||
<span class='text' title='<?php echo $release->name;?>'><?php echo $release->name;?></span>
|
||||
<?php if($release->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->release->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
#batchCreateForm .col-pri {width: 100px;}
|
||||
#batchCreateForm .col-review,
|
||||
#batchCreateForm .col-estimate {width: 90px;}
|
||||
.body-modal .main-header > h2 {max-width: 80%;}
|
||||
@@ -21,7 +21,7 @@
|
||||
<?php endif;?>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $story->id?></span>
|
||||
<span class="text" style='color: <?php echo $story->color;?>'><?php echo $story->title;?></span>
|
||||
<span class="text" title='<?php echo $story->name;?>' style='color: <?php echo $story->color;?>'><?php echo $story->title;?></span>
|
||||
<?php if($story->version > 1):?>
|
||||
<small class='dropdown'>
|
||||
<a href='#' data-toggle='dropdown' class='text-muted'><?php echo '#' . $version;?> <span class='caret'></span></a>
|
||||
|
||||
@@ -2246,6 +2246,7 @@ class taskModel extends model
|
||||
$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null);
|
||||
|
||||
$canBatchAction = $canBatchEdit or $canBatchClose or $canBatchCancel or $canBatchChangeModule or $canBatchAssignTo;
|
||||
$storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
|
||||
|
||||
$canView = common::hasPriv('task', 'view');
|
||||
$taskLink = helper::createLink('task', 'view', "taskID=$task->id");
|
||||
@@ -2301,7 +2302,6 @@ class taskModel extends model
|
||||
echo $this->lang->task->typeList[$task->type];
|
||||
break;
|
||||
case 'status':
|
||||
$storyChanged = (!empty($task->storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion);
|
||||
$storyChanged ? print("<span class='status-changed'><span class='label label-dot'></span> {$this->lang->story->changed}</span>") : print("<span class='status-{$task->status}'><span class='label label-dot'></span> {$this->lang->task->statusList[$task->status]}</span>");
|
||||
break;
|
||||
case 'estimate':
|
||||
@@ -2397,9 +2397,8 @@ class taskModel extends model
|
||||
echo substr($task->lastEditedDate, 5, 11);
|
||||
break;
|
||||
case 'actions':
|
||||
if($task->storyStatus == 'changed' or $browseType == 'needconfirm')
|
||||
if($storyChanged)
|
||||
{
|
||||
$this->lang->task->confirmStoryChange = $this->lang->confirm;
|
||||
common::printIcon('task', 'confirmStoryChange', "taskid=$task->id", '', 'list', '', 'hiddenwin', 'btn-wide');
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<?php endif;?>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $task->id?></span>
|
||||
<span class="text" style='color: <?php echo $task->color; ?>'>
|
||||
<span class="text" title='<?php echo $task->name;?>' style='color: <?php echo $task->color; ?>'>
|
||||
<?php if(!empty($task->parent)) echo '<span class="label label-badge label-primary no-margin">' . $this->lang->task->childrenAB . '</span>';?>
|
||||
<?php if(!empty($task->team)) echo '<span class="label label-badge label-primary no-margin">' . $this->lang->task->multipleAB . '</span>';?>
|
||||
<?php echo isset($task->parentName) ? html::a(inlink('view', "taskID={$task->parent}"), $task->parentName) . ' / ' : '';?><?php echo $task->name;?>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $case->id;?></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank', 'class="text"');?> <span class='text-muted'><i class="icon-angle-right"></i> <span><?php echo $lang->testcase->linkCases;?></span></span>
|
||||
<?php echo html::a($this->createLink('case', 'view', 'caseID=' . $case->id), $case->title, '_blank', "class='text' title='{$case->title}'");?> <span class='text-muted'><i class="icon-angle-right"></i> <span><?php echo $lang->testcase->linkCases;?></span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class='label label-id'><?php echo $case->id;?></span>
|
||||
<span class='text' style='color: <?php echo $case->color; ?>'><?php echo $case->title;?></span>
|
||||
<span class='text' title='<?php echo $case->title;?>' style='color: <?php echo $case->color; ?>'><?php echo $case->title;?></span>
|
||||
|
||||
<?php if($case->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->product->deleted;?></span>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $report->id;?></span>
|
||||
<span class='text'><?php echo $report->title;?></span>
|
||||
<span class='text' title='<?php echo $report->title;?>'><?php echo $report->title;?></span>
|
||||
<?php if($report->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->testreport->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $lib->id;?></span>
|
||||
<?php echo $lib->name;?>
|
||||
<span class='text' title='<?php echo $lib->name;?>'><?php echo $lib->name;?></span>
|
||||
<?php if($lib->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->testsuite->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $suite->id;?></span>
|
||||
<?php echo $suite->name;?>
|
||||
<span class='text' title='<?php echo $suite->name;?>'><?php echo $suite->name;?></span>
|
||||
<?php echo $lang->arrow . $lang->testsuite->linkCase;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $suite->id;?></span>
|
||||
<?php echo $suite->name;?>
|
||||
<span class='text'><?php echo $suite->name;?></span>
|
||||
<?php if($suite->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->suite->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $task->id;?></span>
|
||||
<span class='text'><?php echo $task->name;?></span>
|
||||
<span class='text' title='<?php echo $task->name;?>'><?php echo $task->name;?></span>
|
||||
<?php if($task->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->task->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $todo->id?></span>
|
||||
<span class="text">
|
||||
<?php echo $todo->name;?>
|
||||
</span>
|
||||
<span class='text' title='<?php echo $todo->name;?>'><?php echo $todo->name;?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</a>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class="text">
|
||||
<span class="text" title='<?php echo $root->name;?>'>
|
||||
<?php
|
||||
if($viewType == 'doc')
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</a>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class='text'><?php echo $lang->tree->common . $lang->colon . $root->name;?></span>
|
||||
<span class='text' title='<?php echo $root->name;?>'><?php echo $lang->tree->common . $lang->colon . $root->name;?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,4 +8,3 @@
|
||||
* @version $Id: style.css 1454 2009-10-23 01:45:26Z wwccss $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
.body-modal .main-header > h2{width: 100%; overflow:hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user