summaryrefslogtreecommitdiff
path: root/protected/views/veranstaltung
diff options
context:
space:
mode:
Diffstat (limited to 'protected/views/veranstaltung')
-rw-r--r--protected/views/veranstaltung/_form.php98
-rw-r--r--protected/views/veranstaltung/_search.php54
-rw-r--r--protected/views/veranstaltung/_view.php38
-rw-r--r--protected/views/veranstaltung/create.php16
-rw-r--r--protected/views/veranstaltung/index.php35
-rw-r--r--protected/views/veranstaltung/update.php18
-rw-r--r--protected/views/veranstaltung/view.php28
7 files changed, 287 insertions, 0 deletions
diff --git a/protected/views/veranstaltung/_form.php b/protected/views/veranstaltung/_form.php
new file mode 100644
index 0000000..10eb6c9
--- /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_datetime"],
+ 'maxDate'=>Yii::app()->params["end_datetime"]
+ ),
+ '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_datetime"],
+ 'maxDate'=>Yii::app()->params["end_datetime"]
+ ),
+ '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..b4ec2ed
--- /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->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>
+
+ <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->textField($model,'standort_id'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->label($model,'published'); ?>
+ <?php echo $form->textField($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..f058e2e
--- /dev/null
+++ b/protected/views/veranstaltung/index.php
@@ -0,0 +1,35 @@
+<?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(
+ 'id',
+ array('header'=>'Verein', 'value'=>'$data->verein->name'),
+ 'titel',
+ 'startzeit',
+ 'endzeit',
+ array('header'=>'Standort', '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..aa48d41
--- /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 : "-"),
+ 'titel',
+ 'startzeit',
+ 'endzeit',
+ 'beschreibung:html',
+ array('label'=>'Standort', 'value'=>($model->standort) ? $model->standort->name : "-"),
+ array('label'=>'Öfentlich', 'value'=>CHtml::image($model->published ? "images/ok.png" : "images/nok.png", $model->published ? "ok.png" : "nok.png"), 'type'=>'raw'),
+ ),
+)); ?>