* rember the recPerpage.

This commit is contained in:
wangchunsheng
2009-10-30 01:56:33 +00:00
parent 3915314036
commit 88f22c48a5
2 changed files with 10 additions and 8 deletions
+8 -6
View File
@@ -93,12 +93,14 @@ class project extends control
$tasks = $this->task->getProjectTasks($projectID, $orderBy, $pager);
/* 赋值。*/
$this->assign('header', $header);
$this->assign('position', $position);
$this->assign('tasks', $tasks);
$this->assign('tabID', 'task');
$this->assign('pager', $pager->get());
$this->assign('orderBy', $orderBy);
$this->assign('header', $header);
$this->assign('position', $position);
$this->assign('tasks', $tasks);
$this->assign('tabID', 'task');
$this->assign('pager', $pager->get());
$this->assign('recTotal', $pager->recTotal);
$this->assign('recPerPage', $pager->recPerPage);
$this->assign('orderBy', $orderBy);
$this->display();
}
+2 -2
View File
@@ -38,7 +38,7 @@ function selectProject(projectID)
<?php
include './tabbar.html.php';
if(common::hasPriv('task', 'create')) echo '<div>' . html::a($this->createLink('task', 'create', "project=$project->id"), $lang->task->create) . '</div>';
$app->global->vars = "projectID=$project->id";
$app->global->vars = "projectID=$project->id&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage";
$app->global->orderBy = $orderBy;
function printOrderLink($fieldName)
{
@@ -52,7 +52,7 @@ function selectProject(projectID)
{
$orderBy = $fieldName . '|' . 'asc';
}
$link = helper::createLink('project', 'task', $app->global->vars ."&orderBy=$orderBy");
$link = helper::createLink('project', 'task', sprintf($app->global->vars, $orderBy));
$fieldName = str_replace('`', '', $fieldName);
echo html::a($link, $lang->task->$fieldName);
}