Portal: Added TWIG hooks for logo overloading in the navigation menu.

SVN:trunk[4763]
This commit is contained in:
Guillaume Lajarige
2017-06-20 09:54:02 +00:00
parent 2693e81bad
commit 51519a3659

View File

@@ -126,13 +126,15 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand pull-right" href="{{ app.url_generator.generate('p_home') }}"> {% block pNavigationTopMenuLogo %}
{% if app['combodo.portal.instance.conf'].properties.logo is not null %} <a class="navbar-brand pull-right" href="{{ app.url_generator.generate('p_home') }}">
<img src="{{ app['combodo.portal.instance.conf'].properties.logo }}" alt="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}" /> {% if app['combodo.portal.instance.conf'].properties.logo is not null %}
{% else %} <img src="{{ app['combodo.portal.instance.conf'].properties.logo }}" alt="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}" />
iTop {% else %}
{% endif %} iTop
</a> {% endif %}
</a>
{% endblock %}
<p class="navbar-text"> <p class="navbar-text">
<a class="navbar-link user_infos" href="{{ app.url_generator.generate('p_user_profile_brick') }}"> <a class="navbar-link user_infos" href="{{ app.url_generator.generate('p_user_profile_brick') }}">
<span class="user_photo" style="background-image: url('{{ sUserPhotoUrl }}');"></span> <span class="user_photo" style="background-image: url('{{ sUserPhotoUrl }}');"></span>
@@ -235,13 +237,15 @@
</div> </div>
{% if app['combodo.portal.instance.conf'].properties.logo is not null %} {% if app['combodo.portal.instance.conf'].properties.logo is not null %}
<div class="logo"> <div class="logo">
{# This is a debug helper to know in which screen size we are #} {% block pNavigationSideMenuLogo %}
{% if app['debug'] %} {# This is a debug helper to know in which screen size we are #}
<div style="position: fixed; bottom: 0px; left: 0px; z-index: 9999;">Debug : Taille <span class="hidden-sm hidden-md hidden-lg">XS</span><span class="hidden-xs hidden-md hidden-lg">SM</span><span class="hidden-xs hidden-sm hidden-lg">MD</span><span class="hidden-xs hidden-sm hidden-md">LG</span></div> {% if app['debug'] %}
{% endif %} <div style="position: fixed; bottom: 0px; left: 0px; z-index: 9999;">Debug : Taille <span class="hidden-sm hidden-md hidden-lg">XS</span><span class="hidden-xs hidden-md hidden-lg">SM</span><span class="hidden-xs hidden-sm hidden-lg">MD</span><span class="hidden-xs hidden-sm hidden-md">LG</span></div>
<a href="{{ app.url_generator.generate('p_home') }}" title="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}"> {% endif %}
<img src="{{ app['combodo.portal.instance.conf'].properties.logo }}" alt="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}" /> <a href="{{ app.url_generator.generate('p_home') }}" title="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}">
</a> <img src="{{ app['combodo.portal.instance.conf'].properties.logo }}" alt="{{ app['combodo.portal.instance.conf'].properties.name|dict_s }}" />
</a>
{% endblock %}
</div> </div>
{% endif %} {% endif %}
</nav> </nav>