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

File size: 964B
<div class="post">
	<div class="inline_actions">
		<?php if ($data->user_id != $this->webUser->id): ?>
			<?php if (Yii::app()->user->checkAccess('groups.member.purgeMember') || ($data->group->creator_id == $this->webUser->id || ($data->group->checkAccess('administrator') && $data->role != 'administrator'))): ?>
				<?= CHtml::link(Theme::icon(Theme::ICON_IDELETE), array('purgeMember', 'id' => $data->group_id, 'user' => $data->user_id)) ?>
			<?php endif; ?>
		<?php endif; ?>
	</div>
	<?= Theme::icon(Theme::ICON_USER, 'member') ?> <?= Theme::username($data->user) ?><br />
	<!-- Reader role -->
	<?php if ($data->role == GroupMember::ADMINISTRATOR): ?>
		<?= CHtml::tag('span', array('style' => 'color: red'), Yii::t('Publics', '[Administrator]')); ?>
	<?php elseif ($data->group->creator_id == $data->user_id): ?>
		<?= CHtml::tag('span', array('style' => 'color: red'), Yii::t('Publics', '[Creator]')); ?>
	<?php endif; ?>
	<!-- Reader role off -->
</div>