Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a808fa5

Browse filesBrowse files
committed
Tweaked the toolbar for Silex 2
1 parent ac63334 commit a808fa5
Copy full SHA for a808fa5

File tree

2 files changed

+33
-28
lines changed
Filter options

2 files changed

+33
-28
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
+32-27Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,22 @@
1919
{% endif %}
2020

2121
{% set icon %}
22-
{% if collector.symfonyState is defined %}
22+
{% if collector.applicationname %}
23+
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
24+
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
25+
{% elseif collector.symfonyState is defined %}
2326
<span class="sf-toolbar-label">
2427
{{ include('@WebProfiler/Icon/symfony.svg') }}
2528
</span>
2629
<span class="sf-toolbar-value">{{ collector.symfonyversion }}</span>
27-
{% elseif collector.applicationname %}
28-
<span class="sf-toolbar-label">{{ collector.applicationname }}</span>
29-
<span class="sf-toolbar-value">{{ collector.applicationversion }}</span>
3030
{% endif %}
3131
{% endset %}
3232

3333
{% set text %}
3434
{% if collector.applicationname %}
3535
<div class="sf-toolbar-info-piece">
36-
{{ collector.applicationname }} <b>{{ collector.applicationversion }}</b>
36+
<b>{{ collector.applicationname }}</b>
37+
<span>{{ collector.applicationversion }}</span>
3738
</div>
3839
{% endif %}
3940

@@ -88,19 +89,26 @@
8889
<span>{{ collector.sapiName }}</span>
8990
</div>
9091

92+
9193
{% if collector.symfonyversion is defined %}
9294
<div class="sf-toolbar-info-piece">
9395
<b>Resources</b>
9496
<span>
95-
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
96-
Read Symfony {{ collector.symfonyversion }} Docs
97-
</a>
97+
{% if 'Silex' == collector.applicationname %}
98+
<a href="http://silex.sensiolabs.org/documentation" rel="help">
99+
Read Silex Docs
100+
</a>
101+
{% else %}
102+
<a href="https://symfony.com/doc/{{ collector.symfonyversion }}/index.html" rel="help">
103+
Read Symfony {{ collector.symfonyversion }} Docs
104+
</a>
105+
{% endif %}
98106
</span>
99107
</div>
100108
{% endif %}
101109
{% endset %}
102110

103-
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: block_status }) }}
111+
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: true, name: 'config', status: block_status }) }}
104112
{% endblock %}
105113

106114
{% block menu %}
@@ -115,24 +123,21 @@
115123
{# this application is not the Symfony framework #}
116124
<h2>Project Configuration</h2>
117125

118-
<table>
119-
<tr>
120-
<th>Key</th>
121-
<th>Value</th>
122-
</tr>
123-
<tr>
124-
<th>Application name</th>
125-
<td>{{ collector.applicationname }}</td>
126-
</tr>
127-
<tr>
128-
<th>Application version</th>
129-
<td>{{ collector.applicationversion }}</td>
130-
</tr>
131-
<tr>
132-
<th>Based on</th>
133-
<td>Symfony {{ collector.symfonyversion }}</td>
134-
</tr>
135-
</table>
126+
<div class="metrics">
127+
<div class="metric">
128+
<span class="value">{{ collector.applicationname }}</span>
129+
<span class="label">Application name</span>
130+
</div>
131+
132+
<div class="metric">
133+
<span class="value">{{ collector.applicationversion }}</span>
134+
<span class="label">Application version</span>
135+
</div>
136+
</div>
137+
138+
<p>
139+
Based on <a class="text-bold" href="https://symfony.com">Symfony {{ collector.symfonyversion }}</a>
140+
</p>
136141
{% else %}
137142
<h2>Symfony Configuration</h2>
138143

‎src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base.html.twig
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</style>
1313
{% endblock %}
1414
</head>
15-
<body id="{% block body_id %}{{ app.request.query.get('panel', '')|lower }}{% endblock %}">
15+
<body id="{% block body_id %}{{ app.request.query.get('panel', '')|default('')|lower }}{% endblock %}">
1616
{% block body '' %}
1717
</body>
1818
</html>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.