Skip to content

Commit

Permalink
add sylius version to the footer in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
gabiudrescu committed Sep 17, 2017
1 parent a04bfe8 commit ea5db83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ fos_rest:
rules:
- { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
- { path: '^/', stop: true }

twig:
globals:
app_meta:
version: !php/const:Sylius\Bundle\CoreBundle\Application\Kernel::VERSION
name: !php/const:Sylius\Bundle\CoreBundle\Application\Kernel::APP_NAME
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
{{ sonata_block_render_event('sylius.admin.layout.sidebar_down') }}
{% endblock %}

{% block footer %}
{{ 'sylius.ui.powered_by'|trans }} <a href="http://sylius.org" target="_blank">Sylius</a>.
{% block post_content %}
<div class="ui divider"></div>
{{ 'sylius.ui.powered_by'|trans }} <a href="http://sylius.org" target="_blank">{{ app_meta.name }} v{{ app_meta.version }}</a>
{% endblock %}

{% block javascripts %}
Expand Down
1 change: 1 addition & 0 deletions src/Sylius/Bundle/CoreBundle/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Kernel extends HttpKernel
public const MINOR_VERSION = '0';
public const RELEASE_VERSION = '0';
public const EXTRA_VERSION = '';
public const APP_NAME = 'Sylius';

/**
* {@inheritdoc}
Expand Down

0 comments on commit ea5db83

Please sign in to comment.