Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

footer: fix missing version #2392

Merged
merged 1 commit into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rero_ils/modules/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
from .utils import set_user_name
from ..filter import empty_data, format_date_filter, get_record_by_ref, \
jsondumps, node_assets, text_to_id, to_pretty_json
from ..version import __version__


class REROILSAPP(object):
Expand Down Expand Up @@ -89,6 +90,7 @@ def __init__(self, app=None):
app.add_template_filter(jsondumps, name='jsondumps')
app.add_template_filter(empty_data, name='empty_data')
app.jinja_env.add_extension('jinja2.ext.do')
app.jinja_env.globals['version'] = __version__
self.register_signals(app)

def init_app(self, app):
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/theme/templates/rero_ils/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{{ _('Developed by') }}
<a href="https://www.rero.ch" target="_blank">RERO</a>
{{ _('using') }}
<a href="https://github.com/rero/rero-ils" target="_blank">RERO ILS v{{version}}</a> &amp;
<a href="https://github.com/rero/rero-ils" target="_blank">RERO ILS v{{ version }}</a> &amp;
<a href="https://inveniosoftware.org" target="_blank">Invenio</a>
</p>
</div>
Expand Down
3 changes: 0 additions & 3 deletions rero_ils/theme/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

from .menus import init_menu_lang, init_menu_profile, init_menu_tools
from ..permissions import can_access_professional_view
from ..version import __version__

blueprint = Blueprint(
'rero_ils',
Expand Down Expand Up @@ -75,7 +74,6 @@ def error():
def index():
"""Home Page."""
return render_template('rero_ils/frontpage.html',
version=__version__,
organisations=Organisation.get_all(),
viewcode=current_app.config.get(
'RERO_ILS_SEARCH_GLOBAL_VIEW_CODE'))
Expand All @@ -93,7 +91,6 @@ def index_with_view_code(viewcode):
else:
return render_template(
'rero_ils/frontpage.html',
version=__version__,
organisations=Organisation.get_all(),
viewcode=viewcode
)
Expand Down