public function init()
 {
     parent::init();
     if (!Yii::app()->getUser()->getIsGuest()) {
         Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
     }
 }
 public function init()
 {
     parent::init();
     if (!Yii::app()->user->hasRole('teacher')) {
         $this->redirect(array('/site/index'));
     }
     Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
 }
 public function actionIndex()
 {
     if (Yii::app()->getUser()->getIsGuest()) {
         $this->redirect(Yii::app()->getUser()->loginUrl);
     } else {
         Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
         $this->render('index');
     }
 }
 public function init()
 {
     parent::init();
     if (Yii::app()->user->hasRole('teacher') || Yii::app()->user->hasRole('student')) {
     } else {
         $this->render('//misc/unavailable', array('messageTitle' => 'Page Not Found', 'message' => 'The requested page wast not found.'));
         Yii::app()->end();
     }
     Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
 }
Exemple #5
0
<?php

$this->pageTitle = Yii::t('application', 'All aspects');
?>
<div class="action" id="aspect-index">
	<div class="action-content">
		<!--post-form-->
		<?php 
$this->widget('PostFormWidget');
?>
		<!--/post-form-->
		<div class="stream" id="post-stream">
			<?php 
$this->widget('PostStreamWidget');
?>
		</div>
	</div>
</div>

<?php 
Layout::addBlock('sidebar.right', array('id' => 'right_sidebar', 'content' => $this->renderPartial('/partial/aspect_index_right', array('aspects' => $user->aspects, 'controller' => $this), true)));
Exemple #6
0
<?php

$this->pageTitle = $post->getShortenedContent();
?>
<div class="action" id="post-view">
	<div class="action-content">
		<div class="stream" id="post-stream">
			<div class="stream-content">
				<div class="stream-items">
					<?php 
Yii::app()->controller->widget('PostViewWidget', array('post' => $post));
?>
				</div>
			</div>
		</div>
	</div>
</div>

<?php 
Layout::addBlock('sidebar.right', array('id' => 'right_sidebar', 'content' => '&nbsp;'));
 public function init()
 {
     parent::init();
     Layout::addBlock('sidebar.right', array('id' => 'right_sidebar', 'content' => $this->renderPartial('/partial/editprofile_right', array('user' => Yii::app()->getUser()->getModel()), true)));
 }
 public function actionIndex()
 {
     Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
     $this->render('index');
 }
 public function init()
 {
     parent::init();
     Layout::addBlock('sidebar.left', array('id' => 'course_menu', 'content' => $this->renderPartial('_admin_course', array(), true)));
     Layout::addBlock('sidebar.left', array('id' => 'profile_sidebar', 'content' => $this->widget('ProfileWidget', array('userModel' => Yii::app()->getUser()->getModel()), true)));
 }
Exemple #10
0
<?php

$this->pageTitle = $aspect->name;
?>
<div class="action" id="aspect-view">
	<div class="action-content">
		<!--post-form-->
		<?php 
$this->widget('PostFormWidget', array('aspectIds' => array($aspect->id)));
?>
		<!--/post-form-->
		<div class="stream" id="post-stream">
			<?php 
$this->widget('PostStreamWidget', array('aspectId' => $aspect->id));
?>
		</div>
	</div>
</div>

<?php 
Layout::addBlock('sidebar.right', array('id' => 'right_sidebar', 'content' => $this->renderPartial('/partial/aspect_view_right', array('aspect' => $aspect, 'controller' => $this), true)));