diff options
Diffstat (limited to 'protected/views/myVeranstaltung')
| -rw-r--r-- | protected/views/myVeranstaltung/_form.php | 82 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/_search.php | 39 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/create.php | 14 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/index.php | 38 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/update.php | 16 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/view.php | 28 |
6 files changed, 217 insertions, 0 deletions
diff --git a/protected/views/myVeranstaltung/_form.php b/protected/views/myVeranstaltung/_form.php new file mode 100644 index 0000000..1332b44 --- /dev/null +++ b/protected/views/myVeranstaltung/_form.php @@ -0,0 +1,82 @@ +<div class="form"> + +<?php $form=$this->beginWidget('CActiveForm', array( + 'id'=>'veranstaltung-form', + 'enableAjaxValidation'=>false, +)); ?> + + <?php $this->renderPartial('/common/_required_fields_text'); ?> + + <?php echo $form->errorSummary($model); ?> + + <div class="row"> + <?php echo $form->labelEx($model,'titel'); ?> + <?php echo $form->textField($model,'titel',array('size'=>60,'maxlength'=>100)); ?> + <?php echo $form->error($model,'titel'); ?> + </div> + + <div class="row"> + <?php echo $form->labelEx($model,'startzeit'); ?> + <?php + $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker', array( + 'model'=>$model, + 'attribute'=>'startzeit', + 'mode'=>'datetime', + // additional javascript options for the date picker plugin + 'options'=>array( + 'minDate'=>Yii::app()->params["start_date"], + 'maxDate'=>Yii::app()->params["end_date"], + ), + 'htmlOptions'=>array( + 'style'=>'height:20px;' + ), + )); + ?> + <?php echo $form->error($model,'startzeit'); ?> + </div> + + <div class="row"> + <?php echo $form->labelEx($model,'endzeit'); ?> + <?php + $this->widget('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker', array( + 'model'=>$model, + 'attribute'=>'endzeit', + 'mode'=>'datetime', + // additional javascript options for the date picker plugin + 'options'=>array( + 'minDate'=>Yii::app()->params["start_date"], + 'maxDate'=>Yii::app()->params["end_date"], + ), + 'htmlOptions'=>array( + 'style'=>'height:20px;' + ), + )); + ?> + <?php echo $form->error($model,'endzeit'); ?> + </div> + + <div class="row"> + <?php echo $form->labelEx($model,'beschreibung'); ?> + <?php echo $form->textArea($model,'beschreibung',array('rows'=>6, 'cols'=>50)); ?> + <?php echo $form->error($model,'beschreibung'); ?> + </div> + + <div class="row"> + <?php echo $form->labelEx($model,'standort_id'); ?> + <?php echo $form->dropDownList($model, "standort_id", CHtml::listData($standorte, "id", "name"), array('empty' => '-- Bitte Standort wählen --')); ?> + <?php echo $form->error($model,'standort_id'); ?> + </div> + + <div class="row"> + <?php echo $form->labelEx($model,'published'); ?> + <?php echo $form->checkbox($model,'published'); ?> + <?php echo $form->error($model,'published'); ?> + </div> + + <div class="row buttons"> + <?php echo CHtml::submitButton($model->isNewRecord ? 'Erstellen' : 'Speichern'); ?> + </div> + +<?php $this->endWidget(); ?> + +</div><!-- form -->
\ No newline at end of file diff --git a/protected/views/myVeranstaltung/_search.php b/protected/views/myVeranstaltung/_search.php new file mode 100644 index 0000000..9fb5b02 --- /dev/null +++ b/protected/views/myVeranstaltung/_search.php @@ -0,0 +1,39 @@ +<div class="wide form"> + +<?php $form=$this->beginWidget('CActiveForm', array( + 'action'=>Yii::app()->createUrl($this->route), + 'method'=>'get', +)); ?> + + <div class="row"> + <?php echo $form->label($model,'titel'); ?> + <?php echo $form->textField($model,'titel',array('size'=>60,'maxlength'=>100)); ?> + </div> + + <div class="row"> + <?php echo $form->label($model,'startzeit'); ?> + <?php echo $form->textField($model,'startzeit'); ?> + </div> + + <div class="row"> + <?php echo $form->label($model,'endzeit'); ?> + <?php echo $form->textField($model,'endzeit'); ?> + </div> + + <div class="row"> + <?php echo $form->label($model,'beschreibung'); ?> + <?php echo $form->textArea($model,'beschreibung',array('rows'=>6, 'cols'=>50)); ?> + </div> + + <div class="row"> + <?php echo $form->label($model,'standort_id'); ?> + <?php echo $form->dropDownList($model, 'standort_id', CHtml::listData(Standort::model()->findAll(array('condition'=>'type="Bühne"')), 'id', 'name'), array("empty"=>"")); ?> + </div> + + <div class="row buttons"> + <?php echo CHtml::submitButton('Search'); ?> + </div> + +<?php $this->endWidget(); ?> + +</div><!-- search-form -->
\ No newline at end of file diff --git a/protected/views/myVeranstaltung/create.php b/protected/views/myVeranstaltung/create.php new file mode 100644 index 0000000..defd84d --- /dev/null +++ b/protected/views/myVeranstaltung/create.php @@ -0,0 +1,14 @@ +<?php +$this->breadcrumbs=array( + 'Unsere Veranstaltungen'=>array('index'), + 'Neue Veranstaltung erstellen', +); + +$this->menu=array( + array('label'=>'Unsere Veranstaltungen', 'url'=>array('index')), +); +?> + +<h1>Neue Veranstaltung erstellen</h1> + +<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte)); ?>
\ No newline at end of file diff --git a/protected/views/myVeranstaltung/index.php b/protected/views/myVeranstaltung/index.php new file mode 100644 index 0000000..373e056 --- /dev/null +++ b/protected/views/myVeranstaltung/index.php @@ -0,0 +1,38 @@ +<?php +$this->breadcrumbs=array( + 'Unsere Veranstaltungen', +); + +$this->menu=array( + array('label'=>'Neue Veranstaltung erstellen', 'url'=>array('create')), +); +?> + +<h1>Unsere Veranstaltungen</h1> + +<?php $this->renderPartial('/common/_comparison_text'); ?> + +<?php $this->renderPartial('/common/_advanced_search',array( + 'model'=>$model, +)); ?> + +<?php $this->widget('zii.widgets.grid.CGridView', array( + 'id'=>'veranstaltung-grid', + 'dataProvider'=>$model->search(), + 'filter'=>$model, + 'columns'=>array( + //'id', + //'verein_id', + 'titel', + array('value'=>'Format::displayDateTime($data->startzeit)', 'name'=>'startzeit'), + array('value'=>'Format::displayDateTime($data->endzeit)', 'name'=>'endzeit'), + 'beschreibung', + array('name'=>'standort_id',
+ 'filter'=>CHtml::listData(Standort::model()->findAll(array('condition'=>'type="Bühne"')), 'id', 'name'),
+ 'value'=>'($data->standort) ? $data->standort->name : "Kein Standort"'), + array('name'=>'published', 'filter'=>'', 'value'=>'CHtml::image($data->published ? "images/ok.png" : "images/nok.png", $data->published ? "ok.png" : "nok.png")', 'type'=>'raw'), + array( + 'class'=>'CButtonColumn', + ), + ), +)); ?> diff --git a/protected/views/myVeranstaltung/update.php b/protected/views/myVeranstaltung/update.php new file mode 100644 index 0000000..3ee393d --- /dev/null +++ b/protected/views/myVeranstaltung/update.php @@ -0,0 +1,16 @@ +<?php +$this->breadcrumbs=array( + 'Unsere Veranstaltungen'=>array('index'), + $model->titel.' bearbeiten', +); + +$this->menu=array( + array('label'=>'Unsere Veranstaltungen', 'url'=>array('index')), + array('label'=>'Neue Veranstaltung erstellen', 'url'=>array('create')), + array('label'=>'Diese Veranstaltung anzeigen', 'url'=>array('view', 'id'=>$model->id)), +); +?> + +<h1>Veranstaltung '<?php echo $model->titel; ?>' bearbeiten</h1> + +<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte)); ?>
\ No newline at end of file diff --git a/protected/views/myVeranstaltung/view.php b/protected/views/myVeranstaltung/view.php new file mode 100644 index 0000000..cb1ab82 --- /dev/null +++ b/protected/views/myVeranstaltung/view.php @@ -0,0 +1,28 @@ +<?php +$this->breadcrumbs=array( + 'Unsere Veranstaltungen'=>array('index'), + $model->titel, +); + +$this->menu=array( + array('label'=>'Unsere Veranstaltungen', 'url'=>array('index')), + array('label'=>'Neue Veranstaltung erstellen', 'url'=>array('create')), + array('label'=>'Diese Veranstaltung bearbeiten', 'url'=>array('update', 'id'=>$model->id)), + array('label'=>'Diese Veranstaltung löschen', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Wollen Sie diese Veranstaltung wirklich löschen?')), +); +?> + +<h1><?php echo $model->titel; ?></h1> + +<?php $this->widget('zii.widgets.CDetailView', array( + 'data'=>$model, + 'attributes'=>array( + //'verein_id', + //'titel', + array('label'=>'Startzeit', 'value'=>Format::displayDateTime($model->startzeit)), + array('label'=>'Endzeit', 'value'=>Format::displayDateTime($model->endzeit)), + 'beschreibung:html', + array('label'=>'Standort', 'value'=>($model->standort) ? $model->standort->name : null), + array('label'=>'Öffentlich', 'value'=>CHtml::image($model->published ? "images/ok.png" : "images/nok.png", $model->published ? "ok.png" : "nok.png"), 'type'=>'raw'), + ), +)); ?> |
