mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
help: Fix issues with new version indicator
This commit is contained in:
parent
7fdb09abfd
commit
c7b4bb7cc8
@ -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.
|
||||
|
||||
@ -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 %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user