N°8455 - Fix portal environment banner displaying poorly

This commit is contained in:
Stephen Abello
2025-08-13 16:48:33 +02:00
parent f5b86ff4d9
commit a975f67bd5
4 changed files with 23 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@@ -37,17 +37,6 @@ footer{
text-align: center;
}
/* Environment banner */
#envbanner{
position: relative;
z-index: 10;
padding: 5px 15px;
text-align: center;
}
#envbanner > button{
margin-left: 5px;
color: #000;
}
/* Topbar */
#topbar .navbar-header{

View File

@@ -10,7 +10,17 @@
{# session messages #}
<section class="ipb-page--session-messages">
{% include template('session_messages') %}
{% block pEnvBannerWrapper %}
{% if app['combodo.current_environment'] != 'production' %}
<div id="envbanner" class="ipb-alert alert alert-danger" role="alert">
{{ 'Portal:EnvironmentBanner:Title'|dict_format( app['combodo.current_environment']|upper )|raw }}
<button class="ipb-button ipb-is-regular ipb-is-default" type="button" onclick="window;location.href='{{ app['url_generator'].generate('p_home', {'switch_env': 'production'}) }}'">
{{ 'Portal:EnvironmentBanner:GoToProduction'|dict_s|raw }}
</button>
</div>
{% endif %}
{% endblock %}
{% include template('session_messages') %}
</section>
{# tiles wrapper #}

View File

@@ -178,16 +178,6 @@
</head>
<body class="ipb-body {% block pPageBodyClass %}{% endblock %}" data-gui-type="portal">
{% block pPageBodyWrapper %}
{% block pEnvBannerWrapper %}
{% if app['combodo.current_environment'] != 'production' %}
<div id="envbanner" class="ipb-alert alert alert-danger" role="alert">
{{ 'Portal:EnvironmentBanner:Title'|dict_format( app['combodo.current_environment']|upper )|raw }}
<button type="button" onclick="window;location.href='{{ app['url_generator'].generate('p_home', {'switch_env': 'production'}) }}'">
{{ 'Portal:EnvironmentBanner:GoToProduction'|dict_s|raw }}
</button>
</div>
{% endif %}
{% endblock %}
{% block pNavigationWrapper %}
{% block pNavigationSideMenuWrapper %}
@@ -199,6 +189,17 @@
{% block pMainWrapper %}
<div class="ipb-page--main-wrapper">
<section class="ipb-page--session-messages" id="main-session-messages">
{% block pEnvBannerWrapper %}
{% if app['combodo.current_environment'] != 'production' %}
<div id="envbanner" class="ipb-alert alert alert-danger" role="alert">
{{ 'Portal:EnvironmentBanner:Title'|dict_format( app['combodo.current_environment']|upper )|raw }}
<button class="ipb-button ipb-is-regular ipb-is-default" type="button" onclick="window;location.href='{{ app['url_generator'].generate('p_home', {'switch_env': 'production'}) }}'">
{{ 'Portal:EnvironmentBanner:GoToProduction'|dict_s|raw }}
</button>
</div>
{% endif %}
{% endblock %}
{% include template('session_messages') %}
</section>
<section class="ipb-page--main-header" id="main-header">