Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons feature #60

Closed
mklemarczyk opened this issue Jun 14, 2015 · 1 comment
Closed

Icons feature #60

mklemarczyk opened this issue Jun 14, 2015 · 1 comment

Comments

@mklemarczyk
Copy link

Can you provide simple way to insert a bootstrap glyphicon?

Putting long string "" in label is very unprofessional.

Take a look at these code:

            <?= Html::a('<span class="glyphicon glyphicon-print"></span> ' . Yii::t('app', 'Print'), ['print'], ['class' => 'btn']); ?>
            <?= ButtonDropdown::widget([
                'label' => '<span class="glyphicon glyphicon-print"></span> ' . Yii::t('app', 'Print'),
                'encodeLabel' => false,
                'dropdown' => [
                    'items' => [
                        ['label' => Yii::t('app', 'User')],
                        ['label' => '<span class="glyphicon glyphicon-envelope"></span> ' . Yii::t('app', 'Emails'), 'url' => ['print-emails']],
                        ['label' => '<span class="glyphicon glyphicon-home"></span> ' . Yii::t('app', 'Addresses'), 'url' => ['print-addresses']],
                        ['label' => '<span class="glyphicon glyphicon-earphone"></span> ' . Yii::t('app', 'Telephones'), 'url' => ['print-telephones']],
                    ],
                ],
                'options' => [
                    'class' => 'btn btn-info',
                ],
            ]); ?>
@klimov-paul
Copy link
Member

Duplicates #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants