View file vkclone-0.0.1/protected/modules/groups/views/group/index.php

File size: 1.77Kb
<?php
$this->pageHeader = $this->pageTitle = CHtml::encode($model->name);
?>

<?php if (!empty($model->description)): ?>
	<div class="blue_block">
		<strong><?= CHtml::encode($model->description) ?></strong>
	</div>
<?php endif; ?>

<div class="blue_block">
	<strong>
	<?php if ($model->checkAccess('administrator') || Yii::app()->user->checkAccess('groups.group.updateGroup')): ?>
		<?= CHtml::image(Yii::app()->baseUrl.'/images/edit.png', 'edit', array('class' => 'favicon_image')) ?> <?= CHtml::link(Yii::t('Groups', 'Update group'), array('update', 'id' => $model->id)) ?><br />
	<?php endif; ?>
	<?php if ($model->checkAccess('administrator') || Yii::app()->user->checkAccess('groups.group.deleteGroup')): ?>
		<?= CHtml::image(Yii::app()->baseUrl.'/images/delete.png', 'delete', array('class' => 'favicon_image')) ?> <?= CHtml::link(Yii::t('Groups', 'Delete group'), array('confirm', 'id' => $model->id)) ?><br />
	<?php endif; ?>
	</strong>
	<strong><?= CHtml::image(Yii::app()->baseUrl.'/images/friends.png', 'leave', array('class' => 'favicon_image')) ?> <?= CHtml::link(Yii::t('Groups', 'Leave group'), array('leave', 'id' => $model->id)) ?></strong><br />
	<strong><?= Theme::icon(Theme::ICON_FRIENDS, 'members') ?> <?= CHtml::link(Yii::t('Groups', 'Members'), array('members', 'id' => $model->id)) ?></strong><br />
</div>

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider' => $topics,
	'itemView' => '../topic/_topic',
	'template' => '{items}'.PHP_EOL.'{pager}',
	'pager' => array('class' => 'CPager'),
	'emptyText' => CHtml::tag('div', array('class' => 'text'), Yii::t('Publics', 'No topics created yet')),
)) ?>

<div class="blue_block">
	<?= Theme::icon(Theme::ICON_ADD) ?> <?= CHtml::link(Yii::t('Groups', 'Start new topic'), array('createTopic', 'id' => $model->id)) ?>
</div>