+ bug #139
This commit is contained in:
@@ -21,6 +21,7 @@ class my extends control
|
||||
{
|
||||
parent::__construct();
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('dept');
|
||||
$this->my->setMenu();
|
||||
}
|
||||
|
||||
@@ -304,6 +305,9 @@ class my extends control
|
||||
public function profile()
|
||||
{
|
||||
if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back'));
|
||||
$user = $this->user->getById($this->app->user->account);
|
||||
$deptPath = $this->dept->getParents($user->dept);
|
||||
$this->view->deptPath = $deptPath;
|
||||
$this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->profile;
|
||||
$this->view->position[] = $this->lang->my->profile;
|
||||
$this->view->user = $this->user->getById($this->app->user->id);
|
||||
|
||||
@@ -14,6 +14,26 @@
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<table align='center' class='table-4'>
|
||||
<caption><?php echo $lang->my->profile;?></caption>
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->dept;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($deptPath))
|
||||
{
|
||||
echo "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($deptPath as $key => $dept)
|
||||
{
|
||||
if($dept->name) echo $dept->name;
|
||||
if(isset($deptPath[$key + 1])) echo $lang->arrow;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class='rowhead'><?php echo $lang->user->account;?></th>
|
||||
<td><?php echo $user->account;?></td>
|
||||
|
||||
Reference in New Issue
Block a user