diff options
| author | Tristan Zur <tzur@ccwn.org> | 2012-05-18 12:05:47 +0200 |
|---|---|---|
| committer | Tristan Zur <tzur@ccwn.org> | 2012-05-18 12:05:47 +0200 |
| commit | fdca87325b4f7708a1868419f391fc6a84da1661 (patch) | |
| tree | 7f0bf6cbcc71c8d3dc6ccc04671304bc9f43c770 /protected/controllers/MyAngebotController.php | |
| parent | 3b42a2c428cf9faac8656c72b338f0115e7b6bdf (diff) | |
- Speis & Trank (Vereine) Layout korrigiert
- Schreibfehler in Main-Layout korrigiert
Diffstat (limited to 'protected/controllers/MyAngebotController.php')
| -rw-r--r-- | protected/controllers/MyAngebotController.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/protected/controllers/MyAngebotController.php b/protected/controllers/MyAngebotController.php index a1b6064..02d9929 100644 --- a/protected/controllers/MyAngebotController.php +++ b/protected/controllers/MyAngebotController.php @@ -2,6 +2,11 @@ class MyAngebotController extends Controller { + /** + * @var string the default layout for the views. Defaults to '//layouts/column2', meaning + * using two-column layout. See 'protected/views/layouts/column2.php'. + */ + public $layout='//layouts/column2'; /** * @return array action filters @@ -45,13 +50,25 @@ class MyAngebotController extends Controller if(isset($_POST['AngebotVerein'])) { $model->attributes=$_POST['AngebotVerein']; + $model->verein_id = Yii::app()->user->vereinId; if($model->save()) $this->redirect(array('index')); } + $angebot = Angebot::model()->findAll();
+ $angebote = array();
+ foreach ($angebot as $a) {
+ $an = array();
+ $an["label"] = $a->name;
+ $an["value"] = $a->id;
+ $an["einheiten"] = $a->kategorie->einheiten;
+ array_push($angebote, $an);
+ } + $this->render('create',array( 'model'=>$model, - 'angebote'=>Angebot::model()->findAll(), + 'angebote'=>$angebote, + 'einheiten'=>'' )); } public function actionIndex() |
