This commit is contained in:
Yagami
2018-09-25 09:06:23 +08:00
36 changed files with 121 additions and 116 deletions
+9 -9
View File
@@ -1,15 +1,15 @@
<?php
$config->url = new stdclass();
$config->url->community = 'http://www.zentao.net';
$config->url->ask = 'http://www.zentao.net/ask-browse.html';
$config->url->document = 'http://www.zentao.net/help-book-zentaopmshelp.html';
$config->url->feedback = 'http://www.zentao.net/forum-board-1074.html';
$config->url->faq = 'http://www.zentao.net/ask-faq.html';
$config->url->extension = 'http://www.zentao.net/extension-browse.html';
$config->url->donation = 'http://www.zentao.net/help-donation.html';
$config->url->service = 'http://www.cnezsoft.com/article-browse-1078.html';
$config->url->community = 'https://www.zentao.net';
$config->url->ask = 'https://www.zentao.net/ask-browse.html';
$config->url->document = 'https://www.zentao.net/help-book-zentaopmshelp.html';
$config->url->feedback = 'https://www.zentao.net/forum-board-1074.html';
$config->url->faq = 'https://www.zentao.net/ask-faq.html';
$config->url->extension = 'https://www.zentao.net/extension-browse.html';
$config->url->donation = 'https://www.zentao.net/help-donation.html';
$config->url->service = 'https://www.cnezsoft.com/article-browse-1078.html';
$config->admin->apiRoot = 'http://www.zentao.net';
$config->admin->apiRoot = 'https://www.zentao.net';
$config->admin->log = new stdclass();
$config->admin->log->saveDays = 30;
+2 -37
View File
@@ -13,14 +13,6 @@
<?php
class adminModel extends model
{
/**
* The api agent(use snoopy).
*
* @var object
* @access public
*/
public $agent;
/**
* The api root.
*
@@ -29,29 +21,6 @@ class adminModel extends model
*/
public $apiRoot;
/**
* The construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->setAgent();
}
/**
* Set the api agent.
*
* @access public
* @return void
*/
public function setAgent()
{
$this->agent = $this->app->loadClass('snoopy');
}
/**
* Post data form API
*
@@ -62,9 +31,7 @@ class adminModel extends model
*/
public function postAPI($url, $formvars = "")
{
$this->agent->cookies['lang'] = $this->cookie->lang;
$this->agent->submit($url, $formvars);
return $this->agent->results;
return common::http($url, $formvars);
}
/**
@@ -143,9 +110,7 @@ class adminModel extends model
$params[$apiConfig->sessionVar] = $apiConfig->sessionID;
$params['k'] = $this->getSignature($params);
$this->agent->cookies['lang'] = $this->cookie->lang;
$this->agent->fetch($apiURL . '?' . http_build_query($params));
$result = $this->agent->results;
$result = common::http($apiURL . '?' . http_build_query($params));
$result = json_decode($result);
return $result;
}
+12 -7
View File
@@ -157,14 +157,19 @@ class blockModel extends model
{
$data = array();
$projects = $this->loadModel('project')->getPairs();
$products = $this->loadModel('product')->getPairs();
$data['tasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)->where('id')->in(array_keys($projects))->andWhere("(status='wait' or status='doing')")->andWhere('deleted')->eq(0)->fetch('count');
$data['products'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)->where('status')->ne('closed')->andWhere('id')->in(array_keys($products))->andWhere('deleted')->eq(0)->fetch('count');
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where("(status='wait' or status='doing')")
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
->andWhere('deleted')->eq(0)
->fetch('count');
$data['products'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)
->where('status')->ne('closed')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)
->andWhere('deleted')->eq(0)
->fetch('count');
$today = date('Y-m-d');
$data['delayTask'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)
@@ -182,8 +187,8 @@ class blockModel extends model
->andWhere('deleted')->eq(0)
->fetch('count');
$data['delayProject'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where('id')->in(array_keys($projects))
->andWhere('status')->in('wait,doing')
->where('status')->in('wait,doing')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)
->andWhere('end')->lt($today)
->andWhere('deleted')->eq(0)
->fetch('count');
+1 -1
View File
@@ -324,5 +324,5 @@ $config->bug->datatable->fieldList['lastEditedDate']['required'] = 'no';
$config->bug->datatable->fieldList['actions']['title'] = 'actions';
$config->bug->datatable->fieldList['actions']['fixed'] = 'right';
$config->bug->datatable->fieldList['actions']['width'] = '190';
$config->bug->datatable->fieldList['actions']['width'] = '150';
$config->bug->datatable->fieldList['actions']['required'] = 'yes';
+13 -9
View File
@@ -422,10 +422,9 @@ class bugModel extends model
*/
public function getPlanBugs($planID, $status = 'all', $orderBy = 'id_desc', $pager = null)
{
$projects = $this->loadModel('project')->getPairs('empty|withdelete');
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('plan')->eq((int)$planID)
->andWhere('project')->in(array_keys($projects))
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->projects)->fi()
->beginIF($status != 'all')->andWhere('status')->in($status)->fi()
->andWhere('deleted')->eq(0)
->orderBy($orderBy)->page($pager)->fetchAll('id');
@@ -1313,10 +1312,9 @@ class bugModel extends model
public function getUserBugs($account, $type = 'assignedTo', $orderBy = 'id_desc', $limit = 0, $pager = null)
{
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
$projects = $this->loadModel('project')->getPairs('empty|withdelete');
$bugs = $this->dao->select('*')->from(TABLE_BUG)
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where('deleted')->eq(0)
->andWhere('project')->in(array_keys($projects))
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->projects)->fi()
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
->orderBy($orderBy)
->beginIF($limit > 0)->limit($limit)->fi()
@@ -1459,11 +1457,10 @@ class bugModel extends model
*/
public function getProductBugPairs($productID)
{
$projects = $this->loadModel('project')->getPairs('empty|withdelete');
$bugs = array('' => '');
$data = $this->dao->select('id, title')->from(TABLE_BUG)
->where('product')->eq((int)$productID)
->andWhere('project')->in(array_keys($projects))
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->fetchAll();
@@ -2584,9 +2581,17 @@ class bugModel extends model
}
break;
case 'assignedTo':
$btnTextClass = '';
$assignedToText = !empty($bug->assignedTo) ? zget($users, $bug->assignedTo) : $this->lang->bug->noAssigned;
$btnTextClass = 'text-primary';
if($bug->assignedTo == $account) $btnTextClass = 'text-red';
echo "<span class='{$btnTextClass}'>" . zget($users, $bug->assignedTo) . "</span>";
$btnClass = $assignedToText == 'closed' ? ' disabled' : '';
$btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}";
$assignToLink = helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true);
$assignToHtml = html::a($assignToLink, "<i class='icon icon-hand-right'></i> <span class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='$btnClass'");
echo !common::hasPriv('bug', 'assignTo') ? "<span style='padding-left:25px;' class='{$btnTextClass}'>{$assignedToText}</span>" : $assignToHtml;
break;
case 'assignedDate':
echo substr($bug->assignedDate, 5, 11);
@@ -2620,7 +2625,6 @@ class bugModel extends model
break;
case 'actions':
$params = "bugID=$bug->id";
common::printIcon('bug', 'assignTo', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
+1 -1
View File
@@ -319,7 +319,7 @@ $params = "bugID=$bug->id";
$copyParams = "productID=$productID&branch=$bug->branch&extras=bugID=$bug->id";
$convertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&bugID=$bug->id";
?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
+1 -1
View File
@@ -58,7 +58,7 @@ tbody tr td:first-child input{display:none;}
</div>
<?php echo $this->fetch('file', 'printFiles', array('files' => $build->files, 'fieldset' => 'true'));?>
<?php include '../../common/view/action.html.php';?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
+2 -2
View File
@@ -989,7 +989,7 @@ EOD;
$title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name;
$title = '#' . $preAndNext->pre->$id . ' ' . $title . ' ' . $lang->preShortcutKey;
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : inLink('view', "ID={$preAndNext->pre->$id}");
echo html::a($link, '<i class="icon-pre icon-chevron-left"></i>', '', "id='prevPage' class='btn btn-info' title='{$title}'");
echo html::a($link, '<i class="icon-pre icon-chevron-left"></i>', '', "id='prevPage' class='btn' title='{$title}'");
}
if(isset($preAndNext->next) and $preAndNext->next)
{
@@ -997,7 +997,7 @@ EOD;
$title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name;
$title = '#' . $preAndNext->next->$id . ' ' . $title . ' ' . $lang->nextShortcutKey;
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : inLink('view', "ID={$preAndNext->next->$id}");
echo html::a($link, '<i class="icon-pre icon-chevron-right"></i>', '', "id='nextPage' class='btn btn-info' title='$title'");
echo html::a($link, '<i class="icon-pre icon-chevron-right"></i>', '', "id='nextPage' class='btn' title='$title'");
}
echo '</nav>';
}
+2 -2
View File
@@ -33,7 +33,7 @@
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->action->dynamic->search;?></a>
</div>
</div>
<div id='queryBox' class='cell <?php if($browseType =='bysearch') echo 'show';?>'></div>
<div id='mainContent' class='main-content'>
<div id='dynamics'>
@@ -81,7 +81,7 @@ $preLink = $hasPre ? inlink('dynamic', "browseType=$browseType&param=$param&re
$nextLink = $hasNext ? inlink('dynamic', "browseType=$browseType&param=$param&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container">
<a id="prevPage" class="btn btn-info<?php if(!$hasNext) echo ' disabled';?>" href="<?php echo $nextLink;?>"><i class="icon icon-chevron-left"></i></a>
<a id="nextPage" class="btn btn-info<?php if(!$hasPre) echo ' disabled';?>" href="<?php echo $preLink;?>"><i class="icon icon-chevron-right"></i></a>
+1 -1
View File
@@ -164,7 +164,7 @@
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
+1 -1
View File
@@ -79,7 +79,7 @@ $preLink = $hasPre ? inlink('dynamic', "type=$type&recTotal={$pager->recTotal}
$nextLink = $hasNext ? inlink('dynamic', "type=$type&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container">
<a id="prevPage" class="btn btn-info<?php if(!$hasNext) echo ' disabled';?>" href="<?php echo $nextLink;?>"><i class="icon icon-chevron-left"></i></a>
<a id="nextPage" class="btn btn-info<?php if(!$hasPre) echo ' disabled';?>" href="<?php echo $preLink;?>"><i class="icon icon-chevron-right"></i></a>
+1 -1
View File
@@ -591,7 +591,7 @@ class productModel extends model
->where('t1.product')->eq((int)$productID)
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
->orderBy('t1.project desc')
->andWhere('t2.deleted')->eq(0)
->fetchAll();
foreach($datas as $data)
+1 -1
View File
@@ -80,7 +80,7 @@ $preLink = $hasPre ? inlink('dynamic', "productID=$productID&type=$type&param=
$nextLink = $hasNext ? inlink('dynamic', "productID=$productID&type=$type&param=$param&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container">
<a id="prevPage" class="btn btn-info<?php if(!$hasNext) echo ' disabled';?>" href="<?php echo $nextLink;?>"><i class="icon icon-chevron-left"></i></a>
<a id="nextPage" class="btn btn-info<?php if(!$hasPre) echo ' disabled';?>" href="<?php echo $preLink;?>"><i class="icon icon-chevron-right"></i></a>
+2 -2
View File
@@ -145,7 +145,7 @@
<tr>
<th><?php echo $lang->product->acl;?></th>
<td><em><?php echo $lang->product->aclList[$product->acl];?></em></td>
</tr>
</tr>
<?php if($product->acl == 'custom'):?>
<tr>
<th><?php echo $lang->product->whitelist;?></th>
@@ -211,7 +211,7 @@
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
+5
View File
@@ -1 +1,6 @@
.table-group-btns {width: 200px;}
.table-footer,
.table-grouped {box-shadow: none!important;}
.table-footer {margin-left: 205px; margin-top: 10px;}
.table-grouped > thead>tr>th.c-id,
.table-grouped > tbody>tr>td.c-id {padding-left: 15px;}
+18 -13
View File
@@ -5,25 +5,24 @@
#taskTree li > a > span + span {margin-left: 8px;}
#taskTree li.selected > a {background-color: #E8F3FC;}
#taskTree li.selected > a > span.title {color: #006AF1;}
.label-product, #taskTree .item-product > a > .label-type {background: #88DE8B;}
.label-story, #taskTree .item-story > a > .label-type {background: #00A9FC;}
.label-module, #taskTree .item-module > a > .label-type {background: #52CEDD;}
.label-task, #taskTree .item-task > a > .label-type {background: #006AF1;}
#taskTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
#taskTree li > a > span.user {color: #A6AAB8;}
#taskTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px;}
#taskTree .label-id {border-color: #cbd0db; color: #7d8599}
#taskTree .label.label-type {background: #fff; border: 1px solid #ddd;}
#taskTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #CBD0DB; border-radius: 2px; top: 7px;}
#taskTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #CBD0DB; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
#taskTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
#taskTree li > a > span.user {color: #838a9d;}
#taskTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
#taskTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
#taskTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
#taskTree li > .list-toggle:hover:before,
#taskTree li > .list-toggle:hover {border-color: #006AF1;}
#taskTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #CBD0DB; border-width: 3px; left: 3px;}
#taskTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
#taskTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
#taskTree li.open > .list-toggle:hover {background: #006AF1;}
#taskTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #EDEFF3; top: 14px; left: -12px; z-index: 1; width: 10px;}
#taskTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;}
#taskTree ul > li:before,
#taskTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #EDEFF3; top: -13px; bottom: 12px; left: -12px;}
#taskTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #cbd0db; top: -13px; bottom: 12px; left: -12px;}
#taskTree ul > li:last-child:before {bottom: auto; height: 29px;}
#taskTree ul > li:first-child:before {top: -9px;}
#taskTree ul > li.tree-single-item:before {height: 23px;}
@@ -34,6 +33,7 @@
.tree-show-root .btn-tree-view[data-type="all"] {display: inline-block;}
#itemContent {min-height: 200px;}
#itemContent .label {background: #fff; border: 1px solid #ddd;}
#mainContent > .side-col {width: 460px; display: table-cell; overflow: hidden; transition: width .2s;}
#mainContent > .side-col > .cell {opacity: 1; transition: opacity .2s .1s;}
#mainContent.hide-side > .side-col {display: table-cell; width: 0px;}
@@ -49,4 +49,9 @@ h2.detail-title .label-id, h2.detail-title .label {top: -1px}
.detail + .detail {padding-top: 10px;}
.btn-comment.pull-right {z-index: 10;}
details .btn-comment.pull-right {right: 30px;}
.modal-comment .modal-dialog {min-width: 600px;}
.modal-comment .modal-dialog {min-width: 600px;}
#itemContent .label-product, #taskTree .item-product > a > .label-type {border-color: #89de8b; color: #89de8b; }
#itemContent .label-story, #taskTree .item-story > a > .label-type {border-color: #01a9fc; color: #01a9fc;}
#itemContent .label-module, #taskTree .item-module > a > .label-type {border-color: #52CEDD; color: #52CEDD;}
#itemContent .label-task, #taskTree .item-task > a > .label-type {border-color: #066ff1; color: #066ff1}
+1 -1
View File
@@ -81,7 +81,7 @@ $preLink = $hasPre ? inlink('dynamic', "projectID=$projectID&type=$type&param=
$nextLink = $hasNext ? inlink('dynamic', "projectID=$projectID&type=$type&param=$param&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container">
<a id="prevPage" class="btn btn-info<?php if(!$hasNext) echo ' disabled';?>" href="<?php echo $nextLink;?>"><i class="icon icon-chevron-left"></i></a>
<a id="nextPage" class="btn btn-info<?php if(!$hasPre) echo ' disabled';?>" href="<?php echo $preLink;?>"><i class="icon icon-chevron-right"></i></a>
+1 -1
View File
@@ -79,7 +79,7 @@
<div class='small'><span class='text-muted'><?php echo $lang->testtask->allTasks;?></span> <?php echo count($productTasks);?></div>
</td>
<?php endif;?>
<td class="cell-id">
<td class="c-id">
<?php if($canTestReport):?>
<?php echo html::checkbox('taskIdList', array($task->id => sprintf('%03d', $task->id)));?>
<?php else:?>
+1 -1
View File
@@ -275,7 +275,7 @@
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
+1 -1
View File
@@ -193,5 +193,5 @@ $config->story->datatable->fieldList['caseCount']['name'] = $lang->story->ca
$config->story->datatable->fieldList['actions']['title'] = 'actions';
$config->story->datatable->fieldList['actions']['fixed'] = 'right';
$config->story->datatable->fieldList['actions']['width'] = '190';
$config->story->datatable->fieldList['actions']['width'] = '150';
$config->story->datatable->fieldList['actions']['required'] = 'yes';
+1 -1
View File
@@ -327,7 +327,7 @@
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
+1 -1
View File
@@ -197,5 +197,5 @@ $config->task->datatable->fieldList['lastEditedDate']['required'] = 'no';
$config->task->datatable->fieldList['actions']['title'] = 'actions';
$config->task->datatable->fieldList['actions']['fixed'] = 'right';
$config->task->datatable->fieldList['actions']['width'] = '180';
$config->task->datatable->fieldList['actions']['width'] = '130';
$config->task->datatable->fieldList['actions']['required'] = 'yes';
+13 -3
View File
@@ -2450,8 +2450,20 @@ class taskModel extends model
case 'assignedTo':
$btnTextClass = '';
$assignedToText = zget($users, $task->assignedTo);
if(empty($task->assignedTo))
{
$btnTextClass = 'text-primary';
$assignedToText = $this->lang->task->noAssigned;
}
if($task->assignedTo == $account) $btnTextClass = 'text-red';
echo "<span class='{$btnTextClass}'>{$assignedToText}</span>";
$btnClass = $assignedToText == 'closed' ? ' disabled' : '';
$btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}";
$assignToLink = helper::createLink('task', 'assignTo', "projectID=$task->project&taskID=$task->id", '', true);
$assignToHtml = html::a($assignToLink, "<i class='icon icon-hand-right'></i> <span class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='$btnClass'");
echo !common::hasPriv('task', 'assignTo') ? "<span style='padding-left:25px;' class='{$btnTextClass}'>{$assignedToText}</span>" : $assignToHtml;
break;
case 'assignedDate':
echo substr($task->assignedDate, 5, 11);
@@ -2512,8 +2524,6 @@ class taskModel extends model
break;
}
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if($task->status == 'wait') common::printIcon('task', 'start', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if($task->status == 'pause') common::printIcon('task', 'restart', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
if($task->status == 'done' or $task->status == 'cancel' or $task->status == 'closed') common::printIcon('task', 'close', "taskID=$task->id", $task, 'list', '', '', 'iframe', true);
+1 -1
View File
@@ -335,7 +335,7 @@
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
+1 -1
View File
@@ -204,6 +204,6 @@ $config->testcase->datatable->fieldList['stepNumber']['name'] = $lang->testc
$config->testcase->datatable->fieldList['actions']['title'] = 'actions';
$config->testcase->datatable->fieldList['actions']['fixed'] = 'right';
$config->testcase->datatable->fieldList['actions']['width'] = '190';
$config->testcase->datatable->fieldList['actions']['width'] = '150';
$config->testcase->datatable->fieldList['actions']['required'] = 'yes';
$config->testcase->datatable->fieldList['actions']['sort'] = 'no';
+1 -1
View File
@@ -279,7 +279,7 @@
</div>
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<?php common::printPreAndNext($preAndNext);?>
<div class="btn-toolbar">
<?php common::printBack($browseLink);?>
+1 -1
View File
@@ -34,7 +34,7 @@
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container"></nav>
<div class="btn-toolbar">
<?php
+1 -1
View File
@@ -119,7 +119,7 @@
</div>
</div>
</div>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<div class="container"></div>
<div class="btn-toolbar">
<?php
+2
View File
@@ -2428,6 +2428,8 @@ class upgradeModel extends model
}
}
}
$this->dao->delete()->from(TABLE_CONFIG)->where('module')->eq('common')->andWhere('section')->eq('customMenu')->andWhere('key')->eq('full_project')->exec();
return !dao::isError();
}
+1
View File
@@ -76,6 +76,7 @@ $lang->user->bug = 'Bug';
$lang->user->test = 'Test';
$lang->user->testTask = 'TestTask';
$lang->user->testCase = 'TestCase';
$lang->user->schedule = 'Calendar';
$lang->user->todo = 'Todo';
$lang->user->story = 'Story';
$lang->user->dynamic = 'Dynamic';
+1
View File
@@ -76,6 +76,7 @@ $lang->user->bug = 'Bug';
$lang->user->test = '测试';
$lang->user->testTask = '测试任务';
$lang->user->testCase = '测试用例';
$lang->user->schedule = '日程';
$lang->user->todo = '待办';
$lang->user->story = '需求';
$lang->user->dynamic = '动态';
+1 -1
View File
@@ -79,7 +79,7 @@ $preLink = $hasPre ? inlink('dynamic', "type=$type&account=$account&recTotal={
$nextLink = $hasNext ? inlink('dynamic', "type=$type&account=$account&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions">
<div id="mainActions" class='main-actions'>
<nav class="container">
<a id="prevPage" class="btn btn-info<?php if(!$hasNext) echo ' disabled';?>" href="<?php echo $nextLink;?>"><i class="icon icon-chevron-left"></i></a>
<a id="nextPage" class="btn btn-info<?php if(!$hasPre) echo ' disabled';?>" href="<?php echo $preLink;?>"><i class="icon icon-chevron-right"></i></a>
+9 -9
View File
@@ -10,50 +10,50 @@
if($config->global->flow == 'full')
{
$label = "<span class='text'>{$lang->user->todo}</span>";
$label = "<span class='text'>{$lang->user->schedule}</span>";
$active = $methodName == 'todo' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'todo', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'todo', "account=$account", $label, '', "class='btn btn-link $active'");
}
if($config->global->flow != 'onlyTask' and $config->global->flow != 'onlyTest')
{
$label = "<span class='text'>{$lang->user->story}</span>";
$active = $methodName == 'story' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'story', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'story', "account=$account", $label, '', "class='btn btn-link $active'");
}
if($config->global->flow == 'full' or $config->global->flow == 'onlyTask')
{
$label = "<span class='text'>{$lang->user->task}</span>";
$active = $methodName == 'task' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'task', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'task', "account=$account", $label, '', "class='btn btn-link $active'");
}
if($config->global->flow == 'full' or $config->global->flow == 'onlyTest')
{
$label = "<span class='text'>{$lang->user->bug}</span>";
$active = $methodName == 'bug' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'bug', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'bug', "account=$account", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->test}</span>";
$active = ($methodName == 'testtask' or $methodName == 'testcase')? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'testtask', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'testtask', "account=$account", $label, '', "class='btn btn-link $active'");
}
$label = "<span class='text'>{$lang->user->dynamic}</span>";
$active = $methodName == 'dynamic' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'dynamic', "type=today&account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'dynamic', "type=today&account=$account", $label, '', "class='btn btn-link $active'");
if($config->global->flow == 'full' or $config->global->flow == 'onlyTask')
{
$label = "<span class='text'>{$lang->user->project}</span>";
$active = $methodName == 'project' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'project', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'project', "account=$account", $label, '', "class='btn btn-link $active'");
}
$label = "<span class='text'>{$lang->user->profile}</span>";
$active = $methodName == 'profile' ? ' btn-active-text' : '';
echo html::a($this->createLink('user', 'profile', "account=$account"), $label, '', "class='btn btn-link $active'");
common::printLink('user', 'profile', "account=$account", $label, '', "class='btn btn-link $active'");
?>
</div>
</div>
+2 -2
View File
File diff suppressed because one or more lines are too long
+8 -1
View File
@@ -13,5 +13,12 @@
.hide-sidebar #sidebar .cell{display:none;}
/* 调整每个创建页面的宽度*/
.main-content{padding:30px;}
/* 详情页上一页下一页的样式*/
#nextPage, #prevPage{background-color:#909090;color:#fff}
.table-header.fixed-right>.btn-toolbar{top:0px;}
.c-assignedTo .icon-hand-right {opacity:0;}
.c-assignedTo a:hover .icon-hand-right {opacity:1;}
.main-table tbody>tr:nth-child(odd) .c-assignedTo .btn{background-color:#f5f5f5;}
.main-table tbody>tr:hover .c-assignedTo .btn {background-color:#e9f2fb;}
.main-table tbody>tr>td.col-hover.c-assignedTo .btn {background-color:#e9f2fb;}
.main-table thead>tr>th.c-assignedTo {padding-left:35px;}
File diff suppressed because one or more lines are too long