Skip to content

Commit

Permalink
Dev : quick actions enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 2, 2015
1 parent ca7a37b commit ae9ec05
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 118 deletions.
29 changes: 22 additions & 7 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -87,13 +87,6 @@ public function listsurveys()

}

public function listupdates()
{
echo "should call update/index";
//$this->_renderWrappedTemplate('update', '_updateContainer', array("thisupdatecheckperiod"=>getGlobalSetting('updatecheckperiod'),"updatelastcheck"=>getGlobalSetting('updatelastcheck'),"UpdateNotificationForBranch"=>getGlobalSetting('updatenotification')));
//$this->_renderWrappedTemplate('update', 'update_view');
}


public function regenquestioncodes($iSurveyID, $sSubAction )
{
Expand Down Expand Up @@ -309,6 +302,28 @@ public function changetemplate($iSurveyID, $template)
$survey->save();
}

public function togglequickaction()
{
$setting_entry = 'quickaction_'.Yii::app()->user->getId();
$quickactionstate = getGlobalSetting($setting_entry);

switch ($quickactionstate)
{
// if the quickaction state is not set, then it's the first time user click on the chevron, then the state must be set to 0
case null:
setGlobalSetting($setting_entry, 0);
break;

case 0:
setGlobalSetting($setting_entry, 1);
break;

case 1:
setGlobalSetting($setting_entry, 0);
break;
}
}

/**
* Load complete view of survey properties and actions specified by $iSurveyID
*
Expand Down

0 comments on commit ae9ec05

Please sign in to comment.