8000 [WebProfilerBundle] Add clickable entry view to debug toolbar · symfony/symfony@1c6152e · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c6152e

Browse files
PhilETaylornicolas-grekas
authored andcommitted
[WebProfilerBundle] Add clickable entry view to debug toolbar
1 parent ff361c8 commit 1c6152e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/Symfony/Bundle/WebProfilerBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

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

1011
6.1
1112
---

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/twig.html.twig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@
4646
{% endset %}
4747

4848
{% set text %}
49+
{% set template = collector.templates|keys|first %}
50+
{% set file = collector.templatePaths[template]|default(false) %}
51+
{% set link = file ? file|file_link(1) : false %}
52+
<div class="sf-toolbar-info-piece">
53+
<b>Entry View</b>
54+
<span>
55+
{% if link %}
56+
<a href="{{ link }}" title="{{ file }}" class="stretched-link">
57+
{{ template }}
58+
</a>
59+
{% else %}
60+
{{ template }}
61+
{% endif %}
62+
</span>
63+
</div>
4964
<div class="sf-toolbar-info-piece">
5065
<b>Render Time</b>
5166
<span>{{ time }} ms</span>

0 commit comments

Comments
 (0)
0