* Finish task #8789.
This commit is contained in:
@@ -412,7 +412,7 @@ class my extends control
|
||||
/**
|
||||
* My projects.
|
||||
*
|
||||
* @param string $status
|
||||
* @param string $status doing|wait|suspended|closed|openedbyme
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
@@ -420,7 +420,7 @@ class my extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function project($status = 'all', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->app->loadLang('project');
|
||||
@@ -434,7 +434,7 @@ class my extends control
|
||||
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->project;
|
||||
$this->view->position[] = $this->lang->my->project;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->projects = $this->user->getProjects($this->app->user->account, 'project', 'all', $pager);
|
||||
$this->view->projects = $this->user->getProjects($this->app->user->account, 'project', $status, $pager);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->status = $status;
|
||||
$this->display();
|
||||
|
||||
@@ -49,6 +49,13 @@ $lang->my->storyMenu->openedByMe = 'CreatedByMe';
|
||||
$lang->my->storyMenu->reviewedByMe = 'ReviewedByMe';
|
||||
$lang->my->storyMenu->closedByMe = 'ClosedByMe';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = 'Going';
|
||||
$lang->my->projectMenu->wait = 'Waiting';
|
||||
$lang->my->projectMenu->suspended = 'Suspended';
|
||||
$lang->my->projectMenu->closed = 'Closed';
|
||||
$lang->my->projectMenu->openedbyme = 'CreatedByMe';
|
||||
|
||||
$lang->my->home = new stdclass();
|
||||
$lang->my->home->latest = 'Dynamics';
|
||||
$lang->my->home->action = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>.";
|
||||
|
||||
@@ -49,6 +49,13 @@ $lang->my->storyMenu->openedByMe = '我创建';
|
||||
$lang->my->storyMenu->reviewedByMe = '我评审';
|
||||
$lang->my->storyMenu->closedByMe = '我关闭';
|
||||
|
||||
$lang->my->projectMenu = new stdclass();
|
||||
$lang->my->projectMenu->doing = '进行中';
|
||||
$lang->my->projectMenu->wait = '未开始';
|
||||
$lang->my->projectMenu->suspended = '已挂起';
|
||||
$lang->my->projectMenu->closed = '已关闭';
|
||||
$lang->my->projectMenu->openedbyme = '由我创建';
|
||||
|
||||
$lang->my->home = new stdclass();
|
||||
$lang->my->home->latest = '最新动态';
|
||||
$lang->my->home->action = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
|
||||
|
||||
@@ -13,7 +13,12 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->my->project;?></span></span>
|
||||
<?php foreach($lang->my->projectMenu as $key => $label):?>
|
||||
<?php $active = $status == $key ? 'btn-active-text' : '';?>
|
||||
<?php $label = "<span class='text'>$label</span>";?>
|
||||
<?php if($status == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('project', "type=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class='main-table'>
|
||||
|
||||
@@ -968,8 +968,10 @@ class userModel extends model
|
||||
$myProjectsList = $this->dao->select('t1. *,t2. *')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id')
|
||||
->where('t1.type')->in($type)
|
||||
->beginIF(strpos('doing|wait|suspended|closed', $status) !== false)->andWhere('status')->eq($status)->fi()
|
||||
->beginIF($status == 'done')->andWhere('status')->in('done,closed')->fi()
|
||||
->beginIF($status == 'undone')->andWhere('status')->notin('done,closed')->fi()
|
||||
->beginIF($status == 'openedbyme')->andWhere('openedBy')->eq($account)->fi()
|
||||
->andWhere('t1.account')->eq($account)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->orderBy('t2.id_desc')
|
||||
|
||||
Reference in New Issue
Block a user