* adjust the feature of other user todos.
This commit is contained in:
@@ -70,10 +70,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($users as $user):?>
|
||||
<tr>
|
||||
<tr class='a-center'>
|
||||
<td class='a-right'><?php echo $user->id;?></td>
|
||||
<td><?php echo $user->realname;?></td>
|
||||
<td><?php if(common::hasPriv('user', 'view')) echo html::a($this->createLink('user', 'view', "account=$user->account"), $user->account); else echo $user->account;?></td>
|
||||
<td><?php if(common::hasPriv('user', 'view')) echo html::a($this->createLink('user', 'view', "account=$user->account"), $user->realname); else echo $user->realname;?></td>
|
||||
<td><?php echo $user->account;?></td>
|
||||
<td><?php echo $user->nickname;?></td>
|
||||
<td><?php echo html::mailto($user->email);?></td>
|
||||
<td class='a-center'><?php if(isset($lang->user->gendarList->{$user->gendar})) echo $lang->user->gendarList->{$user->gendar};?></td>
|
||||
|
||||
@@ -39,13 +39,15 @@ class user extends control
|
||||
}
|
||||
|
||||
/* <20>û<EFBFBD><C3BB><EFBFBD>todo<64>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
public function todo($account, $date = 'today')
|
||||
public function todo($account, $date = 'today', $status = 'all')
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD>todo model<65><6C>*/
|
||||
$this->loadModel('todo');
|
||||
$this->lang->set('menugroup.user', 'company');
|
||||
$user = $this->dao->findByAccount($account)->from(TABLE_USER)->fetch();
|
||||
if($date == 'today') $date = $this->todo->today();
|
||||
|
||||
$todos = $this->todo->getList($date, $account, $status);
|
||||
if((int)$date == 0) $date = $this->todo->today();
|
||||
|
||||
/* <20>趨header<65><72>position<6F><6E>Ϣ<EFBFBD><CFA2>*/
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->user->todo;
|
||||
@@ -57,8 +59,8 @@ class user extends control
|
||||
$this->assign('tabID', 'todo');
|
||||
$this->assign('dates', $this->todo->buildDateList());
|
||||
$this->assign('date', $date);
|
||||
$this->assign('todos', $this->todo->getList($date, $account));
|
||||
$this->assign('user', $this->dao->findByAccount($account)->from(TABLE_USER)->fetch());
|
||||
$this->assign('todos', $todos);
|
||||
$this->assign('user', $user);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ function changeDate(date)
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->last;?></th>
|
||||
<td><?php echo $user->last;?></td>
|
||||
<td><?php echo date('Y-m-d H:i:s', $user->last);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='a-right'>
|
||||
@@ -88,11 +88,16 @@ $("#{$tabID}tab").addClass('active');
|
||||
EOT;
|
||||
?>
|
||||
</ul>
|
||||
<?php if($tabID == 'todo'):?>
|
||||
<div>
|
||||
<?php
|
||||
echo html::select('date', $dates, $date, 'onchange=changeDate(this.value)');
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if($tabID == 'todo'):?>
|
||||
<div id='subtab'>
|
||||
<?php
|
||||
echo html::a($this->createLink('user', 'todo', "account=$user->account&date=today"), $lang->todo->todayTodos);
|
||||
echo html::a($this->createLink('user', 'todo', "account=$user->account&date=thisweek"), $lang->todo->thisWeekTodos);
|
||||
echo html::a($this->createLink('user', 'todo', "account=$user->account&date=lastweek"), $lang->todo->lastWeekTodos);
|
||||
echo html::a($this->createLink('user', 'todo', "account=$user->account&date=all"), $lang->todo->allDaysTodos);
|
||||
echo html::a($this->createLink('user', 'todo', "account=$user->account&date=before&account={$app->user->account}&status=wait,doing"), $lang->todo->allUndone);
|
||||
echo html::select('date', $dates, $date, 'onchange=changeDate(this.value)');
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user