mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16237] fix errors
PHPBB3-16237
This commit is contained in:
@@ -164,7 +164,7 @@ class icon extends \Twig\Extension\AbstractExtension
|
||||
'CLASSES' => (string) $classes,
|
||||
'ICON' => (string) $icon,
|
||||
'SOURCE' => (string) $source,
|
||||
'TITLE' => (string) $title,
|
||||
'TITLE' => (string) $title && $type === 'svg' ? unique_id() : '',
|
||||
'VIEW_BOX' => (string) $view_box,
|
||||
'S_HIDDEN' => (bool) $hidden,
|
||||
]);
|
||||
@@ -258,7 +258,7 @@ class icon extends \Twig\Extension\AbstractExtension
|
||||
* 'lock': topicrow.S_TOPIC_LOCKED,
|
||||
* 'fire': topicrow.S_TOPIC_HOT,
|
||||
* 'file': true,
|
||||
* }, 'MY_TITLE', true) }}
|
||||
* }, lang('MY_TITLE'), true) }}
|
||||
*
|
||||
* @param array $icons Array of icons and their booleans
|
||||
* @return string The first 'true' icon
|
||||
|
@@ -1,3 +1,4 @@
|
||||
{% apply spaceless %}
|
||||
<i class="iconify o-icon-src-{{ SOURCE }} o-icon{{ CLASSES ? ' ' ~ CLASSES }}"{% if S_HIDDEN %}{% if TITLE %} title="{{ TITLE }}"{% endif %} aria-hidden="true"{% endif %} data-icon="{{ ICON }}" data-inline="true"{{ ATTRIBUTES }}></i>{% if TITLE %}<span{% if S_HIDDEN %} class="sr-only"{% endif %}>{{ lang(TITLE) }}</span>{% endif %}
|
||||
<i class="iconify o-icon-src-{{ SOURCE }} o-icon{{ CLASSES ? ' ' ~ CLASSES }}"{% if S_HIDDEN %}{% if TITLE %} title="{{ TITLE }}"{% endif %} aria-hidden="true"{% endif %} data-icon="{{ ICON }}" data-inline="true"{{ ATTRIBUTES }}></i>
|
||||
{% if TITLE %}<span{% if S_HIDDEN %} class="sr-only"{% endif %}>{{ TITLE }}</span>{% endif %}
|
||||
{% endapply %}
|
||||
|
@@ -1,6 +1,4 @@
|
||||
{% apply spaceless %}
|
||||
{% set TITLE_ID = TITLE ? TITLE|lower|replace({' ': '_'}) ~ '-' ~ random() %}
|
||||
|
||||
<svg class="o-icon o-icon-svg svg-{{ ICON ~ (CLASSES ? ' ' ~ CLASSES) }}" xmlns="http://www.w3.org/2000/svg" viewBox="{{ VIEW_BOX }}"{% if TITLE %}{% if S_HIDDEN %} aria-hidden="true"{% endif %} aria-labelledby="{{ TITLE_ID }}"{% endif %} role="img"{{ ATTRIBUTES }}>
|
||||
{% if TITLE %}<title id="{{ TITLE_ID }}">{{ TITLE }}</title>{% endif %}
|
||||
|
||||
|
@@ -87,14 +87,14 @@
|
||||
<!-- IF U_ACP -->
|
||||
<li data-last-responsive="true">
|
||||
<a href="{U_ACP}" title="{L_ACP}" role="menuitem">
|
||||
{{ Icon('iconify', 'fa:cogs', '', false) }}<span>{{ lang('ACP_SHORT') }}</span>
|
||||
{{ Icon('iconify', 'fa:cogs', lang('ACP_SHORT'), false) }}
|
||||
</a>
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_MCP -->
|
||||
<li data-last-responsive="true">
|
||||
<a href="{U_MCP}" title="{L_MCP}" role="menuitem">
|
||||
{{ Icon('iconify', 'fa:gavel', '', false) }}<span>{{ lang('MCP_SHORT') }}</span>
|
||||
{{ Icon('iconify', 'fa:gavel', lang('MCP_SHORT'), false) }}
|
||||
</a>
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
|
Reference in New Issue
Block a user