public function actionGet($key = null) { $criteria = new CDbCriteria(); if (!$key) { $criteria->compare('t.`visible`', 1); } if ($key) { $criteria->compare('t.`key`', $key); } $criteria->order = "sort"; // not with('events') because i have a condition and order there if ($models = Team::model()->with('pages')->findAll($criteria)) { if (count($models) == 1) { $this->pageTitle = $models[0]->name . ' - ' . $this->pageTitle; } else { $this->pageTitle = 'Team vom ' . $this->pageTitle; ShortWidgets::addJsShorten(".text", 350); } $this->render('get', array('models' => $models)); } }
<?php echo $form->error($model, 'delete'); ?> </div> <?php } ?> </div> <div class="row"> <div style="float:left;padding-right:40px;"> <?php echo $form->labelEx($model, 'text'); ?> <?php ShortWidgets::ckEditor($model, 'text', array(), array('name' => $namePrefix . '[text]')); ?> <?php echo $form->error($model, 'text'); ?> </div> </div> <?php foreach ($model->infoFields as $k => $v) { ?> <div class="row"> <div style="float:left;padding-right:40px;"> <?php echo $form->labelEx($model, $k); ?>
?> <?php $this->widget('CAutoComplete', array('name' => 'tags', 'value' => $model->tags->toString(), 'url' => array('/page/page/autotags'), 'multiple' => true, 'mustMatch' => false, 'matchCase' => false)); ?> </div> <?php } ?> <div class="row"> <?php echo $form->labelEx($model, 'text'); ?> <p> Ein normaler Zeilenumbruch geht mit Shift+Enter<br/> <?php ShortWidgets::ckEditor($model, 'text'); ?> </p> <?php echo $form->error($model, 'text'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?> </div> <?php $this->endWidget();
public function init() { ShortWidgets::addJsShorten(".ext-comment p", 150); parent::init(); }
if ($data->gId) { ?> <?php echo Chtml::link('<i class="glyphicon glyphicon-calendar"></i><span class="info"> Kalender</span>', array('/event/calendar/index', 'id' => $data->id), array('target' => '_blank', 'title' => 'Kalender', 'class' => 'moreInfos', 'rel' => 'nofollow')); ?> <?php } ?> <?php } ?> <?php if (Yii::app()->params['addthisevent']) { ?> <?php ShortWidgets::addThisEvent('icon', $this->createAbsoluteUrl('/event/termin/index', array('#' => 'termin' . $data->id)), $data->from, $data->to, $data->titel, $data->getUntertitel(true, false)); ?> <?php } ?> </span> </span> <div style="clear:both"> </div> <?php if (!Yii::app()->user->isGuest && $type == 'event') { ?> <hr/> <?php echo CHtml::link('bearbeiten', array('edit', 'id' => $data->id)) . ' '; echo CHtml::link('verdoppeln', array('copy', 'id' => $data->id), array('class' => 'copy')) . ' ';
?> )</a></li> <?php } ?> </ul> <?php } ?> <div class="tab-content"> <?php if ($commentable) { // TODO - this doesn't work with hidden elements - maybe is there some update trigger? // I reduced the pagesize so it is no big problem.. ShortWidgets::addJsShorten(".ext-comment p", 60); ?> <div class="tab-pane text<?php if (!$eventable || !$model->events) { ?> active<?php } ?> " id="comments"> <?php if (count($comments)) { ?> <br/> <?php echo CHtml::link('<i class="glyphicon glyphicon-comment"></i> ins Gästebuch eintragen', array('/page/guestbook/list/', 'comment' => $model->key), array('rel' => 'nofollow')); ?>
<form action="" method="post"> Folgende Termine aufnehmen: <ul> <?php echo CHtml::checkboxList('inc_events', $inc_events, $all_events); ?> </ul> Folgender Text ganz unten: <?php echo ShortWidgets::ckEditor($textModel, 'text'); ?> Aktiviere was du tun möchtest: <ul> <?php echo CHtml::radioButtonList('dowhat', isset($_POST['dowhat']) ? $_POST['dowhat'] : 0, array(0 => 'Vorschau hier', 1 => 'Vorschau als Email', 2 => 'Test-Newsletter', 3 => 'Newsletter WIRKLICH senden')); ?> </ul> <input type="submit" name="xx" value="Testen / Senden" /> </form> <div id="exportdata"> <br/> <br/> <?php echo $this->renderPartial('export_mail', array('dataProvider' => $dataProvider, 'textModel' => $textModel), true); ?>