Fix per-project deprecation badges
I2498f00a6c863d078a70289a655b0aa3958325ed changed the badge shown at the top of documentation pages which describes the state of the release of the documentation currently being viewed. However the unfortunately release-switcher dropdown it introduced into deprecated_badge.tmpl had the side-effect of affecting the badge.html which is dynamically included in project documentation by some Javascript in theme/openstackdocs/layout.html within the openstackdocstheme repository, and the new release switcher was only designed to work with openstack-manuals, not with any other projects. This broke the badge for all releases (www/$RELEASE/badge.html), excluding www/latest/ which has a hard-coded badge.html. This was missed during testing because the dynamic inclusion mechanism is hardcoded to retrieve the badge from https://docs.openstack.org rather than any local repository. For a quick fix, reintroduce the old badge template as www/templates/project_deprecated_badge.tmpl and change all the per-project badges to use this. Later we can investigate the possibility of enhancing this per-project badge so that it provides release-switching functionality like the badge currently in openstack-manuals. Change-Id: I53c4b35e31bcdda16ffd50f9a8a26c773c8d3574
This commit is contained in:
parent
a5e33228b8
commit
d175b76864
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
@ -1 +1 @@
|
|||||||
{% include 'templates/deprecated_badge.tmpl' %}
|
{% include 'templates/project_deprecated_badge.tmpl' %}
|
44
www/templates/project_deprecated_badge.tmpl
Normal file
44
www/templates/project_deprecated_badge.tmpl
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{# -*- mode: html -*- #}
|
||||||
|
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
{# reason to not use the CSSDIR its because introduces a relative path #}
|
||||||
|
{# not an absolute, so when its included on docthemes, its tried to include the css #}
|
||||||
|
{# from a wrong path instead of the right one #}
|
||||||
|
|
||||||
|
<link href="https://docs.openstack.org/common/css/deprecated-badge.css" rel="stylesheet">
|
||||||
|
<script src="https://docs.openstack.org/common/js/deprecated-badge.js"></script>
|
||||||
|
|
||||||
|
<div id="deprecated-badge" class="deprecated-badge fixed
|
||||||
|
{% if SERIES == RELEASED_SERIES %}
|
||||||
|
deprecated-badge-current
|
||||||
|
{% else %}
|
||||||
|
deprecated-badge-{{ SERIES_INFO.status| lower }}
|
||||||
|
{% endif %}
|
||||||
|
">
|
||||||
|
<span id="deprecated-badge-close-button" title="close" class="deprecated-badge-close-button">x</span>
|
||||||
|
<div class="container">
|
||||||
|
{% if SERIES_INFO.status == 'obsolete' %}
|
||||||
|
<p class="deprecated-badge-left">
|
||||||
|
This release is no longer supported by the community. The current supported release is <a href="/{{RELEASED_SERIES}}/">{{RELEASED_SERIES.capitalize()}}.</a>
|
||||||
|
</p>
|
||||||
|
{% elif SERIES_INFO.status == 'EOL' %}
|
||||||
|
<p class="deprecated-badge-left">
|
||||||
|
This release is no longer supported by the community. The current supported release is <a href="/{{RELEASED_SERIES}}/">{{RELEASED_SERIES.capitalize()}}.</a>
|
||||||
|
</p>
|
||||||
|
{% elif SERIES == RELEASED_SERIES %}
|
||||||
|
<p class="deprecated-badge-left">
|
||||||
|
This is the current supported release.
|
||||||
|
</p>
|
||||||
|
{% elif SERIES_INFO.status == 'maintained' %}
|
||||||
|
<p class="deprecated-badge-left">
|
||||||
|
This is maintained, but <strong>not</strong> the current release. The current supported
|
||||||
|
release is <a href="/{{RELEASED_SERIES}}/">{{RELEASED_SERIES.capitalize()}}.</a>
|
||||||
|
</p>
|
||||||
|
{% elif SERIES_INFO.status == 'development' %}
|
||||||
|
<p class="deprecated-badge-left">
|
||||||
|
This release is under development. The current supported release is <a href="/{{RELEASED_SERIES}}/">{{RELEASED_SERIES.capitalize()}}.</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
<a href="#top" class="deprecated-badge-right"><i class="fa fa-chevron-up" aria-hidden="true"></i> Back to Top</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user