* Fix program detail.

This commit is contained in:
Yagami
2020-11-18 15:33:23 +08:00
parent 460947ebce
commit 540728e3fa
2 changed files with 6 additions and 13 deletions
+3 -7
View File
@@ -59,7 +59,7 @@ class program extends control
* @access public
* @return void
*/
public function PGMBrowse($status = 'all', $orderBy = 'order_asc', $recTotal = 0, $recPerPage = 50, $pageID = 1)
public function PGMBrowse($status = 'all', $orderBy = 'order_asc')
{
$this->lang->navGroup->program = 'program';
$this->lang->program->switcherMenu = $this->program->getPGMCommonAction();
@@ -70,16 +70,13 @@ class program extends control
$programType = $this->cookie->programType ? $this->cookie->programType : 'bylist';
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
if($programType === 'bygrid')
{
$programs = $this->program->getProgramStats($status, 20, $orderBy, $pager);
$programs = $this->program->getProgramStats($status, 20, $orderBy);
}
else
{
$programs = $this->program->getPGMList($status, $orderBy, $pager, true);
$programs = $this->program->getPGMList($status, $orderBy, null, true);
}
$this->view->title = $this->lang->program->PGMBrowse;
@@ -88,7 +85,6 @@ class program extends control
$this->view->programs = $programs;
$this->view->status = $status;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->programType = $programType;
+3 -6
View File
@@ -53,9 +53,9 @@
<?php endif;?>
</td>
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
<td class='text-center'><?php echo $program->begin;?></td>
<td class='text-center'><?php echo $program->end == '2059-12-31' ? '' : $program->end;?></td>
<td class='text-left'><?php echo $program->budget . ' ' . zget($lang->program->unitList, $program->budgetUnit);?></td>
<td><?php echo $program->begin;?></td>
<td><?php echo $program->end == '2059-12-31' ? '' : $program->end;?></td>
<td class='text-left'><?php echo $program->budget ? $program->budget . ' ' . zget($lang->program->unitList, $program->budgetUnit) : '';?></td>
<td><?php echo zget($users, $program->PM);?></td>
<td class='text-right c-actions'>
<?php if($program->type == 'program'):?>
@@ -82,9 +82,6 @@
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<style>
.w-240px {width:240px;}