Пример #1
0
<?php

/* @var $this LessionController */
/* @var $data Lession */
?>


<div>
	<?php 
echo CHtml::image($data->user->face && DxdUtil::xImage($data->user->face, 40, 40) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->user->face, 40, 40) : "http://placehold.it/40x40", 'image', array('style' => 'width:40px;height:40px;', 'class' => 'pull-left'));
?>
	<div style="margin-left:50px">
	<?php 
echo CHtml::link($data->user->name, $data->user->pageUrl);
?>
	&nbsp;&nbsp;<span class="muted">
		<?php 
echo date('Y-m-d H:i', $data->addTime);
?>
</span>
	<div>
	<?php 
echo $data->content;
?>
	</div>
	<div>
		<?php 
echo CHtml::link(Yii::t('app', '回复'), 'javascript:;', array('class' => 'muted pull-right', 'data-toggle' => 'collapse', 'data-target' => '#dxd-comment-form-' . $index));
?>
		<div class="clearfix"></div>
	</div>
Пример #2
0
<li class="dxd-group-card-item" groupid="<?php 
echo $data->id;
?>
">
  <div class="thumbnail dxd-group-card">
  	<table style="width:100%">
  	<tr>
  	<td style="width:70px;vertical-align:top">
  		<?php 
$imgUrl = $data->face && DxdUtil::xImage($data->face, 60, 60) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 60, 60) : "http://placehold.it/60x60";
?>
	    <?php 
$image = CHtml::image($imgUrl, 'image', array('style' => 'width:60px;height:60px;', 'class' => ' '));
echo CHtml::link($image, array('view', 'id' => $data->id));
?>
	</td>
	<td style="vertical-align:top">
	<div style="margin-bottom:5px">
	    <?php 
echo CHtml::link($data->name, array('view', 'id' => $data->id));
?>
		&nbsp;&nbsp;<span class="muted"><?php 
echo $data->memberCount;
?>
成员</span>
</div>
	    <div>
	    <?php 
echo mb_substr(strip_tags($data->introduction), 0, 50, 'utf8') . "...";
?>
	    </div>
Пример #3
0
            <?php 
if ($followDataProvider->totalItemCount > 0) {
    ?>
                <div style="margin:5px 0">
                    <span style="font-weight:bold"><?php 
    echo $followDataProvider->totalItemCount;
    ?>
 </span>
                    <?php 
    echo Yii::t('app', '人关注了这个帖子');
    ?>
                </div>
                <?php 
    foreach ($follows as $follow) {
        $img = CHtml::image(Yii::app()->baseUrl . "/" . DxdUtil::xImage($follow->user->face, 45, 45), $follow->user->name, array('style' => 'width:45px;height:45px;padding-bottom:8px;'));
        echo CHtml::link($img, $follow->user->pageUrl, array('class' => 'dxd-username', 'data-userId' => $follow->userId, 'style' => 'margin-right:5px;'));
    }
    ?>
            <?php 
}
?>
        </div>
    </div>
    </div>
</div>

<style type="text/css">
.dxd-right-col{
}
</style>
Пример #4
0
<li class="col-sm-2" courseId="<?php 
echo $data->id;
?>
" style="background-color:#ececec" >
	<div class="group-card" style="margin-bottom:20px">
  		<div style="margin:10px 10px 15px 10px;">
		<?php 
$imgUrl = $data->face && DxdUtil::xImage($data->face, 150, 150) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 150, 150) : "http://placehold.it/150x150";
?>
	    <?php 
$image = CHtml::image($imgUrl, 'image', array('style' => 'width: 150px;height:150px;', 'class' => 'hidden-xs'));
echo CHtml::link($image, array('//group/index/view', 'id' => $data->id));
?>
	    	</div>
	   <div class="text-center">
	    	<?php 
//echo CHtml::link(mb_substr($data->name,0,32,'utf-8'),array('//course/index/view','id'=>$data->id),array('style'=>""));
?>
	   		<div  style="font-size:20px"><?php 
echo CHtml::link(mb_substr($data->name, 0, 12, 'utf-8'), array('//group/index/view', 'id' => $data->id), array('style' => 'color:#555;'));
?>
</div>
	   		<div class="muted"><small>			<?php 
echo $data->memberNum;
?>
&nbsp;<?php 
echo Yii::t('app', '成员');
?>
</small>
	   		</div>
	   		<div style="margin-top:20px">
Пример #5
0
?>
">
<hr/>
<table style="width:100%">
<tr>
<!--
<td style="width:40px;vertical-align:top;padding-top:24px;padding-left:10px;">
<?php 
echo CHtml::ajaxLink(' ', array('vote/postcomment', 'commentId' => $data->id, 'value' => 1), array('success' => 'js:function(data){var item=$(".dxd-post-comment-item[data-commentId=' . $data->id . ']"); item.find(".dxd-post-comment-up").addClass("dxd-voted");item.find(".dxd-post-comment-vote-result").html(data);}'), array('class' => 'dxd-post-comment-up ' . ($data->voteUpNum ? "dxd-voted" : "")));
// echo CHtml::ajaxLink(' ',array('vote/postcomment','commentId'=>$data->id,'value'=>0),array('success'=>'js:function(data){var item =$(".dxd-post-comment-item[data-commentId='.$data->id.']");item.find(".dxd-post-comment-vote-result").html(data);}'),array('class'=>'dxd-post-comment-down '.($data->voteUpNum ? "dxd-voted" : "")));
?>
</td>
-->
<td style="width:60px;vertical-align:top;">
<?php 
$img = CHtml::image(Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->user->face, 50, 50), "images", array('style' => 'width:50px;height:50px;'));
echo CHtml::link($img, $data->user->name, array('class' => ' dxd-username', 'data-userId' => $data->user->id));
?>
</td>
<td>
<div style="margin-bottom:5px;"><?php 
echo CHtml::link($data->user->name, array("u/index", 'id' => $data->user->id), array('class' => 'dxd-username', 'data-userId' => $data->user->id));
?>
<span class="muted">&nbsp;&nbsp;<?php 
echo date("Y-m-d H:i", $data->addTime);
?>
</span>
<?php 
// $img = CHtml::image(Yii::app()->baseUrl."/".DxdUtil::xImage($data->user->face, 25, 25),"images",array('style'=>'width:25px;height:25px;'));
//echo CHtml::link($img,$data->user->name,array('class'=>'dxd-username pull-right', 'data-userId'=>$data->user->id));
echo CHtml::ajaxLink(' ', array('comment/toggleVote', 'id' => $data->id, 'value' => 1), array('success' => 'js:function(data){var item=$(".dxd-post-comment-item[data-commentId=' . $data->id . ']"); item.find(".dxd-post-comment-up").addClass("dxd-voted");item.find(".dxd-post-comment-vote-result").html(data);}'), array('class' => 'pull-right dxd-post-comment-up ' . ($data->voteUpNum ? "dxd-voted" : "")));
Пример #6
0
<div class="row">
	<div style="border:1px solid #ccc;" class="col-sm-12">
	<div style="padding:15px">
		<div class="pull-left">
			<?php 
echo CHtml::image(Yii::app()->baseUrl . "/" . DxdUtil::xImage($user->face, 120, 120), $user->name, array('class' => 'pull-left', 'style' => "margin-right:20px"));
?>
			<div class="pull-left">
				<h2><?php 
echo $user->name;
?>
	</h2>
				<p class="dxd-break-word dxd-self-introduction" style="margin-top:20px;font-size:1.5em;"><?php 
echo $user->bio;
?>
</p>
			</div>
			<div class="clearfix"></div>
		</div>
	<div class="pull-right">
		<?php 
/*$this->widget('booster.widgets.TbButton', array(
    'label'=>'<i class="icon-envelope"></i>'.Yii::t('app','发私信'),
//	'url'=>'javascript:openFancyBox("'.Yii::app()->createUrl('message/create',array('toUserId'=>$user->id)).'");',
   'url'=>array('message/create','toUserId'=>$user->id),
	'htmlOptions'=>array('style'=>'margin:0 5px;','class'=>"dxd-message-btn",'onclick'=>'openFancyBox(this);return false;'),
     'encodeLabel'=>false,
	));*/
echo CHtml::link(Yii::t('app', '发私信'), array('message/create', 'toUserId' => $user->id), array('onclick' => 'openFancyBox(this);return false;', 'class' => 'btn btn-default dxd-message-btn'));
?>
	<?php 
Пример #7
0
		<div style="margin-bottom:20px">
		<?php 
if ($followDataProvider->totalItemCount > 0) {
    ?>
		<div style="margin:15px 0">
			<span style="font-weight:bold"><?php 
    echo $followDataProvider->totalItemCount;
    ?>
 </span>
			<?php 
    echo Yii::t('app', '人关注了这个帖子');
    ?>
		</div>
			<?php 
    foreach ($follows as $follow) {
        $img = CHtml::image(Yii::app()->baseUrl . "/" . DxdUtil::xImage($follow->user->face, 25, 25), $follow->user->name, array('style' => 'width:25px;height:25px;'));
        echo CHtml::link($img, $follow->user->pageUrl, array('class' => 'dxd-username', 'data-userId' => $follow->userId, 'style' => 'margin-right:5px;'));
    }
    ?>
		<?php 
}
?>
		</div>
	</div>
	</div>
</div>

<style type="text/css">
.dxd-right-col{
padding-top:40px;
}
Пример #8
0
<li class="group-course-card span3">
    <div class="div">
        <?php 
if ($data->face && DxdUtil::xImage($data->face, 270, 200)) {
    $imgUrl = Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 270, 200);
} else {
    $imgUrl = "http://placehold.it/270x200";
}
$image = CHtml::image($data->xface, $data->name);
echo CHtml::link($image, array('/course/index/view', 'id' => $data->id));
?>
        <div class="info">
            <?php 
echo CHtml::link(mb_substr($data->name, 0, 32, 'utf-8'), array('/course/index/view', 'id' => $data->id), array('style' => 'display:block;color:#333;font-size:22px;height:50px;border-bottom:2px solid #eee;padding:25px;line-height:30px;'));
?>
            <div style="padding:18px 25px">
                <div class="pull-left"> ¥<strong class="orange-color"><?php 
echo $data->fee;
?>
</strong> </div>
                <div class="pull-right muted"> 已有 <?php 
echo $data->memberNum;
?>
 同学 </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
</li>
Пример #9
0
<div style="padding:10px;">
	<table style="width:100%">
	<tr><td style="width:55px;vertical-align:top;">

	<?php 
$img = CHtml::image($user->face && DxdUtil::xImage($user->face, 48, 48) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($user->face, 48, 48) : "http://placehold.it/48x48", "{$user->name}", array('style' => "width:48px;height:48px;"));
echo CHtml::link($img, $user->pageUrl, array('class' => 'pull-left'));
?>
	</td>
	<td>
					
		<div class="pull-right">
		<?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => '私信', 'url' => array('message/create', 'toUserId' => $user->id), 'size' => 'small', 'htmlOptions' => array('style' => 'margin:0 5px;', 'class' => "dxd-message-btn", 'onclick' => 'openFancyBox(this);return false;')));
?>
			<?php 
$isFan = $user->isFan(Yii::app()->user->id);
echo CHtml::link($isFan ? '取消关注' : '关注', array('u/toggleFollow', 'id' => $user->id), array('onclick' => 'toggleFollow(this);return false;', 'id' => 'dxd-user-followed-' . $user->id, 'class' => 'btn btn-small dxd-user-followed-' . $user->id . " " . ($isFan ? ' ' : ' btn-success ')));
?>
		</div>
	
		<?php 
echo CHtml::link($user->name, $user->pageUrl, array("class" => 'pull-left', 'style' => 'font-size:1em;padding-top:4px;'));
?>
		<div class="clearfix" ></div>
		<div style="margin-top:10px">
		<!--  
				<span style="font-weight:bold;font-size:1em;"><?php 
echo $user->answerNum;
?>
</span><span class="muted"> 个回答</span>
Пример #10
0
<?php

$group = $data->group;
?>
<div class="dxd-index-post-item" style="background-color:white;padding:20px;">
	<div class="group-card pull-left">
  		<div>
		<?php 
$imgUrl = $group->face && DxdUtil::xImage($group->face, 100, 100) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($group->face, 100, 100) : "http://placehold.it/100x100";
?>
	    <?php 
$image = CHtml::image($imgUrl, 'image', array('style' => 'width: 100px;height:100px;', 'class' => 'hidden-xs'));
echo CHtml::link($image, array('/group/index/view', 'id' => $group->id));
?>
	    	</div>
	   <div class="text-center" style="margin-top:22px;">
	    	<?php 
//echo CHtml::link(mb_substr($data->name,0,32,'utf-8'),array('//course/index/view','id'=>$data->id),array('style'=>""));
?>
	   		<div style="font-size:18px"><?php 
echo CHtml::link(mb_substr($group->name, 0, 10, 'utf-8'), array('//group/index/view', 'id' => $group->id), array('style' => 'color:#555;'));
?>
</div>
	   		<!--  
	   		<div class="muted"><small>			<?php 
echo $group->memberNum;
?>
&nbsp;成员</small>
	   		</div>
	   		<div style="margin-top:15px">
	    	<?php 
Пример #11
0
 protected function afterFind()
 {
     if (!$this->face) {
         $this->face = $this->defaultFace;
     }
     $this->face_48 = $this->face && DxdUtil::xImage($this->face, 48, 48) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($this->face, 48, 48) : "http://placehold.it/48x48";
     //	if($this->noEmail()) $this->email = "";
     return parent::afterFind();
 }
Пример #12
0
-->
<li class="col-sm-2" style="width:230px;margin-left:20px;" courseId="<?php 
echo $data->id;
?>
" >
  <div class="thumbnail ">
  		<div class="dxd-course-operate">

  		  		 <?php 
//在我的课表之外显示
echo CHtml::link($data->isCollector(Yii::app()->user->id) ? Yii::t('app', '取消收藏') : Yii::t('app', '收藏课程'), array('toggleCollect', 'id' => $data->id), array('onclick' => 'toggleCollect(this);return false;', 'class' => 'btn dxd-course-learn-btn  hidden-xs'));
?>

	  </div>
  		<?php 
$imgUrl = $data->face && DxdUtil::xImage($data->face, 240, 160) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 240, 160) : "http://placehold.it/220x110";
?>
	    <?php 
$image = CHtml::image($imgUrl, 'image', array('style' => 'height:120px;width: 100%;', 'class' => 'hidden-xs'));
echo CHtml::link($image, array('view', 'id' => $data->id));
?>
	    <div style="padding:10px;">
	    <div style="line-height:24px;font-size:18px;height:50px;">
	    <strong>
	    	<?php 
echo CHtml::link(mb_substr($data->name, 0, 32, 'utf-8'), array('view', 'id' => $data->id), array('style' => "color:#333;"));
?>
	    </strong></div>
	    <hr style="margin:10px 0;"/>
	    <table style="width: 100%">
	    <tr><td><?php 
Пример #13
0
<div class="dxd-course-header">	
	<div class="dxd-course-nav" style="border-top:none;padding-top:15px;padding-bottom:15px;">
		
		<div class="dxd-course-header-left1">
		
		<?php 
$imgUrl = $course->face && DxdUtil::xImage($course->face, 160, 120) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($course->face, 160, 120) : "http://placehold.it/200x150";
?>
		<?php 
echo CHtml::image($imgUrl, 'image', array('class' => 'pull-left dxd-course-face', 'style' => 'width:160px;height:120px;'));
?>
		<?php 
//echo CHtml::link('设置课程封面图片',array('course/setFace','id'=>$course->id),array('class'=>'dxd-set-course-face dxd-fancy-elem'));
?>
		</div>
		<div class="pull-left dxd-course-header-left2">
			<?php 
// echo $this->renderPartial('_topic', array('course'=>$course));
?>

			
			<h1><?php 
echo $course->name;
?>
</h1>
			<div style="line-heigh:16px;">
						<div style="width:80px;height:16px;display:inline-block;vertical-align:-2px;" class="dxd-star-rating-<?php 
echo intval(round($course->rateScore));
?>
"></div>
			&nbsp;<?php 
<?php

$this->pageTitle = Yii::app()->name . "-{$course->name}";
?>
<div class="dxd-course-header">	
	<div class="dxd-course-nav" style="border-top:none;padding-top:15px;padding-bottom:15px;">
		
		<div class="dxd-course-header-left1">
		
		<?php 
$imgUrl = $course->face && DxdUtil::xImage($course->face, 350, 260) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($course->face, 350, 260) : "http://placehold.it/350x260";
?>
		<?php 
echo CHtml::image($imgUrl, 'image', array('class' => 'pull-left', 'style' => 'width:350px;height:260px;'));
?>
		</div>
		<div class="dxd-course-header-left2" style="text-align:center;padding:20px 20px 0 20px;">
			<?php 
// echo $this->renderPartial('_topic', array('course'=>$course));
?>

			
			<h1 ><?php 
echo $course->name;
?>
</h1>
			<p style="font-size:18px;margin:15px;"><?php 
echo $course->subTitle;
?>
</p>
			<div>
Пример #15
0
<li class="col-sm-3" courseId="<?php 
echo $data->id;
?>
" >
<div class="course-card">
  		<?php 
$imgUrl = $data->face && DxdUtil::xImage($data->face, 270, 200) ? Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 270, 200) : "http://placehold.it/270x200";
?>
	    <?php 
$image = CHtml::image($imgUrl, 'image', array('style' => 'width: 270px;height:200px;', 'class' => 'hidden-xs'));
echo CHtml::link($image, array('//course/index/view', 'id' => $data->id));
?>
	    <div style="border:2px solid #eee;border-top:none;">
	    	<?php 
echo CHtml::link(mb_substr($data->name, 0, 32, 'utf-8'), array('//course/index/view', 'id' => $data->id), array('style' => "display:block;color:#333;font-size:22px;height:50px;border-bottom:2px solid #eee;padding:25px;line-height:30px;"));
?>
			<div style="padding:18px 25px">
			<div  class="pull-left">
				<?php 
if ($data->fee == 0) {
    ?>
				<strong class="orange-color"><?php 
    echo Yii::t('app', '免费');
    ?>
</strong>	
				<?php 
} else {
    ?>
					¥<strong class="orange-color"><?php 
    echo $data->fee;
    ?>
Пример #16
0
<div style="margin-bottom:15px"> 
<div class="pull-left">
	<?php 
$img = CHtml::image(Yii::app()->baseUrl . "/" . DxdUtil::xImage($data->face, 40, 40), $data->name, array('style' => 'width:40px;height:40px;'));
echo CHtml::link($img, $data->pageUrl, array('class' => 'dxd-username', 'data-userId' => $data->id), array('style' => 'display:block;width:40px;height:50px;'));
?>
</div>
<div style="line-height:16px;margin-left:50px;">
<?php 
echo CHtml::link($data->name, $data->pageUrl, array('class' => 'dxd-username', 'data-userId' => $data->id, 'style' => 'margin-top:5px;'));
?>
<div class="pull-right muted">
<?php 
echo date('m-d H:i', $data->addTime);
?>
</div>
	<div style="margin-top: 8px">
	<?php 
echo $data->bio;
?>
	</div>
</div>
<div class="clearfix"></div>
</div>
Пример #17
0
<div class="row group-header">
    <div class="col-sm-12">
        <!-- 小组头像 -->
        <div class="pull-left pic hidden-xs">
            <?php 
if ($group->face && DxdUtil::xImage($group->face, 140, 140)) {
    $imgUrl = Yii::app()->baseUrl . "/" . DxdUtil::xImage($group->face, 100, 100);
} else {
    $imgUrl = "http://placehold.it/100x100";
}
echo CHtml::image($imgUrl, 'image', array('class' => 'pull-left dxd-group-face'));
?>
            <div class="clearfix"></div>
        </div>
        <!-- 管理小组 -->
        <div class="pull-right admin hidden-xs">
            <?php 
$this->renderPartial('_join', array('member' => $member, 'group' => $group));
?>
        </div>
        <!-- 小组信息 -->
        <div class="info">
            <span class="name">
                <?php 
echo mb_substr($group->name, 0, 12, 'utf-8');
?>
            </span>
            &nbsp;&nbsp;
            <span class="text">
                <?php 
echo $group->leaderTitle;