Skip to content

Commit

Permalink
Dev Added participant menu to all actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Jun 2, 2015
1 parent 9c9e48b commit 43248b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/ParticipantsController.php
Expand Up @@ -4,6 +4,9 @@

class ParticipantsController extends Controller
{
public $menus = [
'participant' => []
];
public function accessRules()
{
return array_merge([
Expand All @@ -15,12 +18,9 @@ public function accessRules()

public function actionIndex() {
$dataProvider = new \CActiveDataProvider(Participant::model()->accessibleTo(App()->user->id)->with('surveyCount'));

$this->menus['participant'] = [];
$this->render('index', ['dataProvider' => $dataProvider]);
}
public function actionSummary() {
$this->menus['participant'] = [];
$data = array(
'totalrecords' => false && App()->user->checkAccess('superadmin') ? Participant::model()->count() : Participant::model()->accessibleTo(App()->user->id)->count(),
'owned' => Participant::model()->ownedBy(App()->user->id)->count(),
Expand Down

0 comments on commit 43248b5

Please sign in to comment.