Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -177,7 +177,6 @@ class backup extends control
|
||||
|
||||
if($reload == 'yes')
|
||||
{
|
||||
echo js::alert($this->lang->backup->success->backup);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -15,6 +15,7 @@ $(function()
|
||||
$('.rmPHPHeader').click(function()
|
||||
{
|
||||
$('#waitting .modal-body #backupType').html(rmPHPHeader);
|
||||
$('#waitting .modal-content #message').hide();
|
||||
$('#waitting').modal('show');
|
||||
})
|
||||
|
||||
@@ -26,6 +27,7 @@ $(function()
|
||||
if(result)
|
||||
{
|
||||
$('#waitting .modal-body #backupType').html(restore);
|
||||
$('#waitting .modal-content #message').hide();
|
||||
$('#waitting').modal('show');
|
||||
|
||||
$.getJSON(url, function(response)
|
||||
|
||||
@@ -122,19 +122,19 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printIcon('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID", '', 'button', 'bar-chart muted');?>
|
||||
<?php if(common::hasPriv('bug', 'export')):?>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class="icon icon-export muted"></i> <span class="text"> <?php echo $lang->export;?></span> <span class="caret"></span></button>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType");
|
||||
echo "<li>" . html::a($link, $lang->bug->export, '', "class='export'") . "</li>";
|
||||
$class = common::hasPriv('bug', 'export') ? "" : "class='disabled'";
|
||||
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class='disabled'";
|
||||
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
|
||||
if(commonModel::isTutorialMode())
|
||||
@@ -290,12 +290,20 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->product->branchName[$this->session->currentProductType];?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($branches) > 8;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$branchNames = array();
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$branchNames[] = $branchName;
|
||||
}
|
||||
$branchsPinYin = common::convert2Pinyin($branchNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -303,8 +311,9 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<?php
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($branchsPinYin, $branchName, '') . '"') : '';
|
||||
$actionLink = $this->createLink('bug', 'batchChangeBranch', "branchID=$branchID");
|
||||
echo html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\" data-key='$branchID'");
|
||||
echo html::a('#', $branchName, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\" data-key='$branchID'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -316,12 +325,20 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->moduleAB;?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($modules) > 8;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$moduleNames = array();
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$moduleNames[] = $module;
|
||||
}
|
||||
$modulesPinYin = common::convert2Pinyin($moduleNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -329,8 +346,9 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<?php
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
|
||||
$actionLink = $this->createLink('bug', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\" data-key='$moduleID'");
|
||||
echo html::a('#', $module, '', "$searchKey onclick=\"setFormAction('$actionLink','hiddenwin')\" data-key='$moduleID'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -342,12 +360,21 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->assignedTo;?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($memberPairs) > 10;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$memberNames = array();
|
||||
foreach($memberPairs as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId)) continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -358,7 +385,8 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
foreach ($memberPairs as $key => $value)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\",\"hiddenwin\")", $value, '', "data-key='$key'");
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\",\"hiddenwin\")", $value, '', $searchKey);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -306,9 +306,10 @@ class groupModel extends model
|
||||
*/
|
||||
public function updateUser($groupID)
|
||||
{
|
||||
$members = $this->post->members ? $this->post->members : array();
|
||||
$groupUsers = $this->dao->select('account')->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->fetchPairs('account');
|
||||
$newUsers = array_diff($this->post->members, $groupUsers);
|
||||
$delUsers = array_diff($groupUsers, $this->post->members);
|
||||
$newUsers = array_diff($members, $groupUsers);
|
||||
$delUsers = array_diff($groupUsers, $members);
|
||||
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->andWhere('account')->in($delUsers)->exec();
|
||||
|
||||
|
||||
@@ -137,20 +137,32 @@
|
||||
$withSearch = count($memberPairs) > 10;
|
||||
$actionLink = $this->createLink('bug', 'batchAssignTo', "productID=0&type=my");
|
||||
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
|
||||
echo "<div class='dropdown-menu search-list' data-ride='searchList'>";
|
||||
if($withSearch)
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
|
||||
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
|
||||
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
|
||||
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
|
||||
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
|
||||
echo '</div>';
|
||||
$memberNames = array();
|
||||
foreach($memberPairs as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId)) continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list'>";
|
||||
}
|
||||
echo '<div class="list-group">';
|
||||
foreach ($memberPairs as $key => $value)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', "data-key='@$key'");
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', $searchKey);
|
||||
}
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -148,20 +148,32 @@
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo');
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
echo "<div class='dropdown-menu search-list' data-ride='searchList'>";
|
||||
if($withSearch)
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
|
||||
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
|
||||
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
|
||||
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
|
||||
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
|
||||
echo '</div>';
|
||||
$memberNames = array();
|
||||
foreach($memberPairs as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId)) continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list'>";
|
||||
}
|
||||
echo '<div class="list-group">';
|
||||
foreach($users as $key => $value)
|
||||
{
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', "data-key='@$key'");
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a('javascript:$(".table-actions #assignedTo").val("' . $key . '");setFormAction("' . $actionLink . '")', '<i class="icon icon-person icon-sm"></i> ' . $value, '', $searchKey);
|
||||
}
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -96,9 +96,10 @@
|
||||
<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'>
|
||||
<?php
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -288,21 +289,30 @@
|
||||
<?php if(common::hasPriv('story', 'batchChangeModule')):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<?php $withSearch = count($modules) > 8;?>
|
||||
<?php $withSearch = count($modules) > 8;?>
|
||||
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
|
||||
<?php if($withSearch):?>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<input id="moduleSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="moduleSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$moduleNames = array();
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$moduleNames[] = $module;
|
||||
}
|
||||
$modulesPinYin = common::convert2Pinyin($moduleNames);
|
||||
?>
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
|
||||
$actionLink = $this->createLink('story', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo html::a('#', empty($module) ? '/' : $module, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
echo html::a('#', empty($module) ? '/' : $module, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -312,25 +322,34 @@
|
||||
<?php if(common::hasPriv('story', 'batchChangePlan')):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->planAB;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<?php
|
||||
unset($plans['']);
|
||||
$plans = array(0 => $lang->null) + $plans;
|
||||
$withSearch = count($plans) > 8;
|
||||
?>
|
||||
<?php
|
||||
unset($plans['']);
|
||||
$plans = array(0 => $lang->null) + $plans;
|
||||
$withSearch = count($plans) > 8;
|
||||
?>
|
||||
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
|
||||
<?php if($withSearch):?>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<input id="planSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="planSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$planNames = array();
|
||||
foreach($plans as $planID => $plan)
|
||||
{
|
||||
$planNames[] = $plan;
|
||||
}
|
||||
$plansPinYin = common::convert2Pinyin($planNames);
|
||||
?>
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach($plans as $planID => $plan)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($plansPinYin, $plan, '') . '"') : '';
|
||||
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
|
||||
echo html::a('#', $plan, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
echo html::a('#', $plan, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -341,12 +360,21 @@
|
||||
<?php if(common::hasPriv('story', 'batchAssignTo')):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<?php
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
?>
|
||||
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
|
||||
<?php if($withSearch):?>
|
||||
<?php
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
if($withSearch):
|
||||
$memberNames = array();
|
||||
foreach($users as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId) or $memberId == 'closed') continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
?>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
@@ -358,7 +386,8 @@
|
||||
<?php foreach ($users as $key => $value):?>
|
||||
<?php
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value);
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value, '', $searchKey);
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#productsBox .input-group.has-branch > select[name*="branch"] + .chosen-container.chosen-container-active .chosen-single {border-left-width: 1px; padding-left: 8px;}
|
||||
|
||||
.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;}
|
||||
.table-children.table-child-top {border-top: 2px solid #cbd0db;}
|
||||
.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;}
|
||||
.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;}
|
||||
.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;}
|
||||
.table td.has-child > a {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.table td.has-child > .task-toggle {color: #838a9d; position: relative; top: 1px;}
|
||||
.table td.has-child > .task-toggle:hover {color: #006af1; cursor: pointer;}
|
||||
|
||||
@@ -116,23 +116,36 @@
|
||||
<div class="table-actions btn-toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->assignedTo?> <span class="caret"></span></button>
|
||||
<?php
|
||||
$withSearch = count($memberPairs) > 10;
|
||||
<?php
|
||||
$withSearch = count($memberPairs) > 1;
|
||||
$actionLink = $this->createLink('bug', 'batchAssignTo', "projectID={$project->id}&type=project");
|
||||
echo "<div class='dropdown-menu search-list' data-ride='searchList'>";
|
||||
|
||||
if($withSearch)
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
|
||||
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
|
||||
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
|
||||
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
|
||||
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
|
||||
echo '</div>';
|
||||
$memberNames = array();
|
||||
foreach($users as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId)) continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='dropdown-menu search-list'>";
|
||||
}
|
||||
echo '<div class="list-group">';
|
||||
foreach($memberPairs as $key => $value)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', "data-key='@$key'");
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', $searchKey);
|
||||
}
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -46,9 +46,10 @@
|
||||
<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">
|
||||
<?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") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('task', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -56,13 +57,15 @@
|
||||
<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">
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -122,9 +122,10 @@ js::set('browseType', $browseType);
|
||||
<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 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") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('task', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -133,13 +134,15 @@ js::set('browseType', $browseType);
|
||||
<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 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") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -222,12 +225,14 @@ js::set('browseType', $browseType);
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php if(!empty($task->children)):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($task->children as $key => $child):?>
|
||||
<?php $class = $key == 0 ? ' table-child-top' : '';?>
|
||||
<?php $class .= ($key + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
|
||||
<?php $class = $i == 0 ? ' table-child-top' : '';?>
|
||||
<?php $class .= ($i + 1 == count($task->children)) ? ' table-child-bottom' : '';?>
|
||||
<tr class='table-children<?php echo $class;?> parent-<?php echo $task->id;?>' data-id='<?php echo $child->id?>' data-status='<?php echo $child->status?>' data-estimate='<?php echo $child->estimate?>' data-consumed='<?php echo $child->consumed?>' data-left='<?php echo $child->left?>'>
|
||||
<?php foreach($customFields as $field) $this->task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
@@ -269,12 +274,20 @@ js::set('browseType', $browseType);
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($modules) > 10;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$moduleNames = array();
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$moduleNames[] = $module;
|
||||
}
|
||||
$modulesPinYin = common::convert2Pinyin($moduleNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -282,8 +295,9 @@ js::set('browseType', $browseType);
|
||||
<?php
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
|
||||
$actionLink = $this->createLink('task', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo html::a('#', $module, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"");
|
||||
echo html::a('#', $module, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -300,12 +314,21 @@ js::set('browseType', $browseType);
|
||||
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
|
||||
if($withSearch):
|
||||
?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$memberNames = array();
|
||||
foreach($memberPairs as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId)) continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -314,7 +337,8 @@ js::set('browseType', $browseType);
|
||||
foreach($memberPairs as $key => $value)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\", \"#taskList\")", $value);
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\", \"#taskList\")", $value, '', $searchKey);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1937,7 +1937,7 @@ class storyModel extends model
|
||||
{
|
||||
$property = '(' . $this->lang->story->pri . ':' . (!empty($this->lang->story->priList[$story->pri]) ? $this->lang->story->priList[$story->pri] : 0) . ',' . $this->lang->story->estimate . ':' . $story->estimate . ')';
|
||||
}
|
||||
$storyPairs[$story->id] = $story->id . ':' . $story->title . $property;
|
||||
$storyPairs[$story->id] = $story->id . ':' . $story->title . ' '. $property;
|
||||
|
||||
if($limit > 0 && ++$i > $limit)
|
||||
{
|
||||
|
||||
@@ -14,3 +14,7 @@
|
||||
#zeroTaskStory > label:before {top: 7px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 5px; left: 5px;}
|
||||
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
|
||||
|
||||
.chosen-results > li.has-task {position: relative;}
|
||||
.chosen-results > li.has-task:before {content: attr(data-data); display: inline-block; background: rgba(0,0,0,.1); font-size: 12px; border-radius: 4px; padding: 0 4px; margin-right: 4px; position: relative; top: -1px; color: green}
|
||||
.chosen-results > li.has-task.highlighted:before {color: #fff;}
|
||||
@@ -123,7 +123,24 @@ function toggleZeroTaskStory()
|
||||
}
|
||||
})
|
||||
$select.val(selectVal).trigger("chosen:updated");
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// see http://pms.zentao.net/task-view-5086.html
|
||||
function markStoryTask()
|
||||
{
|
||||
$('select[name^="story"]').each(function()
|
||||
{
|
||||
var $select = $(this);
|
||||
$select.find('option').each(function()
|
||||
{
|
||||
var $option = $(this);
|
||||
var value = $option.attr('value');
|
||||
var tasksCount = storyTasks[value];
|
||||
$option.attr('data-data', tasksCount + 't').toggleClass('has-task', !!(tasksCount && tasksCount !== '0'));
|
||||
});
|
||||
$select.trigger("chosen:updated");
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '.chosen-with-drop', function()
|
||||
@@ -168,6 +185,7 @@ $(function()
|
||||
$('#module0_chosen').width($('#module1_chosen').width());
|
||||
$('#story0_chosen').width($('#story1_chosen').width());
|
||||
if($.cookie('zeroTask') == 'true') toggleZeroTaskStory();
|
||||
markStoryTask();
|
||||
|
||||
if(storyID != 0) setStoryRelated(0);
|
||||
|
||||
|
||||
@@ -1511,7 +1511,7 @@ class taskModel extends model
|
||||
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
|
||||
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.`parent`,' . $orderBy)
|
||||
->orderBy($orderBy)
|
||||
->page($pager, 't1.id')
|
||||
->fetchAll('id');
|
||||
|
||||
|
||||
@@ -163,12 +163,20 @@ js::set('suiteID', $suiteID);
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->product->branchName[$this->session->currentProductType];?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($branches) > 10;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$branchNames = array();
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$branchNames[] = $branchName;
|
||||
}
|
||||
$branchsPinYin = common::convert2Pinyin($branchNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -176,8 +184,9 @@ js::set('suiteID', $suiteID);
|
||||
<?php
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($branchsPinYin, $branchName, '') . '"') : '';
|
||||
$actionLink = $this->createLink('testcase', 'batchChangeBranch', "branchID=$branchID");
|
||||
echo html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\" data-key='$branchID'");
|
||||
echo html::a('#', $branchName, '', "$searchKey onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -189,12 +198,20 @@ js::set('suiteID', $suiteID);
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
|
||||
<?php $withSearch = count($modules) > 10;?>
|
||||
<?php if($withSearch):?>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<div class="dropdown-menu search-list search-box-sink" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<?php
|
||||
$moduleNames = array();
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$moduleNames[] = $module;
|
||||
}
|
||||
$modulesPinYin = common::convert2Pinyin($moduleNames);
|
||||
?>
|
||||
<?php else:?>
|
||||
<div class="dropdown-menu search-list">
|
||||
<?php endif;?>
|
||||
@@ -202,8 +219,9 @@ js::set('suiteID', $suiteID);
|
||||
<?php
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($modulesPinYin, $module, '') . '"') : '';
|
||||
$actionLink = $this->createLink('testcase', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\" data-key='$moduleID'");
|
||||
echo html::a('#', $module, '', "$searchKey onclick=\"setFormAction('$actionLink','hiddenwin')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -124,13 +124,15 @@
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'exportTemplet') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -138,13 +140,15 @@
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'import') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -101,12 +101,21 @@
|
||||
<?php if($canBatchAssign):?>
|
||||
<div class="btn-group dropup">
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->testtask->assign;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list" data-ride="searchList">
|
||||
<?php
|
||||
$withSearch = count($assignedTos) > 10;
|
||||
$actionLink = inLink('batchAssign', "taskID=$task->id");
|
||||
echo html::select('assignedTo', $assignedTos, '', 'class="hidden"');
|
||||
?>
|
||||
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
|
||||
<?php if($withSearch):?>
|
||||
<?php
|
||||
$withSearch = count($assignedTos) > 10;
|
||||
$actionLink = inLink('batchAssign', "taskID=$task->id");
|
||||
echo html::select('assignedTo', $assignedTos, '', 'class="hidden"');
|
||||
if($withSearch):
|
||||
$memberNames = array();
|
||||
foreach($assignedTos as $memberId => $member)
|
||||
{
|
||||
if(empty($memberId) or $memberId == 'closed') continue;
|
||||
$memberNames[] = $member;
|
||||
}
|
||||
$membersPinYin = common::convert2Pinyin($memberNames);
|
||||
?>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
|
||||
@@ -116,10 +125,11 @@
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php foreach ($assignedTos as $key => $value):?>
|
||||
<?php
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value);
|
||||
?>
|
||||
<?php
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
echo html::a("javascript:$(\"#assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\")", $value, '', $searchKey);
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+3
-3
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