mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #30750
[Bug 1510421] [NEW] Better support for 3rd party blocktype icons in Mahara 15.10+
Public bug reported:
As discussed in the Mahara dev meeting. With the new bootstrap themes,
Mahara core blocktypes now use fontawesome for their icons. Consequently
the template that displays each block in the block picker, is no longer
using the old thumb.png or get_icon() mtehods to get the block's icon
and display it. Instead, it just has a <span> with a class
"icon-{blocktype.name}":
https://git.mahara.org/mahara/mahara/blob/master/htdocs/theme/raw/templates/view/blocktypelist.tpl
These are then mapped to fontawesome classes here:
https://git.mahara.org/mahara/mahara/blob/master/htdocs/theme/raw/sass/typography/_icons.scss#L21
It would make sense for us to support the old methods, and we could make
the system do this automatically, with some logic in blocktypelist.tpl
and/or in htdocs/blocktype/lib.php
For now, the workaround is to create a style.css file for the block
(under the block's own theme directory) and define the class in there,
like this example from the clippy block: https://github.com/agwells
/maharacontrib-blocktype-
clippy/blob/master/theme/raw/static/style/style.css
.icon-clippy::before {
content: url(\../images/thumb.png);
}
** Affects: mahara
Importance: High
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Affects: mahara/15.10
Importance: High
Assignee: Aaron Wells (u-aaronw)
Status: Confirmed
** Affects: mahara/16.04
Importance: High
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Changed in: mahara
Status: New => In Progress
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Also affects: mahara/16.04
Importance: Undecided
Status: In Progress
** Changed in: mahara/15.10
Status: New => Confirmed
** Changed in: mahara/16.04
Importance: Undecided => High
** Changed in: mahara/15.10
Importance: Undecided => High
** Changed in: mahara/16.04
Milestone: None => 16.04.0
** Changed in: mahara/15.10
Milestone: None => 15.10.1
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1510421
Title:
Better support for 3rd party blocktype icons in Mahara 15.10+
Status in Mahara:
In Progress
Status in Mahara 15.10 series:
Confirmed
Status in Mahara 16.04 series:
In Progress
Bug description:
As discussed in the Mahara dev meeting. With the new bootstrap themes,
Mahara core blocktypes now use fontawesome for their icons.
Consequently the template that displays each block in the block
picker, is no longer using the old thumb.png or get_icon() mtehods to
get the block's icon and display it. Instead, it just has a <span>
with a class "icon-{blocktype.name}":
https://git.mahara.org/mahara/mahara/blob/master/htdocs/theme/raw/templates/view/blocktypelist.tpl
These are then mapped to fontawesome classes here:
https://git.mahara.org/mahara/mahara/blob/master/htdocs/theme/raw/sass/typography/_icons.scss#L21
It would make sense for us to support the old methods, and we could
make the system do this automatically, with some logic in
blocktypelist.tpl and/or in htdocs/blocktype/lib.php
For now, the workaround is to create a style.css file for the block
(under the block's own theme directory) and define the class in there,
like this example from the clippy block: https://github.com/agwells
/maharacontrib-blocktype-
clippy/blob/master/theme/raw/static/style/style.css
.icon-clippy::before {
content: url(\../images/thumb.png);
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1510421/+subscriptions
Follow ups
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Kristina Hoeppner, 2016-04-29
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Aaron Wells, 2016-01-11
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Robert Lyon, 2015-11-27
-
[Bug 1510421] A change has been merged
From: Mahara Bot, 2015-11-25
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Robert Lyon, 2015-11-25
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Robert Lyon, 2015-11-24
-
[Bug 1510421] A patch has been submitted for review
From: Mahara Bot, 2015-11-24
-
[Bug 1510421] A change has been merged
From: Mahara Bot, 2015-11-24
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Aaron Wells, 2015-11-23
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Aaron Wells, 2015-11-23
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Gregor Anželj, 2015-10-31
-
[Bug 1510421] Re: Better support for 3rd party blocktype icons in Mahara 15.10+
From: Kristina Hoeppner, 2015-10-27