Skip to content

Commit

Permalink
Fix Subscribe button
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed May 20, 2015
1 parent b6982e0 commit 510d92a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/ticket/_leftBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
</div>
<?php endif; ?>
<?php $box->beginFooter(); ?>
<?php if (is_array($model->watchers) && array_keys(Yii::$app->user->identity->id, $model->watchers)) : ?>
<?php if (array_key_exists(Yii::$app->user->identity->id, $model->watchers)) : ?>
<?= Html::a('<i class="fa fa-eye-slash"></i>&nbsp;&nbsp;' . Yii::t('app', 'Unsubscribe'), ['unsubscribe', 'id' => $model->id], ['class' => 'btn btn-default btn-block']) ?>
<?php else : ?>
<?= Html::a('<i class="fa fa-eye"></i>&nbsp;&nbsp;' . Yii::t('app', 'Subscribe'), ['subscribe', 'id' => $model->id], ['class' => 'btn btn-default btn-block']) ?>
Expand Down

0 comments on commit 510d92a

Please sign in to comment.