From a4eae3cd87aa6a2cc3ae3ac37811668734cf0f95 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 2 May 2025 15:06:54 +0100 Subject: [PATCH] Formatted jinja templates with djlint --- .../templates/invenio_theme_iform/423.html | 8 +- .../accounts/accounts_base.html | 168 +++++------ .../accounts/header_login.html | 58 ++-- .../accounts/login_user.html | 161 +++++----- .../accounts/register_user.html | 151 +++++----- .../templates/invenio_theme_iform/base.html | 153 +++++----- .../invenio_theme_iform/benefits.html | 36 ++- .../invenio_theme_iform/contact_us.html | 33 +- .../invenio_theme_iform/default_error.html | 20 +- .../templates/invenio_theme_iform/footer.html | 282 ++++++++---------- .../frontpage_overview.html | 95 +++--- .../templates/invenio_theme_iform/header.html | 124 ++++---- .../templates/invenio_theme_iform/index.html | 34 +-- .../invenio_theme_iform/macros/authors.html | 35 ++- .../templates/invenio_theme_iform/navbar.html | 159 +++++----- .../invenio_theme_iform/overview.html | 203 ++++++------- .../invenio_theme_iform/recent_uploads.html | 131 ++++---- 17 files changed, 856 insertions(+), 995 deletions(-) diff --git a/invenio_theme_iform/templates/invenio_theme_iform/423.html b/invenio_theme_iform/templates/invenio_theme_iform/423.html index 88ec245..d8bfc37 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/423.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/423.html @@ -5,10 +5,10 @@ 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 41c3641..6d24c11 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 @@ -5,96 +5,98 @@ 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_tugraz/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 512a0af..fd50e8a 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,36 +1,26 @@ {%- if config.ACCOUNTS %} - -{%- if not current_user.is_authenticated %} - -{%- if config.SECURITY_REGISTERABLE %} - - {%- endif %} - - - - -{%- else %} -{%- if config.USERPROFILES %} - - - - -{%- endif %} -{%- endif %} + {%- if not current_user.is_authenticated %} + {%- if config.SECURITY_REGISTERABLE %} + + {%- endif %} + + {%- else %} + {%- if config.USERPROFILES %} + + + {%- 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 1a63997..b8cb474 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 @@ -5,94 +5,87 @@ modify it under the terms of the MIT License; see LICENSE file for more details. #} - {% extends config.INVENIO_THEME_TUGRAZ_ACCOUNT_BASE %} - - {% from "invenio_accounts/_macros.html" import render_field, form_errors %} {%- from "invenio_oauthclient/_macros.html" import oauth_button %} {% block page_body %} -
-
-
-
- -
- -
{% 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 9a13114..6361201 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 @@ -5,92 +5,83 @@ modify it under the terms of the MIT License; see LICENSE file for more details. #} - {% extends config.INVENIO_THEME_TUGRAZ_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") }} - +
+
+
+
+

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

-
-
- {{ 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 %} - -
- +
+
+

{{ _("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 %} +
+
- {%- 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 6103b49..5273a90 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/base.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/base.html @@ -5,93 +5,74 @@ 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 1e37332..196049b 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/benefits.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/benefits.html @@ -5,17 +5,29 @@ 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 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") }}) +
  • +
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 34ea9fe..85c050d 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/contact_us.html @@ -5,25 +5,18 @@ 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_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.") }}
  • +
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 d6f2bfa..5ba2cdc 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/default_error.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/default_error.html @@ -4,18 +4,14 @@ 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 %} -

{{ _('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_TUGRAZ_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 f6ae2b9..536e63f 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/footer.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/footer.html @@ -5,165 +5,143 @@ 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-tugraz-theme.css'] }}{%- endblock %} {%- block javascript %} - {{ webpack['invenio-theme-tugraz-js.js'] }} + {{ webpack['invenio-theme-tugraz-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 073b572..e52cc04 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/frontpage_overview.html @@ -5,74 +5,61 @@ modify it under the terms of the MIT License; see LICENSE file for more details. #} -
-
-
-
-

{{ _("Research Results") }}

- -
- {{ _("Frontpage: Description for research results") }} -
- - +
- - +
- - +
+
-
diff --git a/invenio_theme_iform/templates/invenio_theme_iform/header.html b/invenio_theme_iform/templates/invenio_theme_iform/header.html index 71cb09f..640ccdf 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/header.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/header.html @@ -5,70 +5,68 @@ 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.") }}

-
+
+

{{ _("Test Instance") }}

+

{{ _("This is the test instance of the TU Graz 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 5c79089..ef64398 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/index.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/index.html @@ -5,31 +5,21 @@ modify it under the terms of the MIT License; see LICENSE file for more details. #} - {%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %} - {%- block javascript %} - {{ webpack['invenio-theme-tugraz-js.js'] }} + {{ webpack['invenio-theme-tugraz-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_tugraz/frontpage_overview.html" %} + {% include "invenio_theme_tugraz/recent_uploads.html" %} + +
+ {% include "invenio_theme_tugraz/contact_us.html" %} + {% include "invenio_theme_tugraz/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 4705883..2093b27 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/macros/authors.html @@ -5,26 +5,25 @@ 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. - #} - +#} {%- 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 2cf9144..a6de7d1 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/navbar.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/navbar.html @@ -5,97 +5,92 @@ 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 62d16bc..704a46f 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/overview.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/overview.html @@ -5,126 +5,103 @@ modify it under the terms of the MIT License; see LICENSE file for more details. #} - {%- extends config.INVENIO_THEME_TUGRAZ_BASE_TEMPLATE %} - {%- set active_dashboard_menu_item = "overview" %} {%- set title = _("Overview") %} - {% block javascript %} - {{ super() }} - {{ webpack['invenio-theme-tugraz-unlock.js'] }} + {{ super() }} + {{ webpack['invenio-theme-tugraz-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 #} - - {%- 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 d992e46..f1fb91c 100644 --- a/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html +++ b/invenio_theme_iform/templates/invenio_theme_iform/recent_uploads.html @@ -5,87 +5,66 @@ 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 %} + -
-
- {%- endfor %} - - {% if records %} - - {%- endif %} + {%- endif %}