Compare commits

..

2 Commits

Author SHA1 Message Date
Christoph Ladurner
049063fd7d release v4.12.9 2024-05-07 10:53:37 +02:00
Christoph Ladurner
4a13f22de4 overview: view publications only if permission 2024-05-07 10:53:01 +02:00
5 changed files with 16 additions and 1 deletions

View File

@@ -8,6 +8,11 @@
Changes
=======
Version v4.12.9 (release 2024-05-07)
- overview: view publications only if permission
Version v4.12.8 (release 2024-03-11)
- ui: add banner to header

View File

@@ -10,6 +10,6 @@
from .ext import InvenioThemeTugraz
__version__ = "4.12.8"
__version__ = "4.12.9"
__all__ = ("__version__", "InvenioThemeTugraz")

View File

@@ -8,6 +8,8 @@
"""invenio module for TUGRAZ theme."""
from invenio_records_marc21.ui.theme import current_identity_can_view
from . import config
from .views import index, locked
@@ -29,6 +31,10 @@ class InvenioThemeTugraz(object):
app.register_error_handler(423, locked)
@app.context_processor
def inject_visibility():
return {"can_view_marc21": current_identity_can_view()}
app.extensions["invenio-theme-tugraz"] = self
def init_config(self, app):

View File

@@ -54,6 +54,7 @@
</div>
</div>
</div>
{% if can_view_marc21 %}
<div class="column">
<div class="ui segment" style="height: 480px">
<h2>{{ _("Publications") }}</h2>
@@ -65,6 +66,7 @@
</div>
</div>
</div>
{% endif %}
<div class="column">
<div class="ui segment" style="height: 480px">
<h2>{{ _("Educational Resources") }}</h2>

View File

@@ -40,10 +40,12 @@ install_requires =
invenio-i18n>=1.3.1
invenio_config_tugraz>=0.11.0
invenio_records_global_search>=0.0.1
invenio_records_marc21>=0.21.0
[options.extras_require]
tests =
invenio-app>=1.3.4,<1.4.0
invenio-previewer>=2.2.0
invenio-search[opensearch2]>=2.1.0,<3.0.0
pytest-black-ng>=0.4.0
pytest-invenio>=2.1.0,<3.0.0