function getLink($post, $attr = true, $excerpt = true)
 {
     $postLink = '';
     $htmlOptions = '';
     //  uncomment jika ingin di tambahkan popup intro
     //if($excerpt == true){
     //    $htmlOptions =  array('onMouseOver'=>"pop(this,'.".$post->ID."');",);
     //    $postLink .= "<p class='".$post->ID." hide'>";
     //    $postLink .= $post->post_excerpt;
     //    $postLink .= "</p>";
     //}
     $postLink .= CHtml::Link($post->post_name, Yii::app()->createUrl('/photo/index', array('id' => $post->ID, 'slug' => $post->post_link)), $htmlOptions);
     $postLink .= $post->post_excerpt == '' ? "<br>" . Helper::getExcerpt($post->post_content, 0, 40) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, 40);
     if ($attr == true) {
         $postLink .= "<br><small class='text-muted'>";
         if ($post->categories != null) {
             $postLink .= CHtml::openTag('span', array('class' => 'label label-default'));
             $criteria = new CDbCriteria();
             $criteria->condition = "parent=0";
             //foreach($post->categories($criteria) as $category):
             //   $postLink .= $category->name.' ';
             //endforeach;
             $postLink .= CHtml::closeTag('span');
         }
         $postLink .= "  " . FTime::since($post->post_modified) . "</small>";
     } else {
         $postLink .= '<div class="entry-meta small muted">';
         $postLink .= FTime::since($post->post_modified);
         $postLink .= "</div>";
     }
     echo $postLink;
 }
Example #2
0
 public function displayScriptItem($dataitem)
 {
     echo "<li class=\"scriptitem grid_15\" >";
     echo "<div class=\"scripttitle\">";
     $linkurl = 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/script/' . $dataitem['scriptid'] . '/' . $dataitem['urltitle'];
     echo CHtml::Link($dataitem['title'], $linkurl);
     echo "</div>";
     echo "<div class=\"updownvote\" id=\"updownvote_{$dataitem['scriptid']}\">";
     echo "<div class=\"vote upvoteicon\">" . CHtml::imageButton($this->baseurl . '/images/upvote1616.png', array('id' => 'upvote_' . $dataitem['scriptid'] . "_0", 'href' => 'javascript:void(0)', 'title' => 'Up Vote', 'value' => 'Up Vote')) . "</div>";
     echo "<div class=\"votes unvoted\" id=\"votes-unvoted_{$dataitem['scriptid']}\">" . $dataitem['votes'] . "</div>";
     echo "<div class=\"votes upvoted\" id=\"votes-upvoted_{$dataitem['scriptid']}\">" . ($dataitem['votes'] + 1) . "</div>";
     echo "<div class=\"votes downvoted\" id=\"votes-downvoted_{$dataitem['scriptid']}\" >" . ($dataitem['votes'] - 1) . "</div>";
     echo "<div class=\"vote downvoteicon\">" . CHtml::imageButton($this->baseurl . '/images/downvote1616.png', array('id' => 'downvote_' . $dataitem['scriptid'] . "_0", 'href' => 'javascript:void(0)', 'title' => 'Down Vote', 'value' => 'Down Vote')) . "</div>";
     $imageId = "starimg_" . $dataitem['scriptid'] . "_" . $dataitem['isfav'];
     $favImageSrc = "{$this->baseurl}/images/stariconset/star-black/star-black16.png";
     $notfavImageSrc = "{$this->baseurl}/images/stariconset/star-white/star-white16.png";
     if ($dataitem['isfav'] == 1) {
         $imageSrc = $favImageSrc;
     } else {
         $imageSrc = $notfavImageSrc;
     }
     $img = "<img id=\"{$imageId}\"  src=\"{$imageSrc}\"/>";
     echo "<div class=\"favstardiv\">" . CHtml::Link($img, 'javascript:void(0)', array('title' => 'Add to favorites', "class" => 'favstar')) . "</div>";
     echo "</div>";
     // end updownvote
     echo "<div class=\"scriptitemmiddleline\">";
     echo "<div class=\"scriptperson\">";
     echo "By: " . CHtml::Link($dataitem['membername'], 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/scripts/' . $dataitem['membername']) . " On " . date('M j, Y', $dataitem['lastmodifieddate']->sec);
     $tagurl = 'http://' . Yii::app()->request->getServerName() . $this->baseurl . '/scripts/tagged/';
     echo "<div class='scripttags'>";
     echo "<ul class='taglist'> ";
     //echo  "<li>".CHtml::Link($dataitem['category'],$tagurl.$dataitem['category'])."</li>";
     if (!empty($dataitem['tags'])) {
         foreach ($dataitem['tags'] as $tag) {
             if (!empty($tag)) {
                 echo "<li>" . CHtml::Link($tag, $tagurl . "{$tag}") . "</li>";
             }
         }
     }
     echo "</ul>";
     echo "</div>";
     echo "</div>";
     echo "<div class=\"scriptdesc\">";
     echo nl2br($dataitem['scriptdesc']);
     echo "&nbsp;<span class=\"smalltext viewscript\"  id=\"viewscript_{$dataitem['scriptid']}\"} >" . CHtml::Link("View Script &#9660;", 'javascript:void(0)') . " </span>";
     echo "</div>";
     echo "<div class=\"script\" id=\"showscript_{$dataitem['scriptid']}\">";
     echo nl2br($dataitem['script']);
     echo "</div>";
     echo "<div class=\"scriptlastline\">";
     echo "</div>";
     echo "</div>";
     // end scriptitemmiddleline
     echo "<hr>";
     echo "</li>";
 }
 public function headText()
 {
     echo CHtml::openTag('p', array('style' => 'margin:10px;', 'class' => 'pull-left'));
     echo CHtml::Link('<i class="fa fa-file"></i> Kelola Data ', array('admin'), array('class' => 'text-info'));
     echo $this->allCount();
     echo " | ";
     echo CHtml::Link(' <i class="fa fa-trash-o"></i> Sampah ', array('trash'), array('class' => 'text-error'));
     echo $this->trashCount();
     echo CHtml::closeTag('p');
 }
 public function makeChild($category)
 {
     echo "<ul style='list-style:none;'>";
     foreach ($category->selfChild as $child) {
         echo "<li>";
         echo CHtml::Link("<i class='fa fa-rss'></i> " . $child->name . "", array('/rss/category', 'id' => $child->term_id, 'slug' => $child->slug));
         $this->makeChild($child);
         echo "</li>";
     }
     echo "</ul>";
 }
 function getLink($post)
 {
     $postLink = '';
     $htmlOptions = '';
     $postLink .= "<h2>" . CHtml::Link(Helper::getExcerpt($post->post_name, 0, $this->data('batasJudul')), Yii::app()->createUrl('single/index', array('id' => $post->ID, 'slug' => $post->post_link))) . "</h2>";
     $postLink .= "  <p>";
     $postLink .= $post->post_excerpt == '' ? Helper::getExcerpt($post->post_content, 0, $this->data('batasDeskripsi')) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, $this->data('batasDeskripsi'));
     $postLink .= "</p>";
     $postLink .= '<div class="text-muted"><i class="fa fa-clock-o"></i> ' . FTime::since($post->post_modified) . '</div>';
     // $postLink .=  '<a class="btn btn-primary readmore" href="'.Yii::app()->createUrl('single/index',array('id'=>$post->ID,'slug'=>$post->post_link)).'">Selengkapnya <i class="fa fa-angle-right"></i></a>';
     echo $postLink;
 }
 public function left()
 {
     echo '<div class="left-nav">';
     echo CHtml::Link('<i class="fa fa-angle-right"></i> Terbaru', array('indeks/view', 'param' => 'post'), array('class' => 'list-group-item'));
     echo CHtml::Link('<i class="fa fa-angle-right"></i> Terpopuler', array('indeks/view', 'param' => 'populer'), array('class' => 'list-group-item'));
     foreach ($this->_labels as $label) {
         echo CHtml::Link('<i class="fa fa-angle-right"></i> ' . $label->name, array('indeks/view', 'param' => $label->slug), array('class' => 'list-group-item'));
     }
     foreach ($this->_category as $label) {
         echo CHtml::Link('<i class="fa fa-angle-right"></i> ' . $label->name, array('indeks/view', 'param' => $label->slug), array('class' => 'list-group-item'));
     }
     echo "</div>";
 }
 function getLink($post, $attr = true, $excerpt = false, $excerptString = 20)
 {
     $postLink = '';
     $htmlOptions = '';
     $postLink .= CHtml::Link(Helper::getExcerpt($post->post_name, 0, $excerptString), Yii::app()->createUrl('single/index', array('id' => $post->ID, 'slug' => $post->post_link)), $htmlOptions);
     if ($excerpt == true) {
         $postLink .= $post->post_excerpt == '' ? "<br>" . Helper::getExcerpt($post->post_content, 0, $this->data('batasDeskripsi')) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, $this->data('batasDeskripsi'));
     }
     if ($this->data('showDate') == true) {
         $postLink .= '<div class="entry-meta small muted">';
         $postLink .= FTime::since($post->post_modified);
         $postLink .= "</div>";
     }
     echo $postLink;
 }
 public function layout($data, $model)
 {
     echo CHtml::openTag('div', array('class' => 'widget archieve content-inner'));
     echo CHtml::openTag('h3', array('class' => 'main-color widget_header'));
     echo $data['title'];
     echo CHtml::closeTag('h3');
     echo CHtml::openTag('div', array('class' => 'row'));
     echo CHtml::openTag('div', array('class' => 'col-xs-12'));
     echo CHtml::openTag('ul', array('class' => 'blog_archieve'));
     $i = 1;
     foreach ($model as $tag) {
         echo CHtml::openTag('li');
         echo CHtml::openTag('h4');
         echo CHtml::Link("<span>" . $i++ . "</span> " . $tag->name . " <span class='pull-right'><i class='fa fa-angle-double-right'></i></span>", Yii::app()->createUrl('/topic/index', array('id' => $tag->term_id, 'slug' => $tag->slug)));
         echo CHtml::closeTag('h4');
         echo CHtml::closeTag('li');
     }
     echo CHtml::closeTag('ul');
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
 }
	
	<?php 
echo $form->textFieldRow($model, 'meta_key', array('class' => 'span12', 'placeholder' => 'Name'));
?>
	
	<?php 
echo $form->textFieldRow($model, 'meta_value', array('class' => 'span12', 'placeholder' => 'http://'));
?>
	 
	<?php 
$list = CHtml::listData(Menuitem::model()->findAll(array('order' => 'meta_key ASC', 'condition' => "term_id = '" . $model->term_id . "'")), 'meta_id', 'meta_key');
?>
	<?php 
echo $form->dropDownListRow($model, 'meta_parent', $list, array('empty' => 'None', 'class' => 'span12'));
?>
	 
        <?php 
echo $form->textFieldRow($model, 'meta_sort', array('class' => 'span5', 'placeholder' => '0'));
?>
        
	<hr>
	<?php 
echo CHtml::Link('Cancel', array('admin', 'id' => $model->term_id), array('class' => 'btn'));
?>
	<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => $model->isNewRecord ? 'info' : 'warning', 'label' => $model->isNewRecord ? 'Create New Menu' : 'Update'));
?>
 

<?php 
$this->endWidget();
?>
</div>

<?php 
echo $form->checkboxRow($model, 'slider_type_manual', array('onClick' => "toogle('.slider_manual_area')"));
?>
<div class='well slider_manual_area hide'>
<?php 
echo $form->textFieldRow($model, 'slider_manual_count');
?>
<br>
<?php 
if ($model->slider_type_manual == 1) {
    ?>
   <?php 
    echo CHtml::Link('Set Item', array('/appback/slidermanual/admin'), array('class' => 'btn btn-success'));
    ?>
 
<?php 
}
?>
</div>

<?php 
echo $form->checkboxRow($model, 'slider_type_label', array('onClick' => "toogle('.slider_label_area')"));
?>
<div class='well slider_label_area hide'>
<?php 
echo $form->checkboxListRow($model, 'slider_label_value', $this->listLabel());
echo $form->textFieldRow($model, 'slider_label_count');
?>
}
echo "<ul style='margin-left:-20px;margin-top:10px;'>";
foreach ($post->topics as $topic) {
    echo "<li>" . CHtml::Link($topic->name, array('topic/index', 'id' => $topic->term_id, 'slug' => $topic->slug)) . "</li> ";
}
echo "</ul>";
?>

<?php 
if (count($post->tags) > 0) {
    ?>
<hr><ul class="tag-cloud">
<?php 
    foreach ($post->tags as $tag) {
        echo "<li>";
        echo CHtml::Link($tag->name, array('tags/index', 'id' => $tag->term_id, 'slug' => $tag->slug), array('class' => 'btn btn-xs btn-primary')) . '  ';
        echo "</li>";
    }
    ?>
</ul>
<?php 
}
?>
 
 
<?php 
$this->getWidget('singlePostBottom');
?>
 
    </div>
<div class='col-xs-4'>
Example #12
0
 </div>
<div class="formtextfield"><?php 
echo $form->fileField($model, 'profilephoto', array('size' => 20, 'maxlength' => 128));
?>
 

</div>
<div class="thumbnailfield">
<?php 
$imgsrc = Yii::getPathOfAlias('application.profilephotos') . DIRECTORY_SEPARATOR . "thumb_" . Yii::app()->user->id . "_" . $model->profilephoto;
if (file_exists($imgsrc)) {
    $thumbUrl = Yii::app()->getAssetManager()->publish($imgsrc);
    $imageUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.profilephotos') . DIRECTORY_SEPARATOR . Yii::app()->user->id . "_" . $model->profilephoto);
    $imghtml = CHtml::image($thumbUrl);
    echo CHtml::link($imghtml, $imageUrl, array('target' => '_new'));
    echo "&nbsp;" . CHtml::Link('Remove', '#', array('id' => 'removeprofilephoto', 'class' => 'smalltext'));
}
?>


</div>


</div>

</div> <!-- end profilebox1 -->



</div>	<!-- end tabs -->
Example #13
0
	<footer>
	<?php 
if (yii::app()->user->isGuest) {
    echo CHtml::Link("我要回應", "#", array("id" => "reply", "onclick" => "\$('#pls_login').show();"));
} else {
    echo CHtml::ajaxLink("我要回應", yii::app()->createUrl("post/replyPost/", array("id" => $model->id)), array('type' => 'GET', 'success' => 'function(data){
						$("#detail").html("").append(data);
					}'), array("id" => "reply"));
}
?>
	<div id="pls_login" style="display:none;">
		<?php 
//echo "Please ".CHtml::Link("Login", yii::app()->createUrl("site/login",
//			array("path_info"=>yii::app()->request->pathInfo)))."with FB Account First";
echo "Please " . CHtml::Link("Login", "#", array("onclick" => "redirectToLogin();")) . "with FB Account First";
?>
	</div>
	</footer>
</article>

<!--<div id="fb-root"></div> -->
	<script>
		function catchLikeAction(value)
		{
			alert("Like!");
			<?php 
$ajaxUrl = yii::app()->createAbsoluteUrl("post/updateFBLike/", array("id" => $model->id));
?>
			$.ajax({
				url: '<?php 
 protected function renderAddButton()
 {
     if (!isset($this->returnLink) or $this->returnLink == "") {
         $this->returnLink = $this->model->tableSchema->name . "/create";
     }
     if ($this->addButtonLink != '') {
         $link = $this->addButtonLink;
     } else {
         $link = array($this->_relatedModel->tableSchema->name . "/create", 'returnTo' => $this->returnLink);
     }
     if (!$this->useLinkButton) {
         echo CHtml::Link(is_string($this->showAddButton) ? $this->showAddButton : 'New', $link);
     } else {
         echo CHtml::LinkButton(is_string($this->showAddButton) ? $this->showAddButton : 'New', array('submit' => $link));
     }
 }
<?php

$this->breadcumbs();
?>
<h3>Lihat : <?php 
echo $model->name;
?>
  </h3><hr>
<?php 
$this->alert();
?>

<?php 
$webUrl = Yii::app()->FrontUrl->createUrl('/tags/index/', array('id' => $model->term_id, 'slug' => $model->slug));
$mobileUrl = Yii::app()->FrontMobileUrl->createUrl('/tags/index/', array('id' => $model->term_id, 'slug' => $model->slug));
$link = "Web Url : " . $webUrl . " - " . CHtml::Link('Go to Link', $webUrl) . "<br>";
$link .= frontendMobileUrl == '' ? "" : "Mobile url : " . $mobileUrl . " - " . CHtml::Link('Go to Link', $mobileUrl);
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'type' => 'bordered striped', 'attributes' => array('name', array('name' => 'slug', 'type' => 'raw', 'value' => $link), array('label' => 'Total Post', 'value' => count($model->postAll)), 'description', array('name' => 'images', 'type' => 'raw', 'value' => CHtml::image(Helper::rootImg('content', $model->images))))));
<li class='<?php 
if ($action === 'favorites') {
    echo 'selected';
}
?>
'> <?php 
echo CHtml::Link('Favorites', array('member/favorites'));
?>
</li>
<li class='<?php 
if ($action === 'invitefriend') {
    echo 'selected';
}
?>
'> <?php 
echo CHtml::Link('Tell a Friend', array('member/invitefriend'));
?>
</li>
<li class=''>
 <?php 
//echo CHtml::mailto('Invite a friend','?body='.$body.'&subject=Invite to MyResume.at');
?>
 </li>

</ul>
</div> <!-- end leftnavprofile -->



</div> <!-- end leftnav -->
 <div class='inset'><center>
<h1>RSS </h1>
 </center>
 
<?php 
echo CHtml::Link("<b><i class='fa fa-rss'></i> Arikel Terbaru </b>", array('/rss/terbaru'));
?>
    
<hr><h4>Kanal</h4><hr>
<?php 
foreach ($model as $category) {
    echo CHtml::Link("<b><i class='fa fa-rss'></i> " . $category->name . "</b>", array('/rss/category', 'id' => $category->term_id, 'slug' => $category->slug)) . ' ';
    $this->makeChild($category);
}
?>
    
 
 <hr><h4>Video</h4><hr>
    <?php 
echo CHtml::Link("<b><i class='fa fa-rss'></i> Video </b>", array('/rss/video'));
?>
    
 
<hr> <h4>Photo</h4><hr>
    <?php 
echo CHtml::Link("<b><i class='fa fa-rss'></i> Photo </b>", array('/rss/photo'));
?>
<hr>
 
 </div>
 
    echo $this->data('title');
    ?>
</h4>
        <?php 
}
?>
      </div>
    <div class="modal-body">
  
        <?php 
if ($this->data('images') != '') {
    ?>
      <center>
<?php 
    $img = CHtml::Image(Helper::rootImg('content', $this->data('images')), '', array('width' => '100%'));
    echo CHtml::Link($img, $this->data('linkImage'));
    ?>
</center> 
 <?php 
} else {
    ?>
 <?php 
    echo $this->data('textIfImagesEmpty');
    ?>
 <?php 
}
?>
      </div>
    
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
Example #19
0
    }
    $zone = Zones::parentZone($zone);
}
echo $this->renderPartial('//waterRequestGeometryZoneProperties/_properties_edit', array('model' => $prop_model, 'params' => $params, 'local' => $model->properties()));
?>
	</div>

	<div class="row" id="water_demand">
		<?php 
echo CHtml::label(Yii::t('waterrequest', 'Water Demand'), 'water_demand_value');
?>
		<?php 
echo CHtml::textField('water_demand_value', '', array('disabled' => true, 'class' => 'text'));
?>
		<?php 
echo CHtml::Link(Yii::t('waterrequest', 'Calculate'), 'javascript:void(0);', array('onclick' => 'simula();'));
?>
		<p class='hint' id='water_demand_info'></p>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::ajaxSubmitButton('Save', CController::createUrl('waterRequestGeometryZones/update', array('id' => $model->id)), array('success' => 'function(){new_refresh_geometries_table();doOverlayClose($(\'#' . $form->id . '\'));}'), array('id' => 'submitta'));
?>
	</div>

<script type="text/javascript">
/* <![CDATA[ */
	//jQuery('#water_demand').hide();
	
	function refresh_zone_parameters_form(){
Example #20
0
<div id="content">

<br> <br>
<p class="error1"> The script you requested was not found. </p>
<p> <?php 
echo CHtml::Link('Return Home', array('site/index'));
?>
</div>
 public function user($data, $row = '')
 {
     return $data->user ? CHtml::Link($data->user->username, array('/user/adminList/view', 'id' => $data->user->id)) . " <small class='muted'>" . $data->user->auth->itemname . "</small>" : "";
 }
Example #22
0
		</form>
		<div id="login_notification" style="display:none;"><?php 
echo "Please " . CHtml::Link("Login", yii::app()->createUrl("site/login", array("path_info" => yii::app()->request->pathInfo))) . "with FB Account First";
?>
</div>
		<div id="postdialog"></div>

		<div id="global-nav" style="float:right;">
			<?php 
//echo CHtml::Link("All News", Yii::app()->baseUrl."/post/news/1");
?>
			<?php 
if (yii::app()->user->isGuest) {
    echo CHtml::Link("Login", yii::app()->createUrl("/site/login"));
} else {
    echo CHtml::Link("Logout(" . yii::app()->user->name . ")", Yii::app()->baseUrl . "/site/logout");
}
?>
		</div>

		
		<div id="fb-root"></div>
			<script>
		      window.fbAsyncInit = function() {
			    FB.init({appId: '<?php 
echo yii::app()->params["fbAppId"];
?>
', status: true, cookie: true,
			             xfbml: true});

				var likeCounter = 0
 foreach ($items as $item => $param) {
     $widget_id = $item;
     if (empty($item)) {
         $widget_name = $item;
     } else {
         if (!empty($param['name'])) {
             $widget_name = !is_array($param['name']) ? $param['name'] : '';
         }
         if (!empty($param['description'])) {
             $widget_description = !is_array($param['description']) ? $param['description'] : '';
         }
     }
     if (ctype_alnum($item) and $item != 'controller') {
         // check alphanumeric
         echo "<div class='well'>";
         echo CHtml::Link('<i class="fa fa-edit"></i>', $this->createUrl('widget/edit', array('id' => $widget_id)), array('class' => 'btn-warning btn pull-right'));
         echo "<b>" . $widget_name . "</b> ";
         $count = Widget::model()->findAllByattributes(array('groups' => $widget_id));
         echo " - <span class='label label-info'>" . count($count) . "</span><br>";
         echo "<span class='muted'>(" . $widget_description . ")</span><br>";
         foreach ($count as $wid) {
             $set = $wid->description != '' ? "<i class='text-success'>Telah di set</i>" : "<i class='text-error'>Belum di set</i>";
             echo "<i class='fa fa-caret-right'></i> " . $wid->name . " - " . $set . "<br>";
         }
         echo "</div>";
     }
 }
 echo "</div></div>";
 if ($a++ % 2 == 0) {
     // cek row ini pertama atau kedua, jika kedua tampilkan
     echo "</div>";
Example #24
0
 public function run()
 {
     if ($this->manyManyTable != '') {
         $this->renderManyManySelection();
     } else {
         $this->renderBelongsToSelection();
     }
     if ($this->showAddButton !== false) {
         if (!isset($this->returnLink) or $this->returnLink == "") {
             $this->returnLink = $this->model->tableSchema->name . "/create";
         }
         echo CHtml::Link(is_string($this->showAddButton) ? $this->showAddButton : 'New', array(get_class($this->_relatedModel) . "/" . $this->createAction, 'returnTo' => $this->returnLink));
     }
 }
 public function user($data, $row = '')
 {
     return $data->post_editor != 0 ? CHtml::Link($data->editors->username, array('/user/adminList/view', 'id' => $data->editors->id)) : "";
 }
    echo CHtml::Link($topic->name, array('/topic/index', 'id' => $topic->term_id, 'slug' => $topic->slug)) . ", ";
}
if (count($post->tags) > 0) {
    echo "<hr>Tag : ";
}
foreach ($post->tags as $tag) {
    echo CHtml::Link($tag->name, array('tags/index', 'id' => $tag->term_id, 'slug' => $tag->slug)) . ', ';
}
?>

 
  <hr>
<span class='text-muted'>
<?php 
if ($post->post_editor_alias != '') {
    echo "Editor : " . $post->post_editor_alias . "<br>";
}
if ($post->post_author_alias != '') {
    echo "Penulis : " . $post->post_author_alias . "<br>";
}
if ($post->post_source != '' and $post->post_source_link != '') {
    echo "Sumber : " . CHtml::Link($post->post_source, $post->post_source_link, array('class' => 'text-muted'));
}
if ($post->post_source != '' and $post->post_source_link == '') {
    echo "Sumber : " . $post->post_source;
}
?>
</span>
<hr>
</div>
  
Example #27
0
 public function run()
 {
     if ($this->style == "SelectBox") {
         echo CHtml::ActiveDropDownList($this->_parentModel, $this->field, $this->getRelatedData(), $this->htmlOptions);
     } else {
         if ($this->style == "ListBox") {
             echo CHtml::ActiveListBox($this->_parentModel, $this->field, $this->getRelatedData(), $this->htmlOptions);
         }
     }
     if (!$this->hideAddButton) {
         if (!isset($this->returnLink) or $this->returnLink == "") {
             $this->returnLink = $this->relation . "/create";
         }
         echo CHtml::Link($this->addButtonString, array($this->relation . "/" . $this->createAction, 'returnTo' => $this->returnLink));
     }
 }
<div class='row-fluid'>
<?php 
echo CHtml::Link('<i class="fa fa-pencil"></i> Buat Baru', array('create'), array('class' => 'btn btn-info'));
?>
 
<?php 
echo CHtml::link('<i class="fa fa-search"></i> Pencarian Lanjutan', '#', array('class' => 'search-button btn'));
?>
<hr>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
<hr>
</div>
<?php 
Yii::app()->clientScript->registerScript('search', "\n\t\$('.search-button').click(function(){\n\t\t\$('.search-form').toggle();\n\t\treturn false;\n\t});\n\t\$('.search-form form').submit(function(){\n\t\t\$.fn.yiiGridView.update('post-grid', {\n\t\t\tdata: \$(this).serialize()\n\t\t});\n\t\treturn false;\n\t});\n");
?>

 
Example #29
0
</div>
		<div class='formtextfield'><?php 
echo $form->passwordField($model, 'password', array('class' => 'inputtext'));
?>
</div>
		
		
	</div>

	<div class="formrow">
	<div class='formlabel'><?php 
echo '';
?>
</div>
   <div class='formtextfield smalltext'><?php 
echo CHtml::Link('Forgot Password', array('login/recover'));
?>
 </div>
   </div>
   
	<div class="formrow">
	<div class='formlabel'> <?php 
echo '';
?>
</div>
		<div class='formtextfield mediumtext'><?php 
echo $form->checkBox($model, 'rememberMe');
?>
		<?php 
echo $form->labelEx($model, 'rememberMe');
?>
    public function layoutManual($type = '', $count)
    {
        $this->count = count($this->loadManual($this->data[$count]));
        if ($this->data[$type] == 1) {
            foreach ($this->loadManual($this->data[$count]) as $slide) {
                $active = '';
                if ($this->firstToActive) {
                    $this->firstToActive = false;
                    $active = "active";
                }
                echo '<div class="item  ' . $active . '">
	   <img src="' . Helper::getThumb('content', $slide->images, 'large') . '"  />
        <div class="carousel-caption">';
                if ($slide->groups != '') {
                    //  echo $slide->groups;
                }
                if ($slide->name != '') {
                    echo CHtml::Link('<h4>' . $slide->name . '</h4>', $slide->slug);
                    if ($this->data['slider_description'] == 1) {
                        echo ' <p>';
                        echo $slide->description;
                        echo '</p>';
                    }
                }
                echo '     
        </div>
        
       </div>';
            }
        }
    }