Skip to content

Commit

Permalink
UCPKN-3056: Remove defaults from session template icon macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
kp77 committed May 27, 2024
1 parent 3a8f0ac commit 737e683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion templates/agenda/oe-agenda-session--oe-break.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% extends "@oe_whitelabel/agenda/oe-agenda-session--oe-default.html.twig" %}

{% block hours %}
{{ _self.icon() }}
{{ _self.icon('clock', 'xs', create_attribute().addClass(['mb-1', 'me-2'])) }}
<span class="text-muted">{{ content.oe_session_hours|field_value }}</span>
{% endblock %}

Expand Down
6 changes: 3 additions & 3 deletions templates/agenda/oe-agenda-session--oe-default.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
* @see ./modules/contrib/oe_agenda/templates/oe-agenda-session.html.twig
*/
#}
{% macro icon(name = 'clock', size = 'xs', attributes) %}
{% macro icon(name, size, attributes) %}
{{ pattern('icon', {
name: name,
path: bcl_icon_path,
size: size,
attributes: attributes|default(create_attribute().addClass(['mb-1', 'me-2']))
attributes: attributes,
}) }}
{% endmacro %}

<div{{ attributes.addClass('row') }}>
<div class="col-xxl-2 col-xl-3 col-lg-3 mb-3 mb-lg-0">
{% block hours %}
{{ _self.icon() }}
{{ _self.icon('clock', 'xs', create_attribute().addClass(['mb-1', 'me-2'])) }}
<span>{{ content.oe_session_hours|field_value }}</span>
{% endblock %}
</div>
Expand Down

0 comments on commit 737e683

Please sign in to comment.