summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-05-06 22:45:08 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-05-06 22:45:08 +0200
commit5b39d6bf7f34ed52059410f3d0af3799aeff2113 (patch)
tree0a0b1abdb0b69f8298410bf439f5d4296276bd69
parent3d72ad7ce1aac1151f5499ef19fc04999ba685d1 (diff)
vereinsansicht basis
-rw-r--r--css/astaf/layout.css2
-rw-r--r--css/yaml4/navigation/hlist-blue-small.css93
-rw-r--r--protected/controllers/VereinController.php2
-rw-r--r--protected/models/Angebot.php2
-rw-r--r--protected/models/AngebotVerein.php2
-rw-r--r--protected/models/Kategorie.php2
-rw-r--r--protected/models/Standort.php2
-rw-r--r--protected/models/Veranstaltung.php2
-rw-r--r--protected/models/Verein.php4
-rw-r--r--protected/modules/cms/controllers/SitecontentController.php3
-rw-r--r--protected/views/verein/_shortangebot.php10
-rw-r--r--protected/views/verein/index.php1
-rw-r--r--protected/views/verein/view.php37
-rw-r--r--themes/astaf/views/layouts/main.php19
14 files changed, 155 insertions, 26 deletions
diff --git a/css/astaf/layout.css b/css/astaf/layout.css
index 4726978..f7a2762 100644
--- a/css/astaf/layout.css
+++ b/css/astaf/layout.css
@@ -20,6 +20,8 @@
/* import screen layout | Screen-Layout einbinden */
@import url(../yaml4/navigation/hlist-blue.css);
+@import url(../yaml4/navigation/hlist-blue-small.css);
+
@import url(../yaml4/navigation/vlist.css);
@import url(../yaml4/forms/blue-theme.css);
diff --git a/css/yaml4/navigation/hlist-blue-small.css b/css/yaml4/navigation/hlist-blue-small.css
new file mode 100644
index 0000000..a25ccbf
--- /dev/null
+++ b/css/yaml4/navigation/hlist-blue-small.css
@@ -0,0 +1,93 @@
+/**
+ * "Yet Another Multicolumn Layout" - YAML CSS Framework
+ *
+ * (en) Horizontal list navigation "hlist"
+ * (de) Horizontale Navigationsliste "hlist"
+ *
+ * @copyright Copyright 2005-2012, Dirk Jesse
+ * @license CC-BY 2.0 (http://creativecommons.org/licenses/by/2.0/),
+ * YAML-CDL (http://www.yaml.de/license.html)
+ * @link http://www.yaml.de
+ * @package yaml
+ * @version v4.0
+ * @revision $Revision: 692 $
+ * @lastmodified $Date: 2012-01-25 11:37:31 +0100 (Mi, 25 Jan 2012) $
+ */
+
+@media all {
+
+ #submenu {
+ /* (en) containing floats in IE */
+ /* (de) Einfassen der Floats im IE */
+ width:100%;
+ overflow:hidden;
+ /* (en|de) Bugfix:IE - collapsing horizontal margins */
+ position:relative;
+ line-height:0.7em;
+ background: #090b21;
+ }
+
+ #submenu {
+ margin:0;
+ padding:0;
+ /* (en|de) Bugfix:IE - Doubled Float Margin Bug */
+ display:inline;
+ float:left; /* LTR */
+ }
+
+ #submenu ul li {
+ /* (en|de) Bugfix:IE - Doubled Float Margin Bug */
+ display:inline;
+ float:left; /* LTR */
+ font-size:0.8em;
+ line-height:0.8em;
+ list-style-type:none;
+ margin: 0 .15em 0 0;
+ padding:0;
+ }
+
+ #submenu ul li a,
+ #submenu ul li strong {
+ background:transparent;
+ color:#aaa;
+ display:block;
+ font-size:1em;
+ line-height: 2em;
+ padding: 0 0.3em;
+ font-weight:normal;
+ text-decoration:none;
+ text-shadow: 0 1px 1px rgba(0,0,0,.5);
+ width:auto;
+ }
+
+ #submenu ul li a:focus,
+ #submenu ul li a:hover,
+ #submenu ul li a:active {
+ color: #b3b5cc;
+ background:#666;
+ background: rgba(255,255,255,.25);
+ -webkit-border-radius: 0.1em;
+ -moz-border-radius: 0.1em;
+ border-radius: 0.1em;
+ text-decoration:none;
+ outline: 0 none;
+ }
+
+ #submenu ul li.active {
+ background:#666;
+ background: rgba(255,255,255,.3);
+ -webkit-border-radius: 0.2em;
+ -moz-border-radius: 0.2em;
+ border-radius: 0.2em;
+ color: #fff;
+ }
+
+ #submenu ul li.active strong,
+ #submenu ul li.active a:focus,
+ #submenu ul li.active a:hover,
+ #submenu ul li.active a:active {
+ background:transparent;
+ color:#fff;
+ text-decoration:none;
+ }
+} \ No newline at end of file
diff --git a/protected/controllers/VereinController.php b/protected/controllers/VereinController.php
index 2be85d6..e0a3e68 100644
--- a/protected/controllers/VereinController.php
+++ b/protected/controllers/VereinController.php
@@ -143,7 +143,7 @@ class VereinController extends Controller
*/
public function loadModel($id)
{
- $model=Verein::model()->findByPk($id);
+ $model=Verein::model()->with('angebote','veranstaltungen')->findByPk($id);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
diff --git a/protected/models/Angebot.php b/protected/models/Angebot.php
index d6ae02a..61e4d54 100644
--- a/protected/models/Angebot.php
+++ b/protected/models/Angebot.php
@@ -100,7 +100,7 @@ class Angebot extends CActiveRecord
public function behaviors() {
return array(
- 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
} \ No newline at end of file
diff --git a/protected/models/AngebotVerein.php b/protected/models/AngebotVerein.php
index 26c6dab..1031100 100644
--- a/protected/models/AngebotVerein.php
+++ b/protected/models/AngebotVerein.php
@@ -102,7 +102,7 @@ class AngebotVerein extends CActiveRecord
public function behaviors() {
return array(
- 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ //'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
} \ No newline at end of file
diff --git a/protected/models/Kategorie.php b/protected/models/Kategorie.php
index 93c799d..294947f 100644
--- a/protected/models/Kategorie.php
+++ b/protected/models/Kategorie.php
@@ -101,7 +101,7 @@ class Kategorie extends CActiveRecord
public function behaviors() {
return array(
- 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
} \ No newline at end of file
diff --git a/protected/models/Standort.php b/protected/models/Standort.php
index d62a594..6052e1a 100644
--- a/protected/models/Standort.php
+++ b/protected/models/Standort.php
@@ -106,7 +106,7 @@ class Standort extends CActiveRecord
public function behaviors() {
return array(
- 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ //'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
} \ No newline at end of file
diff --git a/protected/models/Veranstaltung.php b/protected/models/Veranstaltung.php
index 64c7854..0e4d9b8 100644
--- a/protected/models/Veranstaltung.php
+++ b/protected/models/Veranstaltung.php
@@ -124,7 +124,7 @@ class Veranstaltung extends CActiveRecord
public function behaviors() {
return array(
- 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ // 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
);
}
} \ No newline at end of file
diff --git a/protected/models/Verein.php b/protected/models/Verein.php
index f0d30dd..6d84c91 100644
--- a/protected/models/Verein.php
+++ b/protected/models/Verein.php
@@ -66,7 +66,9 @@ class Verein extends CActiveRecord
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
- "standort"=>array(self::HAS_ONE, "Standort", array('id'=>'standort_id'))
+ "standort"=>array(self::HAS_ONE, "Standort", array('id'=>'standort_id')),
+ "angebote"=>array(self::MANY_MANY, "Angebot", "angebot_verein(verein_id,angebot_id)"),
+ "veranstaltungen"=>array(self::HAS_MANY, "Veranstaltung","verein_id"),
);
}
diff --git a/protected/modules/cms/controllers/SitecontentController.php b/protected/modules/cms/controllers/SitecontentController.php
index bb18771..a2a3906 100644
--- a/protected/modules/cms/controllers/SitecontentController.php
+++ b/protected/modules/cms/controllers/SitecontentController.php
@@ -39,8 +39,9 @@ class SitecontentController extends Controller
$model = $this->loadContent();
$this->breadcrumbs = array($model->title);
+ if($model->id > 1) {
$this->menu = CMS::getMenuPoints($model->id);
-
+ }
$this->render('view', array(
'sitecontent' => $model,
));
diff --git a/protected/views/verein/_shortangebot.php b/protected/views/verein/_shortangebot.php
new file mode 100644
index 0000000..e90da5b
--- /dev/null
+++ b/protected/views/verein/_shortangebot.php
@@ -0,0 +1,10 @@
+<?php
+if(strlen(strip_tags($data->beschreibung))>80) {
+ $tmp = str_split(strip_tags($data->beschreibung),77);
+ $myBeschreibung = $tmp[0]."...";
+} else {
+ $myBeschreibung = strip_tags($data->beschreibung);
+}?>
+
+
+<?php echo CHTML::link("<h6>".$data->name."</h6><p>".$myBeschreibung."</p>" ,array("angebot/view","id"=>$data->id)); ?> \ No newline at end of file
diff --git a/protected/views/verein/index.php b/protected/views/verein/index.php
index cfdd6e0..84431e3 100644
--- a/protected/views/verein/index.php
+++ b/protected/views/verein/index.php
@@ -4,6 +4,7 @@ $this->breadcrumbs=array(
);
$this->menu=array(
+ array('label' => 'Verein suchen', 'url' => array('search')),
array('label'=>'Verein erstellen', 'url'=>array('create'),'visible'=>!Yii::app()->user->isGuest),
);
?>
diff --git a/protected/views/verein/view.php b/protected/views/verein/view.php
index 6efb9e7..7c5bb32 100644
--- a/protected/views/verein/view.php
+++ b/protected/views/verein/view.php
@@ -12,19 +12,28 @@ $this->menu=array(
);
?>
-<h1><?php echo $model->name; ?></h1>
-
-<?php $this->widget('zii.widgets.CDetailView', array(
- 'data'=>$model,
- 'attributes'=>array(
- 'slug',
- /*'name',*/
- array('label'=>'Bild', 'value'=>CHtml::image($model->bild), 'type'=>'raw'),
- array('label'=>'Homepage', 'value'=>CHtml::link($model->url, $model->url, array("target"=>"_blank")), 'type'=>'raw'),
- 'email',
- 'kontaktdaten:html',
- 'beschreibung:html',
- array('label'=>'Standort', 'value'=>($model->standort) ? $model->standort->name : "-"),
- array('label'=>'Öffentlich', 'value'=>CHtml::image($model->published ? "images/ok.png" : "images/nok.png", $model->published ? "ok.png" : "nok.png"), 'type'=>'raw'),
+<h3><?php echo $model->name; ?></h3>
+<?php if ($model->bild) {
+ echo CHtml::image($model->bild,'Vereinslogo '.$model->name, array("class" => "float-left bordered"));
+}?>
+<p><?php echo $model->beschreibung?></p>
+<div class="float-left box">
+<?php $this->widget('zii.widgets.CListView', array(
+ 'dataProvider'=>new CArrayDataProvider($model->angebote, array()),
+ 'itemView'=>'_shortangebot', // refers to the partial view named '_post'
+ 'sortableAttributes'=>array(
+ 'name',
+ /*'create_time'=>'Post Time',*/
),
));?>
+
+<ul><?php
+foreach ($model->veranstaltungen as $value) {
+ echo "<li>".CHTML::link($value->titel,array("veranstaltung/view","id"=>$value->id))."</li>";
+}
+
+?>
+</ul>
+</div>
+<div class="box info float-right"><h6>Kontaktdaten</h6><?php echo $model->kontaktdaten?></div>
+
diff --git a/themes/astaf/views/layouts/main.php b/themes/astaf/views/layouts/main.php
index 3707925..025952f 100644
--- a/themes/astaf/views/layouts/main.php
+++ b/themes/astaf/views/layouts/main.php
@@ -40,10 +40,12 @@
<?php
$this->widget('zii.widgets.CMenu',array(
+ 'id' => 'mainmenu',
'items'=>array_merge(array(
array('activeCssClass' => 'active'),
//array('label'=>'Home', 'url'=>array('/site/index')),
array('label'=>'Home', 'url'=>array('/cms/sitecontent/view', 'page'=>'home')),
+ array('label'=>'Stände', 'url'=>array('/verein/index')),
),
Cms::getMenuPoints(1),
array(
@@ -55,12 +57,21 @@
)
));
?>
- <?php //$this->widget('cms.components.SearchWidget');?>
+
<?php echo CHtml::beginForm(CController::createUrl('/cms/sitecontent/search'),'post',array( 'class'=>'ym-searchform')); ?>
- <!-- <form class="ym-searchform" > -->
<input class="ym-searchfield" name="search" id="search" type="search" placeholder="Suchen..." />
<input class="ym-searchbutton" type="submit" value="Suchen" />
</form>
+
+ <?php if($this->menu) {
+ echo "<div id='submenu'>";
+ $this->widget('zii.widgets.CMenu',array(
+ 'items'=> $this->menu,
+ //'id' => 'submenu'
+ ));
+ echo "</div>";
+ }
+ ?>
</div>
</div>
</nav>
@@ -142,7 +153,7 @@
*/?>
<?php $this->widget('application.extensions.wetter.Wetter', array("ort" => "Waiblingen"));?>
- <div class="ym-wrapper">
+ <!-- <div class="ym-wrapper">
<div class="ym-vlist">
@@ -160,7 +171,7 @@
));
?>
</div>
- </div>
+ </div> -->
<p><?php Cms::render("info_seitenleiste"); ?></p>
<p class="box info"><?php Cms::render("info_box_seitenleiste"); ?></p>