Compare commits

...

28 Commits

Author SHA1 Message Date
Christoph Ladurner 8866b87459 release v4.13.0 2025-01-24 14:44:20 +01:00
Christoph Ladurner 3a91743f9b setup: necessary because devs not released 2025-01-24 14:43:45 +01:00
Christoph Ladurner fa705221dd view: add route for rdm-search
* it is necessary to add it here because the old approach with adding to
  the invenio-search-ui blueprint is not possible anymore since it has
  been changed to a function.
2025-01-24 14:43:45 +01:00
Christoph Ladurner aa21adb1cf setup: relax upper pins
* the idea is to break early.
2025-01-24 14:43:45 +01:00
Martin Obersteiner 5865f0df54 add default-page for unhandled errors 2024-09-19 10:21:41 +02:00
Martin Obersteiner 4b8d5bee9f guard views/dashboard by tugraz_authenticated 2024-07-08 10:16:38 +02:00
Martin Obersteiner 923d4e8120 fix deprecated before_app_first_request 2024-06-11 13:27:04 +02:00
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
Christoph Ladurner dac35b2e0e release v4.12.8 2024-03-11 20:20:52 +01:00
Christoph Ladurner cf5ecfd2f6 ui: add banner to header 2024-03-11 20:20:16 +01:00
Christoph Ladurner 0919760cfd release v4.12.7 2024-02-12 13:34:50 +01:00
Christoph Ladurner 40be6ff4b4 translation: fix typo 2024-02-12 13:34:18 +01:00
Christoph Ladurner 602c4b6523 release v4.12.6 2024-02-02 12:43:31 +01:00
Christoph Ladurner 4a581d6703 fix: error_handler gets 1 parameter 2024-02-02 12:43:11 +01:00
Christoph Ladurner b426e0cc39 release v4.12.5 2024-02-02 11:21:42 +01:00
Christoph Ladurner b975800532 release v4.12.4 2024-02-02 10:39:20 +01:00
Christoph Ladurner 19143a7860 ui: add 423 error page 2024-02-02 10:38:57 +01:00
Christoph Ladurner 2d47e30416 fix: types could be empty list
* it is true that types will always exists, but it could be an empty
2024-02-02 09:51:18 +01:00
Christoph Ladurner 87bead9b7e setup: sort tests imports
* remove unnecessary special opensearch2. moved to tests.
2024-01-31 10:33:13 +01:00
Christoph Ladurner 11bce0a1ce workflows: change to reusable workflows 2024-01-31 10:33:13 +01:00
Christoph Ladurner ebcd040be0 wording: update one string frontpage 2024-01-31 10:12:09 +01:00
Christoph Ladurner 515a02aed5 wording: update frontpage 2024-01-31 10:12:09 +01:00
Christoph Ladurner 7314baccc9 release v4.12.3 2024-01-28 21:19:08 +01:00
Christoph Ladurner 66a694a321 wording: update text in benefits 2024-01-28 21:18:21 +01:00
Christoph Ladurner 529b22ad20 translation: fix research result typo 2024-01-28 21:18:21 +01:00
Christoph Ladurner a5d23135eb ui: remove commented code
* the overriding is solved by overriding the translation strings
2024-01-28 21:18:21 +01:00
Christoph Ladurner 4c3ebcee23 ui: remove comingsoon rule
* there is a more general solution used now.
2024-01-28 21:18:21 +01:00
24 changed files with 691 additions and 450 deletions
+2 -19
View File
@@ -5,22 +5,5 @@ on:
jobs: jobs:
build-n-publish: build-n-publish:
runs-on: ubuntu-latest uses: tu-graz-library/.github/.github/workflows/pypi-publish.yml@main
steps: secrets: inherit
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel babel
- name: Build package
run: |
python setup.py compile_catalog sdist bdist_wheel
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__
password: ${{ secrets.pypi_password }}
+3 -46
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2022 Graz University of Technology. # Copyright (C) 2020-2024 Graz University of Technology.
# #
# invenio-theme-tugraz is free software; you can redistribute it and/or # invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
@@ -24,48 +24,5 @@ on:
default: 'Manual trigger' default: 'Manual trigger'
jobs: jobs:
Tests: tests:
runs-on: ubuntu-20.04 uses: tu-graz-library/.github/.github/workflows/tests.yml@main
strategy:
matrix:
python-version: [3.9, "3.10"]
requirements-level: [pypi]
db-service: [postgresql13]
search-service: [opensearch2]
include:
- search-service: opensearch2
SEARCH_EXTRAS: "opensearch2"
env:
DB: ${{ matrix.db-service }}
SEARCH: ${{ matrix.search-service }}
EXTRAS: tests,${{ matrix.SEARCH_EXTRAS }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Generate dependencies
run: |
pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install ".[$EXTRAS]"
pip freeze
docker --version
docker-compose --version
- name: Run tests
run: |
./run-tests.sh
+53
View File
@@ -8,6 +8,59 @@
Changes Changes
======= =======
Version v4.13.0 (release 2025-01-24)
- setup: necessary because devs not released
- view: add route for rdm-search
- setup: relax upper pins
- add default-page for unhandled errors
- guard views/dashboard by `tugraz_authenticated`
- fix deprecated `before_app_first_request`
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
Version v4.12.7 (release 2024-02-12)
- translation: fix typo
Version v4.12.6 (release 2024-02-02)
- fix: error_handler gets 1 parameter
Version v4.12.5 (release 2024-02-02)
Version v4.12.4 (release 2024-02-02)
- ui: add 423 error page
- fix: types could be empty list
- setup: sort tests imports
- workflows: change to reusable workflows
- wording: update one string frontpage
- wording: update frontpage
Version v4.12.3 (release 2024-01-28)
- wording: update text in benefits
- translation: fix research result typo
- ui: remove commented code
- ui: remove comingsoon rule
Version v4.12.2 (release 2024-01-07) Version v4.12.2 (release 2024-01-07)
- ui: use only first type - ui: use only first type
+1 -1
View File
@@ -10,6 +10,6 @@
from .ext import InvenioThemeTugraz from .ext import InvenioThemeTugraz
__version__ = "4.12.2" __version__ = "4.13.0"
__all__ = ("__version__", "InvenioThemeTugraz") __all__ = ("__version__", "InvenioThemeTugraz")
@@ -0,0 +1,42 @@
// Copyright (C) 2024 Graz University of Technology.
//
// invenio-theme-tugraz is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
import $ from "jquery";
async function generateForm() {
// get email from `/api/me`
let email = "???";
const response = await fetch("/api/me");
if (response.ok) {
const json = await response.json();
email = json?.email || "???";
}
// show form
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
$("#anchor-unlock-form").ZammadForm({
attributes: [
{},
{ defaultValue: email },
{
defaultValue: `Could you unlock my account (${email}) for research-uploads?`,
// TODO: add to defaultValue once policy on how to get accepted is decided...
},
],
modal: false,
});
// focus first entry of now-shown form
document.getElementById("zammad-form-name-inline").focus();
});
}
$(function () {
// called when DOM is ready
const generateFormElement = document.getElementById("generate-unlock-form");
if (generateFormElement) {
generateFormElement.onclick = generateForm;
}
});
@@ -177,3 +177,7 @@ pre {
.ui.equal.height .ui.segment { .ui.equal.height .ui.segment {
height: 100%; height: 100%;
} }
.ui.flashed.message.manage {
text-align: center;
}
+6
View File
@@ -35,10 +35,16 @@ THEME_TUGRAZ_PRODUCTION = False
has to be 'INVENIO_THEME_TUGRAZ_PRODUCTION'. has to be 'INVENIO_THEME_TUGRAZ_PRODUCTION'.
""" """
THEME_TUGRAZ_SUPPORT_EMAIL = ""
"""Shown as contact-info on default error-page."""
# Invenio-theme # Invenio-theme
# ============ # ============
# See https://invenio-theme.readthedocs.io/en/latest/configuration.html # See https://invenio-theme.readthedocs.io/en/latest/configuration.html
# #
THEME_500_TEMPLATE = "invenio_theme_tugraz/default_error.html"
"""Used for any internal server errors and uncaught exceptions."""
THEME_LOGO = "images/tug_logo.png" THEME_LOGO = "images/tug_logo.png"
"""TU Graz logo""" """TU Graz logo"""
+63 -2
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2021 Graz University of Technology. # Copyright (C) 2020-2024 Graz University of Technology.
# #
# invenio-theme-tugraz is free software; you can redistribute it and/or # invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
@@ -8,8 +8,12 @@
"""invenio module for TUGRAZ theme.""" """invenio module for TUGRAZ theme."""
from flask_login import login_required
from invenio_i18n import lazy_gettext as _
from invenio_records_marc21.ui.theme import current_identity_can_view
from . import config from . import config
from .views import index from .views import index, locked, require_tugraz_authenticated
class InvenioThemeTugraz(object): class InvenioThemeTugraz(object):
@@ -26,6 +30,13 @@ class InvenioThemeTugraz(object):
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule # https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule
app.add_url_rule("/", "index", index) app.add_url_rule("/", "index", index)
self.init_config(app) self.init_config(app)
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 app.extensions["invenio-theme-tugraz"] = self
def init_config(self, app): def init_config(self, app):
@@ -33,3 +44,53 @@ class InvenioThemeTugraz(object):
for k in dir(config): for k in dir(config):
if k.startswith("INVENIO_THEME_TUGRAZ_") or k.startswith("THEME_TUGRAZ_"): if k.startswith("INVENIO_THEME_TUGRAZ_") or k.startswith("THEME_TUGRAZ_"):
app.config.setdefault(k, getattr(config, k)) app.config.setdefault(k, getattr(config, k))
def finalize_app(app):
"""Finalize app."""
modify_user_dashboard(app)
guard_view_functions(app)
def modify_user_dashboard(app):
"""Modify user dashboard."""
root_menu = app.extensions["menu"].root_node
user_dashboard_menu = root_menu.submenu("dashboard")
user_dashboard_menu.submenu("overview").register(
"invenio_theme_tugraz.overview",
text=_("Overview"),
order=0,
)
root_menu.submenu("actions.deposit").register(
"invenio_theme_tugraz.overview",
_("My dashboard"),
order=1,
)
def guard_view_functions(app):
"""Guard view-functions against unauthenticated access."""
endpoints_to_guard = [
"invenio_app_rdm_users.communities",
"invenio_app_rdm_users.requests",
"invenio_app_rdm_users.uploads",
]
for endpoint in endpoints_to_guard:
view_func = app.view_functions.get(endpoint)
if not view_func:
continue
# decorate view-func
# same as if view-func were defined with:
# @login_required
# @require_tugraz_authenticated_user
view_func = login_required(
require_tugraz_authenticated(
view_func,
),
)
app.view_functions[endpoint] = view_func
@@ -0,0 +1,14 @@
{#
Copyright (C) 2024 Graz University of Technology.
invenio-theme-tugraz is free software; you can redistribute it and/or
modify it under the terms of the MIT License; see LICENSE file for more
details.
#}
{% extends config.THEME_ERROR_TEMPLATE %}
{% block message %}
<h1><i class="bolt icon"></i> {{_("Locked")}}</h1>
<p>{{_("The resource that is being accessed is locked.")}}</p>
{% endblock message %}
@@ -1,17 +1,21 @@
{# {#
Copyright (C) 2020-2023 Graz University of Technology. Copyright (C) 2020-2024 Graz University of Technology.
invenio-theme-tugraz is free software; you can redistribute it and/or invenio-theme-tugraz is free software; you can redistribute it and/or
modify it under the terms of the MIT License; see LICENSE file for more modify it under the terms of the MIT License; see LICENSE file for more
details. details.
#} #}
<ul> <div class="ui segment" style="padding-bottom: 10px;">
<li><strong>{{_("Safe") }}</strong> &mdash; {{_("your research is stored safely for the future in TU Graz library for as long as TU Graz library exists.") }}</li> <h4>{{ _("Good reasons to use the Repository of the TU Graz") }}</h4>
<li><strong>{{_("Trusted") }}</strong> &mdash; {{_("built and operated by CERN and OpenAIRE to ensure that everyone can join in Open Science.") }}</li>
<li><strong>{{_("Citeable") }}</strong> &mdash; {{_("every upload is assigned a Digital Object Identifier (DOI), to make them citable and trackable.") }}</li> <ul>
<li><strong>{{_("No waiting time") }}</strong> &mdash; {{_("Uploads are made available online as soon as you hit publish, and your DOI is registered within seconds.") }}</li> <li><strong>{{_("Safe") }}</strong> &mdash; {{_("Your research results are permanently available.") }}</li>
<li><strong>{{_("Open or closed") }}</strong> &mdash; {{_("Share e.g. anonymized clinical trial data with only medical professionals via our restricted access mode.") }}</li> <li><strong>{{_("Trusted") }}</strong> &mdash; {{_("A service from TU Graz, developed in cooperation with CERN.") }}</li>
<li><strong>{{_("Versioning") }}</strong> &mdash; {{_("Easily update your dataset with our versioning feature.") }}</li> <li><strong>{{_("Citeable") }}</strong> &mdash; {{_("Every upload is assigned a Digital Object Identifier (DOI).") }}</li>
<li><strong>{{_("Usage statisics") }}</strong> &mdash; {{ _("All uploads display standards compliant usage statistics") }}</li> <li><strong>{{_("No waiting time") }}</strong> &mdash; {{_("Uploads are made available online as soon as you hit publish. Your DOI is registered within seconds.") }}</li>
</ul> <li><strong>{{_("Open or closed") }}</strong> &mdash; {{_("You determine the visibility of your uploads. A restricted access mode is possible.") }}</li>
<li><strong>{{_("Versioning") }}</strong> &mdash; {{_("Easily update your dataset with the versioning feature.") }}</li>
<li><strong>{{_("Usage statistics") }}</strong> &mdash; {{ _("All uploads display standards compliant usage statistics. ") }} <a href="help/statistics">({{ _("More") }})</a></li>
</ul>
</div>
@@ -1,15 +0,0 @@
{#
Copyright (C) 2020-2023 Graz University of Technology.
invenio-theme-tugraz is free software; you can redistribute it and/or
modify it under the terms of the MIT License; see LICENSE file for more
details.
#}
{%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %}
{%- block page_body %}
<div class="ui container">
<h1 style="text-align: center;">comingsoon</h1>
</div>
{%- endblock %}
@@ -0,0 +1,29 @@
{#
Copyright (C) 2020-2024 Graz University of Technology.
invenio-theme-tugraz is free software; you can redistribute it and/or
modify it under the terms of the MIT License; see LICENSE file for more
details.
#}
<div class="ui segment">
<h4>{{ _("Need help?") }}</h4>
{%- if config.THEME_TUGRAZ_CONTACT_FORM %}
<div style="padding-bottom: 10px;">
<a id="feedback-form" class="fluid ui button">
{{ _("Contact us") }}
</a>
</div>
{%- endif %}
<p>
{{ _("We can help with:") }}
</p>
<ul>
<li>{{ _("Upload your research results, software, preprints, etc.") }}</li>
<li>{{ _("Increase upload limit beyond our default policy of 10GB.") }}</li>
<li>{{ _("Establish contact with data stewards.") }}</li>
<li>{{ _("Find individual solutions.") }}</li>
</ul>
</div>
@@ -0,0 +1,21 @@
{#
Copyright (C) 2024 Graz University of Technology.
invenio-theme-tugraz is free software; you can redistribute it and/or
modify it under the terms of the MIT License; see LICENSE file for more
details.
#}
{% extends config.THEME_ERROR_TEMPLATE %}
{% block message %}
<h1> {{ _('Internal server error') }} </h1>
<p>
{{ _(
'Please contact <a href="mailto:{support_email}">our support</a>
to let us know about this error.'
).format(support_email=config.THEME_TUGRAZ_SUPPORT_EMAIL)
}}
</p>
{# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #}
{% endblock message %}
@@ -10,10 +10,10 @@
<div class="center aligned ui equal height grid"> <div class="center aligned ui equal height grid">
<div class="left aligned column"> <div class="left aligned column">
<div class="ui segment image"> <div class="ui segment image">
<h2>{{ _("Research Result") }}</h2> <h2>{{ _("Research Results") }}</h2>
<div> <div>
{{ _("Frontpage: Description for research result") }} {{ _("Frontpage: Description for research results") }}
</div> </div>
<ul> <ul>
@@ -15,6 +15,11 @@
<div> <div>
<header> <header>
{%- block site_banner %}
{% from 'invenio_banners/banner.html' import banner %}
{{ banner() }}
{%- endblock site_banner %}
{%- block navbar %} {%- block navbar %}
<nav> <nav>
{%- block navbar_header %} {%- block navbar_header %}
@@ -25,36 +25,8 @@
<!---segments--> <!---segments-->
<div class="six wide column"> <div class="six wide column">
<!--contact us--> {% include "invenio_theme_tugraz/contact_us.html" %}
<div class="ui segment"> {% include "invenio_theme_tugraz/benefits.html" %}
<h4>{{ _("Need help?") }}</h4>
{%- if config.THEME_TUGRAZ_CONTACT_FORM %}
<div style="padding-bottom: 10px;">
<a id="feedback-form" class="fluid ui button">
{{ _("Contact us") }}
</a>
</div>
{%- endif %}
<p>
{{ config.THEME_SITENAME }} {{ _("prioritizes all Recent uploads.") }}
</p>
<p>
{{ _("We can help with:") }}
</p>
<ul>
<li>{{ _("Uploading your research data, software, preprints, etc.") }}</li>
<li>{{ _("One-on-one with") }} {{ config.THEME_SITENAME }} {{ _("supporters.") }}</li>
<li>{{ _("Quota increases beyond our default policy.") }}</li>
<li>{{ _("Scripts for automated uploading of larger datasets.") }}</li>
</ul>
</div>
<div class="ui segment" style="padding-bottom: 10px;">
<h4>{{ _("Why use") }} {{ config.THEME_SITENAME }}</h4>
{% include "invenio_theme_tugraz/benefits.html" %}
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -11,6 +11,11 @@
{%- set active_dashboard_menu_item = "overview" %} {%- set active_dashboard_menu_item = "overview" %}
{%- set title = _("Overview") %} {%- set title = _("Overview") %}
{% block javascript %}
{{ super() }}
{{ webpack['invenio-theme-tugraz-unlock.js'] }}
{% endblock javascript %}
{%- block page_body %} {%- block page_body %}
{%- block user_dashboard_header %} {%- block user_dashboard_header %}
{% include "invenio_app_rdm/users/header.html" %} {% include "invenio_app_rdm/users/header.html" %}
@@ -19,16 +24,17 @@
<div class="ui container rel-mt-2"> <div class="ui container rel-mt-2">
<h2>Overview</h2> <h2>Overview</h2>
<div class="ui five column stackable grid overview"> <div class="ui five column stackable grid overview">
{% if is_tugraz_authenticated %}
{# 3 columns: Research-Uploads, Communities, and Requests #}
<div class="column"> <div class="column">
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>{{ _("Research Result") }}</h2> <h2>{{ _("Research Results") }}</h2>
<a class="ui left floated image" href="/me/uploads"> <a class="ui left floated image" href="/me/uploads">
<img width="400px" alt="Research Result" src="{{ url_for("static", filename="images/diamond.svg") }}"> <img width="400px" alt="Research Results" src="{{ url_for("static", filename="images/diamond.svg") }}">
</a> </a>
<div class="ui right floated text"> <div class="ui right floated text">
{{ _("Overview: Description for research result") }} {{ _("Overview: Description for research results") }}
</div> </div>
</div> </div>
</div> </div>
@@ -54,6 +60,47 @@
</div> </div>
</div> </div>
</div> </div>
{% else %} {# not is_tugraz_authenticated #}
{# 1 column: greyed out Research-Uploads #}
<div class="column">
{# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #}
<div class="ui small modal" id="tugraz-unlock-modal">
<div class="header">{{ _("On unlocking research uploads") }}</div>
<div class="content">
<p>
{{ _('To ensure a well-curated repository, new users need to get unlocked
before being allowed to upload. Once unlocked, you can upload your research,
request its inclusion in a community, generate a DOI for it, and publish it.') }}
{# TODO: extra lines on policy about who gets accepted how for Research-Uploads #}
</p>
<div id="anchor-unlock-form"> {# will be replaced with ZammadForm when generating it #}
<button class="ui fluid button" onclick="
$('#tugraz-unlock-modal')
.modal('hide')"
>Got it!</button>
<button id="generate-unlock-form" class="ui fluid button">
{{ _("Request unlocking") }}
</button>
</div>
</div>
</div>
{# actual column contents start here #}
<div class="ui disabled segment" style="height: 480px">
<h2>{{ _("Research Results") }}</h2>
<div class="ui left floated image" style="cursor: pointer" onclick="
$('#tugraz-unlock-modal')
.modal('show')"
>
<img width="400px" alt="Research Results" src="{{ url_for("static", filename="images/diamond.svg") }}">
</div>
<div class="ui right floated text">
{{ _("Overview: Description for research results") }}
</div>
</div>
</div>
{% endif %}
{% if can_view_marc21 %}
<div class="column"> <div class="column">
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>{{ _("Publications") }}</h2> <h2>{{ _("Publications") }}</h2>
@@ -65,6 +112,7 @@
</div> </div>
</div> </div>
</div> </div>
{% endif %}
<div class="column"> <div class="column">
<div class="ui segment" style="height: 480px"> <div class="ui segment" style="height: 480px">
<h2>{{ _("Educational Resources") }}</h2> <h2>{{ _("Educational Resources") }}</h2>
@@ -30,9 +30,11 @@
</span> </span>
{# Resource type badge #} {# Resource type badge #}
<span class="ui label grey" data-tooltip="{{ _("Resource type") }}" data-inverted=""> {% if r.metadata.types | length > 0%}
{{ r.metadata.types[0] }} <span class="ui label grey" data-tooltip="{{ _("Resource type") }}" data-inverted="">
</span> {{ r.metadata.types[0] }}
</span>
{% endif %}
<span class="ui label access-status {{ r.access_status.id }}" <span class="ui label access-status {{ r.access_status.id }}"
data-tooltip="{{ r.access_status.description_l10n }}" data-tooltip="{{ r.access_status.description_l10n }}"
@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n" "Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2023-12-06 23:09+0100\n" "POT-Creation-Date: 2024-02-02 10:08+0100\n"
"PO-Revision-Date: 2023-12-06 23:24+0100\n" "PO-Revision-Date: 2024-02-09 22:25+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: de <LL@li.org>\n" "Language-Team: de <LL@li.org>\n"
"Language: de\n" "Language: de\n"
@@ -30,94 +30,135 @@ msgid "Repository"
msgstr "Repository" msgstr "Repository"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12
#: invenio_theme_tugraz/views.py:80 #: invenio_theme_tugraz/views.py:70
msgid "Overview" msgid "Overview"
msgstr "Übersicht" msgstr "Übersicht"
#: invenio_theme_tugraz/views.py:86 #: invenio_theme_tugraz/views.py:76
msgid "My dashboard" msgid "My dashboard"
msgstr "Meine Übersicht" msgstr "Meine Übersicht"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:12
msgid "Locked"
msgstr "Locked"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:13
msgid "The resource that is being accessed is locked."
msgstr "Die angeforderte Ressource ist zurzeit gesperrt."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34
msgid "Invenio" msgid "Invenio"
msgstr "Invenio" msgstr "Invenio"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10
msgid "Good reasons to use the Repository of the TU Graz"
msgstr "Gute Gründe, das Repository der TU Graz zu nutzen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "Safe" msgid "Safe"
msgstr "Sicher" msgstr "Sicher"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "" msgid "Your research results are permanently available."
"your research is stored safely for the future in TU Graz library for as long " msgstr "Ihre Forschungsergebnisse sind dauerhaft verfügbar."
"as TU Graz library exists."
msgstr ""
"Ihre Forschung ist in der Bibliothek der TU Graz für die Zukunft "
"gespeichert, solange die Bibliothek der TU Graz existiert."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "Trusted" msgid "Trusted"
msgstr "Vertrauenswürdig" msgstr "Vertrauenswürdig"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "" msgid "A service from TU Graz, developed in cooperation with CERN."
"built and operated by CERN and OpenAIRE to ensure that everyone can join in " msgstr "Ein Service der TU Graz, entwickelt in Kooperation mit CERN."
"Open Science."
msgstr ""
"Aufgebaut und betrieben von CERN und OpenAIRE, um sicherzustellen, dass "
"jeder an Open Science teilnehmen kann."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "Citeable" msgid "Citeable"
msgstr "Zitierfähig" msgstr "Zitierfähig"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "" msgid "Every upload is assigned a Digital Object Identifier (DOI)."
"every upload is assigned a Digital Object Identifier (DOI), to make them " msgstr "Jedem Upload wird ein Digital Object Identifier (DOI) zugewiesen."
"citable and trackable."
msgstr ""
"Jeder Upload wird mit einem Digital Object Identifier (DOI) versehen,um ihn "
"zitierfähig und nachverfolgbar zu machen."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "No waiting time" msgid "No waiting time"
msgstr "Keine Wartezeit" msgstr "Keine Wartezeit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "" msgid ""
"Uploads are made available online as soon as you hit publish, and your DOI " "Uploads are made available online as soon as you hit publish. Your DOI is "
"is registered within seconds." "registered within seconds."
msgstr "" msgstr ""
"Uploads stehen sofort nach drücken auf Veröffentlichen” zur Verfügung. Ihre " "Uploads sind online verfügbar, sobald Sie auf \"Veröffentlichen\" klicken. "
"DOI wird innerhalb von Sekunden registriert." "Ihre DOI wird innerhalb von Sekunden registriert."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "Open or closed" msgid "Open or closed"
msgstr "Offen oder geschlossen" msgstr "Offen oder geschlossen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "" msgid ""
"Share e.g. anonymized clinical trial data with only medical professionals " "You determine the visibility of your uploads. A restricted access mode is "
"via our restricted access mode." "possible."
msgstr "" msgstr ""
"Teilen Sie z.B. anonymisierte klinische Studiendaten nur mit medizinischem " "Sie bestimmen die Sichtbarkeit Ihrer Uploads. Ein eingeschränkter "
"Fachpersonal über unseren eingeschränkten Zugriffsmodus." "Zugriffsmodus ist möglich."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Versioning" msgid "Versioning"
msgstr "Versionierung" msgstr "Versionierung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Easily update your dataset with our versioning feature." msgid "Easily update your dataset with the versioning feature."
msgstr "Einfaches Updaten ihrer Datensätze mit unserer Versionierung." msgstr ""
"Aktualisieren Sie Ihren Datensatz ganz einfach mit der "
"Versionierungsfunktion."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "Usage statisics" #, fuzzy
#| msgid "Usage statisics"
msgid "Usage statistics"
msgstr "Nutzungsstatistiken" msgstr "Nutzungsstatistiken"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "All uploads display standards compliant usage statistics" #, fuzzy
msgstr "Alle Uploads entsprechen den Standards der Nutzungsstatistiken." #| msgid "All uploads display standards compliant usage statistics."
msgid "All uploads display standards compliant usage statistics. "
msgstr "Alle Uploads zeigen standardkonforme Nutzungsstatistiken an."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr "Mehr"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:10
msgid "Need help?"
msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:15
msgid "Contact us"
msgstr "Kontaktieren Sie uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:20
msgid "We can help with:"
msgstr "Dabei können wir helfen:"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:24
msgid "Upload your research results, software, preprints, etc."
msgstr "Hochladen Ihrer Forschungsergebnisse, Software, Preprints usw."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:25
msgid "Increase upload limit beyond our default policy of 10GB."
msgstr "Upload-Limit Erhöhung über unsere Standardrichtlinie von 10 GB hinaus."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:26
#, fuzzy
#| msgid "Create contact with data stewards."
msgid "Establish contact with data stewards."
msgstr "Kontakt mit den Data Stewards herstellen."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:27
msgid "Find individual solutions."
msgstr "Individuelle Lösungen finden."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29
msgid "Documentation" msgid "Documentation"
@@ -196,12 +237,15 @@ msgid "to change the font size."
msgstr "Um die Schriftgröße zu ändern." msgstr "Um die Schriftgröße zu ändern."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26
msgid "Research Result" msgid "Research Results"
msgstr "Forschungsergebnisse" msgstr "Forschungsergebnisse"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16
msgid "Frontpage: Description for research result" #, fuzzy
#| msgid "Frontpage: Description for research result"
msgid "Frontpage: Description for research results"
msgstr "" msgstr ""
"Forschungsergebnisse ist der Sammelbegriff für alle Ergebnisse eines " "Forschungsergebnisse ist der Sammelbegriff für alle Ergebnisse eines "
"Forschungsprojekts. Sie beschreiben die Daten, den Quellcode und alle " "Forschungsprojekts. Sie beschreiben die Daten, den Quellcode und alle "
@@ -213,7 +257,7 @@ msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:26
msgid "Search for research results" msgid "Search for research results"
msgstr "Suchen Sie nach Forschungsergebnisse" msgstr "Suchen Sie nach Forschungsergebnissen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:29 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:29
msgid "Upload research results" msgid "Upload research results"
@@ -286,54 +330,10 @@ msgstr "Communities"
msgid "Dashboard" msgid "Dashboard"
msgstr "Übersicht" msgstr "Übersicht"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:30
msgid "Need help?"
msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:34
msgid "Contact us"
msgstr "Kontaktiere uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:39
msgid "prioritizes all Recent uploads."
msgstr "reiht die neuesten Uploads vor."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:42
msgid "We can help with:"
msgstr "Dabei können wir helfen:"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:46
msgid "Uploading your research data, software, preprints, etc."
msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints usw."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "One-on-one with"
msgstr "One-on-one mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "supporters."
msgstr "UnterstützerInnen."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:48
msgid "Quota increases beyond our default policy."
msgstr "Quota Erhöhungen über unsere Standard Policy hinaus."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:49
msgid "Scripts for automated uploading of larger datasets."
msgstr "Skripte zum automatisierten Hochladen größerer Datensätze."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:54
msgid "Why use"
msgstr "Warum"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12
msgid "All" msgid "All"
msgstr "Alle" msgstr "Alle"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
msgid "Research Results"
msgstr "Forschungsergebenisse"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "TU GRAZ" msgid "TU GRAZ"
msgstr "" msgstr ""
@@ -359,7 +359,9 @@ msgid "TECHNOLOGY"
msgstr "LEIDENSCHAFT" msgstr "LEIDENSCHAFT"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31
msgid "Overview: Description for research result" #, fuzzy
#| msgid "Overview: Description for research result"
msgid "Overview: Description for research results"
msgstr "Die Forschungsergebnisse bilden die Grundlage für Veröffentlichungen." msgstr "Die Forschungsergebnisse bilden die Grundlage für Veröffentlichungen."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42
@@ -403,14 +405,10 @@ msgstr "Es sind keine öffentlich zugänglichen Datensätze vorhanden."
msgid "Publication date" msgid "Publication date"
msgstr "Datum der Veröffentlichung" msgstr "Datum der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:33 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:34
msgid "Resource type" msgid "Resource type"
msgstr "Art der Veröffentlichung" msgstr "Art der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr "Mehr"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82
@@ -501,6 +499,44 @@ msgstr "Mit Ihrem TUGonline-Account registrieren"
msgid "Sign up with repository credentials" msgid "Sign up with repository credentials"
msgstr "Mit Ihren Repository Daten registrieren" msgstr "Mit Ihren Repository Daten registrieren"
#~ msgid "Why use"
#~ msgstr "Warum"
#~ msgid "Your research is stored safely for the future in TU Graz library."
#~ msgstr ""
#~ "Ihre Forschung ist in der Bibliothek der TU Graz für die Zukunft "
#~ "gespeichert."
#~ msgid "Built by CERN and TU Graz. Operated by TU Graz."
#~ msgstr "Gebaut von CERN und TU Graz. Betrieben von der TU Graz."
#~ msgid "Share private or anonymized data via the restricted access mode."
#~ msgstr ""
#~ "Teilen Sie private oder anonymisierte Daten über den eingeschränkten "
#~ "Zugriffsmodus."
#~ msgid "prioritizes all Recent uploads."
#~ msgstr "reiht die neuesten Uploads vor."
#~ msgid "One-on-one with"
#~ msgstr "One-on-one mit"
#~ msgid "supporters."
#~ msgstr "UnterstützerInnen."
#~ msgid "Scripts for automated uploading of larger datasets."
#~ msgstr "Skripte zum automatisierten Hochladen größerer Datensätze."
#~ msgid ""
#~ "built and operated by CERN and OpenAIRE to ensure that everyone can join "
#~ "in Open Science."
#~ msgstr ""
#~ "Aufgebaut und betrieben von CERN und OpenAIRE, um sicherzustellen, dass "
#~ "jeder an Open Science teilnehmen kann."
#~ msgid "Research Result"
#~ msgstr "Forschungsergebnisse"
#~ msgid "Open Educational Resources" #~ msgid "Open Educational Resources"
#~ msgstr "Open Educational Resources" #~ msgstr "Open Educational Resources"
@@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 4.12.0\n" "Project-Id-Version: invenio-theme-tugraz 4.12.0\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2023-12-06 23:09+0100\n" "POT-Creation-Date: 2024-02-02 10:08+0100\n"
"PO-Revision-Date: 2023-12-06 23:25+0100\n" "PO-Revision-Date: 2024-02-02 10:09+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: en <LL@li.org>\n" "Language-Team: en <LL@li.org>\n"
"Language: en\n" "Language: en\n"
@@ -30,83 +30,122 @@ msgid "Repository"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12
#: invenio_theme_tugraz/views.py:80 #: invenio_theme_tugraz/views.py:70
msgid "Overview" msgid "Overview"
msgstr "" msgstr ""
#: invenio_theme_tugraz/views.py:86 #: invenio_theme_tugraz/views.py:76
msgid "My dashboard" msgid "My dashboard"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:12
msgid "Locked"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:13
msgid "The resource that is being accessed is locked."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34
msgid "Invenio" msgid "Invenio"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10
msgid "Good reasons to use the Repository of the TU Graz"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "Safe" msgid "Safe"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "" msgid "Your research results are permanently available."
"your research is stored safely for the future in TU Graz library for as long "
"as TU Graz library exists."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "Trusted" msgid "Trusted"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "" msgid "A service from TU Graz, developed in cooperation with CERN."
"built and operated by CERN and OpenAIRE to ensure that everyone can join in "
"Open Science."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "Citeable" msgid "Citeable"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "" msgid "Every upload is assigned a Digital Object Identifier (DOI)."
"every upload is assigned a Digital Object Identifier (DOI), to make them "
"citable and trackable."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "No waiting time" msgid "No waiting time"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "" msgid ""
"Uploads are made available online as soon as you hit publish, and your DOI " "Uploads are made available online as soon as you hit publish. Your DOI is "
"is registered within seconds." "registered within seconds."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "Open or closed" msgid "Open or closed"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "" msgid ""
"Share e.g. anonymized clinical trial data with only medical professionals " "You determine the visibility of your uploads. A restricted access mode is "
"via our restricted access mode." "possible."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Versioning" msgid "Versioning"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Easily update your dataset with our versioning feature." msgid "Easily update your dataset with the versioning feature."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "Usage statisics" msgid "Usage statistics"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "All uploads display standards compliant usage statistics" msgid "All uploads display standards compliant usage statistics. "
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:10
msgid "Need help?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:15
msgid "Contact us"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:20
msgid "We can help with:"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:24
msgid "Upload your research results, software, preprints, etc."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:25
msgid "Increase upload limit beyond our default policy of 10GB."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:26
msgid "Establish contact with data stewards."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:27
msgid "Find individual solutions."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29
@@ -186,12 +225,15 @@ msgid "to change the font size."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26
msgid "Research Result" msgid "Research Results"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16
msgid "Frontpage: Description for research result" #, fuzzy
#| msgid "Frontpage: Description for research result"
msgid "Frontpage: Description for research results"
msgstr "" msgstr ""
"Research results is the collective term for all the results of a research " "Research results is the collective term for all the results of a research "
"project. They describe the data, source code and all digital objects on " "project. They describe the data, source code and all digital objects on "
@@ -274,54 +316,10 @@ msgstr ""
msgid "Dashboard" msgid "Dashboard"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:30
msgid "Need help?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:34
msgid "Contact us"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:39
msgid "prioritizes all Recent uploads."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:42
msgid "We can help with:"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:46
msgid "Uploading your research data, software, preprints, etc."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "One-on-one with"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "supporters."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:48
msgid "Quota increases beyond our default policy."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:49
msgid "Scripts for automated uploading of larger datasets."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:54
msgid "Why use"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12
msgid "All" msgid "All"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
msgid "Research Results"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "TU GRAZ" msgid "TU GRAZ"
msgstr "" msgstr ""
@@ -347,7 +345,9 @@ msgid "TECHNOLOGY"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31
msgid "Overview: Description for research result" #, fuzzy
#| msgid "Overview: Description for research result"
msgid "Overview: Description for research results"
msgstr "Research results gives the base on which publications are built." msgstr "Research results gives the base on which publications are built."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42
@@ -388,14 +388,10 @@ msgstr ""
msgid "Publication date" msgid "Publication date"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:33 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:34
msgid "Resource type" msgid "Resource type"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82
+80 -88
View File
@@ -1,22 +1,22 @@
# Translations template for invenio-theme-tugraz. # Translations template for invenio-theme-tugraz.
# Copyright (C) 2023 Graz University of Technology # Copyright (C) 2024 Graz University of Technology
# This file is distributed under the same license as the # This file is distributed under the same license as the
# invenio-theme-tugraz project. # invenio-theme-tugraz project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023. # FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 4.12.1\n" "Project-Id-Version: invenio-theme-tugraz 4.12.3\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2023-12-06 23:09+0100\n" "POT-Creation-Date: 2024-02-02 10:08+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n" "Generated-By: Babel 2.13.1\n"
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:60 #: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:60
msgid "TU Graz Repository" msgid "TU Graz Repository"
@@ -28,83 +28,122 @@ msgid "Repository"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:12
#: invenio_theme_tugraz/views.py:80 #: invenio_theme_tugraz/views.py:70
msgid "Overview" msgid "Overview"
msgstr "" msgstr ""
#: invenio_theme_tugraz/views.py:86 #: invenio_theme_tugraz/views.py:76
msgid "My dashboard" msgid "My dashboard"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:12
msgid "Locked"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html:13
msgid "The resource that is being accessed is locked."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:26
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:34
msgid "Invenio" msgid "Invenio"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10
msgid "Good reasons to use the Repository of the TU Graz"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "Safe" msgid "Safe"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13
msgid "" msgid "Your research results are permanently available."
"your research is stored safely for the future in TU Graz library for as "
"long as TU Graz library exists."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "Trusted" msgid "Trusted"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:11 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14
msgid "" msgid "A service from TU Graz, developed in cooperation with CERN."
"built and operated by CERN and OpenAIRE to ensure that everyone can join "
"in Open Science."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "Citeable" msgid "Citeable"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15
msgid "" msgid "Every upload is assigned a Digital Object Identifier (DOI)."
"every upload is assigned a Digital Object Identifier (DOI), to make them "
"citable and trackable."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "No waiting time" msgid "No waiting time"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16
msgid "" msgid ""
"Uploads are made available online as soon as you hit publish, and your " "Uploads are made available online as soon as you hit publish. Your DOI is"
"DOI is registered within seconds." " registered within seconds."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "Open or closed" msgid "Open or closed"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:14 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:17
msgid "" msgid ""
"Share e.g. anonymized clinical trial data with only medical professionals" "You determine the visibility of your uploads. A restricted access mode is"
" via our restricted access mode." " possible."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Versioning" msgid "Versioning"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:18
msgid "Easily update your dataset with our versioning feature." msgid "Easily update your dataset with the versioning feature."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "Usage statisics" msgid "Usage statistics"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
msgid "All uploads display standards compliant usage statistics" msgid "All uploads display standards compliant usage statistics. "
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:19
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:10
msgid "Need help?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:15
msgid "Contact us"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:20
msgid "We can help with:"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:24
msgid "Upload your research results, software, preprints, etc."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:25
msgid "Increase upload limit beyond our default policy of 10GB."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:26
msgid "Establish contact with data stewards."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/contact_us.html:27
msgid "Find individual solutions."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:29
@@ -184,12 +223,13 @@ msgid "to change the font size."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:13
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:26
msgid "Research Result" msgid "Research Results"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:16
msgid "Frontpage: Description for research result" msgid "Frontpage: Description for research results"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/frontpage_overview.html:26
@@ -255,54 +295,10 @@ msgstr ""
msgid "Dashboard" msgid "Dashboard"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:30
msgid "Need help?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:34
msgid "Contact us"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:39
msgid "prioritizes all Recent uploads."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:42
msgid "We can help with:"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:46
msgid "Uploading your research data, software, preprints, etc."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "One-on-one with"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
msgid "supporters."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:48
msgid "Quota increases beyond our default policy."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:49
msgid "Scripts for automated uploading of larger datasets."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:54
msgid "Why use"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12
msgid "All" msgid "All"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
msgid "Research Results"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "TU GRAZ" msgid "TU GRAZ"
msgstr "" msgstr ""
@@ -328,7 +324,7 @@ msgid "TECHNOLOGY"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:31
msgid "Overview: Description for research result" msgid "Overview: Description for research results"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/overview.html:42
@@ -363,14 +359,10 @@ msgstr ""
msgid "Publication date" msgid "Publication date"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:33 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:34
msgid "Resource type" msgid "Resource type"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
msgid "More"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:82
+61 -35
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2021 Graz University of Technology. # Copyright (C) 2020-2025 Graz University of Technology.
# #
# invenio-theme-tugraz is free software; you can redistribute it and/or # invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
@@ -8,14 +8,12 @@
"""invenio module for TUGRAZ theme.""" """invenio module for TUGRAZ theme."""
from functools import wraps
from typing import Dict from typing import Dict
from flask import Blueprint, g, render_template from flask import Blueprint, current_app, g, redirect, render_template, url_for
from flask_login import current_user, login_required from flask_login import current_user, login_required
from flask_menu import current_menu from invenio_rdm_records.proxies import current_rdm_records
from invenio_i18n import lazy_gettext as _
# from invenio_rdm_records.resources.serializers import UIJSONSerializer
from invenio_records_global_search.resources.serializers import ( from invenio_records_global_search.resources.serializers import (
GlobalSearchJSONSerializer, GlobalSearchJSONSerializer,
) )
@@ -32,6 +30,46 @@ blueprint = Blueprint(
) )
@blueprint.route("/records/search")
def records_search():
"""Search page ui.
With this route it is possible to override the default route
"/search" to get to the rdm-records search. The default route will
be overriden by the global search with changing the
SEARCH_UI_SEARCH_TEMPLATE variable to the value
"invenio_records_global_search/search/search.html" in the
invenio.cfg file.
"""
return render_template("invenio_app_rdm/records/search.html")
def current_identity_is_tugraz_authenticated() -> bool:
"""Checks whether current identity has tugraz-authentication.
NOTE: Default permission-policy has no field for `tugraz_authenticated`.
Should the field not exist, the service checks against admin-permissions instead.
You probably meant to configure a custom permission-policy.
"""
rdm_service = current_rdm_records.records_service
return rdm_service.check_permission(g.identity, "tugraz_authenticated")
def require_tugraz_authenticated(view_func):
"""Decorator for guarding view-functions against unauthenticated users.
Redirects un-authenticated users to their personal dashboard's overview.
"""
@wraps(view_func)
def decorated_view(*args, **kwargs):
if not current_identity_is_tugraz_authenticated():
return redirect(url_for("invenio_theme_tugraz.overview"))
return view_func(*args, **kwargs)
return decorated_view
@blueprint.route("/me/overview") @blueprint.route("/me/overview")
@login_required @login_required
def overview(): def overview():
@@ -39,8 +77,10 @@ def overview():
url = current_user_resources.users_service.links_item_tpl.expand( url = current_user_resources.users_service.links_item_tpl.expand(
g.identity, current_user g.identity, current_user
)["avatar"] )["avatar"]
is_tugraz_authenticated = current_identity_is_tugraz_authenticated()
return render_template( return render_template(
"invenio_theme_tugraz/overview.html", "invenio_theme_tugraz/overview.html",
is_tugraz_authenticated=is_tugraz_authenticated,
user_avatar=url, user_avatar=url,
) )
@@ -60,32 +100,16 @@ def cast_to_dict(attr_dict):
return AttrDict.to_dict(attr_dict) return AttrDict.to_dict(attr_dict)
@blueprint.before_app_first_request def default_error_handler(e: Exception):
def modify_user_dashboard(): """Called when an otherwise unhandled error occurs."""
"""Modify user dashboard.""" # TODO: use sentry here once it's configured
user_dashboard_menu = current_menu.submenu("dashboard") # information we might want to log for debugging the error:
# - `flask.request`, a proxy to the current http-request in which the error occured
# - `flask.session`, a proxy to the current http-session
# - `e`, the passed-in exception
# to get proxied-to objects: `flask.request._get_current_object()`
# order matters, this has to be here, otherwise it want override the orginal return render_template(current_app.config["THEME_500_TEMPLATE"]), 500
# entry
# this is to buggy, it depends on the load order of the packages which is indeterminate
# user_dashboard_menu.submenu("uploads").register(
# "invenio_app_rdm_users.uploads",
# text=_("Research Results"),
# order=1,
# )
user_dashboard_menu.submenu("overview").register(
"invenio_theme_tugraz.overview",
text=_("Overview"),
order=0,
)
current_menu.submenu("actions.deposit").register(
"invenio_theme_tugraz.overview",
_("My dashboard"),
order=1,
)
def ui_blueprint(app): def ui_blueprint(app):
@@ -93,7 +117,9 @@ def ui_blueprint(app):
routes = app.config.get("TUG_ROUTES") routes = app.config.get("TUG_ROUTES")
blueprint.add_url_rule(routes["index"], view_func=index) blueprint.add_url_rule(routes["index"], view_func=index)
blueprint.add_url_rule(routes["comingsoon"], view_func=comingsoon)
# base case for any otherwise unhandled exception
app.register_error_handler(Exception, default_error_handler)
return blueprint return blueprint
@@ -113,6 +139,6 @@ def index():
) )
def comingsoon(): def locked(e):
"""Comingsoon.""" """Error page for status locked."""
return render_template("invenio_theme_tugraz/comingsoon.html") return render_template("invenio_theme_tugraz/423.html")
+2 -1
View File
@@ -17,9 +17,10 @@ theme = WebpackThemeBundle(
entry={ entry={
"invenio-theme-tugraz-theme": "./less/invenio_theme_tugraz/theme.less", "invenio-theme-tugraz-theme": "./less/invenio_theme_tugraz/theme.less",
"invenio-theme-tugraz-js": "./js/invenio_theme_tugraz/theme.js", "invenio-theme-tugraz-js": "./js/invenio_theme_tugraz/theme.js",
"invenio-theme-tugraz-unlock": "./js/invenio_theme_tugraz/unlock.js",
}, },
dependencies={ dependencies={
# add any additional npm dependencies here... "jquery": "^3.2.1", # zammad-form, semantic-ui's modals
}, },
) )
}, },
+12 -8
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2021 Graz University of Technology. # Copyright (C) 2020-2025 Graz University of Technology.
# #
# invenio-theme-tugraz is free software; you can redistribute it and/or # invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
@@ -25,29 +25,31 @@ classifiers =
Programming Language :: Python Programming Language :: Python
Topic :: Internet :: WWW/HTTP :: Dynamic Content Topic :: Internet :: WWW/HTTP :: Dynamic Content
Topic :: Software Development :: Libraries :: Python Modules Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.10
Development Status :: 3 - Alpha Development Status :: 3 - Alpha
[options] [options]
include_package_data = True include_package_data = True
packages = find: packages = find:
python_requires = >=3.9 python_requires = >=3.12
zip_safe = False zip_safe = False
install_requires = install_requires =
invenio-assets>=2.0.0 invenio-assets>=2.0.0
invenio-i18n>=1.3.1 invenio-i18n>=1.3.1
invenio_config_tugraz>=0.11.0 invenio_config_tugraz>=0.11.0
invenio_records_global_search>=0.0.1 invenio_records_global_search>=0.0.1
invenio_records_marc21>=0.21.0
[options.extras_require] [options.extras_require]
tests = tests =
invenio-app>=1.3.4,<2.0.0
invenio-previewer>=2.2.0
invenio-rdm-records<17.0.0
invenio-search[opensearch2]>=2.1.0
pytest<8.0.0
pytest-black-ng>=0.4.0 pytest-black-ng>=0.4.0
pytest-invenio>=2.1.0
Sphinx>=4.5.0 Sphinx>=4.5.0
pytest-invenio>=2.1.0,<3.0.0
invenio-app>=1.3.4,<1.4.0
opensearch2 =
invenio-search[opensearch2]>=2.1.0,<3.0.0
[options.entry_points] [options.entry_points]
invenio_base.apps = invenio_base.apps =
@@ -60,6 +62,8 @@ invenio_assets.webpack =
invenio_theme_tugraz_theme = invenio_theme_tugraz.webpack:theme invenio_theme_tugraz_theme = invenio_theme_tugraz.webpack:theme
invenio_config.module = invenio_config.module =
invenio_theme_tugraz = invenio_theme_tugraz.config invenio_theme_tugraz = invenio_theme_tugraz.config
invenio_base.finalize_app =
invenio_theme_tugraz = invenio_theme_tugraz.ext:finalize_app
[aliases] [aliases]
test = pytest test = pytest