View file vkclone-0.0.1/protected/modules/gallery/views/album/index.php

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

<?php if ($album->user->id != Yii::app()->user->record->id): ?>
<div class="blue_block">
	<?= Theme::icon(Theme::ICON_USER) ?> <strong><?= Theme::username($album->user) ?></strong>
</div>
<?php else: ?>
<div class="blue_block">
	<strong>← <?= CHtml::link(Yii::t('Gallery', 'Back to my albums'), array('default/myAlbums')) ?></strong>
</div>
<?php endif; ?>


<?php if ($album->user_id == Yii::app()->user->record->id): ?>
	<div class="blue_block">
		<?= Theme::icon(Theme::ICON_PHOTOCAMERA, 'upload') ?> <strong><?= CHtml::link(Yii::t('Gallery', 'Upload photo'), array('default/uploadPhoto', 'album_id' => $album->id)) ?></strong><br />
		<?= Theme::icon(Theme::ICON_EDIT) ?> <strong><?= CHtml::link(Yii::t('Gallery', 'Album settings'), array('update', 'id' => $album->id)) ?></strong><br />
		<?= Theme::icon(Theme::ICON_DELETE) ?> <strong><?= CHtml::link(Yii::t('Gallery', 'Delete album'), array('confirm', 'id' => $album->id)) ?></strong><br />
	</div>
<?php endif; ?>

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider' => $photos,
	'itemView' => '../photo/_photo',
	'template' => "{items}\n{pager}",
	'emptyText' => CHtml::tag('div', array('class' => 'text'), Yii::t('Gallery', 'No photos found')),
)); ?>