Skip to content

Commit

Permalink
feat: display packages versions in the side bar
Browse files Browse the repository at this point in the history
* display configured packages version at the bottom of the side bar
* closes inveniosoftware/invenio-app-rdm#2838
  • Loading branch information
ntarocco authored and kpsherva committed Sep 26, 2024
1 parent 436ffbd commit 136cbae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions invenio_administration/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@

ADMINISTRATION_THEME_BASE_TEMPLATE = "invenio_theme/page.html"
"""Administration base template."""

ADMINISTRATION_DISPLAY_VERSIONS = []
"""Display packages versions in the admin panel side bar.
Accepts a list of tuples in the format (package name, version).
Example: [("my-app", "v1.3.2")]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@
{% block admin_sidenav_menu %}
{% include "invenio_administration/sidebar/sidenav.html" %}
{% endblock %}

<div class="ui divider" aria-hidden="true"></div>

{% if config.ADMINISTRATION_DISPLAY_VERSIONS %}
<div class="ui relaxed list ml-10 versions">
{% for package_name, package_version in config.ADMINISTRATION_DISPLAY_VERSIONS %}
<div class="item">
<a class="ui grey tiny label">
{{ package_name }}
<div class="detail">{{ package_version }}</div>
</a>
</div>
{% endfor %}
</div>
{% endif %}

</section>

{% endblock admin_sidenav %}
Expand Down

0 comments on commit 136cbae

Please sign in to comment.