diff --git a/config/filter.php b/config/filter.php index 17961573b8..775c59ec2f 100644 --- a/config/filter.php +++ b/config/filter.php @@ -131,6 +131,7 @@ $filter->product->index->cookie['preBranch'] = 'int'; $filter->product->export->cookie['checkedItem'] = 'reg::checked'; $filter->program->index->cookie['programType'] = 'code'; +$filter->program->index->cookie['mine'] = 'code'; $filter->project->default->cookie['lastProject'] = 'int'; $filter->project->default->cookie['projectMode'] = 'code'; diff --git a/module/program/control.php b/module/program/control.php index c89b4a4ccb..fc88f1e581 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -15,11 +15,11 @@ class program extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->pager = $pager; $this->view->projectList = $this->program->getList($status, $orderBy, $pager); $this->view->status = $status; $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->title = $this->lang->program->index; $this->view->position[] = $this->lang->program->index; diff --git a/module/program/css/index.css b/module/program/css/index.css index fc77748c40..ada4c5d23b 100644 --- a/module/program/css/index.css +++ b/module/program/css/index.css @@ -1,3 +1,9 @@ .panel-title {height:55px; padding:10px;} .main-table.flow-block {height:203px;} .main-table.panel-heading > strong,.main-table.panel-heading > span {margin-bottom:5px} +#mainMenu .pull-left .checkbox-primary{display: inline-block; margin-left: 10px;} + +.footerbar .right-info{position: absolute; bottom: 10px; right: 10px;} +.footerbar .left-info{position: absolute; bottom: 15px; left: 20px;} +.flow-block {height: 230px;} +.panel-body .card-content{overflow-y: scroll; height: 100px;} diff --git a/module/program/js/index.js b/module/program/js/index.js new file mode 100644 index 0000000000..95c0722555 --- /dev/null +++ b/module/program/js/index.js @@ -0,0 +1,8 @@ +$(function() +{ + $('input[name^="mine"]').click(function() + { + var mine = $(this).is(':checked') ? 1 : 0; + $.cookie('mine', mine, {expires:config.cookieLife, path:config.webRoot}); + }) +}) diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index f703bbb352..9a91575d1a 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -24,6 +24,9 @@ $lang->program->dateRange = '起止时间'; $lang->program->to = '至'; $lang->program->realFinished = '实际完成日期'; $lang->program->realStarted = '实际开始日期'; +$lang->program->bygrid = '看板'; +$lang->program->bylist = '列表'; +$lang->program->mine = '我参与的'; $lang->program->durationEstimation = '工作量估算'; $lang->program->noProgram = '暂时没有项目'; @@ -37,3 +40,9 @@ $lang->program->typeList['cmmi'] = "瀑布"; $lang->program->categoryList['single'] = "单产品项目"; $lang->program->categoryList['multiple'] = "多产品项目"; + +$lang->program->featureBar['all'] = '所有'; +$lang->program->featureBar['doing'] = '进行中'; +$lang->program->featureBar['wait'] = '未开始'; +$lang->program->featureBar['suspended'] = '已挂起'; +$lang->program->featureBar['closed'] = '已关闭'; diff --git a/module/program/model.php b/module/program/model.php index 3195ff721c..f0980cbdcb 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -9,6 +9,10 @@ class programModel extends model ->andWhere('deleted')->eq(0) ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi() ->beginIF($status != 'all')->andWhere('status')->eq($status)->fi() + ->beginIF($this->cookie->mine) + ->andWhere('openedBy')->eq($this->app->user->account) + ->orWhere('PM')->eq($this->app->user->account) + ->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/program/view/index.html.php b/module/program/view/index.html.php index ca83d4c11a..e8dcf498c8 100644 --- a/module/program/view/index.html.php +++ b/module/program/view/index.html.php @@ -11,23 +11,28 @@ ?> -