* Modify user module.
This commit is contained in:
@@ -1143,7 +1143,7 @@ class user extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* crop avatar
|
||||
*
|
||||
* @param int $image
|
||||
@@ -1151,7 +1151,7 @@ class user extends control
|
||||
* @return void
|
||||
*/
|
||||
public function cropAvatar($image)
|
||||
{
|
||||
{
|
||||
$image = $this->loadModel('file')->getByID($image);
|
||||
|
||||
if(!empty($_POST))
|
||||
@@ -1161,7 +1161,7 @@ class user extends control
|
||||
$this->dao->update(TABLE_USER)->set('avatar')->eq($image->webPath)->where('account')->eq($this->app->user->account)->exec();
|
||||
$this->app->user->avatar = $image->webPath;
|
||||
exit('success');
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->user = $this->user->getById($this->app->user->account);
|
||||
$this->view->title = $this->lang->user->cropAvatar;
|
||||
@@ -1221,9 +1221,9 @@ class user extends control
|
||||
|
||||
/**
|
||||
* Ajax print templates.
|
||||
*
|
||||
* @param int $type
|
||||
* @param string $link
|
||||
*
|
||||
* @param int $type
|
||||
* @param string $link
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1265,7 +1265,7 @@ class user extends control
|
||||
|
||||
/**
|
||||
* Ajax get more user.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1292,7 +1292,7 @@ class user extends control
|
||||
|
||||
/**
|
||||
* Refresh random for login
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+94
-94
@@ -70,7 +70,7 @@ class userModel extends model
|
||||
*
|
||||
* @param string $params noletter|noempty|nodeleted|noclosed|withguest|pofirst|devfirst|qafirst|pmfirst|realname|outside|inside|all, can be sets of theme
|
||||
* @param string $usersToAppended account1,account2
|
||||
* @param int $maxCount
|
||||
* @param int $maxCount
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -868,10 +868,10 @@ class userModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$groups = $this->dao->select('t1.acl, t1.PRJ')->from(TABLE_GROUP)->alias('t1')
|
||||
$groups = $this->dao->select('t1.acl, t1.project')->from(TABLE_GROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id=t2.group')
|
||||
->where('t2.account')->eq($account)
|
||||
->andWhere('t1.role')->ne('PRJAdmin')
|
||||
->andWhere('t1.role')->ne('projectAdmin')
|
||||
->andWhere('t1.role')->ne('limited')
|
||||
->fetchAll();
|
||||
|
||||
@@ -926,12 +926,12 @@ class userModel extends model
|
||||
if($sprintAllow) $acls['sprints'] = array();
|
||||
if($viewAllow) $acls['views'] = array();
|
||||
if($actionAllow) unset($acls['actions']);
|
||||
|
||||
|
||||
$sql = $this->dao->select('module, method')->from(TABLE_GROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id = t2.group')
|
||||
->leftJoin(TABLE_GROUPPRIV)->alias('t3')->on('t2.group = t3.group')
|
||||
->where('t2.account')->eq($account)
|
||||
->andWhere('t1.PRJ')->eq(0);
|
||||
->andWhere('t1.project')->eq(0);
|
||||
}
|
||||
|
||||
$stmt = $sql->query();
|
||||
@@ -942,15 +942,15 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/* Get can manage projects by user. */
|
||||
$PRJAdminGroupID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('PRJAdmin')->fetch('id');
|
||||
$canManageProjects = $this->dao->select('PRJ')->from(TABLE_USERGROUP)->where('`group`')->eq($PRJAdminGroupID)->andWhere('account')->eq($account)->fetch('PRJ');
|
||||
$projectAdminGroupID = $this->dao->select('id')->from(TABLE_GROUP)->where('role')->eq('projectAdmin')->fetch('id');
|
||||
$canManageProjects = $this->dao->select('project')->from(TABLE_USERGROUP)->where('`group`')->eq($projectAdminGroupID)->andWhere('account')->eq($account)->fetch('project');
|
||||
return array('rights' => $rights, 'acls' => $acls, 'projects' => $canManageProjects);
|
||||
}
|
||||
|
||||
/**
|
||||
* login function.
|
||||
*
|
||||
* @param object $user
|
||||
*
|
||||
* @param object $user
|
||||
* @access public
|
||||
* @return bool|object
|
||||
*/
|
||||
@@ -1187,9 +1187,9 @@ class userModel extends model
|
||||
$this->dao->update(TABLE_USER)->set('ranzhi')->eq('')->where('account')->eq($account)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Upload avatar.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1525,9 +1525,9 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Compute user view.
|
||||
*
|
||||
* @param string $account
|
||||
* @param bool $force
|
||||
*
|
||||
* @param string $account
|
||||
* @param bool $force
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -1600,39 +1600,39 @@ class userModel extends model
|
||||
/* Process program userview. */
|
||||
$programs = array();
|
||||
foreach($allPrograms as $id => $program)
|
||||
{
|
||||
{
|
||||
if($this->checkProgramPriv($program, $account, zget($stakeholders, $id, array()), zget($whiteList, $id, array()))) $programs[$id] = $id;
|
||||
}
|
||||
}
|
||||
$userView->programs = join(',', $programs);
|
||||
|
||||
/* Process product userview. */
|
||||
$products = array();
|
||||
foreach($allProducts as $id => $product)
|
||||
{
|
||||
{
|
||||
if($this->checkProductPriv($product, $account, $groups, zget($productTeams, $product->id, array()), zget($productStakeholders, $product->id, array()), zget($productWhiteList, $product->id, array()))) $products[$id] = $id;
|
||||
}
|
||||
}
|
||||
$userView->products = join(',', $products);
|
||||
|
||||
/* Process project userview. */
|
||||
$projects = array();
|
||||
foreach($allProjects as $id => $project)
|
||||
{
|
||||
{
|
||||
$projectTeams = zget($teams, $id, array());
|
||||
$projectStakeholders = zget($stakeholders, $id, array());
|
||||
if($this->checkProjectPriv($project, $account, $projectStakeholders, $projectTeams, zget($whiteList, $id, array()))) $projects[$id] = $id;
|
||||
}
|
||||
}
|
||||
$userView->projects = join(',', $projects);
|
||||
|
||||
/* Process sprint userview. */
|
||||
$sprints = array();
|
||||
foreach($allSprints as $id => $sprint)
|
||||
{
|
||||
{
|
||||
$sprintTeams = zget($teams, $id, array());
|
||||
$sprintStakeholders = zget($stakeholders, $sprint->project, array());
|
||||
if($this->checkSprintPriv($sprint, $account, $sprintStakeholders, $sprintTeams, zget($whiteList, $id, array()))) $sprints[$id] = $id;
|
||||
}
|
||||
}
|
||||
$userView->sprints = join(',', $sprints);
|
||||
}
|
||||
}
|
||||
$this->dao->replace(TABLE_USERVIEW)->data($userView)->exec();
|
||||
}
|
||||
|
||||
@@ -1641,10 +1641,10 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get product teams and stakeholders.
|
||||
*
|
||||
* @param array $allProducts
|
||||
*
|
||||
* @param array $allProducts
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getProductMembers($allProducts)
|
||||
{
|
||||
@@ -1653,10 +1653,10 @@ class userModel extends model
|
||||
$productProjects = array();
|
||||
$stmt = $this->dao->select('project,product')->from(TABLE_PROJECTPRODUCT)->where('product')->in(array_keys($allProducts))->query();
|
||||
while($projectProduct = $stmt->fetch())
|
||||
{
|
||||
{
|
||||
$productProjects[$projectProduct->product][$projectProduct->project] = $projectProduct->project;
|
||||
$projectProducts[$projectProduct->project][$projectProduct->product] = $projectProduct->product;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get linked projects teams. */
|
||||
$teamGroups = array();
|
||||
@@ -1666,7 +1666,7 @@ class userModel extends model
|
||||
->query();
|
||||
|
||||
while($team = $stmt->fetch())
|
||||
{
|
||||
{
|
||||
$productIdList = zget($projectProducts, $team->root, array());
|
||||
foreach($productIdList as $productID) $teamGroups[$productID][$team->account] = $team->account;
|
||||
}
|
||||
@@ -1679,10 +1679,10 @@ class userModel extends model
|
||||
|
||||
$stakeholderGroups = array();
|
||||
while($stakeholder = $stmt->fetch())
|
||||
{
|
||||
{
|
||||
$productIdList = zget($projectProducts, $stakeholder->objectID, array());
|
||||
foreach($productIdList as $productID) $stakeholderGroups[$productID][$stakeholder->user] = $stakeholder->user;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get linked programs stakeholders. */
|
||||
$programProduct = array();
|
||||
@@ -1704,13 +1704,13 @@ class userModel extends model
|
||||
foreach($productIdList as $productID) $stakeholderGroups[$productID][$programStakeholder->user] = $programStakeholder->user;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return array($teamGroups, $stakeholderGroups);
|
||||
}
|
||||
|
||||
/**
|
||||
* Grant user view.
|
||||
*
|
||||
*
|
||||
* @param string $account
|
||||
* @param array $acls
|
||||
* @param string $projects
|
||||
@@ -1804,12 +1804,12 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Update user view by object type.
|
||||
*
|
||||
*
|
||||
* @param string $objectIdList
|
||||
* @param string $objectType
|
||||
* @param array $users
|
||||
* @access public
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function updateUserView($objectIdList, $objectType, $users = array())
|
||||
{
|
||||
@@ -1824,11 +1824,11 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Update program user view.
|
||||
*
|
||||
*
|
||||
* @param array $programIdList
|
||||
* @param array $user
|
||||
* @access public
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function updateProgramView($programIdList, $users)
|
||||
{
|
||||
@@ -1857,7 +1857,7 @@ class userModel extends model
|
||||
if(!empty($users)) $authedUsers = $users;
|
||||
if(empty($users))
|
||||
{
|
||||
foreach($programs as $program)
|
||||
foreach($programs as $program)
|
||||
{
|
||||
$stakeholders = zget($stakeholderGroup, $program->id, array());
|
||||
$whiteList = zget($whiteListGroup, $program->id, array());
|
||||
@@ -1892,10 +1892,10 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Update project view
|
||||
*
|
||||
* Update project view
|
||||
*
|
||||
* @param array $projectIdList
|
||||
* @param array $users
|
||||
* @param array $users
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1930,13 +1930,13 @@ class userModel extends model
|
||||
|
||||
/* Get all parent program and subprogram relation. */
|
||||
$parentStakeholderGroup = $this->stakeholder->getParentStakeholderGroup($projectIdList);
|
||||
|
||||
|
||||
/* Get auth users. */
|
||||
$authedUsers = array();
|
||||
if(!empty($users)) $authedUsers = $users;
|
||||
if(empty($users))
|
||||
{
|
||||
foreach($projects as $project)
|
||||
foreach($projects as $project)
|
||||
{
|
||||
$stakeholders = zget($stakeholderGroup, $project->id, array());
|
||||
$teams = zget($teamGroups, $project->id, array());
|
||||
@@ -1975,11 +1975,11 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Update product user view.
|
||||
*
|
||||
*
|
||||
* @param array $productIdList
|
||||
* @param array $user
|
||||
* @access public
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function updateProductView($productIdList, $users)
|
||||
{
|
||||
@@ -1996,7 +1996,7 @@ class userModel extends model
|
||||
$userGroups[$group->account] .= "{$group->group},";
|
||||
$groupUsers[$group->group][$group->account] = $group->account;
|
||||
}
|
||||
|
||||
|
||||
list($productTeams, $productStakeholders) = $this->getProductMembers($products);
|
||||
|
||||
/* Get white list group. */
|
||||
@@ -2049,9 +2049,9 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Update sprint view.
|
||||
*
|
||||
*
|
||||
* @param array $sprintIdList
|
||||
* @param array $users
|
||||
* @param array $users
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -2095,7 +2095,7 @@ class userModel extends model
|
||||
if(!empty($users)) $authedUsers = $users;
|
||||
if(empty($users))
|
||||
{
|
||||
foreach($sprints as $sprint)
|
||||
foreach($sprints as $sprint)
|
||||
{
|
||||
$stakeholders = zget($stakeholderGroup, $sprint->project, array());
|
||||
$teams = zget($teamGroups, $sprint->id, array());
|
||||
@@ -2141,13 +2141,13 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Check program priv
|
||||
*
|
||||
* @param object $program
|
||||
* @param string $account
|
||||
*
|
||||
* @param object $program
|
||||
* @param string $account
|
||||
* @param array $stakeholders
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return bool
|
||||
* @return bool
|
||||
*/
|
||||
public function checkProgramPriv($program, $account, $stakeholders, $whiteList)
|
||||
{
|
||||
@@ -2165,11 +2165,11 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Check project priv.
|
||||
*
|
||||
* @param object $project
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $teams
|
||||
*
|
||||
* @param object $project
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -2207,11 +2207,11 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Check sprint priv.
|
||||
*
|
||||
* @param object $project
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $teams
|
||||
*
|
||||
* @param object $project
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -2223,17 +2223,17 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Check product priv.
|
||||
*
|
||||
* @param object $product
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $linkedProjects
|
||||
* @param array $teams
|
||||
*
|
||||
* @param object $product
|
||||
* @param string $account
|
||||
* @param string $groups
|
||||
* @param array $linkedProjects
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkProductPriv($product, $account, $groups, $teams, $stakeholders, $whiteList)
|
||||
public function checkProductPriv($product, $account, $groups, $teams, $stakeholders, $whiteList)
|
||||
{
|
||||
if(strpos($this->app->company->admins, ',' . $account . ',') !== false) return true;
|
||||
if($product->PO == $account OR $product->QD == $account OR $product->RD == $account OR $product->createdBy == $account OR (isset($product->feedback) && $product->feedback == $account)) return true;
|
||||
@@ -2248,17 +2248,17 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get project authed users.
|
||||
*
|
||||
*
|
||||
* @param object $project
|
||||
* @param array $stakeholders
|
||||
* @param array $stakeholders
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectAuthedUsers($project, $stakeholders, $teams, $whiteList)
|
||||
{
|
||||
$users = array();
|
||||
$users = array();
|
||||
|
||||
foreach(explode(',', trim($this->app->company->admins, ',')) as $admin) $users[$admin] = $admin;
|
||||
|
||||
@@ -2297,12 +2297,12 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get program authed users.
|
||||
*
|
||||
* @param object $program
|
||||
* @param array $stakeholders
|
||||
*
|
||||
* @param object $program
|
||||
* @param array $stakeholders
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getProgramAuthedUsers($program, $stakeholders, $whiteList)
|
||||
{
|
||||
@@ -2321,13 +2321,13 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get sprint authed users.
|
||||
*
|
||||
*
|
||||
* @param object $sprint
|
||||
* @param array $stakeholders
|
||||
* @param array $stakeholders
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getSprintAuthedUsers($sprint, $stakeholders, $teams, $whiteList)
|
||||
{
|
||||
@@ -2336,11 +2336,11 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get product view list users.
|
||||
*
|
||||
* @param object $product
|
||||
* @param array $groupUsers
|
||||
* @param array $linkedProjects
|
||||
* @param array $teams
|
||||
*
|
||||
* @param object $product
|
||||
* @param array $groupUsers
|
||||
* @param array $linkedProjects
|
||||
* @param array $teams
|
||||
* @param array $whiteList
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -2366,9 +2366,9 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Judge an action is clickable or not.
|
||||
*
|
||||
* @param object $user
|
||||
* @param string $action
|
||||
*
|
||||
* @param object $user
|
||||
* @param string $action
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -2387,7 +2387,7 @@ class userModel extends model
|
||||
/**
|
||||
* Save user template.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -2406,8 +2406,8 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get User Template.
|
||||
*
|
||||
* @param string $type
|
||||
*
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -2425,8 +2425,8 @@ class userModel extends model
|
||||
|
||||
/**
|
||||
* Get personal data.
|
||||
*
|
||||
* @param string $account
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->PRJ), $bug->id, '_blank');?></td>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->project), $bug->id, '_blank');?></td>
|
||||
<td><span class='<?php echo 'severity' . zget($lang->bug->severityList, $bug->severity, $bug->severity)?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity)?></span></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td><?php echo $lang->bug->typeList[$bug->type]?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->PRJ), $bug->title);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', false, $bug->project), $bug->title);?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->resolvedBy);?></td>
|
||||
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
<tr>
|
||||
<td class="c-id"><?php printf('%03d', $issue->id);?></td>
|
||||
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
|
||||
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php echo html::a($this->createLink('issue', 'view', "id=$issue->id", '', '', $issue->PRJ), $issue->title, '', "data-group='project'");?></td>
|
||||
<td title="<?php echo zget($lang->issue->severityList, $issue->severity);?>"><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
|
||||
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php echo html::a($this->createLink('issue', 'view', "id=$issue->id", '', '', $issue->project), $issue->title, '', "data-group='project'");?></td>
|
||||
<td title="<?php echo zget($lang->issue->severityList, $issue->severity);?>"><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
|
||||
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
|
||||
<td title="<?php echo zget($users, $issue->owner);?>"><?php echo zget($users, $issue->owner);?></td>
|
||||
<td title="<?php echo zget($lang->issue->statusList, $issue->status);?>"><?php echo zget($lang->issue->statusList, $issue->status);?></td>
|
||||
|
||||
@@ -50,17 +50,17 @@
|
||||
<th class='w-date'><?php echo $lang->task->deadlineAB;?></th>
|
||||
<th class='w-70px'><?php echo $lang->statusAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->PRJ), sprintf('%03d', $task->id));?></td>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri);?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID", '', false, $task->PRJ), $task->projectName);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID", '', false, $task->project), $task->projectName);?></td>
|
||||
<td class='text-left nobr'>
|
||||
<?php if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';?>
|
||||
<?php if($task->parent > 0) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->PRJ), $task->name, null, "style='color: $task->color'");?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), $task->name, null, "style='color: $task->color'");?>
|
||||
</td>
|
||||
<td class='hours' title="<?php echo $task->estimate . ' ' . $lang->project->workHour;?>"><?php echo $task->estimate . ' ' . $lang->project->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->consumed . ' ' . $lang->project->workHour;?>"><?php echo $task->consumed . ' ' . $lang->project->workHourUnit;?></td>
|
||||
@@ -70,7 +70,7 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
<?php if($tasks):?>
|
||||
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ul class='nav nav-default'>
|
||||
<?php
|
||||
$that = zget($lang->user->thirdPerson, $user->gender);
|
||||
|
||||
|
||||
$active = $type == 'case2Him' ? 'active' : '';
|
||||
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
|
||||
$active = $type == 'caseByHim' ? 'active' : '';
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<div class='main-table'>
|
||||
<table class='table has-sort-head'>
|
||||
<?php
|
||||
<?php
|
||||
$vars = "userID={$user->id}&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID";
|
||||
$this->app->loadLang('testtask');
|
||||
?>
|
||||
@@ -49,9 +49,9 @@
|
||||
<?php foreach($cases as $case):?>
|
||||
<?php $caseID = $type == 'case2Him' ? $case->case : $case->id?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->PRJ), sprintf('%03d', $caseID));?></td>
|
||||
<td><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->project), sprintf('%03d', $caseID));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->PRJ), $case->title);?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version", '', false, $case->project), $case->title);?></td>
|
||||
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
|
||||
<td><?php echo zget($users, $case->openedBy);?></td>
|
||||
<td><?php echo zget($users, $case->lastRunner);?></td>
|
||||
@@ -60,7 +60,7 @@
|
||||
<td class='<?php echo $case->status;?>'><?php echo $this->processStatus('testcase', $case);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($cases):?>
|
||||
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->PRJ), sprintf('%03d', $task->id));?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->PRJ), $task->name);?></td>
|
||||
<td><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), $task->name);?></td>
|
||||
<td class='nobr'><?php echo $task->projectName?></td>
|
||||
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', false, $task->PRJ), $task->buildName));?></td>
|
||||
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', false, $task->project), $task->buildName));?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td><?php echo $task->end?></td>
|
||||
<td class='task-<?php echo $task->status?>'><?php echo $this->processStatus('testtask', $task);?></td>
|
||||
|
||||
Reference in New Issue
Block a user