summaryrefslogtreecommitdiff
path: root/protected/views
diff options
context:
space:
mode:
Diffstat (limited to 'protected/views')
-rw-r--r--protected/views/kategorie/_form.php2
-rw-r--r--protected/views/kategorie/_search.php2
-rw-r--r--protected/views/kategorie/index.php28
-rw-r--r--protected/views/kategorie/update.php7
-rw-r--r--protected/views/layouts/main.php4
-rw-r--r--protected/views/myAngebot/_form.php51
-rw-r--r--protected/views/myAngebot/_search.php29
-rw-r--r--protected/views/myAngebot/create.php14
-rw-r--r--protected/views/myAngebot/index.php30
-rw-r--r--protected/views/myAngebot/update.php17
-rw-r--r--protected/views/myverein/view.php2
-rw-r--r--protected/views/speisTrank/_angebot_vereine.php20
-rw-r--r--protected/views/speisTrank/_form.php2
-rw-r--r--protected/views/speisTrank/_search.php4
-rw-r--r--protected/views/speisTrank/index.php5
-rw-r--r--protected/views/standort/_form.php6
-rw-r--r--protected/views/standort/_search.php2
-rw-r--r--protected/views/standort/index.php2
-rw-r--r--protected/views/user/_form.php2
-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.php40
-rw-r--r--protected/views/veranstaltung/update.php18
-rw-r--r--protected/views/veranstaltung/view.php28
-rw-r--r--protected/views/verein/_form.php4
-rw-r--r--protected/views/verein/create.php2
-rw-r--r--protected/views/verein/index.php28
-rw-r--r--protected/views/verein/update.php5
30 files changed, 484 insertions, 76 deletions
diff --git a/protected/views/kategorie/_form.php b/protected/views/kategorie/_form.php
index 156fdd1..a6b9971 100644
--- a/protected/views/kategorie/_form.php
+++ b/protected/views/kategorie/_form.php
@@ -6,7 +6,7 @@ $form=$this->beginWidget('CActiveForm', array(
'enableAjaxValidation'=>false,
)); ?>
- <p class="note">Mit <span class="required">*</span> gekennzeichnete Felder sind Pflichtfelder.</p>
+ <?php $this->renderPartial('/common/_required_fields_text'); ?>
<?php echo $form->errorSummary($model); ?>
diff --git a/protected/views/kategorie/_search.php b/protected/views/kategorie/_search.php
index 8322f02..7352abd 100644
--- a/protected/views/kategorie/_search.php
+++ b/protected/views/kategorie/_search.php
@@ -32,7 +32,7 @@
<div class="row">
<?php echo $form->label($model,'published'); ?>
- <?php echo $form->textField($model,'published'); ?>
+ <?php echo $form->checkbox($model,'published'); ?>
</div>
<div class="row buttons">
diff --git a/protected/views/kategorie/index.php b/protected/views/kategorie/index.php
index 3629458..705ca3d 100644
--- a/protected/views/kategorie/index.php
+++ b/protected/views/kategorie/index.php
@@ -1,46 +1,26 @@
<?php
$this->breadcrumbs=array(
- 'Kategorien verwalten',
+ 'Kategorien',
);
$this->menu=array(
array('label'=>'Kategorie erstellen', '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('kategorie-grid', {
- data: $(this).serialize()
- });
- return false;
-});
-");
?>
-<h1>Kategorien verwalten</h1>
+<h1>Kategorien</h1>
-<p>
-Die optionale Eingabe von Vergleichsoperatoren (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
-or <b>=</b>) zu Beginn eines Suchwertes dient der Spezifikation, wie der Vergleich erfolgen soll.
-</p>
+<?php $this->renderPartial('/common/_comparison_text'); ?>
-<?php echo CHtml::link('Erweiterte Suche','#',array('class'=>'search-button')); ?>
-<div class="search-form" style="display:none">
-<?php $this->renderPartial('_search',array(
+<?php $this->renderPartial('/common/_advanced_search',array(
'model'=>$model,
)); ?>
-</div><!-- search-form -->
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'kategorie-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
- 'id',
'name',
'einheiten',
'default_menge:number',
diff --git a/protected/views/kategorie/update.php b/protected/views/kategorie/update.php
index e8a09e6..b090579 100644
--- a/protected/views/kategorie/update.php
+++ b/protected/views/kategorie/update.php
@@ -1,12 +1,11 @@
<?php
$this->breadcrumbs=array(
- 'Kategories'=>array('index'),
- $model->name=>array('view','id'=>$model->id),
- 'Kategorie bearbeiten',
+ 'Kategorien'=>array('index'),
+ '"'.$model->name.'" bearbeiten',
);
$this->menu=array(
- array('label'=>'Kategorien verwalten', 'url'=>array('index')),
+ array('label'=>'Kategorien', 'url'=>array('index')),
array('label'=>'Kategorie erstellen', 'url'=>array('create')),
array('label'=>'Kategorie anzeigen', 'url'=>array('view', 'id'=>$model->id)),
);
diff --git a/protected/views/layouts/main.php b/protected/views/layouts/main.php
index 6f00be2..1e499bc 100644
--- a/protected/views/layouts/main.php
+++ b/protected/views/layouts/main.php
@@ -37,8 +37,12 @@
"visible"=>!Yii::app()->user->isGuest && Yii::app()->user->isAdmin, "active"=>$this->id == "kategorie"),
array("label"=>"Speis & Trank", "url"=>array("/speisTrank/index"),
"visible"=>!Yii::app()->user->isGuest && Yii::app()->user->isAdmin, "active"=>$this->id == "speisTrank"),
+ array("label"=>"Speis & Trank", "url"=>array("/myAngebot/index"),
+ "visible"=>!Yii::app()->user->isGuest && Yii::app()->user->vereinId, "active"=>$this->id == "myAngebot"),
array("label"=>"Veranstaltungen", "url"=>array("/veranstaltung/index"),
"visible"=>!Yii::app()->user->isGuest && Yii::app()->user->isAdmin, "active"=>$this->id == "veranstaltung"),
+ array("label"=>"Audit", "url"=>array("/auditTrail/admin"),
+ "visible"=>!Yii::app()->user->isGuest && Yii::app()->user->isAdmin, "active"=>$this->id == "admin"),
array("label"=>"Benutzer", "url"=>array("/user/admin"),
"visible"=>!Yii::app()->user->isGuest && Yii::app()->user->isAdmin, "active"=>$this->id == "user"),
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'),
diff --git a/protected/views/myAngebot/_form.php b/protected/views/myAngebot/_form.php
new file mode 100644
index 0000000..f48ecc9
--- /dev/null
+++ b/protected/views/myAngebot/_form.php
@@ -0,0 +1,51 @@
+<div class="form">
+
+<?php $form=$this->beginWidget('CActiveForm', array(
+ 'id'=>'angebot-form',
+ 'enableAjaxValidation'=>false,
+)); ?>
+
+ <?php $this->renderPartial('/common/_required_fields_text'); ?>
+
+ <?php echo $form->errorSummary($model); ?>
+
+ <div class="row">
+ <?php echo $form->labelEx($model, 'angebot_id'); ?>
+ <?php echo $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
+ 'name'=>'city',
+ 'source'=>array('ac1', 'ac2', 'ac3'),
+ // additional javascript options for the autocomplete plugin
+ 'options'=>array(
+ 'minLength'=>'2',
+ ),
+ 'htmlOptions'=>array(
+ 'style'=>'height:20px;'
+ ),
+)); ?>
+ <?php echo $form->error($model, 'angebot_id'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'menge'); ?>
+ <?php echo $form->textField($model,'menge',array('size'=>60,'maxlength'=>80)); ?>
+ <?php echo $form->error($model,'menge'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'preis'); ?>
+ <?php echo $form->textField($model,'preis',array('size'=>60,'maxlength'=>80)); ?>
+ <?php echo $form->error($model,'preis'); ?>
+ </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> \ No newline at end of file
diff --git a/protected/views/myAngebot/_search.php b/protected/views/myAngebot/_search.php
new file mode 100644
index 0000000..790eae1
--- /dev/null
+++ b/protected/views/myAngebot/_search.php
@@ -0,0 +1,29 @@
+<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,'published'); ?>
+ <?php echo $form->checkbox($model,'published'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->label($model,'menge'); ?>
+ <?php echo $form->textField($model,'menge'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->label($model,'preis'); ?>
+ <?php echo $form->textField($model,'preis'); ?>
+ </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/myAngebot/create.php b/protected/views/myAngebot/create.php
new file mode 100644
index 0000000..1a6bf5a
--- /dev/null
+++ b/protected/views/myAngebot/create.php
@@ -0,0 +1,14 @@
+<?php
+$this->breadcrumbs=array(
+ 'Speis & Trank'=>array('index'),
+ 'Kulinarisches Angebot erstellen',
+);
+
+$this->menu=array(
+ array('label'=>'Speis & Trank', 'url'=>array('index')),
+);
+?>
+
+<h1>Kulinarisches Angebot erstellen</h1>
+
+<?php echo $this->renderPartial('_form', array('model'=>$model)); ?> \ No newline at end of file
diff --git a/protected/views/myAngebot/index.php b/protected/views/myAngebot/index.php
new file mode 100644
index 0000000..0c7fc43
--- /dev/null
+++ b/protected/views/myAngebot/index.php
@@ -0,0 +1,30 @@
+<?php
+$this->breadcrumbs=array(
+ 'Speis & Trank',
+);?>
+
+
+<h1>Meine Angebote</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'=>'angebot-grid',
+ 'dataProvider'=>$model->search(),
+ 'filter'=>$model,
+ 'columns'=>array(
+ array('header'=>'Angebot', 'value'=>'$data->angebot->name', 'name'=>'angebot_id', 'filter'=>CHtml::listData(Angebot::model()->findAll(), 'id', 'name')),
+ array('header'=>'Verein', 'value'=>'$data->verein->name'),
+ array('header'=>'Menge', 'value'=>'Format::number($data->menge, $data->einheit)'),
+ array('header'=>'Preis', 'value'=>'Format::currency($data->preis)'),
+ 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'
+ ),
+ ),
+)); ?> \ No newline at end of file
diff --git a/protected/views/myAngebot/update.php b/protected/views/myAngebot/update.php
new file mode 100644
index 0000000..e3bc87a
--- /dev/null
+++ b/protected/views/myAngebot/update.php
@@ -0,0 +1,17 @@
+<?php
+$this->breadcrumbs=array(
+ 'Speis & Trank'=>array('index'),
+ $model->name.' bearbeiten',
+
+);
+
+$this->menu=array(
+ array('label'=>'Speis & Trank', 'url'=>array('index')),
+ array('label'=>'Kulinarisches Angebot erstellen', 'url'=>array('create')),
+ array('label'=>$model->name.' anzeigen', 'url'=>array('view', 'id'=>$model->id)),
+);
+?>
+
+<h1><?php echo $model->name; ?> bearbeiten</h1>
+
+<?php echo $this->renderPartial('_form', array('model'=>$model, 'kategorien'=>$kategorien)); ?> \ No newline at end of file
diff --git a/protected/views/myverein/view.php b/protected/views/myverein/view.php
index 5e7649c..52afea7 100644
--- a/protected/views/myverein/view.php
+++ b/protected/views/myverein/view.php
@@ -20,6 +20,6 @@ $this->menu=array(
'email',
'kontaktdaten:html',
'beschreibung:html',
- array('label'=>'Standort', 'value'=>$model->standort->name)
+ array('label'=>'Standort', 'value'=>($model->standort) ? $model->standort->name : "-")
),
)); ?>
diff --git a/protected/views/speisTrank/_angebot_vereine.php b/protected/views/speisTrank/_angebot_vereine.php
index 93c1ebd..2d65d35 100644
--- a/protected/views/speisTrank/_angebot_vereine.php
+++ b/protected/views/speisTrank/_angebot_vereine.php
@@ -1,8 +1,12 @@
-<ul>
-<?php foreach($angebot_vereine as $verein): ?>
- <li>
- <?php echo CHtml::link(Verein::model()->findByPk($verein->verein_id)->name, array("/verein/view", "id"=>$verein->verein_id)); ?>
- <?php echo $verein->menge." ".$verein->einheit?> für <?php echo $verein->preis?>€
- </li>
-<?php endforeach; ?>
-</ul> \ No newline at end of file
+<?php
+$dataProvider = new CArrayDataProvider($angebot_vereine);
+$dataProvider->keyField = false;
+$this->widget('zii.widgets.grid.CGridView', array(
+ 'id'=>'angebot-vereine-grid',
+ 'dataProvider'=>$dataProvider,
+ 'columns'=>array(
+ array('header'=>'Verein', 'value'=>'CHtml::link(Verein::model()->findByPk($data->verein_id)->name, array("/verein/view", "id"=>$data->verein_id))', 'type'=>'raw'),
+ array('header'=>'Menge', 'value'=>'Format::number($data->menge, $data->einheit)'),
+ array('header'=>'Preis', 'value'=>'Format::currency($data->preis)')
+ ),
+)); ?> \ No newline at end of file
diff --git a/protected/views/speisTrank/_form.php b/protected/views/speisTrank/_form.php
index 27349a4..ca1ba6f 100644
--- a/protected/views/speisTrank/_form.php
+++ b/protected/views/speisTrank/_form.php
@@ -44,7 +44,7 @@
</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/speisTrank/_search.php b/protected/views/speisTrank/_search.php
index 4300232..a88293a 100644
--- a/protected/views/speisTrank/_search.php
+++ b/protected/views/speisTrank/_search.php
@@ -12,7 +12,7 @@
<div class="row">
<?php echo $form->label($model,'kategorie_id'); ?>
- <?php echo $form->textField($model,'kategorie_id'); ?>
+ <?php echo $form->dropDownList($model, 'kategorie_id', CHtml::listData(Kategorie::model()->findAll(), 'id', 'name'), array("empty"=>"")); ?>
</div>
<div class="row">
@@ -27,7 +27,7 @@
<div class="row">
<?php echo $form->label($model,'published'); ?>
- <?php echo $form->textField($model,'published'); ?>
+ <?php echo $form->checkbox($model,'published'); ?>
</div>
<div class="row buttons">
diff --git a/protected/views/speisTrank/index.php b/protected/views/speisTrank/index.php
index 48015fc..1f416cc 100644
--- a/protected/views/speisTrank/index.php
+++ b/protected/views/speisTrank/index.php
@@ -20,7 +20,10 @@ $this->menu=array(
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
- array('header'=>'Kategorie', 'value'=>'($data->kategorie) ? $data->kategorie->name : "-"'),
+ array('header'=>'Kategorie',
+ 'name'=>'kategorie_id',
+ 'filter'=>CHtml::listData(Kategorie::model()->findAll(), 'id', 'name'),
+ 'value'=>'($data->kategorie) ? $data->kategorie->name : "-"'),
'name',
'beschreibung:html',
array('header'=>'Öffentlich',
diff --git a/protected/views/standort/_form.php b/protected/views/standort/_form.php
index fb17125..f37dc3d 100644
--- a/protected/views/standort/_form.php
+++ b/protected/views/standort/_form.php
@@ -16,6 +16,12 @@
</div>
<div class="row">
+ <?php echo $form->labelEx($model,'type'); ?>
+ <?php echo Html::enumDropDownList($model, 'type'); ?>
+ <?php echo $form->error($model,'type'); ?>
+ </div>
+
+ <div class="row">
<?php echo $form->labelEx($model,'pos_lat'); ?>
<?php echo $form->textField($model,'pos_lat'); ?>
<?php echo $form->error($model,'pos_lat'); ?>
diff --git a/protected/views/standort/_search.php b/protected/views/standort/_search.php
index 4f39bd5..eeab539 100644
--- a/protected/views/standort/_search.php
+++ b/protected/views/standort/_search.php
@@ -27,7 +27,7 @@
<div class="row">
<?php echo $form->label($model,'published'); ?>
- <?php echo $form->textField($model,'published'); ?>
+ <?php echo $form->checkbox($model,'published'); ?>
</div>
<div class="row buttons">
diff --git a/protected/views/standort/index.php b/protected/views/standort/index.php
index 5449010..9a88a74 100644
--- a/protected/views/standort/index.php
+++ b/protected/views/standort/index.php
@@ -61,7 +61,7 @@ $map->render();
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
- 'id',
+ 'type',
'name',
'pos_lat',
'pos_long',
diff --git a/protected/views/user/_form.php b/protected/views/user/_form.php
index dda3df4..163e11c 100644
--- a/protected/views/user/_form.php
+++ b/protected/views/user/_form.php
@@ -5,7 +5,7 @@
'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); ?>
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'),
+ ),
+)); ?>
diff --git a/protected/views/verein/_form.php b/protected/views/verein/_form.php
index 9950421..dbda2db 100644
--- a/protected/views/verein/_form.php
+++ b/protected/views/verein/_form.php
@@ -6,7 +6,7 @@
"htmlOptions"=>array('enctype'=>'multipart/form-data'),
)); ?>
- <p class="note">Mit <span class="required">*</span> gekennzeichnete Felder sind Pflichtfelder.</p>
+ <?php $this->renderPartial('/common/_required_fields_text'); ?>
<?php echo $form->errorSummary($model); ?>
@@ -14,7 +14,7 @@
<?php echo $form->labelEx($model,'slug'); ?>
<?php
if (Yii::app()->user->isAdmin) {
- echo $form->textField($model,'slug',array('size'=>60,'maxlength'=>255));
+ echo $form->dropDownList($model, "slug", CHtml::listData($slugs, "username", "username"), array('empty' => '-- Bitte Benutzer wählen --'));
} else {
echo CHtml::encode($model->slug);
}
diff --git a/protected/views/verein/create.php b/protected/views/verein/create.php
index 02a63f8..46f088e 100644
--- a/protected/views/verein/create.php
+++ b/protected/views/verein/create.php
@@ -11,4 +11,4 @@ $this->menu=array(
<h1>Verein erstellen</h1>
-<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte)); ?> \ No newline at end of file
+<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte,'slugs'=>$slugs)); ?> \ No newline at end of file
diff --git a/protected/views/verein/index.php b/protected/views/verein/index.php
index a396dbb..ca98727 100644
--- a/protected/views/verein/index.php
+++ b/protected/views/verein/index.php
@@ -1,40 +1,20 @@
<?php
$this->breadcrumbs=array(
- 'Vereine'=>array('index'),
- 'Verwalten',
+ 'Vereine',
);
$this->menu=array(
array('label'=>'Verein erstellen', '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('verein-grid', {
- data: $(this).serialize()
- });
- return false;
-});
-");
?>
-<h1>Vereine verwalten</h1>
+<h1>Vereine</h1>
-<p>
-Die optionale Eingabe von Vergleichsoperatoren (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
-or <b>=</b>) zu Beginn eines Suchwertes dient der Spezifikation, wie der Vergleich erfolgen soll.
-</p>
+<?php $this->renderPartial('/common/_comparison_text'); ?>
-<?php echo CHtml::link('Erweiterte Suche','#',array('class'=>'search-button')); ?>
-<div class="search-form" style="display:none">
-<?php $this->renderPartial('_search',array(
+<?php $this->renderPartial('/common/_advanced_search',array(
'model'=>$model,
)); ?>
-</div><!-- search-form -->
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'verein-grid',
diff --git a/protected/views/verein/update.php b/protected/views/verein/update.php
index 2ce51a8..5230605 100644
--- a/protected/views/verein/update.php
+++ b/protected/views/verein/update.php
@@ -1,8 +1,7 @@
<?php
$this->breadcrumbs=array(
'Vereine'=>array('index'),
- $model->name=>array('view','id'=>$model->id),
- 'Bearbeiten',
+ '"'.$model->name.'" bearbeiten',
);
$this->menu=array(
@@ -14,4 +13,4 @@ $this->menu=array(
<h1>Verein '<?php echo $model->name; ?>' bearbeiten</h1>
-<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte)); ?> \ No newline at end of file
+<?php echo $this->renderPartial('_form', array('model'=>$model, 'standorte'=>$standorte,'slugs'=>$slugs)); ?> \ No newline at end of file