Merge branch 'sprint/195_zg_55147' into 'master'
* Finish task#55174,55172 See merge request easycorp/zentaopms!3573
This commit is contained in:
@@ -695,10 +695,11 @@ EOF;
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
public function project($status = 'doing', $recTotal = 0, $recPerPage = 15, $pageID = 1, $orderBy = 'id_desc')
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->app->loadLang('project');
|
||||
@@ -713,7 +714,7 @@ EOF;
|
||||
|
||||
/* Get PM id list. */
|
||||
$accounts = array();
|
||||
$projects = $this->user->getObjects($this->app->user->account, 'project', $status, 'id_desc', $pager);
|
||||
$projects = $this->user->getObjects($this->app->user->account, 'project', $status, $orderBy, $pager);
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if(!empty($project->PM) and !in_array($project->PM, $accounts)) $accounts[] = $project->PM;
|
||||
@@ -727,6 +728,10 @@ EOF;
|
||||
$this->view->PMList = $PMList;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->status = $status;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,18 +30,19 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form class='main-table' id='projectForm' method='post' data-ride='table' data-checkable='false'>
|
||||
<table class='table table-fixed' id='projectList'>
|
||||
<table class='table has-sort-head table-fixed' id='projectList'>
|
||||
<?php $vars = "status=$status&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&orderBy=%s"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->project->name;?></th>
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->project->name);?></th>
|
||||
<?php if($status == 'openedbyme'):?>
|
||||
<th class='c-status'> <?php echo $lang->project->status;?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->project->status);?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date'><?php echo $lang->project->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->project->end;?></th>
|
||||
<th class='text-right c-budget'><?php echo $lang->project->budget;?></th>
|
||||
<th class='c-user'><?php echo $lang->project->PM;?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->project->begin);?></th>
|
||||
<th class='c-date'><?php common::printOrderLink('end', $orderBy, $vars, $lang->project->end);?></th>
|
||||
<th class='text-right c-budget'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->project->budget);?></th>
|
||||
<th class='c-user'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->project->PM);?></th>
|
||||
<th class='text-center c-actions-6'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -490,7 +490,7 @@ $(document).ready(function()
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#testStory_chosen,#story_chosen', function()
|
||||
$(document).on('click', '#testStory_chosen', function()
|
||||
{
|
||||
var $obj = $(this).prev('select');
|
||||
var value = $obj.val();
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?></span>
|
||||
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
|
||||
<?php echo html::select('story', array($task->story => (empty($stories) or !isset($stories[$task->story])) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<?php echo html::select('story', $stories, $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user