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

Allow fontawsome icons as menu items #5205

Closed
moreamazingnick opened this issue Apr 2, 2024 · 0 comments · Fixed by #5278
Closed

Allow fontawsome icons as menu items #5205

moreamazingnick opened this issue Apr 2, 2024 · 0 comments · Fixed by #5278
Assignees
Labels
area/framework Affects third party integration/development area/ui Affects the user interface enhancement New feature or improvement
Milestone

Comments

@moreamazingnick
Copy link
Contributor

moreamazingnick commented Apr 2, 2024

I would like to use fontawsome icons as menu items.

My first idea would be patching url.php
https://github.com/Icinga/icingaweb2/blob/main/library/Icinga/Web/View/helpers/url.php

and do something like this:
if the icon name starts with 'fa-' it has to be a fontawsome name and the class will be provides differently.

...
    if(strpos($img,"fa-") === 0){
        if (isset($properties['class'])) {
            $properties['class'] .= ' icon ' . $img . " fa";
        } else {
            $properties['class'] = 'icon ' . $img. " fa";;
        }
    }else{
        if (isset($properties['class'])) {
            $properties['class'] .= ' icon-' . $img;
        } else {
            $properties['class'] = 'icon-' . $img;
        }
    }
...

I am happy to provide a pull request...

Thanks in advance and
best Regards
Nicolas

@lippserd lippserd added the dev-call Issues and Pull Requests to be discussed at the Dev Call. label Sep 13, 2024
@nilmerg nilmerg linked a pull request Oct 10, 2024 that will close this issue
@nilmerg nilmerg added enhancement New feature or improvement area/framework Affects third party integration/development area/ui Affects the user interface and removed dev-call Issues and Pull Requests to be discussed at the Dev Call. labels Oct 10, 2024
@nilmerg nilmerg added this to the 2.12.2 milestone Oct 10, 2024
@nilmerg nilmerg self-assigned this Oct 10, 2024
@nilmerg nilmerg changed the title Feature Request / allow fontawsome icons as menu items Allow fontawsome icons as menu items Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/framework Affects third party integration/development area/ui Affects the user interface enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants