diff --git a/CHANGELOG.md b/CHANGELOG.md index 82c5b5800..2466f25dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - Added JS license web labels for LibreJS. - Added basic configuration form for Minetest server. - Added Domain Name Server (BIND) module. +- help: Added indicator for new plinth version available. ### Changed - frontpage: Show app logos instead of generic icons. diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py index d73140a92..0c3c81d8d 100644 --- a/plinth/modules/help/help.py +++ b/plinth/modules/help/help.py @@ -20,11 +20,12 @@ Help module for Plinth. """ import os +from apt.cache import Cache from django.http import Http404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _, ugettext_lazy from stronghold.decorators import public -from apt.cache import Cache + from plinth import cfg, __version__ @@ -55,7 +56,7 @@ def about(request): context = { 'title': _('About {box_name}').format(box_name=_(cfg.box_name)), 'version': __version__, - 'new_version': plinth.candidate.is_installed + 'new_version': not plinth.candidate.is_installed } return TemplateResponse(request, 'help_about.html', context) diff --git a/plinth/modules/help/templates/help_about.html b/plinth/modules/help/templates/help_about.html index cbc31427e..da8c3c5f5 100644 --- a/plinth/modules/help/templates/help_about.html +++ b/plinth/modules/help/templates/help_about.html @@ -75,10 +75,13 @@

{% blocktrans trimmed %} You are running Plinth version {{ version }}. - {% if new_version %} - There is a new version available. - {% end if %} {% endblocktrans %} + + {% if new_version %} + {% blocktrans trimmed %} + There is a new version available. + {% endblocktrans %} + {% endif %}

{% endblock %}