diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2012-05-28 15:28:35 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2012-05-28 15:28:35 +0000 | 
| commit | 054086b33dad4c4f7089cf2ebf0f52eed1d7a023 (patch) | |
| tree | d78d83a895e239b3495e9ac52ecee0107b2a2f61 /h-source/Application | |
| parent | 7097598d5576ba5e9391b43f26bfc037c08d61c3 (diff) | |
administrators can now view the actions of a single user in a compact format
Diffstat (limited to 'h-source/Application')
| -rw-r--r-- | h-source/Application/Controllers/SpecialController.php | 17 | ||||
| -rw-r--r-- | h-source/Application/Models/HistoryModel.php | 1 | ||||
| -rw-r--r-- | h-source/Application/Views/Desktop/Special/modactions.php | 11 | 
3 files changed, 23 insertions, 6 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 9298ad3..a118211 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -33,7 +33,9 @@ class SpecialController extends BaseController  		$data['title'] = gtext('last modifications').' - '.Website::$generalName;  		$this->append($data); -		$this->setArgKeys(array('page:forceNat'=>1)); +		Params::$nullQueryValue = 'undef'; +		 +		$this->setArgKeys(array('page:forceNat'=>1,'username:sanitizeAll'=>'undef'));  	}  	protected function last($lang = 'en',$action = 'modifications') @@ -78,11 +80,12 @@ class SpecialController extends BaseController  				break;  		} - +		$whereClauseArray['username'] = $this->viewArgs['username']; +		  		$this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); - -		$this->m['HistoryModel']->clear()->select()->where($whereClauseArray)->orderBy('id_history desc'); - +		 +		$this->m['HistoryModel']->clear()->left('regusers')->on('history.created_by=regusers.id_user')->select("history.*,regusers.username")->where($whereClauseArray)->orderBy('id_history desc'); +		  		$recordNumber = $this->m['HistoryModel']->rowNumber();  		$page = $this->viewArgs['page']; @@ -90,6 +93,8 @@ class SpecialController extends BaseController  		$data['table'] = $this->m['HistoryModel']->send(); +// 		echo $this->m['HistoryModel']->getQuery(); +		  		$data['pageList'] = $this->h['Pages']->render($page-5,11);  		$this->append($data); @@ -120,7 +125,7 @@ class SpecialController extends BaseController  		$this->m['HistoryModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30);  		$data['table'] = $this->m['HistoryModel']->send(); - +		  		$data['pageList'] = $this->h['Pages']->render($page-5,11);  		$this->append($data); diff --git a/h-source/Application/Models/HistoryModel.php b/h-source/Application/Models/HistoryModel.php index cf63dbe..d94f745 100644 --- a/h-source/Application/Models/HistoryModel.php +++ b/h-source/Application/Models/HistoryModel.php @@ -30,6 +30,7 @@ class HistoryModel extends Model_Tree {  			'approved'	=>	'hardware',  			'deleted'	=>	'hardware',  			'cleared'	=>	'hardware', +			'username'	=>	'regusers',  		);  		$this->orderBy = 'history.id_history'; diff --git a/h-source/Application/Views/Desktop/Special/modactions.php b/h-source/Application/Views/Desktop/Special/modactions.php index 4539aee..43c7a44 100644 --- a/h-source/Application/Views/Desktop/Special/modactions.php +++ b/h-source/Application/Views/Desktop/Special/modactions.php @@ -42,6 +42,17 @@  				<td class="simpleText">NOTE</td>  				<?php } ?>  			</tr> +			<tr> +				<td> </td> +				<td> </td> +				<td> </td> +				<td> </td> +				<td> </td> +				<td> </td> +				<?php if (strcmp($this->action,'usersactions') !== 0) { ?> +				<td> </td> +				<?php } ?> +			</tr>  			<?php foreach ($table as $row) { ?>  			<tr class="listRow">  				<td class="simpleText">  | 
