Skip to content

Commit

Permalink
Dev : Removed the first step redirection (it's now a modal)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis committed Oct 2, 2015
1 parent 0439bc7 commit a10722a
Showing 1 changed file with 31 additions and 38 deletions.
69 changes: 31 additions & 38 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -51,46 +51,39 @@ public function index()

public function listsurveys()
{
if (count(getSurveyList(true)) == 0)
Yii::app()->loadHelper('surveytranslator');

$aData['issuperadmin'] = false;
if (Permission::model()->hasGlobalPermission('superadmin','read'))
{
$this->_renderWrappedTemplate('super', 'firststeps');
}
else
$aData['issuperadmin'] = true;
}

$aData['model'] = $model = new Survey('search');

// Search
if (isset($_GET['Survey']['searched_value']))
{
Yii::app()->loadHelper('surveytranslator');

$aData['issuperadmin'] = false;
if (Permission::model()->hasGlobalPermission('superadmin','read'))
{
$aData['issuperadmin'] = true;
}

$aData['model'] = $model = new Survey('search');

// Search
if (isset($_GET['Survey']['searched_value']))
{
$model->searched_value = $_GET['Survey']['searched_value'];
}

$model->active = null;
// Filter state
if (isset($_GET['active']))
{
$model->active = $_GET['active'];
}

// Set number of page
if (isset($_GET['pageSize']))
{
Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']);
}

$aData['fullpagebar']['button']['newsurvey'] = true;

$this->_renderWrappedTemplate('survey', 'listSurveys_view', $aData);

}
$model->searched_value = $_GET['Survey']['searched_value'];
}

$model->active = null;
// Filter state
if (isset($_GET['active']))
{
$model->active = $_GET['active'];
}

// Set number of page
if (isset($_GET['pageSize']))
{
Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']);
}

$aData['fullpagebar']['button']['newsurvey'] = true;

$this->_renderWrappedTemplate('survey', 'listSurveys_view', $aData);

}

public function listupdates()
Expand Down

0 comments on commit a10722a

Please sign in to comment.