help: Fix issues with new version indicator

This commit is contained in:
James Valleroy committed 2017-01-17 12:29:33 -05:00
1 parent 7fdb09abfd
commit c7b4bb7cc8
3 files changed
+10 -5

No files matched your search

+3 -2
View File
@@ -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)
@@ -75,10 +75,13 @@
<p style='margin-top:30px'>
{% 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 %}
</p>
{% endblock %}