mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
help: Add indicator for new plinth version available
This commit is contained in:
parent
b9954f4c79
commit
7fdb09abfd
@ -24,7 +24,7 @@ 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__
|
||||
|
||||
|
||||
@ -50,9 +50,12 @@ def index(request):
|
||||
@public
|
||||
def about(request):
|
||||
"""Serve the about page"""
|
||||
cache = Cache()
|
||||
plinth = cache['plinth']
|
||||
context = {
|
||||
'title': _('About {box_name}').format(box_name=_(cfg.box_name)),
|
||||
'version': __version__
|
||||
'version': __version__,
|
||||
'new_version': plinth.candidate.is_installed
|
||||
}
|
||||
return TemplateResponse(request, 'help_about.html', context)
|
||||
|
||||
|
||||
@ -75,6 +75,9 @@
|
||||
<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 %}
|
||||
</p>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user