| @@ 88-109 (lines=22) @@ | ||
| 85 | * |
|
| 86 | * @return array |
|
| 87 | */ |
|
| 88 | public function indexAction() |
|
| 89 | { |
|
| 90 | /* @var $request \Zend\Http\Request */ |
|
| 91 | $request = $this->getRequest(); |
|
| 92 | $params = $request->getQuery(); |
|
| 93 | $isRecruiter = $this->acl()->isRole('recruiter'); |
|
| 94 | $params->count = 10; |
|
| 95 | if ($isRecruiter) { |
|
| 96 | $params->set('by', 'me'); |
|
| 97 | } |
|
| 98 | //default sorting |
|
| 99 | if (!isset($params['sort'])) { |
|
| 100 | $params->set('sort', "-name"); |
|
| 101 | } |
|
| 102 | // save the Params in the Session-Container |
|
| 103 | $this->paginationParams()->setParams('Organizations\Index', $params); |
|
| 104 | $paginator = $this->paginator('Organizations/Organization', $params); |
|
| 105 | return array( |
|
| 106 | 'script' => 'organizations/index/list', |
|
| 107 | 'organizations' => $paginator |
|
| 108 | ); |
|
| 109 | } |
|
| 110 | ||
| 111 | ||
| 112 | /** |
|
| @@ 276-299 (lines=24) @@ | ||
| 273 | * |
|
| 274 | * @return array |
|
| 275 | */ |
|
| 276 | public function dashboardAction() |
|
| 277 | { |
|
| 278 | $params = $this->getRequest()->getQuery(); |
|
| 279 | $isRecruiter = $this->acl()->isRole('recruiter'); |
|
| 280 | if ($isRecruiter) { |
|
| 281 | $params->set('by', 'me'); |
|
| 282 | } |
|
| 283 | ||
| 284 | //default sorting |
|
| 285 | if (!isset($params['sort'])) { |
|
| 286 | $params['sort']="-date"; |
|
| 287 | } |
|
| 288 | $params->count = 5; |
|
| 289 | $params->pageRange=5; |
|
| 290 | ||
| 291 | $this->paginationParams()->setParams('Applications\Index', $params); |
|
| 292 | ||
| 293 | $paginator = $this->paginator('Applications/Application', $params); |
|
| 294 | ||
| 295 | return array( |
|
| 296 | 'script' => 'applications/index/dashboard', |
|
| 297 | 'applications' => $paginator |
|
| 298 | ); |
|
| 299 | } |
|
| 300 | ||
| 301 | /** |
|
| 302 | * sends a test-mail with all application-data to the applicant |
|