diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 10:18:11 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 10:18:11 +0200 |
| commit | acec2b5dc35302147f9a9c73d837dce2f3f9958e (patch) | |
| tree | 2f88a3a657a9211331e1e63e056a089189bd0dd2 /protected/views/veranstaltung | |
| parent | 56593a21209f3ce55fe66d303dbe01b8e081778b (diff) | |
| parent | 148a216bba21cec1cbe07b60b5191791e0016d6f (diff) | |
Merge branch 'master' of ssh://proxy.ccwn.org:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/views/veranstaltung')
| -rw-r--r-- | protected/views/veranstaltung/_form.php | 98 | ||||
| -rw-r--r-- | protected/views/veranstaltung/_search.php | 54 | ||||
| -rw-r--r-- | protected/views/veranstaltung/_view.php | 38 | ||||
| -rw-r--r-- | protected/views/veranstaltung/create.php | 16 | ||||
| -rw-r--r-- | protected/views/veranstaltung/index.php | 40 | ||||
| -rw-r--r-- | protected/views/veranstaltung/update.php | 18 | ||||
| -rw-r--r-- | protected/views/veranstaltung/view.php | 28 |
7 files changed, 292 insertions, 0 deletions
diff --git a/protected/views/veranstaltung/_form.php b/protected/views/veranstaltung/_form.php new file mode 100644 index 0000000..833c693 --- /dev/null +++ b/protected/views/veranstaltung/_form.php @@ -0,0 +1,98 @@ +<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); ?> +<?php echo Yii::app()->params["start_datetime"]?> + <div class="row"> + <?php echo $form->labelEx($model,'verein_id'); ?> + <?php echo $form->dropDownList($model, "verein_id", CHtml::listData($vereine, "id", "name"), array('empty' => '-- Bitte Verein wählen --')); ?> + <?php echo $form->error($model,'verein_id'); ?> + </div> + + <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 $this->widget('application.extensions.tinymce.ETinyMce', + array( + 'name'=>'beschreibung', + "value"=>$model->beschreibung, + 'useSwitch' => false, + 'editorTemplate'=>'simple', + "language"=>"de", + "height"=>"200px", + ) + ); + ?> + <?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/veranstaltung/_search.php b/protected/views/veranstaltung/_search.php new file mode 100644 index 0000000..099603c --- /dev/null +++ b/protected/views/veranstaltung/_search.php @@ -0,0 +1,54 @@ +<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,'id'); ?> + <?php echo $form->textField($model,'id'); ?> + </div> + + <div class="row"> + <?php echo $form->label($model,'verein_id'); ?> + <?php echo $form->dropDownList($model, 'verein_id', CHtml::listData(Verein::model()->findAll(), 'id', 'name'), array("empty"=>"")); ?> + </div> + + <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"> + <?php echo $form->label($model,'published'); ?> + <?php echo $form->checkbox($model,'published'); ?> + </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/veranstaltung/_view.php b/protected/views/veranstaltung/_view.php new file mode 100644 index 0000000..daa818a --- /dev/null +++ b/protected/views/veranstaltung/_view.php @@ -0,0 +1,38 @@ +<div class="view"> + + <b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b> + <?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('verein_id')); ?>:</b> + <?php echo CHtml::encode($data->verein_id); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('titel')); ?>:</b> + <?php echo CHtml::encode($data->titel); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('startzeit')); ?>:</b> + <?php echo CHtml::encode($data->startzeit); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('endzeit')); ?>:</b> + <?php echo CHtml::encode($data->endzeit); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('beschreibung')); ?>:</b> + <?php echo CHtml::encode($data->beschreibung); ?> + <br /> + + <b><?php echo CHtml::encode($data->getAttributeLabel('standort_id')); ?>:</b> + <?php echo CHtml::encode($data->standort_id); ?> + <br /> + + <?php /* + <b><?php echo CHtml::encode($data->getAttributeLabel('published')); ?>:</b> + <?php echo CHtml::encode($data->published); ?> + <br /> + + */ ?> + +</div>
\ No newline at end of file diff --git a/protected/views/veranstaltung/create.php b/protected/views/veranstaltung/create.php new file mode 100644 index 0000000..ea42d4c --- /dev/null +++ b/protected/views/veranstaltung/create.php @@ -0,0 +1,16 @@ +<?php +$this->breadcrumbs=array( + 'Veranstaltungen'=>array('index'), + 'Veranstaltung erstellen', +); + +$this->menu=array( + array('label'=>'Veranstaltungen', 'url'=>array('index')), +); +?> + +<h1>Veranstaltung erstellen</h1> + +<?php echo $this->renderPartial('_form', array('model'=>$model, + 'vereine'=>$vereine, + 'standorte'=>$standorte)); ?>
\ No newline at end of file diff --git a/protected/views/veranstaltung/index.php b/protected/views/veranstaltung/index.php new file mode 100644 index 0000000..35f2ec7 --- /dev/null +++ b/protected/views/veranstaltung/index.php @@ -0,0 +1,40 @@ +<?php +$this->breadcrumbs=array( + 'Veranstaltungen', +); + +$this->menu=array( + array('label'=>'Veranstaltung erstellen', 'url'=>array('create')), +);?> + +<h1>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( + array('header'=>'Verein', + 'name'=>'verein_id', + 'filter'=>CHtml::listData(Verein::model()->findAll(), 'id', 'name'), + 'value'=>'$data->verein->name'), + 'titel', + array('header'=>'Startzeit', 'value'=>'Format::displayDateTime($data->startzeit)'), + array('header'=>'Endzeit', 'value'=>'Format::displayDateTime($data->endzeit)'), + array('header'=>'Standort', + '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('header'=>'Öffentlich', + '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/veranstaltung/update.php b/protected/views/veranstaltung/update.php new file mode 100644 index 0000000..8813aae --- /dev/null +++ b/protected/views/veranstaltung/update.php @@ -0,0 +1,18 @@ +<?php +$this->breadcrumbs=array( + 'Veranstaltungen'=>array('index'), + '"'.$model->titel.'" bearbeiten' +); + +$this->menu=array( + array('label'=>'Veranstaltungen', 'url'=>array('index')), + array('label'=>'Veranstaltung erstellen', 'url'=>array('create')), + array('label'=>'Veranstaltung anzeigen', 'url'=>array('view', 'id'=>$model->id)), +); +?> + +<h1>"<?php echo $model->titel; ?>" bearbeiten</h1> + +<?php echo $this->renderPartial('_form', array('model'=>$model, + 'vereine'=>$vereine, + 'standorte'=>$standorte)); ?>
\ No newline at end of file diff --git a/protected/views/veranstaltung/view.php b/protected/views/veranstaltung/view.php new file mode 100644 index 0000000..5840a4e --- /dev/null +++ b/protected/views/veranstaltung/view.php @@ -0,0 +1,28 @@ +<?php +$this->breadcrumbs=array( + 'Veranstaltungen'=>array('index'), + $model->titel, +); + +$this->menu=array( + array('label'=>'Veranstaltungen', 'url'=>array('index')), + array('label'=>'Veranstaltung erstellen', 'url'=>array('create')), + array('label'=>'Veranstaltung bearbeiten', 'url'=>array('update', 'id'=>$model->id)), + array('label'=>'Veranstaltung löschen', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')), + ); +?> + +<h1><?php echo $model->titel; ?></h1> + +<?php $this->widget('zii.widgets.CDetailView', array( + 'data'=>$model, + 'attributes'=>array( + array('label'=>'Verein', 'value'=>($model->verein) ? $model->verein->name : null), + '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'=>'Öfentlich', 'value'=>CHtml::image($model->published ? "images/ok.png" : "images/nok.png", $model->published ? "ok.png" : "nok.png"), 'type'=>'raw'), + ), +)); ?> |
