From 7ac561a0337cbe1bbf9f18f53f5600d410b12df7 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 2 May 2025 15:55:19 +0100 Subject: [PATCH] Attempt to fix jinja templates --- .../templates/invenio_theme_iform/.gitignore | 1 + .../templates/invenio_theme_iform/423.html | 10 +- .../accounts/accounts_base.html | 170 ++++++----- .../accounts/header_login.html | 58 ++-- .../accounts/login_user.html | 165 +++++----- .../accounts/register_user.html | 163 +++++----- .../templates/invenio_theme_iform/base.html | 152 +++++----- .../invenio_theme_iform/benefits.html | 38 +-- .../invenio_theme_iform/contact_us.html | 35 ++- .../invenio_theme_iform/default_error.html | 24 +- .../templates/invenio_theme_iform/footer.html | 284 ++++++++++-------- .../frontpage_overview.html | 97 +++--- .../templates/invenio_theme_iform/header.html | 128 ++++---- .../templates/invenio_theme_iform/index.html | 38 ++- .../invenio_theme_iform/macros/authors.html | 37 +-- .../templates/invenio_theme_iform/navbar.html | 161 +++++----- .../invenio_theme_iform/overview.html | 209 +++++++------ .../invenio_theme_iform/recent_uploads.html | 133 ++++---- 18 files changed, 1020 insertions(+), 883 deletions(-) create mode 100644 invenio_theme_iform/templates/invenio_theme_iform/.gitignore diff --git a/invenio_theme_iform/templates/invenio_theme_iform/.gitignore b/invenio_theme_iform/templates/invenio_theme_iform/.gitignore new file mode 100644 index 0000000..326d9f4 --- /dev/null +++ b/invenio_theme_iform/templates/invenio_theme_iform/.gitignore @@ -0,0 +1 @@ +.zed diff --git a/invenio_theme_iform/templates/invenio_theme_iform/423.html b/invenio_theme_iform/templates/invenio_theme_iform/423.html index d8bfc37..e838ece 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/423.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/423.html @@ -1,14 +1,14 @@ {# Copyright (C) 2024 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform 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 %} -

- {{ _("Locked") }} -

-

{{ _("The resource that is being accessed is locked.") }}

+

{{_("Locked")}}

+

{{_("The resource that is being accessed is locked.")}}

{% endblock message %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/accounts/accounts_base.html b/invenio_theme_iform/templates/invenio_theme_iform/accounts/accounts_base.html index 6d24c11..557048e 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/accounts/accounts_base.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/accounts/accounts_base.html @@ -1,102 +1,100 @@ {# Copyright (C) 2020-2021 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} + - - - {%- block head %} - {%- block head_meta %} - - - - {%- if description %}{% endif %} - {%- if keywords %}{% endif %} - {%- if config.get('THEME_GOOGLE_SITE_VERIFICATION', None) %} - {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} - - {%- endfor %} - {%- endif %} - {%- endblock head_meta %} - {%- block head_title %} - {%- set title = title or _(config.THEME_SITENAME) or _('Invenio') %} - {{ title }} - {%- endblock head_title %} - {%- block head_links %} - - {%- if keywords %}{% endif %} - {%- block head_links_langs %} - {%- if alternate_urls %} - {%- for alt_ln, alternate_url in alternate_urls.items() %} - - {%- endfor %} - {%- endif %} - {%- endblock %} - {%- block head_apple_icons %} - {%- for size in [144, 114, 72, 57] %} - {%- set icon_name = 'apple-touch-icon-%d-precomposed.png' | format(size) %} - - {%- endfor %} - {%- endblock head_apple_icons %} - {%- endblock head_links %} - {%- block header %} - {% endblock header %} - {%- block css %} - {{ webpack['theme.css'] }} - {{ webpack['invenio-theme-tugraz-theme.css'] }} - - + - {%- endblock css %} - {%- endblock head %} - - - {% if not config.THEME_TUGRAZ_PRODUCTION %} -
-

{{ _ ("Test Instance") }}

-

{{ _ ("This is the test instance of the TU Graz Repository.") }}

-
- {% endif %} - {%- block body %} - {%- block browserupgrade %} - - {%- endblock browserupgrade %} - {%- block body_inner %} - {%- block navbar_header %} - {%- include "invenio_theme_tugraz/navbar.html" %} - - {%- block flashmessages %} - {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} - {{ flashed_messages() }} - {%- endblock %} - {%- endblock navbar_header %} - {# + {%- endblock browserupgrade %} + {%- block body_inner %} + + {%- block navbar_header %} + {%- include "invenio_theme_iform/navbar.html" %} + + {%- block flashmessages %} + {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} + {{ flashed_messages() }} + + {%- endblock %} + {%- endblock navbar_header %} + + {# {%- block page_header %} {% include config.THEME_HEADER_TEMPLATE %} {%- endblock page_header %} -#} - {%- block page_body %} - {% include "invenio_theme/body.html" %} - {%- endblock page_body %} - {%- endblock body_inner %} - {%- block javascript %} - {% include config.THEME_JAVASCRIPT_TEMPLATE %} - {%- endblock javascript %} - {%- block trackingcode %} - {% include config.THEME_TRACKINGCODE_TEMPLATE %} - {%- endblock %} - {%- endblock body %} - + #} + + {%- block page_body %} +{% include "invenio_theme/body.html" %} + {%- endblock page_body %} + {%- endblock body_inner %} + {%- block javascript %} +{% include config.THEME_JAVASCRIPT_TEMPLATE %} + {%- endblock javascript %} + {%- block trackingcode %}{% include config.THEME_TRACKINGCODE_TEMPLATE %} + {%- endblock %} + {%- endblock body %} + diff --git a/invenio_theme_iform/templates/invenio_theme_iform/accounts/header_login.html b/invenio_theme_iform/templates/invenio_theme_iform/accounts/header_login.html index fd50e8a..512a0af 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/accounts/header_login.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/accounts/header_login.html @@ -1,26 +1,36 @@ {%- if config.ACCOUNTS %} - {%- if not current_user.is_authenticated %} - {%- if config.SECURITY_REGISTERABLE %} -
- {{ _ ("Sign up") }} -
- {%- endif %} -
- {{ _ ("Log in") }} -
- {%- else %} - {%- if config.USERPROFILES %} -
- - {{ current_user.email }} - -
-
- {{ _("Sign out") }} -
- {%- endif %} - {%- endif %} + +{%- if not current_user.is_authenticated %} + +{%- if config.SECURITY_REGISTERABLE %} +
+ + {{_ ("Sign up")}} + +
+ {%- endif %} + +
+ + {{_ ("Log in")}} + +
+ + +{%- else %} +{%- if config.USERPROFILES %} + +
+ + {{ current_user.email }} + +
+
+ + {{_('Sign out')}} + +
+ +{%- endif %} +{%- endif %} {%- endif %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/accounts/login_user.html b/invenio_theme_iform/templates/invenio_theme_iform/accounts/login_user.html index b8cb474..65439f4 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/accounts/login_user.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/accounts/login_user.html @@ -1,91 +1,98 @@ {# Copyright (C) 2020-2021 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform 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_ACCOUNT_BASE %} + +{% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %} + + {% from "invenio_accounts/_macros.html" import render_field, form_errors %} {%- from "invenio_oauthclient/_macros.html" import oauth_button %} {% block page_body %} -
-
-
-
-
- - {%- block registerable %} - {%- if security.registerable %} -
- {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} - {{ _("Sign up") }} -
- {%- endif %} - {%- endblock registerable %} - {%- block recoverable %} - {%- if security.recoverable %} - - {%- endif %} - {%- endblock recoverable %} -
+
+
+
+
+ +
+ + + {%- block registerable %} + {%- if security.registerable %} +
+ {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} + {{ _('Sign up') }} +
+ {%- endif %} + {%- endblock registerable %} + + {%- block recoverable %} + {%- if security.recoverable %} + + {%- endif %} + {%- endblock recoverable %}
+
+
{% endblock page_body %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/accounts/register_user.html b/invenio_theme_iform/templates/invenio_theme_iform/accounts/register_user.html index 6361201..44a9ec8 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/accounts/register_user.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/accounts/register_user.html @@ -1,87 +1,96 @@ {# Copyright (C) 2020 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform 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_ACCOUNT_BASE %} + +{% extends config.INVENIO_THEME_IFORM_ACCOUNT_BASE %} + {% from "invenio_accounts/_macros.html" import render_field, form_errors %} + {% block page_body %} -
-
-
-
-

{{ _("Create an Account") }}

-
-
-
-

{{ _("Citeable. Discoverable.") }}

-

- {{ _("Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable.") }} - -

{{ _("Communities.") }}

-

- {{ _("Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines).") }} - -

{{ _("Trusted Research Data Management") }}

-

- {{ _("Built on top of TU Graz expertise in managing of the research data from the Graz University of Technology.") }} - -

-
-
- {# Sigup with SSO #} - {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} -
- -
- {{ _ ("Or") }} -
- {%- endif %} - {%- block form_header %} - {# can add a header img #} - {%- block form_outer %} - {%- endblock form_outer %} - {%- endblock form_header %} - {%- with form = register_user_form %} - {%- set accordion_active = "active" if form.errors else "" %} -
-
-
- {{ _("Sign up with repository credentials") }} - -
-
-
- {{ form_errors(form) }} - {{ form.hidden_tag() }} - {%- block registration_form_fields scoped %} - {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} - {{ render_field(form.password, icon="lock icon", errormsg=False) }} - {%- if form.password_confirm %}{{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }}{%- endif %} - {%- endblock registration_form_fields %} - {%- if form.recaptcha %}
{{ form.recaptcha() }}
{%- endif %} -
- -
-
-
-
-
- {%- endwith %} -
-
-
+
+ +
+ +
+
+

{{ _("Create an Account") }}

+ +
+
+

{{ _("Citeable. Discoverable.") }}

+

+ {{ _("Uploads get a Digital Object Identifier (DOI) to make them easily and uniquely citeable.")}} +

{{ _("Communities.") }}

+

+ {{ _("Accept or reject uploads to your own community (e.g workshops, EU projects, institutions or entire disciplines).") }} + +

{{ _("Trusted Research Data Management") }}

+

+ {{ _("Built on top of I-Form expertise in them managing of research data.") }} + +

+
+ +
+ {# Sigup with SSO #} + {%- if config.INVENIO_CONFIG_IFORM_SHIBBOLETH %} +
+ +
{{_ ("Or") }}
+ {%- endif %} + + {%- block form_header %} + {# can add a header img #} + {%- block form_outer %} + {%- endblock form_outer %} + {%- endblock form_header %} + + {%- with form = register_user_form %} + {%- set accordion_active = "active" if form.errors else "" %} +
+
+
+ {{ _("Sign up with repository credentials") }} + +
+
+
+ {{ form_errors(form) }} + {{ form.hidden_tag() }} + {%- block registration_form_fields scoped %} + {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} + {{ render_field(form.password, icon="lock icon", errormsg=False) }} + {%- if form.password_confirm %} + {{ render_field(form.password_confirm, icon="lock icon", errormsg=False) }} + {%- endif %} + {%- endblock registration_form_fields %} + + {%- if form.recaptcha %} +
{{ form.recaptcha() }}
+ {%- endif %} + +
+ +
+
+
+
+
+ {%- endwith %} +
+
+
+
+ + {% endblock page_body %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/base.html b/invenio_theme_iform/templates/invenio_theme_iform/base.html index 5273a90..6df257b 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/base.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/base.html @@ -1,78 +1,94 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} + - - - {%- block head %} - {%- block head_meta %} - - - - {%- if description %}{% endif %} - {%- if keywords %}{% endif %} - {%- if config.get("THEME_GOOGLE_SITE_VERIFICATION", None) %} - {%- for google_id in config.THEME_GOOGLE_SITE_VERIFICATION %} - - {%- endfor %} - {%- endif %} - {%- endblock head_meta %} - {%- block head_title %} - {%- set title = title or _(config.THEME_SITENAME) or _("Invenio") %} - {{ title }} - {%- endblock head_title %} - {%- block head_links %} - - {%- if keywords %}{% endif %} - {%- block head_links_langs %} - {%- if alternate_urls %} - {%- for alt_ln, alternate_url in alternate_urls.items() %} - - {%- endfor %} - {%- endif %} - {%- endblock %} - {%- endblock head_links %} - {%- block header %} - {% endblock header %} - {%- block css %} - {{ webpack["theme.css"] }} - {{ webpack["invenio-theme-tugraz-theme.css"] }} - {%- endblock css %} - {%- endblock head %} - - - {%- block body %} - {%- block browserupgrade %} - - {%- endblock browserupgrade %} - {%- block body_inner %} - {%- block page_header %} - {% include config.THEME_HEADER_TEMPLATE %} - {%- endblock page_header %} - {%- block page_body %} - {% include "invenio_theme/body.html" %} - {%- endblock page_body %} - {%- block page_footer %} - {% include config.THEME_FOOTER_TEMPLATE %} - {%- endblock page_footer %} - {%- endblock body_inner %} - {%- block javascript %} - {% include config.THEME_JAVASCRIPT_TEMPLATE %} - {%- endblock javascript %} - {%- block trackingcode %} - {% include config.THEME_TRACKINGCODE_TEMPLATE %} - {%- endblock %} - {%- endblock body %} - + {%- endblock browserupgrade %} + + {%- block body_inner %} + {%- block page_header %} + {% include config.THEME_HEADER_TEMPLATE %} + {%- endblock page_header %} + + {%- block page_body %} + {% include "invenio_theme/body.html" %} + {%- endblock page_body %} + + {%- block page_footer %} + {% include config.THEME_FOOTER_TEMPLATE %} + {%- endblock page_footer %} + {%- endblock body_inner %} + + {%- block javascript %} + {% include config.THEME_JAVASCRIPT_TEMPLATE %} + {%- endblock javascript %} + + {%- block trackingcode %} + {% include config.THEME_TRACKINGCODE_TEMPLATE %} + {%- endblock %} + {%- endblock body %} + diff --git a/invenio_theme_iform/templates/invenio_theme_iform/benefits.html b/invenio_theme_iform/templates/invenio_theme_iform/benefits.html index 196049b..a8c3797 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/benefits.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/benefits.html @@ -1,33 +1,21 @@ {# Copyright (C) 2020-2024 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} +
-

{{ _("Good reasons to use the Repository of the TU Graz") }}

-
    -
  • - {{ _("Safe") }} — {{ _("Your research results are permanently available.") }} -
  • -
  • - {{ _("Trusted") }} — {{ _("A service from TU Graz, developed in cooperation with CERN.") }} -
  • -
  • - {{ _("Citeable") }} — {{ _("Every upload is assigned a Digital Object Identifier (DOI).") }} -
  • -
  • - {{ _("No waiting time") }} — {{ _("Uploads are made available online as soon as you hit publish. Your DOI is registered within seconds.") }} -
  • -
  • - {{ _("Open or closed") }} — {{ _("You determine the visibility of your uploads. A restricted access mode is possible.") }} -
  • -
  • - {{ _("Versioning") }} — {{ _("Easily update your dataset with the versioning feature.") }} -
  • -
  • - {{ _("Usage statistics") }} — {{ _("All uploads display standards compliant usage statistics. ") }} ({{ _("More") }}) -
  • -
+

{{ _("Good reasons to use the I-Form Repository") }}

+ +
    +
  • {{_("Safe") }} — {{_("Your research results are permanently available.") }}
  • +
  • {{_("Trusted") }} — {{_("A service from I-Form, developed in cooperation with CERN.") }}
  • +
  • {{_("Citeable") }} — {{_("Every upload is assigned a Digital Object Identifier (DOI).") }}
  • +
  • {{_("No waiting time") }} — {{_("Uploads are made available online as soon as you hit publish. Your DOI is registered within seconds.") }}
  • +
  • {{_("Open or closed") }} — {{_("You determine the visibility of your uploads. A restricted access mode is possible.") }}
  • +
  • {{_("Versioning") }} — {{_("Easily update your dataset with the versioning feature.") }}
  • +
  • {{_("Usage statistics") }} — {{ _("All uploads display standards compliant usage statistics. ") }} ({{ _("More") }})
  • +
diff --git a/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html b/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html index 85c050d..18023c9 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html @@ -1,22 +1,29 @@ {# Copyright (C) 2020-2024 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} +
-

{{ _("Need help?") }}

- {%- if config.THEME_TUGRAZ_CONTACT_FORM %} - - {%- endif %} -

{{ _("We can help with:") }}

-
    -
  • {{ _("Upload your research results, software, preprints, etc.") }}
  • -
  • {{ _("Increase upload limit beyond our default policy of 10GB.") }}
  • -
  • {{ _("Establish contact with data stewards.") }}
  • -
  • {{ _("Find individual solutions.") }}
  • -
+

{{ _("Need help?") }}

+ + {%- if config.THEME_IFORM_CONTACT_FORM %} + + {%- endif %} +

+ {{ _("We can help with:") }} +

+ +
    +
  • {{ _("Upload your research results, software, preprints, etc.") }}
  • +
  • {{ _("Increase upload limit beyond our default policy of 10GB.") }}
  • +
  • {{ _("Establish contact with data stewards.") }}
  • +
  • {{ _("Find individual solutions.") }}
  • +
diff --git a/invenio_theme_iform/templates/invenio_theme_iform/default_error.html b/invenio_theme_iform/templates/invenio_theme_iform/default_error.html index 5ba2cdc..3cfcc53 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/default_error.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/default_error.html @@ -1,17 +1,21 @@ {# Copyright (C) 2024 Graz University of Technology. - - invenio-theme-tugraz is free software; you can redistribute it and/or + + invenio-theme-iform 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 %} -

{{ _("Internal server error") }}

+ #} + + {% extends config.THEME_ERROR_TEMPLATE %} + + {% block message %} +

{{ _('Internal server error') }}

- {{ _('Please contact our support - to let us know about this error.').format(support_email=config.THEME_TUGRAZ_SUPPORT_EMAIL) - }} + {{ _( + 'Please contact our support + to let us know about this error.' + ).format(support_email=config.THEME_IFORM_SUPPORT_EMAIL) + }}

{# TODO: provide g.sentry_event_id here once sentry is configured, cf. invenio_theme/500.html #} -{% endblock message %} + {% endblock message %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/footer.html b/invenio_theme_iform/templates/invenio_theme_iform/footer.html index 536e63f..7cf44e9 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/footer.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/footer.html @@ -1,147 +1,169 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} -{%- block css %}{{ webpack['invenio-theme-tugraz-theme.css'] }}{%- endblock %} + +{%- block css %} + {{ webpack['invenio-theme-iform-theme.css'] }} +{%- endblock %} + {%- block javascript %} - {{ webpack['invenio-theme-tugraz-js.js'] }} + {{ webpack['invenio-theme-iform-js.js'] }} {%- endblock javascript %} +
+ diff --git a/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html b/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html index e52cc04..1ced273 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html @@ -1,65 +1,78 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} +
-
-
-
-

{{ _("Research Results") }}

-
{{ _("Frontpage: Description for research results") }}
- +
+
+
+
+

{{ _("Publications") }}

+ +
+ {{ _("Frontpage: Description for publications") }}
-
-
-

{{ _("Publications") }}

-
{{ _("Frontpage: Description for publications") }}
-
+
  • + {{ _("Search for publications") }} +
  • + +
    +
    +
    +
    +

    {{ _("Educational Resources") }}

    + +
    + {{ _("Frontpage: Description for open educational resources") }}
    -
    -
    -

    {{ _("Educational Resources") }}

    -
    {{ _("Frontpage: Description for open educational resources") }}
    -
    -
    +
  • + {{ _("Search for educational resourses") }} +
  • +
  • + {{ _("Upload educational resources") }} +
  • + +
    +
    diff --git a/invenio_theme_iform/templates/invenio_theme_iform/header.html b/invenio_theme_iform/templates/invenio_theme_iform/header.html index 640ccdf..8a49505 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/header.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/header.html @@ -1,72 +1,74 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} -{% if not config.THEME_TUGRAZ_PRODUCTION %} -
    -

    {{ _("Test Instance") }}

    -

    {{ _("This is the test instance of the TU Graz Repository.") }}

    -
    + +{% if not config.THEME_IFORM_PRODUCTION %} +
    +

    {{ _("Test Instance") }}

    +

    {{ _("This is the test instance of the I-Form Repository.") }}

    +
    {% endif %} +
    -
    - {%- block site_banner %} - {% from 'invenio_banners/banner.html' import banner %} - {{ banner() }} - {%- endblock site_banner %} - {%- block navbar %} - - {%- endblock navbar %} - {%- block flashmessages %} - {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} - {{ flashed_messages() }} - {%- endblock %} -
    +
    + {%- block site_banner %} + {% from 'invenio_banners/banner.html' import banner %} + {{ banner() }} + {%- endblock site_banner %} + + {%- block navbar %} + + {%- endblock navbar %} + + {%- block flashmessages %} + {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} + {{ flashed_messages() }} + {%- endblock %} +
    diff --git a/invenio_theme_iform/templates/invenio_theme_iform/index.html b/invenio_theme_iform/templates/invenio_theme_iform/index.html index ef64398..9cbad90 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/index.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/index.html @@ -1,25 +1,35 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform 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 %} + +{%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %} + {%- block javascript %} - {{ webpack['invenio-theme-tugraz-js.js'] }} + {{ webpack['invenio-theme-iform-js.js'] }} {%- endblock javascript %} + {%- block page_body %} -
    - -
    - {% include "invenio_theme_tugraz/frontpage_overview.html" %} - {% include "invenio_theme_tugraz/recent_uploads.html" %} - -
    - {% include "invenio_theme_tugraz/contact_us.html" %} - {% include "invenio_theme_tugraz/benefits.html" %} -
    -
    + +
    + + +
    + + {% include "invenio_theme_iform/frontpage_overview.html" %} + + {% include "invenio_theme_iform/recent_uploads.html" %} + + +
    + {% include "invenio_theme_iform/contact_us.html" %} + {% include "invenio_theme_iform/benefits.html" %}
    +
    +
    + + {%- endblock %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html b/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html index 2093b27..e6b6aa1 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html @@ -2,28 +2,29 @@ Copyright (C) 2020 Zenodo Copyright (C) 2020 TUGRAZ - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. -#} + #} + {%- macro creators (authors_list) %} - {%- for creators in authors_list %} - {%- if creators.identifiers and creators.identifiers.orcid %} - - - - {%- endif %} - {{ creators.person_or_org.name }} - {% if not loop.last %};{% endif %} - {%- endfor %} + +{%- for creators in authors_list %} + +{%- if creators.identifiers and creators.identifiers.orcid %} + +{%- endif %} + +{{creators.person_or_org.name}} +{% if not loop.last %}; {% endif %} + +{%- endfor %} {%- endmacro %} + {%- macro contributors(contributors_list) %} - {%- for group in contributors_list|groupby('type') %} -
    {{ group.grouper }}(s)
    - {{ authors(group.list) }} - {%- endfor %} +{%- for group in contributors_list|groupby('type')%} +
    {{group.grouper}}(s)
    +{{authors(group.list)}} +{%- endfor %} {%- endmacro %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/navbar.html b/invenio_theme_iform/templates/invenio_theme_iform/navbar.html index a6de7d1..d3631d4 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/navbar.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/navbar.html @@ -1,96 +1,101 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} + {% set options = [ - { - "key": "records", - "text": _("All"), - "value": url_for("invenio_search_ui.search"), - "title": "repo", - },{ + { + "key": "records", + "text": _("All"), + "value": url_for("invenio_search_ui.search"), + "title": "repo", + },{ "key": "rdm", "text": _("Research Results"), "value": "/records/search", "title": "Research Data", -},{ -"key": "marc21", -"text": _("Publications"), -"value": url_for("invenio_records_marc21.search"), -"title": "publication", -},{ -"key": "lom", -"text": _("Educational Resources"), -"value": url_for("invenio_records_lom.search"), -"title": "oer", -} -] %} + },{ + "key": "marc21", + "text": _("Publications"), + "value": url_for("invenio_records_marc21.search"), + "title": "publication", + },{ + "key": "lom", + "text": _("Educational Resources"), + "value": url_for("invenio_records_lom.search"), + "title": "oer", + } +] +%} +
    -
    -
    -
    - + diff --git a/invenio_theme_iform/templates/invenio_theme_iform/overview.html b/invenio_theme_iform/templates/invenio_theme_iform/overview.html index 704a46f..d4248d2 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/overview.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/overview.html @@ -1,107 +1,130 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform 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 %} + +{%- extends config.INVENIO_THEME_IFORM_BASE_TEMPLATE %} + {%- set active_dashboard_menu_item = "overview" %} {%- set title = _("Overview") %} + {% block javascript %} - {{ super() }} - {{ webpack['invenio-theme-tugraz-unlock.js'] }} + {{ super() }} + {{ webpack['invenio-theme-iform-unlock.js'] }} {% endblock javascript %} + {%- block page_body %} - {%- block user_dashboard_header %} - {% include "invenio_app_rdm/users/header.html" %} - {%- endblock user_dashboard_header %} -
    -

    Overview

    -
    - {% if is_tugraz_authenticated %} - {# 3 columns: Research-Uploads, Communities, and Requests #} -
    -
    -

    {{ _("Research Results") }}

    - - Research Results - -
    {{ _("Overview: Description for research results") }}
    -
    -
    -
    -
    -

    {{ _("Communities") }}

    - - Communities - -
    {{ _("Overview: Description of Communities") }}
    -
    -
    -
    -
    -

    {{ _("Requests") }}

    - - Requests - -
    {{ _("Overview: Description of Requests") }}
    -
    -
    - {% else %} - {# not is_tugraz_authenticated #} - {# 1 column: greyed out Research-Uploads #} -
    - {# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #} - - {# actual column contents start here #} -
    -

    {{ _("Research Results") }}

    -
    - Research Results -
    -
    {{ _("Overview: Description for research results") }}
    -
    -
    - {% endif %} - {% if can_view_marc21 %} -
    -
    -

    {{ _("Publications") }}

    - - Publications - -
    {{ _("Overview: Description for publications") }}
    -
    -
    - {% endif %} -
    -
    -

    {{ _("Educational Resources") }}

    - - Open Educational Resources - -
    {{ _("Overview: Description for open educational resources") }}
    -
    -
    + {%- block user_dashboard_header %} + {% include "invenio_app_rdm/users/header.html" %} + {%- endblock user_dashboard_header %} + +
    +

    Overview

    + +
    + {% if is_iform_authenticated %} + {# 3 columns: Research-Uploads, Communities, and Requests #} +
    +
    +

    {{ _("Research Results") }}

    + + Research Results + +
    + {{ _("Overview: Description for research results") }} +
    +
    +
    +
    +

    {{ _("Communities") }}

    + + Communities + +
    + {{ _("Overview: Description of Communities") }} +
    +
    +
    +
    +
    +

    {{ _("Requests") }}

    + + Requests + +
    + {{ _("Overview: Description of Requests") }} +
    +
    +
    + {% else %} {# not is_iform_authenticated #} + {# 1 column: greyed out Research-Uploads #} +
    + {# a modal's HTML can be placed anywhere, so I placed it here, right before it's used #} + + + {# actual column contents start here #} +
    +

    {{ _("Research Results") }}

    +
    + Research Results +
    +
    + {{ _("Overview: Description for research results") }} +
    +
    +
    + {% endif %} + {% if can_view_marc21 %} +
    +
    +

    {{ _("Publications") }}

    + + Publications + +
    + {{ _("Overview: Description for publications") }} +
    +
    +
    + {% endif %} +
    +
    +

    {{ _("Educational Resources") }}

    + + Open Educational Resources + +
    + {{ _("Overview: Description for open educational resources") }} +
    +
    +
    +
    + {%- endblock %} diff --git a/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html b/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html index f1fb91c..bfcdd7a 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html @@ -1,70 +1,91 @@ {# Copyright (C) 2020-2023 Graz University of Technology. - invenio-theme-tugraz is free software; you can redistribute it and/or + invenio-theme-iform is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} +
    -

    {{ _("Recent uploads") }}

    - {% if not records %} -
    -

    {{ _("There are no public records to show.") }}

    -
    - {% endif %} - {%- for r in records %} - {%- set creation_date = r.created | from_isodatetime -%} - {%- set record_url = r.original.view %} -
    -
    - {# Publication date/Version badge #} - {{ r.created_date_l10n_long }} - {# Resource type badge #} - {% if r.metadata.types | length > 0 %} - {{ r.metadata.types[0] }} - {% endif %} - - - {{ r.access_status.title_l10n }} - - {{ r.original.schema_l10n }} -
    -

    - {{ r.metadata.titles[0] }} -

    -

    - {%- for creator in r.metadata.creators %}{{ creator }}{%- endfor %} -

    - -
    - {%- for subject in r.metadata.subjects %}{{ subject }}{%- endfor %} -
    - - {# +

    {{ _("Recent uploads") }}

    + + {% if not records %} +
    +

    + {{ _("There are no public records to show.") }} +

    +
    + {% endif %} + + {%- for r in records %} + {%- set creation_date = r.created | from_isodatetime -%} + {%- set record_url = r.original.view %} + +
    +
    + {# Publication date/Version badge #} + + {{ r.created_date_l10n_long }} + + + {# Resource type badge #} + {% if r.metadata.types | length > 0%} + + {{ r.metadata.types[0] }} + + {% endif %} + + + + {{ r.access_status.title_l10n }} + + + + {{ r.original.schema_l10n }} + +
    + +

    + + {{ r.metadata.titles[0] }} + +

    + +

    + {%- for creator in r.metadata.creators %} + {{ creator }} + {%- endfor %} +

    + + + +
    + {%- for subject in r.metadata.subjects %} + {{ subject }} + {%- endfor %} +
    + + {# {% trans user=userprofile, date=creation_date | dateformat("long")%} Uploaded on {{date}} {% endtrans %} #} - -
    -
    -
    - {%- endfor %} - {% if records %} -
    - {%- endif %} +
    +
    + {%- endfor %} + + {% if records %} + + {%- endif %}