Compare commits

...

21 Commits

Author SHA1 Message Date
Mojib Wali cb9b80668c release: v3.9.2 2022-06-28 15:48:50 +02:00
David 5bf5ce4268 fix: adopt renaming of serialize function (#269) 2022-06-28 15:39:44 +02:00
Mojib Wali 79a9014878 release v3.9.1 2022-06-02 10:38:05 +02:00
David 708d10ae1a fix: restrict babel version (#266) 2022-05-30 15:39:15 +02:00
David 0dc9240e73 dep: adapt to v9 (#263) 2022-05-30 13:58:46 +02:00
David 7f1286bd6b fix: add trigger to accordion (#265) 2022-05-30 13:58:20 +02:00
Christoph Ladurner f883dc7760 release v3.9.0 2022-05-27 15:32:50 +02:00
Christoph Ladurner 7c250a41fe refactor 2022-05-25 12:47:09 +02:00
Christoph Ladurner c9ff126c28 align with invenio-app-rdm community changes 2022-05-25 12:47:09 +02:00
Christoph Ladurner 597b8b0905 add .git-blame-ignore-revs 2022-05-12 09:06:52 +02:00
Christoph Ladurner 903498185f migrate to use black as opinionated auto formater 2022-05-12 09:06:52 +02:00
Christoph Ladurner 4fd0501c58 global: migrate setup.py to setup.cfg 2022-05-12 09:06:52 +02:00
mb-wali d8c91df396 v3.8.0 2022-03-03 11:01:12 +01:00
Mojib Wali 0da96559ec global: migrate to v8 2022-03-03 10:53:03 +01:00
mb-wali e73fc3633d v3.7.0 2021-12-07 10:01:49 +01:00
David aa2c3112df dep: bump config module (#252) 2021-12-06 14:51:33 +01:00
David 62d23f104c docs: adjust sphinx to flask2 (#251) 2021-12-06 14:47:55 +01:00
David 07d7e6fa0e update register and login view (#247)
fix: remove redundant closing div tag for register

ui: update register and login template with accordion

styling: modify accordion css

translation: add german translation
2021-11-08 10:33:11 +01:00
Mojib Wali 27f1501b31 v3.6.1 2021-09-01 12:02:36 +02:00
David Eckhard 6299da5ca2 fix: css for ui divider 2021-08-10 11:52:50 +02:00
David Eckhard 9ec241684d fix: add font locally and remove google dependency 2021-08-10 10:29:32 +02:00
33 changed files with 576 additions and 565 deletions
-9
View File
@@ -15,15 +15,6 @@ insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
charset = utf-8 charset = utf-8
# Python files
[*.py]
indent_size = 4
# isort plugin configuration
known_first_party = invenio_theme_tugraz
multi_line_output = 2
default_section = THIRDPARTY
skip = .eggs
# RST files (used by sphinx) # RST files (used by sphinx)
[*.rst] [*.rst]
indent_size = 4 indent_size = 4
+1
View File
@@ -0,0 +1 @@
cd71ecd24b8fc2253a58c60082c80a87c8085601
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install setuptools wheel pip install setuptools wheel babel
- name: Build package - name: Build package
run: | run: |
python setup.py compile_catalog sdist bdist_wheel python setup.py compile_catalog sdist bdist_wheel
+13 -29
View File
@@ -1,3 +1,11 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2022 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.
name: CI name: CI
on: on:
@@ -20,42 +28,18 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
python-version: [3.6, 3.7, 3.8, 3.9] python-version: [3.8, 3.9]
requirements-level: [min, pypi] requirements-level: [pypi]
db-service: [postgresql12] db-service: [postgresql13]
search-service: [elasticsearch7] search-service: [elasticsearch7]
exclude:
- python-version: 3.6
requirements-level: pypi
- python-version: 3.7
requirements-level: min
- python-version: 3.8
requirements-level: min
- python-version: 3.9
requirements-level: min
- db-service: postgresql12
requirements-level: min
- search-service: elasticsearch7
requirements-level: min
include: include:
- db-service: postgresql12
DB_EXTRAS: "postgresql"
- search-service: elasticsearch7 - search-service: elasticsearch7
SEARCH_EXTRAS: "elasticsearch7" SEARCH_EXTRAS: "elasticsearch7"
env: env:
DB: ${{ matrix.db-service }} DB: ${{ matrix.db-service }}
SEARCH: ${{ matrix.search-service }} SEARCH: ${{ matrix.search-service }}
EXTRAS: all,${{ matrix.DB_EXTRAS }},${{ matrix.SEARCH_EXTRAS }} EXTRAS: tests,${{ matrix.SEARCH_EXTRAS }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -67,7 +51,7 @@ jobs:
- name: Generate dependencies - name: Generate dependencies
run: | run: |
python -m pip install --upgrade pip setuptools py wheel requirements-builder pip install wheel requirements-builder
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip - name: Cache pip
uses: actions/cache@v2 uses: actions/cache@v2
+5
View File
@@ -5,6 +5,11 @@
# 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.
#
# 1) Create message catalog:
# $ python setup.py extract_messages
# $ python setup.py update_catalog -l de
# $ python setup.py compile_catalog
[main] [main]
host = https://www.transifex.com host = https://www.transifex.com
+88
View File
@@ -7,6 +7,94 @@
Changes Changes
======= =======
Version 3.9.2 (released 2022-06-28)
- fix: adopt renaming of serialize function (#269)
Version 3.9.1 (released 2022-06-02)
- fix: add trigger to accordion (#265)
- dep: adapt to v9 of invenioRDM(#263)
Version 3.9.0 (released 2022-05-27)
- global: migrate setup.py to setup.cfg #260
Version 3.8.0 (released 2022-03-03)
- global: migrate to v8 of invenioRDM #257
Version 3.7.0 (released 2021-12-07)
- dep: bump config module #252
- docs: adjust sphinx to flask2 #251
- update register and login view #247
Version 3.6.1 (released 2021-09-01)
- fix: add font locally and remove google dependency #242
- fix: css for ui divider #243
Version 3.6.0 (released 2021-05-08)
- config: removes i18n config #239
- revert: removes override for details,deposit page #238
- styling: changes deposit form segment color #234
- refactor: views & deposit override #235
- login_user: extended user login template #230
Version 3.4.1 (released 2021-06-04)
- global: route blueprint migrated to config-tugraz #228
Version 3.4.0 (released 2021-06-01)
- documents: adds reference guide version 2 #225
- ui: change title to data-tooltip #224
- global: migrate inveniordm v4 #226
Version 3.0.3 (released 2021-06-01)
- bugfix: removes overrides item #222
Version 3.0.2 (released 2021-05-17)
- feature: adds credits to footer #217
- ui: adapt color badges #220
- badges(ui): adds tug theme badge colors #221
Version 3.0.1 (released 2021-05-07)
- override depsit & edit #210
- ui: display access badge #212
- documents: adds missing documents #216
Version 3.0.0 (released 2021-04-30)
- Migrated to invenioRDM v3 #209
Version 2.0.9 (released 2021-04-15)
- bugfix: created field using old metadata #196
- fix: blur link on click, clickable login with TUG button #194
Version 2.0.6 (released 2021-04-8)
- bugfixes: modified config vars #191
Version 1.9.0 (released 2021-03-11)
- DOI minting #161
- Zammad contact Form #156
Version 1.0.3 (released 2020-07-10)
- firefox compatibility: centering the menu underline #40
- adds font-family #50
Version 1.0.1 (released 2020-07-08)
- Login page modified #48
Version 0.1.0 (released TBD) Version 0.1.0 (released TBD)
+4
View File
@@ -34,7 +34,11 @@ recursive-include invenio_theme_tugraz *.svg
recursive-include invenio_theme_tugraz *.less recursive-include invenio_theme_tugraz *.less
recursive-include invenio_theme_tugraz *.ico recursive-include invenio_theme_tugraz *.ico
recursive-include invenio_theme_tugraz *.pdf recursive-include invenio_theme_tugraz *.pdf
recursive-include invenio_theme_tugraz *.ttf
recursive-include invenio_theme_tugraz *.txt
recursive-include tests *.py recursive-include tests *.py
recursive-include invenio_theme_tugraz *.jpg recursive-include invenio_theme_tugraz *.jpg
recursive-include invenio_theme_tugraz *.gitkeep recursive-include invenio_theme_tugraz *.gitkeep
recursive-include .github/workflows *.yml recursive-include .github/workflows *.yml
include .git-blame-ignore-revs
+11 -18
View File
@@ -8,7 +8,7 @@
"""Sphinx configuration.""" """Sphinx configuration."""
import os from invenio_theme_tugraz import __version__
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
@@ -44,9 +44,9 @@ source_suffix = ".rst"
master_doc = "index" master_doc = "index"
# General information about the project. # General information about the project.
project = u"invenio-theme-tugraz" project = "invenio-theme-tugraz"
copyright = u"2020, Graz University of Technology" copyright = "2020, Graz University of Technology"
author = u"Graz University of Technology" author = "Graz University of Technology"
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@@ -54,17 +54,8 @@ author = u"Graz University of Technology"
# #
# The short X.Y version. # The short X.Y version.
# Get the version string. Cannot be done with import!
g = {}
with open(
os.path.join(os.path.dirname(__file__), "..", "invenio_theme_tugraz", "version.py"),
"rt",
) as fp:
exec(fp.read(), g)
version = g["__version__"]
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = version release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
@@ -250,8 +241,8 @@ latex_documents = [
( (
master_doc, master_doc,
"invenio-theme-tugraz.tex", "invenio-theme-tugraz.tex",
u"invenio-theme-tugraz Documentation", "invenio-theme-tugraz Documentation",
u"Graz University of Technology", "Graz University of Technology",
"manual", "manual",
), ),
] ]
@@ -285,7 +276,7 @@ man_pages = [
( (
master_doc, master_doc,
"invenio-theme-tugraz", "invenio-theme-tugraz",
u"invenio-theme-tugraz Documentation", "invenio-theme-tugraz Documentation",
[author], [author],
1, 1,
) )
@@ -304,7 +295,7 @@ texinfo_documents = [
( (
master_doc, master_doc,
"invenio-theme-tugraz", "invenio-theme-tugraz",
u"invenio-theme-tugraz Documentation", "invenio-theme-tugraz Documentation",
author, author,
"invenio-theme-tugraz", "invenio-theme-tugraz",
"invenio module for TUGRAZ theme.", "invenio module for TUGRAZ theme.",
@@ -328,6 +319,8 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = { intersphinx_mapping = {
"python": ("https://docs.python.org/", None), "python": ("https://docs.python.org/", None),
"flask": ("https://flask.palletsprojects.com/", None),
"werkzeug": ("https://werkzeug.palletsprojects.com/", None),
# TODO: Configure external documentation references, eg: # TODO: Configure external documentation references, eg:
# 'Flask-Admin': ('https://flask-admin.readthedocs.io/en/latest/', None), # 'Flask-Admin': ('https://flask-admin.readthedocs.io/en/latest/', None),
} }
+3 -2
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2021 Graz University of Technology. # Copyright (C) 2020-2022 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
@@ -9,6 +9,7 @@
"""invenio module for TUGRAZ theme.""" """invenio module for TUGRAZ theme."""
from .ext import InvenioThemeTugraz from .ext import InvenioThemeTugraz
from .version import __version__
__version__ = "3.9.2"
__all__ = ("__version__", "InvenioThemeTugraz") __all__ = ("__version__", "InvenioThemeTugraz")
@@ -0,0 +1,93 @@
Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name Source.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -187,6 +187,7 @@ svg:not(:root) {
.main-menu-underline-line { .main-menu-underline-line {
border: 2px solid @greyLight !important; border: 2px solid @greyLight !important;
border-radius: 0; border-radius: 0;
background-color: @greyLight;
} }
#margin-divider{ #margin-divider{
@@ -77,12 +77,25 @@ pre {
background-color: @tugrazRed; background-color: @tugrazRed;
} }
.ui.button:hover, /***
.ui.search.button:hover { * accordion title
background-color: @primaryButtonHoverBackground; ***/
.ui.accordion.styled {
.title,
.title.active {
background-color: @greyLight;
color: rgba(0, 0, 0, 0.6);
}
} }
.ui.button:hover { /***
* buttons hover and accordion hover
***/
.ui.button:hover,
.ui.search.button:hover,
.ui.accordion.styled .title:hover,
.ui.accordion.styled .accordion .title:hover {
background-color: @primaryButtonHoverBackground;
color: @primaryButton; color: @primaryButton;
} }
@@ -97,6 +110,7 @@ pre {
.ui.input > input, /* it seams redundant but it is not */ .ui.input > input, /* it seams redundant but it is not */
.ui.segment, .ui.segment,
.ui.selection.dropdown, .ui.selection.dropdown,
.ui.accordion.styled,
.ui.card, .ui.card,
.ui.cards > .card, .ui.cards > .card,
.ui.basic.button, .ui.basic.buttons .button, .ui.basic.button, .ui.basic.buttons .button,
@@ -138,3 +152,17 @@ pre {
} }
} }
@font-face {
font-family: "Source Sans Pro";
src: url('./fonts/SourceSansPro/SourceSansPro-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Source Sans Pro";
src: url('./fonts/SourceSansPro/SourceSansPro-Italic.ttf') format('truetype');
font-weight: 400;
font-style: italic;
}
@@ -15,8 +15,6 @@
@import "macros"; @import "macros";
@import "login"; @import "login";
@import "deposit"; @import "deposit";
@import (css)
url("https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap");
/*** /***
**TODO: **TODO:
@@ -34,3 +32,7 @@
transition: background-color 0.15s ease 0s, color 0.15s ease 0s; transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
outline: none; outline: none;
} }
.nowrap-link {
white-space: nowrap;
}
+2 -6
View File
@@ -16,9 +16,7 @@ INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = "invenio_theme_tugraz/base.html" INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = "invenio_theme_tugraz/base.html"
"""TU Graz Default base template""" """TU Graz Default base template"""
INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = ( INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = "invenio_theme_tugraz/accounts/accounts_base.html"
"invenio_theme_tugraz/accounts/accounts_base.html"
)
"""TU Graz Default account base template""" """TU Graz Default account base template"""
INVENIO_THEME_TUGRAZ_ICON = "images/icon_use.png" INVENIO_THEME_TUGRAZ_ICON = "images/icon_use.png"
@@ -75,9 +73,7 @@ THEME_SITENAME = _("Repository")
SECURITY_LOGIN_USER_TEMPLATE = "invenio_theme_tugraz/accounts/login_user.html" SECURITY_LOGIN_USER_TEMPLATE = "invenio_theme_tugraz/accounts/login_user.html"
"""Login template""" """Login template"""
SECURITY_REGISTER_USER_TEMPLATE = ( SECURITY_REGISTER_USER_TEMPLATE = "invenio_theme_tugraz/accounts/register_user.html"
"invenio_theme_tugraz/accounts/register_user.html"
)
"""Sigup template""" """Sigup template"""
# Invenio-app-rdm # Invenio-app-rdm
+3 -4
View File
@@ -8,8 +8,6 @@
"""Frontpage records.""" """Frontpage records."""
from __future__ import absolute_import, print_function
from elasticsearch_dsl.query import Q from elasticsearch_dsl.query import Q
from invenio_search.api import RecordsSearch from invenio_search.api import RecordsSearch
@@ -22,5 +20,6 @@ class FrontpageRecordsSearch(RecordsSearch):
index = "rdmrecords-records" index = "rdmrecords-records"
default_filter = Q( default_filter = Q(
"query_string", query=( "query_string",
"access.record:public " "AND versions.is_latest:true")) query=("access.record:public " "AND versions.is_latest:true"),
)
@@ -17,7 +17,7 @@
<div class="ui container"> <div class="ui container">
<div class="ui centered grid padded"> <div class="ui centered grid padded">
<div class="ui padded segments huge form"> <div class="ui padded segments large form">
<div class="ui login segment padded"> <div class="ui login segment padded">
<div class="divider hidden"></div> <div class="divider hidden"></div>
{%- block form_header %} {%- block form_header %}
@@ -35,7 +35,7 @@
<div class="field"> <div class="field">
<a class="login-page-button ui fluid large button" href="{{ url_for('sso_saml.sso', idp=name) }}"> <a class="login-page-button ui fluid large button" href="{{ url_for('sso_saml.sso', idp=name) }}">
{{ {{
_('Sign in with %(title)s', title=config.SSO_SAML_IDPS[name]['title']|default("SAML", true)) _('Log in with %(title)s', title=config.SSO_SAML_IDPS[name]['title']|default("SAML", true))
}} }}
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" /> <img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a> </a>
@@ -45,28 +45,34 @@
<div class="ui horizontal divider"> <div class="ui horizontal divider">
{{ _("Or") }} {{ _("Or") }}
</div> </div>
{%- endif %} {%- endif %}
{% endif %} {% endif %}
{%- block form_outer %} {%- block form_outer %}
{%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %} {%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %}
{%- with form = login_user_form %} {%- with form = login_user_form %}
<div style="padding-bottom: 20px;padding-top: 6px;"> {%- set accordion_active = "active" if form.errors else "" %}
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="ui big form"> <div class="ui styled accordion">
{{ form.hidden_tag() }} <div class="title trigger {{ accordion_active }}">
{{ form_errors(form) }} {{ _('Log in with repository credentials') }}
{{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} <i class="user icon button"></i>
{{ render_field(form.password, icon="lock icon", errormsg=False) }} </div>
<button type="submit" class="ui fluid large submit button"> <div class="content {{ accordion_active }}">
<i class="ui sign-in icon"></i>{{ _('Log In') }} <form action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="ui large form">
</button> {{ form.hidden_tag() }}
</form> {{ form_errors(form) }}
</div> {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }}
{{ render_field(form.password, icon="lock icon", errormsg=False) }}
<button type="submit" class="ui fluid large submit button">
<i class="ui sign-in icon"></i>{{ _('Log In') }}
</button>
</form>
</div>
</div>
{%- endwith %} {%- endwith %}
{%- endif %} {%- endif %}
{%- endblock form_outer %} {%- endblock form_outer %}
<div class="divider hidden"></div> <div class="divider hidden"></div>
</div> </div>
{%- block registerable %} {%- block registerable %}
@@ -41,46 +41,56 @@
<div class="column" id="switch_right"> <div class="column" id="switch_right">
<!--Sigup with SSO--> <!--Sigup with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %} {%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<div class="ui divider"></div> <div class="ui divider"></div>
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="login-page-button ui fluid large button"> <a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="login-page-button ui fluid large button">
<span style="font-size: 18px;">{{ _('Sign up with TUGRAZ ') }}</span> <span style="font-size: 18px;">{{ _('Sign up with TUGRAZ ') }}</span>
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" /> <img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a> </a>
</div> <div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or")}}</span></div>
<div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or")}}</span></div> {%- endif %}
{%- endif %}
{%- block form_header %} {%- block form_header %}
<!-- can add a header img--> <!-- can add a header img-->
{%- block form_outer %} {%- block form_outer %}
{%- endblock form_outer %} {%- endblock form_outer %}
{%- endblock form_header %} {%- endblock form_header %}
{%- with form = register_user_form %}
<form class="ui big form" action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
{{ 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 %} {%- with form = register_user_form %}
<div class="grouped fields">{{ form.recaptcha() }}</div> {%- set accordion_active = "active" if form.errors else "" %}
{%- endif %} <div class="ui padded centered large form">
<div class="ui styled accordion">
<div class="title trigger {{ accordion_active }}">
{{ _('Sign up with repository credentials') }}
<i class="user icon button"></i>
</div>
<div class="content {{ accordion_active }}">
<form class="ui large form" action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
{{ 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 %}
<div class="centered row"> {%- if form.recaptcha %}
<button type="submit" class="ui fluid large submit button"> <div class="grouped fields">{{ form.recaptcha() }}</div>
<i class="ui edit outline icon"></i>{{ _('Sign up') }} {%- endif %}
</button>
<div class="centered row">
<button type="submit" class="ui fluid large submit button">
<i class="ui edit outline icon"></i>{{ _('Sign up') }}
</button>
</div>
</form>
</div>
</div> </div>
</form> </div>
{%- endwith %} {%- endwith %}
<div class="ui divider"></div> <div class="ui divider"></div>
</div> </div>
@@ -13,38 +13,48 @@
</div> </div>
{% endif %} {% endif %}
<header> <div>
{%- block navbar %} <header>
<nav> {%- block navbar %}
{%- block navbar_header %} <nav>
{%- include "invenio_theme_tugraz/navbar.html" %} {%- block navbar_header %}
{%- endblock navbar_header %} {%- include "invenio_theme_tugraz/navbar.html" %}
{%- endblock navbar_header %}
<div class="ui container"> <div class="ui container">
<div class="ui grid stackable container"> <div class="ui grid stackable container">
<div class="three column row centered" style="padding-bottom: 0;"> <div class="three column row centered" style="padding-bottom: 0;">
<div class="two wide column main-menu-entry"> <div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home" class="no-decoration"> <a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home" class="no-decoration">
<span class="home-inline"> <span class="home-inline">
<svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon" <svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg"
version="1.1" xml:space="preserve" height="36.997" width="35.969" version="1.1" xml:space="preserve" height="36.997" width="35.969"
enable-background="new 0 0 595.28 841.89" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" enable-background="new 0 0 595.28 841.89" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 35.969 36.997451"> xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 35.969 36.997451">
<polyline style="stroke:#E4154B;stroke-linecap:square;stroke-width:4;fill:none" <polyline style="stroke:#E4154B;stroke-linecap:square;stroke-width:4;fill:none"
points="282.72 437.28 282.72 414.77 297.71 406.69 312.69 414.77 312.69 437.28" points="282.72 437.28 282.72 414.77 297.71 406.69 312.69 414.77 312.69 437.28"
transform="translate(-279.72 -403.28)"> transform="translate(-279.72 -403.28)">
</polyline> </polyline>
</svg> </svg>
{{_ ("Home")}} {{_ ("Home")}}
</span> </span>
</a> </a>
</div> </div>
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %} {%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}
<div class="two wide column main-menu-entry"> <div class="two wide column main-menu-entry">
<a href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a> <a role="menuitem" href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
</div> </div>
{%- endfor %} {% endfor %}
{% for item in current_menu.submenu('actions').children|sort(attribute='order') if item.visible recursive %}
<div class="two wide column main-menu-entry">
<a role="menuitem" href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
</div>
{% endfor %}
</div> </div>
<div id="margin-divider" class="ui divider main-menu-underline-line"> <div id="margin-divider" class="ui divider main-menu-underline-line">
@@ -55,16 +65,18 @@
<div class="spacer"></div> <div class="spacer"></div>
</div> </div>
</nav> </nav>
{%- endblock navbar %} {%- endblock navbar %}
{%- block flashmessages %} {%- block flashmessages %}
{%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%} {%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%}
{{ flashed_messages() }} {{ flashed_messages() }}
{%- endblock %} {%- endblock %}
{# </header>
{#
{%- block breadcrumbs %} {%- block breadcrumbs %}
{%- include "invenio_theme/breadcrumbs.html" %} {%- include "invenio_theme/breadcrumbs.html" %}
{%- endblock breadcrumbs %} {%- endblock breadcrumbs %}
#} #}
</header> </div>
@@ -8,7 +8,7 @@ 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: 2021-06-22 10:21+0200\n" "POT-Creation-Date: 2022-03-03 10:34+0100\n"
"PO-Revision-Date: 2020-10-06 10:27+0200\n" "PO-Revision-Date: 2020-10-06 10:27+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n" "Language: de\n"
@@ -19,19 +19,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n" "Generated-By: Babel 2.9.1\n"
#: invenio_theme_tugraz/config.py:14 invenio_theme_tugraz/config.py:63 #: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
msgid "TU Graz Repository" msgid "TU Graz Repository"
msgstr "TU Graz Repository" msgstr "TU Graz Repository"
#: invenio_theme_tugraz/config.py:66 #: invenio_theme_tugraz/config.py:65
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30
msgid "Repository" msgid "Repository"
msgstr "Repository" msgstr "Repository"
#: invenio_theme_tugraz/config.py:91
msgid "German"
msgstr "Deutsche"
#: 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:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:26
msgid "Invenio" msgid "Invenio"
@@ -47,7 +43,7 @@ msgid ""
"long as TU Graz library exists." "long as TU Graz library exists."
msgstr "" msgstr ""
"Ihre Forschung ist in der Bibliothek der TU Graz für die Zukunft " "Ihre Forschung ist in der Bibliothek der TU Graz für die Zukunft "
"gespeichert,solange die Bibliothek der TU Graz existiert." "gespeichert, solange die Bibliothek der TU Graz existiert."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:4 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:4
msgid "Trusted" msgid "Trusted"
@@ -243,6 +239,10 @@ msgstr "Dies ist die Testumgebung des TU Graz Repositorys."
msgid "Home" msgid "Home"
msgstr "Startseite" msgstr "Startseite"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:49
msgid "My dashboard"
msgstr "Meine Übersicht"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
msgid "Type and press enter to search" msgid "Type and press enter to search"
msgstr "Suchbegriff eingeben und “Enter” drücken (?)" msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
@@ -271,52 +271,51 @@ msgid ""
" " " "
msgstr "Hochgeladen am %(date)s\n" msgstr "Hochgeladen am %(date)s\n"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:131 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:118
msgid "More" msgid "More"
msgstr "Mehr" msgstr "Mehr"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:141 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:128
msgid "Need help?" msgid "Need help?"
msgstr "Brauchen Sie Hilfe?" msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:132
msgid "Contact us" msgid "Contact us"
msgstr "Kontaktiere uns" msgstr "Kontaktiere uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:150 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:137
msgid "prioritizes all Recent uploads." msgid "prioritizes all Recent uploads."
msgstr "reiht die neuesten Uploads vor." msgstr "reiht die neuesten Uploads vor."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:153 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:140
msgid "We can help with:" msgid "We can help with:"
msgstr "Dabei können wir helfen:" msgstr "Dabei können wir helfen:"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:158 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145
msgid "Uploading your research data, software, preprints, etc." msgid "Uploading your research data, software, preprints, etc."
msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints usw." msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints usw."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:146
msgid "One-on-one with" msgid "One-on-one with"
msgstr "One-on-one mit" msgstr "One-on-one mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:146
msgid "supporters." msgid "supporters."
msgstr "Unterstützern" msgstr "Unterstützern"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:160 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:147
msgid "Quota increases beyond our default policy." msgid "Quota increases beyond our default policy."
msgstr "Quota Erhöhungen über unsere Standard Policy hinaus." msgstr "Quota Erhöhungen über unsere Standard Policy hinaus."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:161 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:148
msgid "Scripts for automated uploading of larger datasets." msgid "Scripts for automated uploading of larger datasets."
msgstr "Skripte zum automatisierten Hochladen größerer Datensätze." msgstr "Skripte zum automatisierten Hochladen größerer Datensätze."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:166 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:153
msgid "Why use" msgid "Why use"
msgstr "Warum" msgstr "Warum"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:66 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:66
#, fuzzy
msgid "REPOSITORY" msgid "REPOSITORY"
msgstr "Repository" msgstr "Repository"
@@ -337,10 +336,10 @@ msgid "TECHNOLOGY"
msgstr "LEIDENSCHAFT" msgstr "LEIDENSCHAFT"
#: 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:76 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:78 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:86
msgid "Sign up" msgid "Sign up"
msgstr "Registrierung" msgstr "Registrieren"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:15 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:15
msgid "Log in" msgid "Log in"
@@ -355,25 +354,29 @@ msgid "Log in to Repository"
msgstr "Anmelden" msgstr "Anmelden"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38
#, fuzzy, python-format #, python-format
msgid "Sign in with %(title)s" msgid "Log in with %(title)s"
msgstr "Einloggen mit" msgstr "Einloggen mit %(title)s"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:52 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Or" msgid "Or"
msgstr "Oder" msgstr "Oder"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:61 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:57
msgid "Log in with repository credentials"
msgstr "Loggen Sie sich mit Ihrem Repository-Account ein"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:67
msgid "Log In" msgid "Log In"
msgstr "Einloggen" msgstr "Einloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:75 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:81
#, python-format #, python-format
msgid "New to %(sitename)s?" msgid "New to %(sitename)s?"
msgstr "Neu im %(sitename)s?" msgstr "Neu im %(sitename)s?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:85 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:91
msgid "Forgot password?" msgid "Forgot password?"
msgstr "Passwort vergessen" msgstr "Passwort vergessen"
@@ -417,38 +420,11 @@ msgstr "Gebaut basierend auf Expertise derTU Graz im Bereich Data Management"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:48 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:48
msgid "Sign up with TUGRAZ " msgid "Sign up with TUGRAZ "
msgstr "Mit Ihrem TUGonline-Account einloggen" msgstr "Mit Ihrem TUGonline-Account registrieren"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:65
msgid "New version" msgid "Sign up with repository credentials"
msgstr "neue Version" msgstr "Mit Ihren Repository Daten registrieren"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:12
msgid "New upload"
msgstr "Neuer upload"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:14
msgid "Edit upload"
msgstr "Upload bearbeiten"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:63
#, python-format
msgid ""
"\n"
" There is a %(link_start)snewer version%(link_end)s of the "
"record available.\n"
" "
msgstr ""
"Es ist eine %(link_start)sneuere Version%(link_end)s des Eintrags "
"verfügbar."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:138
msgid "Files"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:146
msgid "Reason"
msgstr "Grund"
#~ msgid "Version" #~ msgid "Version"
#~ msgstr "Version" #~ msgstr "Version"
@@ -482,3 +458,34 @@ msgstr "Grund"
#~ msgid "Uploads" #~ msgid "Uploads"
#~ msgstr "Hochladen" #~ msgstr "Hochladen"
#~ msgid "German"
#~ msgstr "Deutsche"
#~ msgid "New version"
#~ msgstr "neue Version"
#~ msgid "New upload"
#~ msgstr "Neuer upload"
#~ msgid "Edit upload"
#~ msgstr "Upload bearbeiten"
#~ msgid ""
#~ "\n"
#~ " There is a %(link_start)snewer "
#~ "version%(link_end)s of the record available."
#~ "\n"
#~ " "
#~ msgstr ""
#~ "Es ist eine %(link_start)sneuere "
#~ "Version%(link_end)s des Eintrags verfügbar."
#~ msgid "Files"
#~ msgstr "Dateien"
#~ msgid "Reason"
#~ msgstr "Grund"
#~ msgid "Dashboard"
#~ msgstr ""
+34 -55
View File
@@ -1,15 +1,15 @@
# Translations template for invenio-theme-tugraz. # Translations template for invenio-theme-tugraz.
# Copyright (C) 2021 Graz University of Technology # Copyright (C) 2022 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>, 2021. # FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 3.4.1\n" "Project-Id-Version: invenio-theme-tugraz 3.7.0\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2021-06-22 10:21+0200\n" "POT-Creation-Date: 2022-03-03 10:34+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"
@@ -18,19 +18,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n" "Generated-By: Babel 2.9.1\n"
#: invenio_theme_tugraz/config.py:14 invenio_theme_tugraz/config.py:63 #: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
msgid "TU Graz Repository" msgid "TU Graz Repository"
msgstr "" msgstr ""
#: invenio_theme_tugraz/config.py:66 #: invenio_theme_tugraz/config.py:65
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
#: invenio_theme_tugraz/config.py:91
msgid "German"
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:26 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/base.html:26
msgid "Invenio" msgid "Invenio"
@@ -232,6 +228,10 @@ msgstr ""
msgid "Home" msgid "Home"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:49
msgid "My dashboard"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
msgid "Type and press enter to search" msgid "Type and press enter to search"
msgstr "" msgstr ""
@@ -260,47 +260,47 @@ msgid ""
" " " "
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:131 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:118
msgid "More" msgid "More"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:141 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:128
msgid "Need help?" msgid "Need help?"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:132
msgid "Contact us" msgid "Contact us"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:150 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:137
msgid "prioritizes all Recent uploads." msgid "prioritizes all Recent uploads."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:153 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:140
msgid "We can help with:" msgid "We can help with:"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:158 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145
msgid "Uploading your research data, software, preprints, etc." msgid "Uploading your research data, software, preprints, etc."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:146
msgid "One-on-one with" msgid "One-on-one with"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:146
msgid "supporters." msgid "supporters."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:160 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:147
msgid "Quota increases beyond our default policy." msgid "Quota increases beyond our default policy."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:161 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:148
msgid "Scripts for automated uploading of larger datasets." msgid "Scripts for automated uploading of larger datasets."
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:166 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:153
msgid "Why use" msgid "Why use"
msgstr "" msgstr ""
@@ -325,8 +325,8 @@ msgid "TECHNOLOGY"
msgstr "" 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:76 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:78 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:86
msgid "Sign up" msgid "Sign up"
msgstr "" msgstr ""
@@ -344,24 +344,28 @@ msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38
#, python-format #, python-format
msgid "Sign in with %(title)s" msgid "Log in with %(title)s"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:52 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Or" msgid "Or"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:61 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:57
msgid "Log in with repository credentials"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:67
msgid "Log In" msgid "Log In"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:75 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:81
#, python-format #, python-format
msgid "New to %(sitename)s?" msgid "New to %(sitename)s?"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:85 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:91
msgid "Forgot password?" msgid "Forgot password?"
msgstr "" msgstr ""
@@ -403,32 +407,7 @@ msgstr ""
msgid "Sign up with TUGRAZ " msgid "Sign up with TUGRAZ "
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:10 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:65
msgid "New version" msgid "Sign up with repository credentials"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:12
msgid "New upload"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:14
msgid "Edit upload"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:63
#, python-format
msgid ""
"\n"
" There is a %(link_start)snewer version%(link_end)s of the "
"record available.\n"
" "
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:138
msgid "Files"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/landingpage/detail.html:146
msgid "Reason"
msgstr "" msgstr ""
-15
View File
@@ -1,15 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 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.
"""Version information for invenio-theme-tugraz.
This file is imported by ``invenio_theme_tugraz.__init__``,
and parsed by ``setup.py``.
"""
__version__ = "3.6.0"
+24 -25
View File
@@ -8,8 +8,6 @@
"""invenio module for TUGRAZ theme.""" """invenio module for TUGRAZ theme."""
import binascii
from os import environ
from typing import Dict from typing import Dict
from elasticsearch_dsl.utils import AttrDict from elasticsearch_dsl.utils import AttrDict
@@ -18,34 +16,36 @@ from invenio_rdm_records.resources.serializers import UIJSONSerializer
from .search import FrontpageRecordsSearch from .search import FrontpageRecordsSearch
blueprint = Blueprint(
"invenio_theme_tugraz",
__name__,
template_folder="templates",
static_folder="static",
)
@blueprint.app_template_filter("make_dict_like")
def make_dict_like(value: str, key: str) -> Dict[str, str]:
"""Convert the value to a dict like structure.
in the form of a key -> value pair.
"""
return {key: value}
@blueprint.app_template_filter("cast_to_dict")
def cast_to_dict(attr_dict):
"""Return the dict structure of AttrDict variable."""
return AttrDict.to_dict(attr_dict)
def ui_blueprint(app): def ui_blueprint(app):
"""Blueprint for the routes and resources provided by Invenio-theme-tugraz.""" """Blueprint for the routes and resources provided by Invenio-theme-tugraz."""
routes = app.config.get("TUG_ROUTES") routes = app.config.get("TUG_ROUTES")
blueprint = Blueprint(
"invenio_theme_tugraz",
__name__,
template_folder="templates",
static_folder="static",
)
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) blueprint.add_url_rule(routes["comingsoon"], view_func=comingsoon)
@blueprint.app_template_filter("make_dict_like")
def make_dict_like(value: str, key: str) -> Dict[str, str]:
"""Convert the value to a dict like structure.
in the form of a key -> value pair.
"""
return {key: value}
@blueprint.app_template_filter("cast_to_dict")
def cast_to_dict(attr_dict):
"""Return the dict structure of AttrDict variable."""
return AttrDict.to_dict(attr_dict)
return blueprint return blueprint
@@ -53,7 +53,7 @@ def records_serializer(records=None):
"""Serialize list of records.""" """Serialize list of records."""
record_list = [] record_list = []
for record in records: for record in records:
record_list.append(UIJSONSerializer().serialize_object_to_dict(record.to_dict())) record_list.append(UIJSONSerializer().dump_obj(record.to_dict()))
return record_list return record_list
@@ -62,8 +62,7 @@ def index():
records = FrontpageRecordsSearch()[:5].sort("-created").execute() records = FrontpageRecordsSearch()[:5].sort("-created").execute()
return render_template( return render_template(
"invenio_theme_tugraz/index.html", "invenio_theme_tugraz/index.html", records=records_serializer(records)
records=records_serializer(records)
) )
+3
View File
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "babel>2.8"]
build-backend = "setuptools.build_meta"
-12
View File
@@ -1,12 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 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.
[pytest]
addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_theme_tugraz --cov-report=term-missing tests invenio_theme_tugraz
testpaths = tests invenio_theme_tugraz
live_server_scope = module
+2 -11
View File
@@ -16,18 +16,9 @@ set -o errexit
# Quit on unbound symbols # Quit on unbound symbols
set -o nounset set -o nounset
# Always bring down docker services
function cleanup() {
eval "$(docker-services-cli down --env)"
}
trap cleanup EXIT
python -m check_manifest --ignore ".*-requirements.txt" python -m check_manifest --ignore ".*-requirements.txt"
python -m sphinx.cmd.build -qnNW docs docs/_build/html python -m sphinx.cmd.build -qnN docs docs/_build/html
eval "$(docker-services-cli up --db ${DB:-postgresql} --search ${SEARCH:-elasticsearch} --cache ${CACHE:-redis} --env)"
python -m pytest python -m pytest
tests_exit_code=$? tests_exit_code=$?
python -m sphinx.cmd.build -qnNW -b doctest docs docs/_build/doctest python -m sphinx.cmd.build -qnN -b doctest docs docs/_build/doctest
exit "$tests_exit_code" exit "$tests_exit_code"
+63 -15
View File
@@ -6,6 +6,63 @@
# 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.
[metadata]
name = invenio-theme-tugraz
version = attr: invenio_theme_tugraz.__version__
description = "Invenio module for TUGRAZ theme."
long_description = file: README.rst, CHANGES.rst
keywords = invenio theme invenioRDM TU-Graz
license = MIT
author = "Graz University of Technology"
author_email = mojib.wali@tugraz.at
url = https://github.com/tu-graz-library/invenio-theme-tugraz
platforms = any
classifiers =
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Development Status :: 3 - Alpha
[options]
include_package_data = True
packages = find:
python_requires = >=3.8
zip_safe = False
install_requires =
Flask-BabelEx>=0.9.4
Flask-WebpackExt>=1.0.0
invenio-assets>=1.2.7,<1.3.0
invenio-i18n>=1.3.1,<1.4.0
invenio_config_tugraz>=0.9.0,<0.10.0
[options.extras_require]
tests =
pytest-black>=0.3.0,<0.3.10
sphinx>=4.2.0,<5
pytest-invenio>=1.4.7
invenio-app>=1.3.0,<2.0.0
elasticsearch7 =
invenio-search[elasticsearch7]>=1.4.2,<2.0
[options.entry_points]
invenio_base.apps =
invenio_theme_tugraz = invenio_theme_tugraz:InvenioThemeTugraz
invenio_base.blueprints =
invenio_theme_tugraz = invenio_theme_tugraz.views:ui_blueprint
invenio_i18n.translations =
messages = invenio_theme_tugraz
invenio_assets.webpack =
invenio_theme_tugraz_theme = invenio_theme_tugraz.webpack:theme
invenio_config.module =
invenio_theme_tugraz = invenio_theme_tugraz.config
[aliases] [aliases]
test = pytest test = pytest
@@ -22,6 +79,7 @@ add_ignore = D401
[compile_catalog] [compile_catalog]
directory = invenio_theme_tugraz/translations/ directory = invenio_theme_tugraz/translations/
use-fuzzy = True
[extract_messages] [extract_messages]
copyright_holder = Graz University of Technology copyright_holder = Graz University of Technology
@@ -37,20 +95,10 @@ output-dir = invenio_theme_tugraz/translations/
[update_catalog] [update_catalog]
input-file = invenio_theme_tugraz/translations/messages.pot input-file = invenio_theme_tugraz/translations/messages.pot
output-dir = invenio_theme_tugraz/translations/ output-dir = invenio_theme_tugraz/translations/
[flake8]
max-line-length = 88
extend-ignore = E203
select = C,E,F,W,B,B950
ignore = E501
[isort] [isort]
multi_line_output = 3 profile=black
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
[pycodestyle] [tool:pytest]
ignore = E203,E501 addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_theme_tugraz --cov-report=term-missing tests invenio_theme_tugraz
testpaths = tests invenio_theme_tugraz
live_server_scope = module
+3 -110
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020-2021 Graz University of Technology. # Copyright (C) 2020-2022 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,113 +8,6 @@
"""invenio module for TUGRAZ theme.""" """invenio module for TUGRAZ theme."""
import os from setuptools import setup
from setuptools import find_packages, setup setup()
readme = open("README.rst").read()
history = open("CHANGES.rst").read()
tests_require = [
"pytest-invenio>=1.4.0",
"invenio-app>=1.3.0,<2.0.0",
]
# Should follow invenio-app-rdm
invenio_search_version = ">=1.4.0,<1.5.0"
invenio_db_version = ">=1.0.9,<1.1.0"
extras_require = {
"elasticsearch7": [f"invenio-search[elasticsearch7]{invenio_search_version}"],
"mysql": [f"invenio-db[mysql,versioning]{invenio_db_version}"],
"postgresql": [f"invenio-db[postgresql,versioning]{invenio_db_version}"],
"sqlite": [f"invenio-db[versioning]{invenio_db_version}"],
"docs": [
"Sphinx>=3",
],
"tests": tests_require,
}
extras_require["all"] = []
for name, reqs in extras_require.items():
if name[0] == ":" or name in (
"elasticsearch7",
"mysql",
"postgresql",
"sqlite",
):
continue
extras_require["all"].extend(reqs)
setup_requires = [
"Babel>=1.3",
"pytest-runner>=3.0.0,<5",
]
install_requires = [
"Flask-BabelEx>=0.9.4",
"Flask-WebpackExt>=1.0.0",
"invenio-assets>=1.2.0",
"invenio-i18n>=1.2.0",
"invenio_config_tugraz>=0.6.1",
]
packages = find_packages()
# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join("invenio_theme_tugraz", "version.py"), "rt") as fp:
exec(fp.read(), g)
version = g["__version__"]
setup(
name="invenio-theme-tugraz",
version=version,
description=__doc__,
long_description=readme + "\n\n" + history,
keywords="invenio, theme, invenioRDM, TU-Graz, Graz University of Technology, statistics",
license="MIT",
author="Graz University of Technology",
author_email="mojib.wali@tugraz.at",
url="https://github.com/tu-graz-library/invenio-theme-tugraz",
packages=packages,
zip_safe=False,
include_package_data=True,
platforms="any",
entry_points={
"invenio_base.apps": [
"invenio_theme_tugraz = invenio_theme_tugraz:InvenioThemeTugraz",
],
"invenio_base.blueprints": [
"invenio_theme_tugraz = invenio_theme_tugraz.views:ui_blueprint",
],
"invenio_i18n.translations": [
"messages = invenio_theme_tugraz",
],
"invenio_assets.webpack": [
"invenio_theme_tugraz_theme = invenio_theme_tugraz.webpack:theme",
],
"invenio_config.module": [
"invenio_theme_tugraz = invenio_theme_tugraz.config",
],
},
extras_require=extras_require,
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
classifiers=[
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Development Status :: 3 - Alpha",
],
)
-41
View File
@@ -12,62 +12,21 @@ See https://pytest-invenio.readthedocs.io/ for documentation on which test
fixtures are available. fixtures are available.
""" """
import os
import shutil
import tempfile
import pytest import pytest
from flask import Flask from flask import Flask
from flask_babelex import Babel
from invenio_db import InvenioDB, db
from invenio_i18n import InvenioI18N from invenio_i18n import InvenioI18N
from invenio_search import InvenioSearch
from sqlalchemy_utils.functions import create_database, database_exists, drop_database
from invenio_theme_tugraz import InvenioThemeTugraz from invenio_theme_tugraz import InvenioThemeTugraz
@pytest.fixture(scope="module")
def celery_config():
"""Override pytest-invenio fixture.
TODO: Remove this fixture if you add Celery support.
"""
return {}
@pytest.fixture() @pytest.fixture()
def app(request): def app(request):
"""Basic Flask application.""" """Basic Flask application."""
instance_path = tempfile.mkdtemp()
app = Flask("testapp") app = Flask("testapp")
DB = os.getenv("SQLALCHEMY_DATABASE_URI", "sqlite://")
app.config.update( app.config.update(
I18N_LANGUAGES=[("en", "English"), ("de", "German")], I18N_LANGUAGES=[("en", "English"), ("de", "German")],
SQLALCHEMY_DATABASE_URI=DB,
SQLALCHEMY_TRACK_MODIFICATIONS=False,
) )
Babel(app)
InvenioDB(app)
InvenioSearch(app)
InvenioThemeTugraz(app) InvenioThemeTugraz(app)
InvenioI18N(app) InvenioI18N(app)
with app.app_context():
db_url = str(db.engine.url)
if db_url != "sqlite://" and not database_exists(db_url):
create_database(db_url)
db.create_all()
def teardown():
with app.app_context():
db_url = str(db.engine.url)
db.session.close()
if db_url != "sqlite://":
drop_database(db_url)
shutil.rmtree(instance_path)
request.addfinalizer(teardown)
app.test_request_context().push()
return app return app
+1 -1
View File
@@ -35,4 +35,4 @@ def test_init():
def test_app(app): def test_app(app):
"""Test extension initialization.""" """Test extension initialization."""
theme = InvenioThemeTugraz(app) _ = InvenioThemeTugraz(app)
-22
View File
@@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 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.
"""Pytest configuration.
See https://pytest-invenio.readthedocs.io/ for documentation on which test
fixtures are available.
"""
import pytest
from invenio_app.factory import create_ui
@pytest.fixture(scope='module')
def create_app(instance_path):
"""Application factory fixture."""
return create_ui
-33
View File
@@ -1,33 +0,0 @@
# # -*- coding: utf-8 -*-
# #
# # Copyright (C) 2020-2021 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.
# """Test views."""
# from elasticsearch_dsl.utils import AttrDict
# from invenio_theme_tugraz.views import cast_to_dict, make_dict_like
# def test_make_dict_like():
# """Test make_dict_like."""
# access = {
# "access_right" : "open"
# }
# dicts = make_dict_like("open", "access_right")
# assert access == dicts
# def test_cast_to_dict():
# """Test cast_to_dict."""
# resource_type = {
# "subtype" : "publication-datamanagementplan",
# "type" : "publication"
# }
# expected = {'subtype': 'publication-datamanagementplan', 'type': 'publication'}
# attr = cast_to_dict(AttrDict(resource_type))
# assert expected == attr