diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-22 10:56:25 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-22 10:56:25 +0200 |
| commit | 2a8b46329775b8503519d432a52dba13e8547d8e (patch) | |
| tree | 74aca6815e0cdc617dd125b894591d00f04a44c0 /protected/modules/cms/views/sitecontent/view.php | |
| parent | 12c8482bf883988c0fc5ed4c8972396af63e8258 (diff) | |
cms integriert (yaycms)
Diffstat (limited to 'protected/modules/cms/views/sitecontent/view.php')
| -rw-r--r-- | protected/modules/cms/views/sitecontent/view.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/protected/modules/cms/views/sitecontent/view.php b/protected/modules/cms/views/sitecontent/view.php new file mode 100644 index 0000000..c75f610 --- /dev/null +++ b/protected/modules/cms/views/sitecontent/view.php @@ -0,0 +1,47 @@ +<?php +if(isset($sc)) + $this->pageTitle = $sc->title . ' - ' . Yii::app()->name; +if(isset($menu)) + $this->pageTitle = $menu->title. ' - ' . Yii::app()->name; + +if(Yii::app()->user->id == 1) // is admin +{ + if(is_object($sitecontent)) + { + $this->renderPartial('draw', array('sitecontent' => $sitecontent)); + echo "<br />"; + echo CHtml::link(Yii::t('CmsModule.cms', 'Edit this sitecontent'), + array('/cms/sitecontent/update', 'id' => $sitecontent->id)); + } + else if ($sitecontent == array()) + { + echo CHtml::link(Yii::t('CmsModule.cms', 'Create new sitecontent here'), + array('/cms/sitecontent/create', 'position' => $menu->id)); + + } else if (is_array($sitecontent)) + { + foreach($sitecontent as $sc) + { + $this->renderPartial('draw', array('sitecontent' => $sc)); + echo "<br />"; + echo CHtml::link(Yii::t('CmsModule.cms', 'Edit this sitecontent'), + array('/cms/sitecontent/update', 'id' => $sc->id)); + } + } +} +else +{ + if(!is_null($sitecontent)) + if(is_object($sitecontent)) + $this->renderPartial('draw', array('sitecontent' => $sitecontent)); + else + foreach($sitecontent as $sc) + { + $this->renderPartial('draw', array('sitecontent' => $sc)); + } + +} + +if(isset($menu)) + $this->breadcrumbs = array($menu->title); + |
