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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#linkButton {border-radius: 4px !important;}
|
||||
tbody > tr > td > .btn-icon {margin-right: 4px}
|
||||
@media (max-width: 1200px) {#storyList .c-user, #storyList .c-estimate {display: none!important;}}
|
||||
@media (max-width: 1000px) {#storyList .c-status, #storyList .c-pri {display: none!important;}}
|
||||
@media (max-width: 820px) {#storyList .c-sort, #storyList .c-stage {display: none!important;}}
|
||||
@media (max-width: 820px) {#storyList .c-sort, #storyList .c-stage {display: none!important;}}
|
||||
|
||||
@@ -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 ++;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,20 @@
|
||||
<?php
|
||||
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export'");
|
||||
|
||||
$this->lang->story->create = $this->lang->project->createStory;
|
||||
if($productID and !$this->loadModel('story')->checkForceReview())
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-link'>";
|
||||
echo "<i class='icon-plus'></i> {$lang->story->create} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
|
||||
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&project=$project->id"), $lang->story->create) . '</li>';
|
||||
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&project=$project->id"), $lang->story->batchCreate) . '</li>';
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("project=$project->id");
|
||||
@@ -45,23 +59,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover' id='createActionMenu'>";
|
||||
echo "<button type='button' class='btn btn-link dropdown-toggle btn-icon'>";
|
||||
echo "<i class='icon-link muted'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-primary' id='linkButton'>";
|
||||
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
if(common::hasPriv('project', 'linkStory')) echo "<li>" . html::a($this->createLink('project', 'linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo "<li>" . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
|
||||
if(common::hasPriv('project', 'linkStory')) echo '<li>' . html::a(inlink('linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
$this->lang->story->create = $this->lang->project->createStory;
|
||||
if($productID and !$this->loadModel('story')->checkForceReview())
|
||||
{
|
||||
common::printLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&project=$project->id", "<i class='icon icon-plus'></i> " . $lang->story->batchCreate, '', "class='btn btn-secondary'");
|
||||
common::printLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&project=$project->id", "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -118,9 +118,9 @@ js::set('browseType', $browseType);
|
||||
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType", '', 'button', 'bar-chart muted');
|
||||
?>
|
||||
|
||||
<div class="btn-group">
|
||||
<div class="btn-group dropdown-hover">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" id='exportActionMenu'>
|
||||
<ul class="dropdown-menu pull-right" id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
@@ -129,9 +129,9 @@ js::set('browseType', $browseType);
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<div class="btn-group dropdown-hover">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" id='importActionMenu'>
|
||||
<ul class="dropdown-menu pull-right" id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<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) ? $task->parentName . '/' : '';?><?php echo $task->name;?>
|
||||
<?php echo isset($task->parentName) ? html::a(inlink('view', "taskID={$task->parent}"), $task->parentName) . ' / ' : '';?><?php echo $task->name;?>
|
||||
</span>
|
||||
<?php if($task->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->task->deleted;?></span>
|
||||
|
||||
Reference in New Issue
Block a user