Skip to content

Commit

Permalink
footer: fix missing version
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Sep 23, 2021
1 parent ba2c911 commit cfe8259
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
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

0 comments on commit cfe8259

Please sign in to comment.