echo Html::a('<i class="fa fa-plus"></i> ' . Yii::t('MailModule.views_mail_show', 'Add user'), ['/mail/mail/add-user', 'id' => $message->id, 'ajax' => 1], array('class' => 'btn btn-info', 'data-target' => '#globalModal'));
    ?>

                    <?php 
    if (count($message->users) > 2 && $message->originator->id != Yii::$app->user->id) {
        ?>
                        <a class="btn btn-danger"
                           href="<?php 
        echo Url::to(['leave', 'id' => $message->id]);
        ?>
"><i
                                class="fa fa-sign-out"></i> <?php 
        echo Yii::t('MailModule.views_mail_show', "Leave discussion");
        ?>
                        </a>
                    <?php 
    }
    ?>
                </div>

                <?php 
    CActiveForm::end();
    ?>
            </div>
        <?php 
}
?>

    </div>
</div>