Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 576e25f

Browse files
committed
feature EasyCorp#919 Show the installed EasyAdmin version in the toolbar and profiler (javiereguiluz)
This PR was squashed before being merged into the master branch (closes EasyCorp#919). Discussion ---------- Show the installed EasyAdmin version in the toolbar and profiler It's a minor thing, but I think we should have done this a while ago. This helps people know exactly which version are using and whether the reported issue has been fixed in their versions or not. The idea is to display the version in the toolbar... ![toolbar_version](https://cloud.githubusercontent.com/assets/73419/13264606/376b10e4-da6f-11e5-8e40-d81c8b874ddb.png) ... and in the profiler: ![symfony_profiler](https://cloud.githubusercontent.com/assets/73419/13264663/87048036-da6f-11e5-842e-3e9a92b1fae4.png) Commits ------- e80f417 Show the installed EasyAdmin version in the toolbar and profiler
2 parents 8478e31 + e80f417 commit 576e25f

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

EasyAdminBundle.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*/
2323
class EasyAdminBundle extends Bundle
2424
{
25+
const VERSION = '1.11.6-DEV';
26+
2527
public function build(ContainerBuilder $container)
2628
{
2729
$container->addCompilerPass(new EasyAdminConfigurationPass(), PassConfig::TYPE_BEFORE_REMOVING);

Resources/views/data_collector/easyadmin.html.twig

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212

1313
{% set text %}
1414
<div class="sf-toolbar-info-piece">
15-
<b>EasyAdmin</b>
15+
<b>EasyAdmin version</b>
16+
<span class="sf-toolbar-status">{{ constant('JavierEguiluz\\Bundle\\EasyAdminBundle\\EasyAdminBundle::VERSION') }}</span>
1617
</div>
1718
<div class="sf-toolbar-info-piece">
1819
<b>Managed entities</b>
19-
<span>{{ collector.numEntities }}</span>
20+
<span class="sf-toolbar-status">{{ collector.numEntities }}</span>
2021
</div>
2122
{% endset %}
2223

2324
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': true }) }}
2425
{% endblock %}
2526

26-
2727
{% block menu %}
2828
<span class="label status-{{ not collector.requestParameters ? 'disabled' }}">
2929
<span class="icon">{{ include('@EasyAdmin/data_collector/icon.svg.twig', { height: 32 }) }}</span>
@@ -34,7 +34,7 @@
3434
{% block panel %}
3535
{% set profiler_markup_version = profiler_markup_version|default(1) %}
3636

37-
<h2>EasyAdmin</h2>
37+
<h2>EasyAdmin <small>({{ constant('JavierEguiluz\\Bundle\\EasyAdminBundle\\EasyAdminBundle::VERSION') }})</small></h2>
3838

3939
{% if profiler_markup_version == 1 %}
4040

@@ -117,4 +117,13 @@
117117
</div>
118118
</div>
119119
</div>
120+
121+
<h3>Additional Resources</h3>
122+
123+
<ul>
124+
<li><a href="https://github.com/javiereguiluz/EasyAdminBundle/issues">Report an issue</a></li>
125+
<li><a href="https://github.com/javiereguiluz/EasyAdminBundle#documentation">Read documentation</a></li>
126+
<li><a href="https://github.com/javiereguiluz/EasyAdminBundle">Project homepage</a></li>
127+
</ul>
128+
120129
{% endblock %}

0 commit comments

Comments
 (0)