*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 8d91da64 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Make URLs in the welcome email page dynamic

* also, add a new config item `THEME_TUW_TEST_INSTANCE_URL` that will be
  used in the "final note" block in the email template
* if that value is set to `None`, then the block will be skipped
  entirely
* also, mock view function from Invenio-Config-TUW to not depend on it
  for tests
parent e28dc331
No related branches found
No related tags found
1 merge request!165📝 Welcome template: update text
......@@ -62,6 +62,9 @@ to spam/annoy an arbitrary email address via our system.
THEME_TUW_FORECAST = default_forecast
"""Function for checking the upcoming weather."""
THEME_TUW_TEST_INSTANCE_URL = None
"""The URL for a test/sandbox instance to advertise (if not set to ``None``)."""
# Invenio-Theme
# =============
......
......@@ -40,7 +40,7 @@ Thanks for your request, I've just granted you permission to create new record d
Due to the requirements of the Core Trust Seal that we are pursuing, we will need to review new records briefly before publication.
So if you encounter an error after clicking the "publish" button on the deposit page, that's expected.
Please drop us an e-mail with the record's ID (e.g. its URL), and we'll check and publish it for you.
You can always track the status of your records in "My Dashboard": https://researchdata.tuwien.ac.at/me/uploads
You can always track the status of your records in "My Dashboard": {{ url_for("invenio_app_rdm_users.uploads", _external=True) }}
Please consider that publishing a record means that the set of files uploaded to that record cannot be modified anymore.
......@@ -56,15 +56,14 @@ Speaking of keeping the datasets well-curated and up-to-date, we recognize that
This is relevant because, due to the nature of our system, access to it is strongly linked with university accounts.
So even though we certainly hope the need will not arise too soon, it is still a good idea to think of succession plans eventually.
As such, we would like to ask you if you are comfortable with granting us (i.e. the team at the Center for Research Data Management) permission to maintain and curate the metadata of your records in the future.
Consent can be indicated directly in the system in the account settings: https://researchdata.tuwien.ac.at/account/settings/curation/
Consent can be indicated directly in the system in the account settings: {{ url_for("invenio_config_tuw_settings.curation_settings_view", _external=True) }}
As a final note, if you just want to play around and familiarize yourself with the system in general, we also offer a test system: https://test.researchdata.tuwien.ac.at/
In this system, all permissions are given to TU Wien employees automatically.
This test system does not mint any live DOIs, and we reserve the rights to arbitrarily clear its contents.
{%+ if config.THEME_TUW_TEST_INSTANCE_URL +%}
As a final note, if you just want to play around and familiarize yourself with the system or just need to deposit data as part of an exercise, we also offer a test system: {{ config.THEME_TUW_TEST_INSTANCE_URL }}
This test system does not mint any live DOIs, and we reserve the right to arbitrarily clear its contents.
Otherwise, the functionality is pretty much identical, so it's an ideal playground.
{# note: the shape of this construct, including the {%+ ... +%} and this comment are relevant for the formatting #}
{%+ endif +%}
Cheers,
{{ current_user.user_profile.given_name }}
</pre>
......@@ -80,7 +79,7 @@ Dear {{ user_name }},
Thanks for your request, I've just granted you permission to create new record drafts and upload files!
Please note that we reserve the right to manually check records before they can be published.
So if you encounter an error after clicking the "publish" button on the deposit page, that's expected – please drop us an e-mail with the record's ID (e.g. its URL), and we'll check and publish it for you.
You can always track the status of your records in "My Dashboard": https://researchdata.tuwien.ac.at/me/uploads.
You can always track the status of your records in "My Dashboard": {{ url_for("invenio_app_rdm_users.uploads", _external=True) }}
Please consider that publishing a record means that the set of files uploaded to that record cannot be modified anymore.
......@@ -95,14 +94,14 @@ To ensure that your files are preserved and accessible in the long term, we stro
Speaking of keeping the datasets well-curated and up-to-date, we recognize that every journey will eventually end – including university affiliations, especially as a student.
This is relevant because, due to the nature of our system, access to it is strongly linked with university accounts.
As such, we would like to ask you if you are comfortable with granting us (i.e. the team at the Center for Research Data Management) permission to maintain and curate the metadata of your records in the future.
Consent can be indicated directly in the system in the account settings: https://researchdata.tuwien.ac.at/account/settings/curation/
Consent can be indicated directly in the system in the account settings: {{ url_for("invenio_config_tuw_settings.curation_settings_view", _external=True) }}
As a final note, if you just want to play around and familiarize yourself with the system or just need to deposit data as part of an exercise, we also offer a test system: https://test.researchdata.tuwien.ac.at/
{%+ if config.THEME_TUW_TEST_INSTANCE_URL +%}
As a final note, if you just want to play around and familiarize yourself with the system or just need to deposit data as part of an exercise, we also offer a test system: {{ config.THEME_TUW_TEST_INSTANCE_URL }}
This test system does not mint any live DOIs, and we reserve the right to arbitrarily clear its contents.
Otherwise, the functionality is pretty much identical, so it's an ideal playground.
{# note: the shape of this construct, including the {%+ ... +%} and this comment are relevant for the formatting #}
{%+ endif +%}
Cheers,
{{ current_user.user_profile.given_name }}
</pre>
......
......@@ -62,7 +62,21 @@ class MockManifestLoader(JinjaManifestLoader):
@pytest.fixture(scope="module")
def create_app(instance_path):
"""Create test app."""
return create_ui
def _create_ui(*args, **kwargs):
"""Create slightly modified UI app."""
app = create_ui(*args, **kwargs)
@app.route(
"/curation/", endpoint="invenio_config_tuw_settings.curation_settings_view"
)
def curation_endpoint():
"""Mock curation settings endpoint."""
return "curation, eh?"
return app
return _create_ui
@pytest.fixture(scope="module")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment