mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2026-01-29 21:52:32 +00:00
ui: add 423 error page
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- 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
|
||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||
@@ -9,7 +9,7 @@
|
||||
"""invenio module for TUGRAZ theme."""
|
||||
|
||||
from . import config
|
||||
from .views import index
|
||||
from .views import index, locked
|
||||
|
||||
|
||||
class InvenioThemeTugraz(object):
|
||||
@@ -26,6 +26,9 @@ class InvenioThemeTugraz(object):
|
||||
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule
|
||||
app.add_url_rule("/", "index", index)
|
||||
self.init_config(app)
|
||||
|
||||
app.register_error_handler(423, locked)
|
||||
|
||||
app.extensions["invenio-theme-tugraz"] = self
|
||||
|
||||
def init_config(self, app):
|
||||
|
||||
14
invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html
Normal file
14
invenio_theme_tugraz/templates/invenio_theme_tugraz/423.html
Normal file
@@ -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 %}
|
||||
@@ -8,8 +8,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
|
||||
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
||||
"POT-Creation-Date: 2024-01-31 09:23+0100\n"
|
||||
"PO-Revision-Date: 2024-01-31 10:03+0100\n"
|
||||
"POT-Creation-Date: 2024-02-02 10:08+0100\n"
|
||||
"PO-Revision-Date: 2024-02-02 10:09+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: de <LL@li.org>\n"
|
||||
"Language: de\n"
|
||||
@@ -38,6 +38,14 @@ msgstr "Übersicht"
|
||||
msgid "My dashboard"
|
||||
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/base.html:34
|
||||
msgid "Invenio"
|
||||
@@ -118,7 +126,7 @@ 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:86
|
||||
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
|
||||
msgid "More"
|
||||
msgstr "Mehr"
|
||||
|
||||
@@ -397,7 +405,7 @@ msgstr "Es sind keine öffentlich zugänglichen Datensätze vorhanden."
|
||||
msgid "Publication date"
|
||||
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"
|
||||
msgstr "Art der Veröffentlichung"
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: invenio-theme-tugraz 4.12.0\n"
|
||||
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
||||
"POT-Creation-Date: 2024-01-31 09:23+0100\n"
|
||||
"PO-Revision-Date: 2024-01-31 10:00+0100\n"
|
||||
"POT-Creation-Date: 2024-02-02 10:08+0100\n"
|
||||
"PO-Revision-Date: 2024-02-02 10:09+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: en <LL@li.org>\n"
|
||||
"Language: en\n"
|
||||
@@ -38,6 +38,14 @@ msgstr ""
|
||||
msgid "My dashboard"
|
||||
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/base.html:34
|
||||
msgid "Invenio"
|
||||
@@ -108,7 +116,7 @@ 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:86
|
||||
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
|
||||
@@ -380,7 +388,7 @@ msgstr ""
|
||||
msgid "Publication date"
|
||||
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"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: invenio-theme-tugraz 4.12.3\n"
|
||||
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
||||
"POT-Creation-Date: 2024-01-31 09:23+0100\n"
|
||||
"POT-Creation-Date: 2024-02-02 10:08+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -36,6 +36,14 @@ msgstr ""
|
||||
msgid "My dashboard"
|
||||
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/base.html:34
|
||||
msgid "Invenio"
|
||||
@@ -106,7 +114,7 @@ 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:86
|
||||
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/recent_uploads.html:88
|
||||
msgid "More"
|
||||
msgstr ""
|
||||
|
||||
@@ -351,7 +359,7 @@ msgstr ""
|
||||
msgid "Publication date"
|
||||
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"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -100,3 +100,8 @@ def index():
|
||||
return render_template(
|
||||
"invenio_theme_tugraz/index.html", records=records_serializer(records)
|
||||
)
|
||||
|
||||
|
||||
def locked():
|
||||
"""Error page for status locked."""
|
||||
return render_template("invenio_theme_tugraz/423.html")
|
||||
|
||||
Reference in New Issue
Block a user