Skip to content

Commit

Permalink
[WebProfilerBundle] Add clickable entry view to debug toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilETaylor authored and nicolas-grekas committed Apr 3, 2023
1 parent ff361c8 commit 1c6152e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CHANGELOG

* Add a "role=img" and an explicit title in the .svg file used by the web debug toolbar
to improve accessibility with screen readers for blind users
* Add a clickable link to the entry view twig file in the toolbar

6.1
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@
{% endset %}

{% set text %}
{% set template = collector.templates|keys|first %}
{% set file = collector.templatePaths[template]|default(false) %}
{% set link = file ? file|file_link(1) : false %}
<div class="sf-toolbar-info-piece">
<b>Entry View</b>
<span>
{% if link %}
<a href="{{ link }}" title="{{ file }}" class="stretched-link">
{{ template }}
</a>
{% else %}
{{ template }}
{% endif %}
</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Render Time</b>
<span>{{ time }} ms</span>
Expand Down

0 comments on commit 1c6152e

Please sign in to comment.