diff options
Diffstat (limited to 'protected/views/myVeranstaltung')
| -rw-r--r-- | protected/views/myVeranstaltung/_form.php | 46 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/_search.php | 17 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/_view.php | 38 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/admin.php | 59 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/create.php | 11 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/index.php | 36 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/update.php | 16 | ||||
| -rw-r--r-- | protected/views/myVeranstaltung/view.php | 30 |
8 files changed, 90 insertions, 163 deletions
diff --git a/protected/views/myVeranstaltung/_form.php b/protected/views/myVeranstaltung/_form.php index 588048d..1332b44 100644 --- a/protected/views/myVeranstaltung/_form.php +++ b/protected/views/myVeranstaltung/_form.php @@ -5,17 +5,11 @@ 'enableAjaxValidation'=>false, )); ?> - <p class="note">Fields with <span class="required">*</span> are required.</p> + <?php $this->renderPartial('/common/_required_fields_text'); ?> <?php echo $form->errorSummary($model); ?> <div class="row"> - <?php echo $form->labelEx($model,'verein_id'); ?> - <?php echo $form->textField($model,'verein_id'); ?> - <?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'); ?> @@ -23,13 +17,41 @@ <div class="row"> <?php echo $form->labelEx($model,'startzeit'); ?> - <?php echo $form->textField($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 echo $form->textField($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> @@ -41,18 +63,18 @@ <div class="row"> <?php echo $form->labelEx($model,'standort_id'); ?> - <?php echo $form->textField($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->textField($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 ? 'Create' : 'Save'); ?> + <?php echo CHtml::submitButton($model->isNewRecord ? 'Erstellen' : 'Speichern'); ?> </div> <?php $this->endWidget(); ?> diff --git a/protected/views/myVeranstaltung/_search.php b/protected/views/myVeranstaltung/_search.php index b4ec2ed..9fb5b02 100644 --- a/protected/views/myVeranstaltung/_search.php +++ b/protected/views/myVeranstaltung/_search.php @@ -6,16 +6,6 @@ )); ?> <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->textField($model,'verein_id'); ?> - </div> - - <div class="row"> <?php echo $form->label($model,'titel'); ?> <?php echo $form->textField($model,'titel',array('size'=>60,'maxlength'=>100)); ?> </div> @@ -37,12 +27,7 @@ <div class="row"> <?php echo $form->label($model,'standort_id'); ?> - <?php echo $form->textField($model,'standort_id'); ?> - </div> - - <div class="row"> - <?php echo $form->label($model,'published'); ?> - <?php echo $form->textField($model,'published'); ?> + <?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"> diff --git a/protected/views/myVeranstaltung/_view.php b/protected/views/myVeranstaltung/_view.php deleted file mode 100644 index daa818a..0000000 --- a/protected/views/myVeranstaltung/_view.php +++ /dev/null @@ -1,38 +0,0 @@ -<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/myVeranstaltung/admin.php b/protected/views/myVeranstaltung/admin.php deleted file mode 100644 index 6e2a1a3..0000000 --- a/protected/views/myVeranstaltung/admin.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -$this->breadcrumbs=array( - 'Veranstaltungs'=>array('index'), - 'Manage', -); - -$this->menu=array( - array('label'=>'List Veranstaltung', 'url'=>array('index')), - array('label'=>'Create Veranstaltung', 'url'=>array('create')), -); - -Yii::app()->clientScript->registerScript('search', " -$('.search-button').click(function(){ - $('.search-form').toggle(); - return false; -}); -$('.search-form form').submit(function(){ - $.fn.yiiGridView.update('veranstaltung-grid', { - data: $(this).serialize() - }); - return false; -}); -"); -?> - -<h1>Manage Veranstaltungs</h1> - -<p> -You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> -or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done. -</p> - -<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?> -<div class="search-form" style="display:none"> -<?php $this->renderPartial('_search',array( - 'model'=>$model, -)); ?> -</div><!-- search-form --> - -<?php $this->widget('zii.widgets.grid.CGridView', array( - 'id'=>'veranstaltung-grid', - 'dataProvider'=>$model->search(), - 'filter'=>$model, - 'columns'=>array( - 'id', - 'verein_id', - 'titel', - 'startzeit', - 'endzeit', - 'beschreibung', - /* - 'standort_id', - 'published', - */ - array( - 'class'=>'CButtonColumn', - ), - ), -)); ?> diff --git a/protected/views/myVeranstaltung/create.php b/protected/views/myVeranstaltung/create.php index 3c7af00..defd84d 100644 --- a/protected/views/myVeranstaltung/create.php +++ b/protected/views/myVeranstaltung/create.php @@ -1,15 +1,14 @@ <?php $this->breadcrumbs=array( - 'Veranstaltungs'=>array('index'), - 'Create', + 'Unsere Veranstaltungen'=>array('index'), + 'Neue Veranstaltung erstellen', ); $this->menu=array( - array('label'=>'List Veranstaltung', 'url'=>array('index')), - array('label'=>'Manage Veranstaltung', 'url'=>array('admin')), + array('label'=>'Unsere Veranstaltungen', 'url'=>array('index')), ); ?> -<h1>Create Veranstaltung</h1> +<h1>Neue Veranstaltung erstellen</h1> -<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
\ No newline at end of file +<?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 index 6ff8a23..f5b5893 100644 --- a/protected/views/myVeranstaltung/index.php +++ b/protected/views/myVeranstaltung/index.php @@ -1,17 +1,39 @@ <?php $this->breadcrumbs=array( - 'Veranstaltungs', + 'Unsere Veranstaltungen', ); $this->menu=array( - array('label'=>'Create Veranstaltung', 'url'=>array('create')), - array('label'=>'Manage Veranstaltung', 'url'=>array('admin')), + array('label'=>'Unsere Veranstaltungen', 'url'=>array('index')), + array('label'=>'Neue Veranstaltung erstellen', 'url'=>array('create')), ); ?> -<h1>Veranstaltungs</h1> +<h1>Unsere Veranstaltungen</h1> -<?php $this->widget('zii.widgets.CListView', array( - 'dataProvider'=>$dataProvider, - 'itemView'=>'_view', +<?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 index cfeb467..3ee393d 100644 --- a/protected/views/myVeranstaltung/update.php +++ b/protected/views/myVeranstaltung/update.php @@ -1,18 +1,16 @@ <?php $this->breadcrumbs=array( - 'Veranstaltungs'=>array('index'), - $model->id=>array('view','id'=>$model->id), - 'Update', + 'Unsere Veranstaltungen'=>array('index'), + $model->titel.' bearbeiten', ); $this->menu=array( - array('label'=>'List Veranstaltung', 'url'=>array('index')), - array('label'=>'Create Veranstaltung', 'url'=>array('create')), - array('label'=>'View Veranstaltung', 'url'=>array('view', 'id'=>$model->id)), - array('label'=>'Manage Veranstaltung', 'url'=>array('admin')), + 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>Update Veranstaltung <?php echo $model->id; ?></h1> +<h1>Veranstaltung '<?php echo $model->titel; ?>' bearbeiten</h1> -<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
\ No newline at end of file +<?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 index 12ac308..cb1ab82 100644 --- a/protected/views/myVeranstaltung/view.php +++ b/protected/views/myVeranstaltung/view.php @@ -1,30 +1,28 @@ <?php $this->breadcrumbs=array( - 'Veranstaltungs'=>array('index'), - $model->id, + 'Unsere Veranstaltungen'=>array('index'), + $model->titel, ); $this->menu=array( - array('label'=>'List Veranstaltung', 'url'=>array('index')), - array('label'=>'Create Veranstaltung', 'url'=>array('create')), - array('label'=>'Update Veranstaltung', 'url'=>array('update', 'id'=>$model->id)), - array('label'=>'Delete Veranstaltung', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')), - array('label'=>'Manage Veranstaltung', 'url'=>array('admin')), + 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>View Veranstaltung #<?php echo $model->id; ?></h1> +<h1><?php echo $model->titel; ?></h1> <?php $this->widget('zii.widgets.CDetailView', array( 'data'=>$model, 'attributes'=>array( - 'id', - 'verein_id', - 'titel', - 'startzeit', - 'endzeit', - 'beschreibung', - 'standort_id', - 'published', + //'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'), ), )); ?> |
