Compare commits

...

58 Commits

Author SHA1 Message Date
Christoph Ladurner
02e9b3f90c release v4.11.0 2023-04-20 22:09:40 +02:00
Christoph Ladurner
9320fe3d5d global: make dependencies compatible with v11 2023-04-20 22:08:14 +02:00
Christoph Ladurner
d38e50a489 release v4.10.1 2022-11-10 09:21:59 +01:00
Mojib Wali
f1fc4d8b9e dep: bump in invenio-assets 2022-10-13 11:57:18 +02:00
Mojib Wali
b286b9adaa release: v4.10.0 2022-10-13 11:38:53 +02:00
Mojib Wali
19fada5940 global: migrate to v10 2022-10-13 11:32:22 +02:00
Christoph Ladurner
7cb3b5a83b release v4.0.2 2022-09-09 10:37:05 +02:00
David
936c085f05 css: adapt skip-to-main button (#280) 2022-08-18 18:32:09 +02:00
Christoph Ladurner
d43cf0e4b5 release v4.0.1 2022-08-05 10:28:27 +02:00
Christoph Ladurner
73a344eb52 update translation 2022-08-05 10:28:05 +02:00
Christoph Ladurner
aa37718a2c improve wording on search options 2022-08-05 10:28:05 +02:00
Christoph Ladurner
3a500543c6 release v4.0.0 2022-07-29 13:27:53 +02:00
Christoph Ladurner
e310a4ca38 remove unnecessary html code for header-search-bar
unnecessary because the react component which is handling this id is generating
the html code.
2022-07-29 13:22:52 +02:00
Christoph Ladurner
c3f55030dc fix warning from semantic-ui-react Search component 2022-07-29 13:22:52 +02:00
Christoph Ladurner
95d27fdd8c add marc21 and lom to the searchbar
copy pasted code from invenio_app_rdm/searchbar. it was necessary to
do that to configure the shown list.
2022-07-29 13:22:52 +02:00
Christoph Ladurner
28b956cfaa change searchbar layout and use invenio-app-rdm searchbar
the searchbar is now on the top of the header, left of the language switch. the
new searchbar introduced a new feature, it could handle different indices like
all repository or communities. But the problem is where to place the new search
bar. for the moment the compromise is to put it on the top right.

this position may not be compatible with tugraz layout.
2022-07-29 13:22:52 +02:00
Christoph Ladurner
5ac2a68848 remove grey color of community block and reduce size 2022-07-29 13:22:52 +02:00
Christoph Ladurner
0399814fe0 migrate js to use prettier 2022-07-29 13:22:52 +02:00
Christoph Ladurner
f11facc9d6 release v3.9.3 2022-07-17 20:55:54 +02:00
Christoph Ladurner
c9bc56e168 fix broken search page
the invenioRDM version v9.1 introduced a new search feature. the implementation
assumes that the id header-search-bar exists on the page. if that is not the
case the page will not be rendered.

this fix adds a hidden search element as invenioRDM v9.1 introduced. the page is
not using this at the moment because it would need some further layout
adjustments.

further moves this fix the local search element to the header to be existent on
the index and search page. for the future this should be undone and the new
invenioRDM search should be used.
2022-07-17 20:55:12 +02:00
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
Mojib Wali
c73571c2b7 v3.6.0 2021-08-05 10:05:49 +02:00
mb-wali
db52ca8aad config: removes i18n config
This closes #236
2021-08-05 10:05:03 +02:00
mb-wali
21b67cb3e0 revert: removes override for
* records landingpage (details)
* deposit page (deposit create and depsosit edit)
2021-08-05 09:54:12 +02:00
mb-wali
f22e62dfb0 style: changes deposit form segment color
css: refactor variables
2021-07-08 15:31:16 +02:00
mb-wali
8eb5152963 refactor: views & deposit override
separates the views from override deposit
2021-07-08 15:31:07 +02:00
mb-wali
a8a4aab191 i18n: update translations 2021-06-24 13:38:37 +02:00
mb-wali
2815c35590 styling: adds tug logo 2021-06-24 13:38:37 +02:00
mb-wali
fc13dc8228 login_user: extended user login template
adds support for oauth and new configs
2021-06-24 13:38:37 +02:00
Mojib Wali
2290dbe3cb v3.4.1 2021-06-04 12:02:12 +02:00
mb-wali
15f4d5fce3 dep: bump in config module 2021-06-04 11:55:41 +02:00
mb-wali
b76f27c037 global: route blueprint migrated to config-tugraz
This is required to make sure config module is independent
2021-06-04 11:55:41 +02:00
Mojib Wali
4aa72c003b v3.4.0 2021-06-01 12:37:16 +02:00
mb-wali
fb906bda72 global: refactor upon release changes
resource_type: change in index and values of resource type.

func: that will serialize list of records.
2021-06-01 12:32:03 +02:00
mb-wali
808aca3f60 details: modified resource_type 2021-06-01 12:32:03 +02:00
mb-wali
5f49389fb1 global: migrate v4 2021-06-01 12:32:03 +02:00
mb-wali
4930e78c3a documents: adds reference guide version 2 2021-05-27 12:53:59 +02:00
David Eckhard
1ad73cc001 ui: change title to data-tooltip 2021-05-27 12:24:45 +02:00
55 changed files with 889 additions and 1692 deletions

View File

@@ -15,15 +15,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
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]
indent_size = 4

1
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1 @@
cd71ecd24b8fc2253a58c60082c80a87c8085601

View File

@@ -15,7 +15,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install setuptools wheel babel
- name: Build package
run: |
python setup.py compile_catalog sdist bdist_wheel
@@ -23,4 +23,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__
password: ${{ secrets.pypi_password }}
password: ${{ secrets.pypi_password }}

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
on:
@@ -20,42 +28,18 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
requirements-level: [min, pypi]
db-service: [postgresql12]
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
python-version: [3.8, 3.9]
requirements-level: [pypi]
db-service: [postgresql13]
search-service: [opensearch2]
include:
- db-service: postgresql12
DB_EXTRAS: "postgresql"
- search-service: elasticsearch7
SEARCH_EXTRAS: "elasticsearch7"
- search-service: opensearch2
SEARCH_EXTRAS: "opensearch2"
env:
DB: ${{ matrix.db-service }}
SEARCH: ${{ matrix.search-service }}
EXTRAS: all,${{ matrix.DB_EXTRAS }},${{ matrix.SEARCH_EXTRAS }}
EXTRAS: tests,${{ matrix.SEARCH_EXTRAS }}
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -67,7 +51,7 @@ jobs:
- name: Generate dependencies
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
- name: Cache pip
uses: actions/cache@v2

View File

@@ -5,6 +5,11 @@
# 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.
#
# 1) Create message catalog:
# $ python setup.py extract_messages
# $ python setup.py update_catalog -l de
# $ python setup.py compile_catalog
[main]
host = https://www.transifex.com

View File

@@ -8,6 +8,131 @@
Changes
=======
Version v4.11.0 (release 2023-04-20)
- global: make dependencies compatible with v11
Version v4.10.1 (release 2022-11-10)
- dep: bump in invenio-assets
Version v4.10.0 (release 2022-10-13)
- global: migrate to v10 (#282)
Version v4.0.2 (release 2022-09-09)
- release v4.0.1
- update translation
- improve wording on search options
Version v4.0.1 (release 2022-08-05)
- update translation
- improve wording on search options
Version v4.0.0 (release 2022-07-29)
- remove unnecessary html code for header-search-bar
- fix warning from semantic-ui-react Search component
- add marc21 and lom to the searchbar
- change searchbar layout and use invenio-app-rdm searchbar
- remove grey color of community block and reduce size
- migrate js to use prettier
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)
- Initial public release.

View File

@@ -34,7 +34,11 @@ recursive-include invenio_theme_tugraz *.svg
recursive-include invenio_theme_tugraz *.less
recursive-include invenio_theme_tugraz *.ico
recursive-include invenio_theme_tugraz *.pdf
recursive-include invenio_theme_tugraz *.ttf
recursive-include invenio_theme_tugraz *.txt
recursive-include tests *.py
recursive-include invenio_theme_tugraz *.jpg
recursive-include invenio_theme_tugraz *.gitkeep
recursive-include .github/workflows *.yml
include .git-blame-ignore-revs

View File

@@ -15,7 +15,6 @@ encoding = utf-8
[jinja2: **/templates/**.html]
encoding = utf-8
extensions = jinja2.ext.autoescape, jinja2.ext.with_
# Extraction from JavaScript files

View File

@@ -8,7 +8,7 @@
"""Sphinx configuration."""
import os
from invenio_theme_tugraz import __version__
# -- General configuration ------------------------------------------------
@@ -44,9 +44,9 @@ source_suffix = ".rst"
master_doc = "index"
# General information about the project.
project = u"invenio-theme-tugraz"
copyright = u"2020, Graz University of Technology"
author = u"Graz University of Technology"
project = "invenio-theme-tugraz"
copyright = "2020, Graz University of Technology"
author = "Graz University of Technology"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -54,24 +54,15 @@ author = u"Graz University of Technology"
#
# 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.
release = version
release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
@@ -250,8 +241,8 @@ latex_documents = [
(
master_doc,
"invenio-theme-tugraz.tex",
u"invenio-theme-tugraz Documentation",
u"Graz University of Technology",
"invenio-theme-tugraz Documentation",
"Graz University of Technology",
"manual",
),
]
@@ -285,7 +276,7 @@ man_pages = [
(
master_doc,
"invenio-theme-tugraz",
u"invenio-theme-tugraz Documentation",
"invenio-theme-tugraz Documentation",
[author],
1,
)
@@ -304,7 +295,7 @@ texinfo_documents = [
(
master_doc,
"invenio-theme-tugraz",
u"invenio-theme-tugraz Documentation",
"invenio-theme-tugraz Documentation",
author,
"invenio-theme-tugraz",
"invenio module for TUGRAZ theme.",
@@ -328,6 +319,8 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/", None),
"flask": ("https://flask.palletsprojects.com/", None),
"werkzeug": ("https://werkzeug.palletsprojects.com/", None),
# TODO: Configure external documentation references, eg:
# 'Flask-Admin': ('https://flask-admin.readthedocs.io/en/latest/', None),
}

View File

@@ -1,6 +1,6 @@
# -*- 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
# modify it under the terms of the MIT License; see LICENSE file for more
@@ -9,6 +9,7 @@
"""invenio module for TUGRAZ theme."""
from .ext import InvenioThemeTugraz
from .version import __version__
__version__ = "4.11.0"
__all__ = ("__version__", "InvenioThemeTugraz")

View File

@@ -1,528 +0,0 @@
// This file is part of InvenioRDM
// Copyright (C) 2020 CERN.
// Copyright (C) 2020 Northwestern University.
// Copyright (C) 2021 Graz University of Technology.
//
// Invenio App RDM is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
import _get from "lodash/get";
import React, { Component, createRef, Fragment } from "react";
import {
AccessRightField,
CreatibutorsField,
DatesField,
DeleteButton,
DepositFormApp,
DepositFormTitle,
DescriptionsField,
FileUploader,
FormFeedback,
IdentifiersField,
LanguagesField,
LicenseField,
PIDField,
PreviewButton,
PublicationDateField,
PublishButton,
PublisherField,
RelatedWorksField,
ResourceTypeField,
SaveButton,
TitlesField,
VersionField,
} from "react-invenio-deposit";
import { AccordionField } from "react-invenio-forms";
import { Card, Container, Divider, Grid, Ref, Sticky } from "semantic-ui-react";
export class RDMDepositForm extends Component {
constructor(props) {
super(props);
this.config = props.config || {};
// TODO: retrieve from backend
this.config["canHaveMetadataOnlyRecords"] = true;
// TODO: Make ALL vocabulary be generated by backend.
// Currently, some vocabulary is generated by backend and some is
// generated by frontend here. Iteration is faster and abstractions can be
// discovered by generating vocabulary here. Once happy with vocabularies,
// then we can generate it in the backend.
this.vocabularies = {
metadata: {
...this.config.vocabularies,
titles: {
...this.config.vocabularies.titles,
},
descriptions: {
type: [
{ text: "Abstract", value: "abstract" },
{ text: "Methods", value: "methods" },
{ text: "Series Information", value: "seriesinformation" },
{ text: "Table of Contents", value: "tableofcontents" },
{ text: "Technical Info", value: "technicalinfo" },
{ text: "Other", value: "other" },
],
},
creators: {
type: [
{ text: "Person", value: "personal" },
{ text: "Organization", value: "organizational" },
],
role: [
{ text: "Editor", value: "editor" },
{ text: "Data Curator", value: "datacurator" },
{ text: "Data Manager", value: "datamanager" },
{ text: "Project Manager", value: "projectmanager" },
],
},
contributors: {
type: [
{ text: "Person", value: "personal" },
{ text: "Organization", value: "organizational" },
],
role: [
{ text: "Editor", value: "editor" },
{ text: "Data Curator", value: "datacurator" },
{ text: "Data Manager", value: "datamanager" },
{ text: "Project Manager", value: "projectmanager" },
],
},
dates: {
type: [
{ text: "Accepted", value: "accepted" },
{ text: "Available", value: "available" },
{ text: "Copyrighted", value: "copyrighted" },
{ text: "Collected", value: "collected" },
{ text: "Created", value: "created" },
{ text: "Issued", value: "issued" },
{ text: "Submitted", value: "submitted" },
{ text: "Updated", value: "updated" },
{ text: "Valid", value: "valid" },
{ text: "Withdrawn", value: "withdrawn" },
{ text: "Other", value: "other" },
],
},
// TODO: Replace with an API backend
funding: {
funder: [
{
name: "National Institutes of Health (US)",
identifier: "funder1",
scheme: "funderScheme1",
},
{
name: "European Commission (EU)",
identifier: "funder2",
scheme: "funderScheme2",
},
],
award: [
{
title: "CANCER &AIDS DRUGS--PRECLIN PHARMACOL/TOXICOLOGY",
number: "N01CM037835-016",
identifier: "awardA",
scheme: "awardSchemeA",
parentScheme: "funderScheme1",
parentIdentifier: "funder1",
},
{
title:
"Beyond the Standard Model at the LHC and with Atom Interferometers.",
number: "228169",
identifier: "awardB1",
scheme: "awardSchemeB",
parentScheme: "funderScheme2",
parentIdentifier: "funder2",
},
{
title: "ENvironmental COnditions in GLAucoma Patients",
number: "747441",
identifier: "awardB2",
scheme: "awardSchemeB",
parentScheme: "funderScheme2",
parentIdentifier: "funder2",
},
],
},
identifiers: {
resource_type: this.config.vocabularies.resource_type,
scheme: [
{ text: "ARK", value: "ark" },
{ text: "ARXIV", value: "arxiv" },
{ text: "BIBCODE", value: "bibcode" },
{ text: "DOI", value: "doi" },
{ text: "EAN13", value: "ean13" },
{ text: "EISSN", value: "eissn" },
{ text: "HANDLE", value: "handle" },
{ text: "IGSN", value: "igsn" },
{ text: "ISBN", value: "isbn" },
{ text: "ISSN", value: "issn" },
{ text: "ISTC", value: "istc" },
{ text: "LISSN", value: "lissn" },
{ text: "LSID", value: "lsid" },
{ text: "PMID", value: "pmid" },
{ text: "PURL", value: "purl" },
{ text: "UPC", value: "upc" },
{ text: "URL", value: "url" },
{ text: "URN", value: "urn" },
{ text: "W3ID", value: "w3id" },
],
relations: [
{ text: "Is cited by", value: "iscitedby" },
{ text: "Cites", value: "cites" },
{ text: "Is supplement to", value: "issupplementto" },
{ text: "Is supplemented by", value: "issupplementedby" },
{ text: "Is continued by", value: "iscontinuedby" },
{ text: "Continues", value: "continues" },
{ text: "Is described by", value: "isdescribedby" },
{ text: "Describes", value: "describes" },
{ text: "Has metadata", value: "hasmetadata" },
{ text: "Is metadata for", value: "ismetadatafor" },
{ text: "Has version", value: "hasversion" },
{ text: "Is version of", value: "isversionof" },
{ text: "Is new version of", value: "isnewversionof" },
{ text: "Is previous version of", value: "ispreviousversionof" },
{ text: "Is part of", value: "ispartof" },
{ text: "Has part", value: "haspart" },
{ text: "Is referenced by", value: "isreferencedby" },
{ text: "References", value: "references" },
{ text: "Is documented by", value: "isdocumentedby" },
{ text: "Documents", value: "documents" },
{ text: "Is compiled by", value: "iscompiledby" },
{ text: "Compiles", value: "compiles" },
{ text: "Is variant form of", value: "isvariantformof" },
{ text: "Is original form of", value: "isoriginalformof" },
{ text: "Is identical to", value: "isidenticalto" },
{ text: "Is reviewed by", value: "isreviewedby" },
{ text: "Reviews", value: "reviews" },
{ text: "Is derived from", value: "isderivedfrom" },
{ text: "Is source of", value: "issourceof" },
{ text: "Is required by", value: "isrequiredby" },
{ text: "Requires", value: "requires" },
{ text: "Is obsoleted by", value: "isobsoletedby" },
{ text: "Obsoletes", value: "obsoletes" },
],
},
subjects: {
options: [
{
text: "Deep Learning",
value: {
subject: "Deep Learning",
scheme: "user",
identifier: "U1",
},
},
{
text: "MeSH: Cognitive Neuroscience",
value: {
subject: "Cognitive Neuroscience",
scheme: "mesh",
identifier: "D000066494",
},
},
{
text: "FAST: Glucagonoma",
value: {
subject: "Glucagonoma",
scheme: "fast",
identifier: "943672",
},
},
],
limitToOptions: [
{ text: "All", value: "all" },
{ text: "MeSH", value: "mesh" },
{ text: "FAST", value: "fast" },
],
},
},
};
// check if files are present
this.noFiles = false;
if (
!Array.isArray(this.props.files.entries) ||
(!this.props.files.entries.length && this.props.record.is_published)
) {
this.noFiles = true;
}
}
formFeedbackRef = createRef();
sidebarRef = createRef();
accordionStyle = {
header: { className: "inverted brand", style: { cursor: "pointer" } },
};
render() {
return (
<DepositFormApp
config={this.config}
record={this.props.record}
files={this.props.files}
permissions={this.props.permissions}
>
<FormFeedback fieldPath="message" />
<Container style={{ marginTop: "10px" }}>
<DepositFormTitle />
<Grid>
<Grid.Row>
<Grid.Column width={11}>
<AccordionField
fieldPath=""
active={true}
label={"Files"}
ui={this.accordionStyle}
>
{this.noFiles && this.props.record.is_published && (
<p
style={{
textAlign: "center",
opacity: "0.5",
cursor: "default !important",
}}
>
<em>The record has no files.</em>
</p>
)}
<FileUploader
isDraftRecord={!this.props.record.is_published}
quota={{
maxFiles: 100,
maxStorage: 10 ** 10,
}}
/>
</AccordionField>
<AccordionField
fieldPath=""
active={true}
label={"Basic information"}
ui={this.accordionStyle}
>
{this.config.pids.map((pid) => (
<Fragment key={pid.scheme}>
<PIDField
btnLabelGetPID={pid.btn_label_get_pid}
canBeManaged={pid.can_be_managed}
canBeUnmanaged={pid.can_be_unmanaged}
fieldPath={`pids.${pid.scheme}`}
isEditingPublishedRecord={
this.props.record.is_published === true // is_published is `null` at first upload
}
managedHelpText={pid.managed_help_text}
pidLabel={pid.pid_label}
pidPlaceholder={pid.pid_placeholder}
pidType={pid.scheme}
unmanagedHelpText={pid.unmanaged_help_text}
/>
<Divider />
</Fragment>
))}
<ResourceTypeField
options={this.vocabularies.metadata.resource_type}
required
/>
<TitlesField
options={this.vocabularies.metadata.titles}
required
/>
<PublicationDateField required />
<CreatibutorsField
label={"Creators"}
labelIcon={"user"}
fieldPath={"metadata.creators"}
roleOptions={this.vocabularies.metadata.creators.role}
schema="creators"
required
/>
<DescriptionsField
options={this.vocabularies.metadata.descriptions}
editorConfig={{
removePlugins: [
"Image",
"ImageCaption",
"ImageStyle",
"ImageToolbar",
"ImageUpload",
"MediaEmbed",
"Table",
"TableToolbar",
"TableProperties",
"TableCellProperties",
],
}}
/>
<LicenseField
fieldPath="metadata.rights"
searchConfig={{
searchApi: {
axios: {
headers: {
Accept: "application/vnd.inveniordm.v1+json",
},
url: "/api/vocabularies/licenses",
withCredentials: false,
},
},
initialQueryState: {
filters: [["tags", "recommended"]],
},
}}
serializeLicenses={(result) => ({
title: result.title_l10n,
description: result.description_l10n,
id: result.id,
link: result.props.url,
})}
/>
<br />
</AccordionField>
<AccordionField
fieldPath=""
active={true}
label={"Recommended information"}
ui={this.accordionStyle}
>
<CreatibutorsField
addButtonLabel={"Add contributor"}
label={"Contributors"}
labelIcon={"user plus"}
fieldPath={"metadata.contributors"}
roleOptions={this.vocabularies.metadata.contributors.role}
schema="contributors"
modal={{
addLabel: "Add contributor",
editLabel: "Edit contributor",
}}
/>
{/**TODO: uncomment to use Subjects*/}
{/* <SubjectsField
initialOptions={_get(
this.props.record,
"metadata.subjects",
null
)}
limitToOptions={
this.vocabularies.metadata.subjects.limitToOptions
}
/>
<ComingSoonField
fieldPath="metadata.subjects"
label="Subjects"
labelIcon="tag"
/> */}
<LanguagesField
initialOptions={_get(
this.props.record,
"ui.languages",
[]
).filter((lang) => lang !== null)} // needed because dumped empty record from backend gives [null]
serializeSuggestions={(suggestions) =>
suggestions.map((item) => ({
text: item.title_l10n,
value: item.id,
key: item.id,
}))
}
/>
<DatesField options={this.vocabularies.metadata.dates} />
<VersionField />
<PublisherField />
<br />
</AccordionField>
{/**TODO: uncomment to use FundingField*/}
{/* <AccordionField
fieldPath=""
active={true}
label={"Funding"}
ui={this.accordionStyle}
>
<FundingField options={this.vocabularies.metadata.funding} />
<ComingSoonField
fieldPath="metadata.funding"
label="Awards"
labelIcon="money bill alternate outline"
/>
<br />
</AccordionField> */}
<AccordionField
fieldPath=""
active={true}
label={"Alternate identifiers"}
ui={this.accordionStyle}
>
<IdentifiersField
fieldPath="metadata.identifiers"
label="Alternate identifier(s)"
labelIcon="barcode"
schemeOptions={
this.vocabularies.metadata.identifiers.scheme
}
/>
</AccordionField>
<AccordionField
fieldPath=""
active={true}
label={"Related works"}
ui={this.accordionStyle}
>
<RelatedWorksField
options={this.vocabularies.metadata.identifiers}
/>
<br />
</AccordionField>
</Grid.Column>
<Ref innerRef={this.sidebarRef}>
<Grid.Column width={5} className="deposit-sidebar">
<Sticky context={this.sidebarRef} offset={20}>
<Card className="actions">
<Card.Content>
<div className="sidebar-buttons">
<SaveButton fluid className="save-button" />
<PreviewButton fluid className="preview-button" />
</div>
<PublishButton fluid />
</Card.Content>
</Card>
<Card className="actions">
<Card.Content>
<DeleteButton
fluid
// TODO: make is_published part of the API response
// so we don't have to do this
isPublished={this.props.record.is_published}
/>
</Card.Content>
</Card>
<AccessRightField
label={"Visibility"}
labelIcon={"shield"}
/>
</Sticky>
</Grid.Column>
</Ref>
</Grid.Row>
</Grid>
</Container>
</DepositFormApp>
);
}
}

View File

@@ -1,23 +0,0 @@
// This file is part of InvenioRDM
// Copyright (C) 2020 CERN.
// Copyright (C) 2020 Northwestern University.
//
// Invenio App RDM is free software; you can redistribute it and/or modify it
// under the terms of the MIT License; see LICENSE file for more details.
import React from "react";
import ReactDOM from "react-dom";
import "semantic-ui-css/semantic.min.css";
import { getInputFromDOM } from "react-invenio-deposit";
import { RDMDepositForm } from "./RDMDepositForm";
ReactDOM.render(
<RDMDepositForm
record={getInputFromDOM("deposits-record")}
files={getInputFromDOM("deposits-record-files")}
config={getInputFromDOM("deposits-config")}
permissions={getInputFromDOM("deposits-record-permissions")}
/>,
document.getElementById("deposit-form")
);

View File

@@ -1,8 +1,12 @@
import $ from 'jquery';
import 'semantic-ui-css';
import $ from "jquery";
import "semantic-ui-css";
import { MultipleOptionsSearchBar } from "@js/invenio_search_ui/components";
import { i18next } from "@translations/invenio_app_rdm/i18next";
import ReactDOM from "react-dom";
import React from "react";
// called on document ready
$(function() {
$(function () {
importZammadScript();
});
@@ -11,31 +15,40 @@ function importZammadScript() {
scriptNode.id = "zammad_form_script";
scriptNode.src = "https://ub-support.tugraz.at/assets/form/form.js";
document.head.appendChild(scriptNode);
$.getScript("https://ub-support.tugraz.at/assets/form/form.js", () => {
$('#feedback-form').ZammadForm({
messageTitle: 'Contact us',
$("#feedback-form").ZammadForm({
messageTitle: "Contact us",
showTitle: true,
messageSubmit: 'Submit',
messageThankYou: 'Thank you for your message, (#%s). We will get back to you as quickly as possible!',
modal: true
messageSubmit: "Submit",
messageThankYou:
"Thank you for your message, (#%s). We will get back to you as quickly as possible!",
modal: true,
});
});
}
// used for sticky test instance notification
$('.ui.sticky.test-instance')
.sticky({
context: 'body'
})
;
$(".ui.sticky.test-instance").sticky({
context: "body",
});
export function toggleVisibility(id) {
var element = document.getElementById(id);
var isHided = element.style.display === "none";
var element = document.getElementById(id);
var isHided = element.style.display === "none";
element.style.display = isHided ? "block" : "none";
element.style.display = isHided ? "block" : "none";
}
window.toggleVisibility = toggleVisibility;
const headerSearchbar = document.getElementById("header-search-bar");
const searchBarOptions = JSON.parse(headerSearchbar.dataset.options);
ReactDOM.render(
<MultipleOptionsSearchBar
options={searchBarOptions}
placeholder={i18next.t("Search records...")}
/>,
headerSearchbar
);

View File

@@ -0,0 +1,14 @@
/*
* Copyright (C) 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.
*/
.ui.container.page-subheader-outer {
background-color: unset;
}
.ui.fluid.container {
width: fit-content;
}

View File

@@ -0,0 +1,15 @@
/*
* Copyright (C) 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.
*/
// deposit form segment styling
.ui.inverted.brand.segment {
background-color: @greyLight !important;
color: @tugrazBlack !important;
label {
color: @tugrazBlack;
}
}

View File

@@ -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.

View File

@@ -187,6 +187,7 @@ svg:not(:root) {
.main-menu-underline-line {
border: 2px solid @greyLight !important;
border-radius: 0;
background-color: @greyLight;
}
#margin-divider{
@@ -254,3 +255,10 @@ span.home-inline{
border: solid @notificationBorder 1px;
z-index: 100000;
}
#skip-to-main {
background-color: @primaryButton;
&:focus {
background-color: @primaryButtonInverted;
}
}

View File

@@ -77,12 +77,25 @@ pre {
background-color: @tugrazRed;
}
.ui.button:hover,
.ui.search.button:hover {
background-color: @primaryButtonHoverBackground;
/***
* accordion title
***/
.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;
}
@@ -97,6 +110,7 @@ pre {
.ui.input > input, /* it seams redundant but it is not */
.ui.segment,
.ui.selection.dropdown,
.ui.accordion.styled,
.ui.card,
.ui.cards > .card,
.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;
}

View File

@@ -1,5 +1,5 @@
/*
* 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 modify it
* under the terms of the MIT License; see LICENSE file for more details.
@@ -14,8 +14,8 @@
@import "search";
@import "macros";
@import "login";
@import (css)
url("https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap");
@import "deposit";
@import "communities";
/***
**TODO:
@@ -33,3 +33,7 @@
transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
outline: none;
}
.nowrap-link {
white-space: nowrap;
}

View File

@@ -17,16 +17,20 @@
// badge colors, accessibility
@accessRight : #e9711c;
@accessRightOpen : #e9711c;
@accessRightOpen : @accessRight;
@accessRightRestricted: #fbbd08;
@accessRightEmbargoed : #db2828;
@accessRightClosed : #db2828;
@accessRightClosed : @accessRightEmbargoed;
@accessRightMetadata : #2185D0;
// primary colors TU Graz
@tugrazBlack: #231f20;
@tugrazRed : #e4154b;
// general
@primaryBackground: #fff;
@primaryText : #000;
// accent colors
@greyDark : #777;
@@ -36,24 +40,19 @@
// link and button colors
@primaryLinkInverted : #000;
@primaryLinkBackgroundInverted: #fff;
@primaryLink : #fff;
@primaryLinkHoverBackground : #000;
@primaryButton : #fff;
@primaryButtonHoverBackground : #000;
@primaryButtonInverted : #000f;
@primaryLinkInverted : @primaryText;
@primaryLinkBackgroundInverted: @primaryBackground;
@primaryLink : @primaryBackground;
@primaryLinkHoverBackground : @primaryText;
@primaryButton : @primaryBackground;
@primaryButtonHoverBackground : @primaryText;
@primaryButtonInverted : @primaryText;
// general
@primaryBackground: #fff;
@primaryText : #000;
// account (signin, signup) specific
@primaryFormAccounts : #fff;
@primaryFormAccounts : @primaryBackground;
@formAccountsInputPlaceholder : silver;
@fieldInputSelectionBackground: #50a2ce;
@signInBackground : #245b78;

View File

@@ -9,7 +9,6 @@
"""invenio module for TUGRAZ theme."""
from flask_babelex import gettext as _
from invenio_app_rdm.config import RECORDS_UI_ENDPOINTS
INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
"""Default value for the application."""
@@ -17,9 +16,7 @@ INVENIO_THEME_TUGRAZ_DEFAULT_VALUE = _("TU Graz Repository")
INVENIO_THEME_TUGRAZ_BASE_TEMPLATE = "invenio_theme_tugraz/base.html"
"""TU Graz Default base template"""
INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = (
"invenio_theme_tugraz/accounts/accounts_base.html"
)
INVENIO_THEME_TUGRAZ_ACCOUNT_BASE = "invenio_theme_tugraz/accounts/accounts_base.html"
"""TU Graz Default account base template"""
INVENIO_THEME_TUGRAZ_ICON = "images/icon_use.png"
@@ -76,20 +73,9 @@ THEME_SITENAME = _("Repository")
SECURITY_LOGIN_USER_TEMPLATE = "invenio_theme_tugraz/accounts/login_user.html"
"""Login template"""
SECURITY_REGISTER_USER_TEMPLATE = (
"invenio_theme_tugraz/accounts/register_user.html"
)
SECURITY_REGISTER_USER_TEMPLATE = "invenio_theme_tugraz/accounts/register_user.html"
"""Sigup template"""
# Invenio-I18N
# ============
# See https://invenio-i18n.readthedocs.io/en/latest/configuration.html
BABEL_DEFAULT_LOCALE = "en"
# Default time zone
BABEL_DEFAULT_TIMEZONE = "Europe/Vienna"
# Other supported languages (do not include BABEL_DEFAULT_LOCALE in list).
I18N_LANGUAGES = [("de", _("German"))]
# Invenio-app-rdm
# =============
# See https://invenio-app-rdm.readthedocs.io/en/latest/configuration.html
@@ -119,7 +105,4 @@ DEPOSITS_HEADER_TEMPLATE = "invenio_theme_tugraz/header.html"
TUG_ROUTES = {
"index": "/",
"comingsoon": "/comingsoon",
"guide": "/guide",
"terms": "/terms",
"gdpr": "/gdpr",
}

View File

@@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2021 CERN.
# Copyright (C) 2019-2021 Northwestern University.
# Copyright (C) 2021 TU Wien.
# Copyright (C) 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.
# https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/records_ui/views/deposits.py
"""Routes for record-related pages provided by Invenio-App-RDM."""
from flask import render_template
from flask_login import login_required
from invenio_app_rdm.records_ui.utils import set_default_value
from invenio_app_rdm.records_ui.views.decorators import pass_draft, pass_draft_files
from invenio_app_rdm.records_ui.views.deposits import (
get_form_config,
get_search_url,
new_record,
)
from invenio_rdm_records.resources.serializers import UIJSONSerializer
@login_required
def deposit_create():
"""Create a new deposit."""
return render_template(
"invenio_theme_tugraz/deposit/deposit.html",
forms_config=get_form_config(createUrl=("/api/records")),
searchbar_config=dict(searchUrl=get_search_url()),
record=new_record(),
files=dict(
default_preview=None, entries=[], links={}
),
)
@login_required
@pass_draft
@pass_draft_files
def deposit_edit(draft=None, draft_files=None, pid_value=None):
"""Edit an existing deposit."""
serializer = UIJSONSerializer()
record = serializer.serialize_object_to_dict(draft.to_dict())
return render_template(
"invenio_theme_tugraz/deposit/deposit.html",
forms_config=get_form_config(apiUrl=f"/api/records/{pid_value}/draft"),
record=record,
files=draft_files.to_dict(),
searchbar_config=dict(searchUrl=get_search_url()),
permissions=draft.has_permissions_to(['new_version'])
)

View File

@@ -9,8 +9,7 @@
"""invenio module for TUGRAZ theme."""
from . import config
from .deposits import deposit_create, deposit_edit
from .views import index, record_detail
from .views import index
class InvenioThemeTugraz(object):
@@ -26,9 +25,6 @@ class InvenioThemeTugraz(object):
# add index route rule
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule
app.add_url_rule("/", "index", index)
app.add_url_rule("/records/<pid_value>", "record_detail", record_detail)
app.add_url_rule("/uploads/new", "deposit_create", deposit_create)
app.add_url_rule("/uploads/<pid_value>", "deposit_edit", deposit_edit)
self.init_config(app)
app.extensions["invenio-theme-tugraz"] = self

View File

@@ -8,10 +8,8 @@
"""Frontpage records."""
from __future__ import absolute_import, print_function
from elasticsearch_dsl.query import Q
from invenio_search.api import RecordsSearch
from invenio_search.engine import dsl
class FrontpageRecordsSearch(RecordsSearch):
@@ -21,6 +19,7 @@ class FrontpageRecordsSearch(RecordsSearch):
"""Default index and filter for frontpage search."""
index = "rdmrecords-records"
default_filter = Q(
"query_string", query=(
"access.record:public " "AND versions.is_latest:true"))
default_filter = dsl.Q(
"query_string",
query=("access.record:public " "AND versions.is_latest:true"),
)

View File

@@ -10,13 +10,14 @@
{% from "invenio_accounts/_macros.html" import render_field, form_errors %}
{%- from "invenio_oauthclient/_macros.html" import oauth_button %}
{% block page_body %}
<div class="spacer-long"></div>
<div class="spacer-long"></div>
<div class="ui container">
<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="divider hidden"></div>
{%- block form_header %}
@@ -24,32 +25,54 @@
{%- endblock form_header %}
<div class="ui divider"></div>
<!--Log in with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="login-page-button ui fluid large button">
{% trans type='TUGRAZ' %} Log in with {{ type }}{% endtrans %}
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a>
<div class="spacer-long"></div>
<div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or")}}</span></div>
{% if config.OAUTHCLIENT_REMOTE_APPS or config.SSO_SAML_IDPS %}
<div class="ui form">
{% for name in config.OAUTHCLIENT_REMOTE_APPS.keys() %}
{{ oauth_button(name, next=request.args.get('next')) }}
{% endfor %}
</div>
{% for name in config.SSO_SAML_IDPS.keys() %}
<div class="field">
<a class="login-page-button ui fluid large button" href="{{ url_for('sso_saml.sso', idp=name) }}">
{{
_('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" />
</a>
</div>
{% endfor %}
{%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %}
<div class="ui horizontal divider">
{{ _("Or") }}
</div>
{%- endif %}
{% endif %}
{%- block form_outer %}
{%- if config.ACCOUNTS_LOCAL_LOGIN_ENABLED %}
{%- with form = login_user_form %}
<div style="padding-bottom: 20px;padding-top: 6px;">
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="ui big form">
{{ form.hidden_tag() }}
{{ form_errors(form) }}
{{ 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>
{%- set accordion_active = "active" if form.errors else "" %}
<div class="ui styled accordion">
<div class="title trigger {{ accordion_active }}">
{{ _('Log in with repository credentials') }}
<i class="user icon button"></i>
</div>
<div class="content {{ accordion_active }}">
<form action="{{ url_for_security('login') }}" method="POST" name="login_user_form" class="ui large form">
{{ form.hidden_tag() }}
{{ form_errors(form) }}
{{ 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 %}
{%- endif %}
{%- endblock form_outer %}
<div class="divider hidden"></div>
</div>
{%- block registerable %}

View File

@@ -39,48 +39,58 @@
</div>
<div class="column" id="switch_right">
<!--Sigup with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<div class="ui divider"></div>
<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>
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a>
<div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or")}}</span></div>
{%- endif %}
<!--Sigup with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<div class="ui divider"></div>
<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>
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a>
</div>
<div class="ui inverted horizontal divider"><span class="text-color">{{_ ("Or")}}</span></div>
{%- endif %}
{%- block form_header %}
<!-- can add a header img-->
{%- block form_outer %}
{%- endblock form_outer %}
{%- endblock form_header %}
{%- block form_header %}
<!-- can add a header img-->
{%- block form_outer %}
{%- endblock form_outer %}
{%- 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 %}
{%- with form = register_user_form %}
{%- set accordion_active = "active" if form.errors else "" %}
<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 %}
{%- if form.recaptcha %}
<div class="grouped fields">{{ form.recaptcha() }}</div>
{%- endif %}
{%- if form.recaptcha %}
<div class="grouped fields">{{ form.recaptcha() }}</div>
{%- endif %}
<div class="centered row">
<button type="submit" class="ui fluid large submit button">
<i class="ui edit outline icon"></i>{{ _('Sign up') }}
</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>
</form>
{%- endwith %}
</div>
{%- endwith %}
<div class="ui divider"></div>
</div>

View File

@@ -1,37 +0,0 @@
{#
Copyright (C) 2020 CERN.
Copyright (C) 2020 Northwestern University.
Copyright (C) 2021 Graz University of Technology.
Invenio App RDM is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
#}
{%- if not record.is_published and record.versions.index and record.versions.index > 1%}
{%- set title = _("New version") %}
{%- elif not record.is_published %}
{%- set title = _("New upload") %}
{% else %}
{%- set title = _("Edit upload") %}
{%- endif %}
{%- extends config.BASE_TEMPLATE %}
{%- block page_body %}
{%- if record %}
<input id="deposits-record" type="hidden" name="deposits-record" value='{{record | tojson }}'></input>
{%- endif %}
{%- if files %}
<input id="deposits-record-files" type="hidden" name="deposits-record-files" value='{{files | tojson }}'></input>
{%- endif %}
{%- if forms_config %}
<input type="hidden" name="deposits-config" value='{{forms_config | tojson }}'></input>
{%- endif %}
{%- if permissions %}
<input id="deposits-record-permissions" type="hidden" name="deposits-record-permissions" value='{{permissions | tojson }}'></input>
{%- endif %}
<div id="deposit-form"></div>
{%- endblock page_body %}
{%- block javascript %}
{{ super() }}
{{ webpack['invenio-theme-tugraz-rdm-deposit.js'] }}
{%- endblock %}

View File

@@ -34,7 +34,7 @@ details.
{{_ ("Documentation")}} <i class="external alternate icon"></i>
</a>
<br>
<a href="{{ url_for('invenio_theme_tugraz.guide') }}"
<a href="{{ url_for('invenio_config_tugraz.guide') }}"
title="Quick guide" target="_blank">
{{_ ("Reference Guide")}} <i class="download icon"></i>
</a>
@@ -44,12 +44,12 @@ details.
{{_ ("Search Guide")}}<i class="angle right icon"></i>
</a>
<br>
<a href="{{ url_for('invenio_theme_tugraz.gdpr') }}"
<a href="{{ url_for('invenio_config_tugraz.gdpr') }}"
title="General Data Protection Rights" target="_blank">
{{_ ("Data Protection")}} <i class="download icon"></i>
</a>
<br>
<a href="{{ url_for('invenio_theme_tugraz.terms') }}"
<a href="{{ url_for('invenio_config_tugraz.terms') }}"
title="Terms and Conditions" target="_blank">
{{_ ("Terms and Conditions")}} <i class="download icon"></i>
</a>

View File

@@ -13,58 +13,70 @@
</div>
{% endif %}
<header>
{%- block navbar %}
<nav>
{%- block navbar_header %}
{%- include "invenio_theme_tugraz/navbar.html" %}
{%- endblock navbar_header %}
<div>
<header>
{%- block navbar %}
<nav>
{%- block 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="three column row centered" style="padding-bottom: 0;">
<div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home" class="no-decoration">
<span class="home-inline">
<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"
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#"
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"
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)">
</polyline>
</svg>
{{_ ("Home")}}
</span>
<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"
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#"
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"
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)">
</polyline>
</svg>
{{_ ("Home")}}
</span>
</a>
</div>
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}
<div class="two wide column main-menu-entry">
<a href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
</div>
{%- endfor %}
<div class="two wide column main-menu-entry">
<a role="menuitem" href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
</div>
{% 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 id="margin-divider" class="ui divider main-menu-underline-line">
</div>
</div>
<div class="spacer"></div>
</div>
</nav>
{%- endblock navbar %}
{%- block flashmessages %}
{%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%}
{{ flashed_messages() }}
{%- endblock %}
{#
</nav>
{%- endblock navbar %}
{%- block flashmessages %}
{%- from "invenio_theme/macros/messages.html" import flashed_messages with context -%}
{{ flashed_messages() }}
{%- endblock %}
</header>
{#
{%- block breadcrumbs %}
{%- include "invenio_theme/breadcrumbs.html" %}
{%- include "invenio_theme/breadcrumbs.html" %}
{%- endblock breadcrumbs %}
#}
</header>
#}
</div>

View File

@@ -17,25 +17,8 @@
{%- block page_body %}
<div class="ui container">
{%- block frontpage_search %}
{%- block frontpage_form %}
<div class="ui center aligned grid">
<div class="sixteen wide column">
<form action="{{config.THEME_SEARCH_ENDPOINT}}" class="ui form" role="search">
<div class="ui fluid big action icon input">
<input type="text" name="q" autofocus="autofocus" placeholder="{{ _("Type and press enter to search") }}">
<button type="submit" class="ui icon search button">
<i class="icon search"></i>
</button>
</div>
</form>
</div>
</div>
<div class="ui divider hidden"></div>
{%- endblock frontpage_form %}
{%- endblock frontpage_search %}
<div class="ui stackable grid">
<!---Recent uploads-->
@@ -58,15 +41,15 @@
-->
<div class="badges">
<!--Publication date/Version badge-->
<span class="ui label blue" title="{{_('Publication date')}}">
<span class="ui label blue" data-tooltip="{{_('Publication date')}}" data-inverted="">
{{ r.metadata.publication_date }} {{ '(' ~ r.metadata.version ~ ')' if r.metadata.version }}
</span>
<!--Resource type badge-->
<span class="ui label grey" title="{{_('Resource type')}}">
{{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }}
<span class="ui label grey" data-tooltip="{{_('Resource type')}}" data-inverted>
{{ r.ui.resource_type.title_l10n }}
</span>
<span class="ui label access-status {{ r.ui.access_status.id }}" data-tooltip="{{ r.ui.access_status.description_l10n }}" data-inverted="">
{% if r.ui.access_status.icon %}<i class="icon {{ r.ui.access_status.icon }}"></i>{% endif %}
{{ r.ui.access_status.title_l10n }}
@@ -108,22 +91,9 @@
</div>
</div>
<!--Disabled on feb-relase - enable when stable-->
<!-- <div class="right floated column">
<span class="access-right">
<i class="icon lock open"></i>
{{ r.access.access_right | make_dict_like('access_right') | vocabulary_title('access_right') }}
{%- for right in r.metadata.rights %}
<a target="_blank" href="{{right.url}}">{{ '(' ~ right.identifier ~ ')' }}</a>
{%- endfor %}
</span>
</div> -->
</div>
</div>
</article>
<!----TODO: more versions
-->
{%- endfor %}
{% if records %}

View File

@@ -1,205 +0,0 @@
{#
Copyright (C) 2020-2021 CERN.
Copyright (C) 2020-2021 Northwestern University.
Copyright (C) 2021 TU Wien.
Copyright (C) 2021 Graz University of Technology.
Invenio RDM Records 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.BASE_TEMPLATE %}
{%- from "invenio_app_rdm/records/macros/files.html" import file_list_box, preview_file_box %}
{%- from "invenio_app_rdm/records/macros/detail.html" import show_detail %}
{%- set title = record.metadata.title -%}
{%- set metadata = record.metadata %}
{%- block page_body %}
<div class="banners">
{% if is_preview %}
<div class="ui info flashed top-attached manage message">
<div class="ui container">
<div class="ui relaxed grid">
<div class="column">
<div class="row">
<div class="header">
<i class="eye icon"></i> Preview
</div>
<p>
{% if record.is_published %}
You are previewing changes that have not yet been published.
{% endif %}
{% if not record.is_published and record.versions.index == 1 %}
You are previewing a new record that has not yet been published.
{% endif %}
{% if not record.is_published and record.versions.index > 1 %}
You are previewing a new record version that has not yet been published.
{% endif %}
</p>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if permissions is defined and permissions.can_edit and not is_preview %}
<div class="ui warning flashed top-attached manage message">
<div class="ui container">
<div id="recordManagement" data-record='{{ record | tojson }}' data-permissions='{{ permissions | tojson }}'></div>
</div>
</div>
{% endif %}
{% if (not record.versions.is_latest and not is_preview) or (is_preview and not record.versions.is_latest_draft) %}
<div class="ui warning flashed top-attached manage message">
<div class="ui container">
<div class="ui relaxed grid">
<div class="column">
<div class="row">
<p>
{% trans link_start=('<a href="' + record.links.latest_html + '"><b>')|safe, link_end='</b></a>'|safe %}
There is a {{ link_start }}newer version{{ link_end }} of the record available.
{% endtrans %}
</p>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class="ui container">
<div class="ui relaxed grid">
<div class="two column row top-padded">
<div class="eleven wide column">
{% if record.access.record == 'restricted' %}
<div class="ui {{ record.ui.access_status.message_class }} message">
<strong><i class="{{ record.ui.access_status.icon }} icon"></i>{{ record.ui.access_status.title_l10n }}</strong> {{ record.ui.access_status.description_l10n }}
{% if record.access.embargo.reason %}
<p>Reason: {{ record.access.embargo.reason }}</p>
{% endif %}
</div>
{% endif %}
{%- block record_body -%}
{%- block record_header -%}
<div class="ui grid middle aligned">
<div class="two column row">
<div class="left floated left aligned column">
<span class="ui" title="Publication date">{{ record.ui.publication_date_l10n_long }}</span>
<span class="label text-muted"> | Version {{ record.ui.version }}</span>
</div>
<div class="right floated right aligned column">
<span class="ui label small grey">{{ record.ui.resource_type }}</span>
<span class="ui label small access-status {{ record.ui.access_status.id }}" data-tooltip="{{ record.ui.access_status.description_l10n }}" data-inverted="">
{% if record.ui.access_status.icon %}<i class="icon {{ record.ui.access_status.icon }}"></i>{% endif %}
{{ record.ui.access_status.title_l10n }}
</span>
</div>
</div>
</div>
{%- endblock record_header -%}
{%- block record_title -%}
<h1>{{ metadata.title }}</h1>
<p>{%- include "invenio_app_rdm/records/details/creators.html" %}</p>
{%- endblock record_title -%}
{%- block record_content -%}
<p>{%- include "invenio_app_rdm/records/details/contributors.html" %}</p>
<p>{%- include "invenio_app_rdm/records/details/doi.html" %}</p>
{%- include "invenio_app_rdm/records/details/subjects.html" %}
<div class="top-padded">
{%- include "invenio_app_rdm/records/details/description.html" %}
</div>
<div class="top-padded">
{%- include "invenio_app_rdm/records/details/licenses.html" %}
</div>
{%- endblock record_content -%}
{# files #}
{%- block record_files -%}
{%- if record.files.enabled -%}
{%- if permissions.can_read_files -%}
{# record has files AND user can see files #}
{%- set files = files|order_entries %}
{%- if files|has_previewable_files -%}
{%-set preview_file = files|select_preview_file(default_preview=record.files.default_preview) %}
{{ preview_file_box(preview_file, pid, is_preview, record) }}
{%- endif -%}
{{ file_list_box(files, pid, is_preview, record) }}
{% else %}
{# record has files BUT user cannot see files #}
<div class="panel-spacing">
<div class="ui accordion panel {{ record.ui.access_status.id }}" id="preview" href="#collapsablePreview">
<div class="active title panel-heading {{ record.ui.access_status.id }}">
{{ _("Files") }}
<i class="angle down icon"></i>
</div>
<div id="collapsablePreview" class="active content">
<div class="ui {{ record.ui.access_status.message_class }} message file-box-message">
<i class="ui {{ record.ui.access_status.icon }} icon"></i><b>{{ record.ui.access_status.title_l10n }}</b>
<p>{{ record.ui.access_status.description_l10n }}</p>
{% if record.access.embargo.reason %}
<p>{{_("Reason")}}: {{record.access.embargo.reason}}</p>
{% endif%}
</div>
</div>
</div>
</div>
{%- endif %}
{%- endif %}
{%- endblock record_files -%}
{%- block record_details -%}
{# More details #}
<div class="top-padded">
{%- include "invenio_app_rdm/records/details/details.html" %}
</div>
{%- endblock record_details -%}
{%- block record_footer -%}
<div class="ui grid">
<div class="two column row top-bottom-padded font-small">
<div class="four wide column">
<p><b>Upload information</b></p>
</div>
<div class="twelve wide column">
<span class="label text-muted">
<b>Created:</b> {{ record.ui.created_date_l10n_long }} | <b>Modified:</b> {{ record.ui.updated_date_l10n_long }}
</span>
</div>
</div>
</div>
{%- endblock record_footer -%}
{%- block jump -%}
<div class="ui grid">
<div class="centered row" id="jump-btn">
<a style="cursor: pointer;">
<span class="ui button">
<i class="arrow alternate circle up outline icon"></i>Jump up</span>
</a>
</div>
</div>
{%- endblock jump -%}
{%- endblock record_body %}
</div>
<div class="five wide column">
{% block record_sidebar %}
{%- include "invenio_app_rdm/records/details/side_bar.html" %}
{% endblock record_sidebar %}
</div>
</div>
</div>
</div>
{%- endblock page_body %}
{%- block javascript %}
{{ super() }}
{{ webpack['invenio-app-rdm-landing-page.js'] }}
{# Communities management -- TODO include again when communities are ready #}
{# {{ webpack['invenio-communities-records.js'] }} #}
{{ webpack['previewer_theme.js'] }}
{%- endblock javascript %}

View File

@@ -15,7 +15,7 @@
<a href="{{creators.identifiers.orcid|pid_url('orcid')}}" target="_blank" ><img class="inline-orcid" src="{{ url_for('static', filename='extra/orcid.png')}}" /></a>
{%- endif %}
<span class="text-muted" {% if creators.affiliations %} {% for affiliation in creators.affiliations %} data-toggle="tooltip" title="{{affiliation.name}}" {%- endfor %} {% endif %}>{{creators.person_or_org.name}}</span>
<span class="text-muted" {% if creators.affiliations %} {% for affiliation in creators.affiliations %} data-tooltip="{{affiliation.name}}" data-inverted="" {%- endfor %} {% endif %}>{{creators.person_or_org.name}}</span>
{% if not loop.last %}; {% endif %}
{%- endfor %}

View File

@@ -1,18 +1,43 @@
{#
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
modify it under the terms of the MIT License; see LICENSE file for more
details.
#}
{% set options = [
{
"key": "records",
"text": _("All") + " " + config.THEME_SITENAME,
"value": url_for("invenio_search_ui.search"),
"title": "repo",
},{
"key": "marc21",
"text": _("Publications"),
"value": url_for("invenio_records_marc21.search"),
"title": "publication",
},{
"key": "lom",
"text": _("Open Educational Resources"),
"value": url_for("invenio_records_lom.search"),
"title": "oer",
}
]
%}
<div class="ui container">
<div class="short-menu" id="all-menu-top-table">
<div class="short-menu-left">
<div id="all-menu-top-left-item">
<div class="short-menu-left-search">
{%- if config.I18N_LANGUAGES %}
<div class="short-menu-left-lang" style="margin-right:10px; font-size:18px;">
<div style="display: inline-block;">
<div class="item p-0 search-bar rel-mr-1">
<div id="header-search-bar" data-options='{{ options | tojson }}'></div>
</div>
</div>
<div class="short-menu-left-lang">
{%- for l in current_i18n.get_locales() %}
{%- if current_i18n.language != l.language %}
<a
@@ -20,21 +45,6 @@
{%- endif %}
{%- endfor %}
</div>
{%- endif %}
<div class="search-icon-header">
<a href="{{url_for('invenio_search_ui.search')}}" class="no-decoration">
<svg class="short-menu-icon" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.w3.org/2000/svg" height="26.015" width="26.015" version="1.1"
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
viewBox="0 0 26.01515 26.01515">
<g stroke-miterlimit="10" transform="translate(1,1)">
<circle cy="8.5" cx="8.5" r="8" style="stroke-miterlimit:10;stroke-width:2"></circle>
<path style="stroke-width:2;stroke-miterlimit:10;stroke-linecap:round" d="m14.156 14.156 9.344 9.344">
</path>
</g>
</svg>
</a>
</div>
</div>
</div>
</div>
@@ -65,7 +75,7 @@
<br>
{{_ ("REPOSITORY")}}
<br>
{{_ ("LIBRARY & ARCHIVES")}}
{{_ ("LIBRARY & ARCHIVES")}}
</a>
</div>
</div>

View File

@@ -8,30 +8,27 @@ msgid ""
msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2021-05-10 10:36+0200\n"
"PO-Revision-Date: 2020-10-06 10:27+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
"POT-Creation-Date: 2022-08-05 10:15+0200\n"
"PO-Revision-Date: 2022-08-05 10:21+0200\n"
"Last-Translator: \n"
"Language-Team: de <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.9.1\n"
"X-Generator: Poedit 2.3.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:60
msgid "TU Graz Repository"
msgstr "TU Graz Repository"
#: invenio_theme_tugraz/config.py:66
#: invenio_theme_tugraz/config.py:63
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30
msgid "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/base.html:26
msgid "Invenio"
@@ -43,11 +40,11 @@ msgstr "Sicher"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:3
msgid ""
"your research is stored safely for the future in TU Graz library for as "
"long as TU Graz library exists."
"your research is stored safely for the future in TU Graz library for as long "
"as TU Graz library exists."
msgstr ""
"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
msgid "Trusted"
@@ -55,8 +52,8 @@ msgstr "Vertrauenswürdig"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:4
msgid ""
"built and operated by CERN and OpenAIRE to ensure that everyone can join "
"in Open Science."
"built and operated by CERN and OpenAIRE to ensure that everyone can join in "
"Open Science."
msgstr ""
"Aufgebaut und betrieben von CERN und OpenAIRE, um sicherzustellen, dass "
"jeder an Open Science teilnehmen kann."
@@ -70,8 +67,8 @@ msgid ""
"every upload is assigned a Digital Object Identifier (DOI), to make them "
"citable and trackable."
msgstr ""
"Jeder Upload wird mit einem Digital Object Identifier (DOI) versehen,um "
"ihn zitierfähig und nachverfolgbar zu"
"Jeder Upload wird mit einem Digital Object Identifier (DOI) versehen,um ihn "
"zitierfähig und nachverfolgbar zu"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:6
msgid "No waiting time"
@@ -79,11 +76,11 @@ msgstr "Keine Wartezeit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:6
msgid ""
"Uploads are made available online as soon as you hit publish, and your "
"DOI is registered within seconds."
"Uploads are made available online as soon as you hit publish, and your DOI "
"is registered within seconds."
msgstr ""
"Uploads stehen sofort nach drücken auf “Veröffentlichen” zur Verfügung. "
"Ihre DOI wird innerhalb von Sekunden registriert."
"Uploads stehen sofort nach drücken auf “Veröffentlichen” zur Verfügung. Ihre "
"DOI wird innerhalb von Sekunden registriert."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:7
msgid "Open or closed"
@@ -91,11 +88,11 @@ msgstr "Offen oder geschlossen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:7
msgid ""
"Share e.g. anonymized clinical trial data with only medical professionals"
" via our restricted access mode."
"Share e.g. anonymized clinical trial data with only medical professionals "
"via our restricted access mode."
msgstr ""
"Teilen Sie z.B. anonymisierte klinische Studiendaten nur mit "
"medizinischem Fachpersonal über unseren eingeschränkten Zugriffsmodus."
"Teilen Sie z.B. anonymisierte klinische Studiendaten nur mit medizinischem "
"Fachpersonal über unseren eingeschränkten Zugriffsmodus."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:8
msgid "Versioning"
@@ -198,22 +195,38 @@ msgid "to change the font size."
msgstr "Um die Schriftgröße zu ändern."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:117
#, python-format
#, fuzzy, python-format
msgid ""
"<strong>Powered by</strong>\n"
" <a href=\"%(invenio_rdm)s\" target=\"_blank\">"
" <a href=\"%(invenio_rdm)s\" target=\"_blank\" title=\"invenioRDM"
"\">"
msgstr ""
"<strong>Powered by</strong> <a href=\"%(invenio_rdm)s\" "
"target=\"_blank\">"
"<strong>Powered by</strong> <a href=\"%(invenio_rdm)s\" target=\"_blank\">"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:127
#, python-format
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:126
#, fuzzy, python-format
msgid ""
"<strong>Enabled by</strong>\n"
" <a href=\"%(fair_data)s\" target=\"_blank\">"
" <a href=\"%(fair_data)s\" target=\"_blank\" title=\"Fair Data "
"Austria\">"
msgstr ""
"<strong>Enabled by</strong> <a href=\"%(fair_data)s\" target=\"_blank\">"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:140
#, python-format
msgid ""
"\n"
" <a href=\"%(oea)s\" target=\"_blank\" title=\"Open Education "
"Austria\">"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:157
#, python-format
msgid ""
"\n"
" <a href=\"%(re3data)s\" target=\"_blank\" title=\"Registry of "
"Research Data Repositories\">"
msgstr ""
"<strong>Enabled by</strong> <a href=\"%(fair_data)s\" "
"target=\"_blank\">"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:61
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:11
@@ -225,108 +238,117 @@ msgstr "Testumgebung"
msgid "This is the test instance of the TU Graz Repository."
msgstr "Dies ist die Testumgebung des TU Graz Repositorys."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:39
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:40
msgid "Home"
msgstr "Startseite"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
msgid "Type and press enter to search"
msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:43
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:26
msgid "Recent uploads"
msgstr "Kürzlich hochgeladene Dateien"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:30
msgid "There are no public records to show."
msgstr "Es sind keine öffentlich zugänglichen Datensätze vorhanden."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:61
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:44
msgid "Publication date"
msgstr "Datum der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:66
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:49
msgid "Resource type"
msgstr "Art der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:104
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:87
#, python-format
msgid ""
"\n"
" Uploaded on %(date)s\n"
" "
msgstr "Hochgeladen am %(date)s\n"
msgstr ""
"\n"
"\t\tHochgeladen am %(date)s"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:131
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:101
msgid "More"
msgstr "Mehr"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:141
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:111
msgid "Need help?"
msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:115
msgid "Contact us"
msgstr "Kontaktiere uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:150
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:120
msgid "prioritizes all Recent uploads."
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:123
msgid "We can help with:"
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:128
msgid "Uploading your research data, software, preprints, etc."
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:129
msgid "One-on-one with"
msgstr "One-on-one mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:129
msgid "supporters."
msgstr "Unterstützern"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:160
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:130
msgid "Quota increases beyond our default policy."
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:131
msgid "Scripts for automated uploading of larger datasets."
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:136
msgid "Why use"
msgstr "Warum"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:66
#, fuzzy
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12
msgid "All"
msgstr "Alle"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
msgid "Publications"
msgstr "Publikationen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:22
msgid "Open Educational Resources"
msgstr "Open Educational Resources"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:76
msgid "REPOSITORY"
msgstr "Repository"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:68
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "LIBRARY & ARCHIVES"
msgstr "Bibliothek und Archiv"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:88
msgid "SCIENCE"
msgstr "WISSEN"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:79
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:89
msgid "PASSION"
msgstr "TECHNIK"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:80
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:90
msgid "TECHNOLOGY"
msgstr "LEIDENSCHAFT"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:59
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:78
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:86
msgid "Sign up"
msgstr "Registrierung"
msgstr "Registrieren"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:15
msgid "Log in"
@@ -336,30 +358,34 @@ msgstr "Einloggen"
msgid "Sign out"
msgstr "Ausloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:23
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:24
msgid "Log in to Repository"
msgstr "Anmelden"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:29
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38
#, python-format
msgid " Log in with %(type)s"
msgstr "Einloggen mit"
msgid "Log in with %(title)s"
msgstr "Einloggen mit %(title)s"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:33
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:52
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Or"
msgstr "Oder"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:45
#: 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"
msgstr "Einloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:58
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:81
#, python-format
msgid "New to %(sitename)s?"
msgstr "Neu im %(sitename)s?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:68
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:91
msgid "Forgot password?"
msgstr "Passwort vergessen"
@@ -376,8 +402,7 @@ msgid ""
"Uploads get a Digital Object Identifier (DOI) to make them easily and "
"uniquely citeable."
msgstr ""
"Uploads erhalten eine DOI und werden damit leichtauffindbar und "
"zitierfähig."
"Uploads erhalten eine DOI und werden damit leichtauffindbar und zitierfähig."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:28
msgid "Communities."
@@ -385,8 +410,8 @@ msgstr "Communities"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:30
msgid ""
"Accept or reject uploads to your own community (e.g workshops, EU "
"projects, institutions or entire disciplines)."
"Accept or reject uploads to your own community (e.g workshops, EU projects, "
"institutions or entire disciplines)."
msgstr ""
"Annehmen oder Ablehnen von Uploads in Ihrer eigenen Community (z.B. "
"workshop, EU-Projekt, Forschungseinrichtung, Disziplin)"
@@ -397,48 +422,23 @@ msgstr "Vertrauenswürdiges Forschungsdatenmanagement"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:34
msgid ""
"Built on top of TU Graz expertise in managing of the research data from "
"the Graz University of Technology."
"Built on top of TU Graz expertise in managing of the research data from the "
"Graz University of Technology."
msgstr "Gebaut basierend auf Expertise derTU Graz im Bereich Data Management"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:48
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
msgid "New version"
msgstr "neue Version"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:65
msgid "Sign up with repository credentials"
msgstr "Mit Ihren Repository Daten registrieren"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:12
msgid "New upload"
msgstr "Neuer upload"
#~ msgid "My dashboard"
#~ msgstr "Meine Übersicht"
#: 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"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:52
msgid "Uploads"
msgstr "Hochladen"
#~ msgid "Type and press enter to search"
#~ msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
#~ msgid "Version"
#~ msgstr "Version"
@@ -452,21 +452,38 @@ msgstr "Hochladen"
#~ msgid "Handbook"
#~ msgstr "Handbuch"
#~ msgid "RDM DOI Badge"
#~ msgstr "RDM DOI Abzeichen"
#~ msgid "DOI"
#~ msgstr "DOI"
#~ msgid "Open Access"
#~ msgstr ""
#~ msgid "Uploads"
#~ msgstr "Hochladen"
#~ msgid "No minted DOI"
#~ msgstr ""
#~ msgid "German"
#~ msgstr "Deutsche"
#~ msgid "New version"
#~ msgstr "neue Version"
#~ msgid "New upload"
#~ msgstr "Neuer upload"
#~ msgid "Edit upload"
#~ msgstr "Upload bearbeiten"
#~ msgid ""
#~ "Enabled by\n"
#~ " <a href=\"%(fair_data)s\" target=\"_blank\">"
#~ "\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"

View File

@@ -1,36 +1,32 @@
# 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
# invenio-theme-tugraz project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-theme-tugraz 3.0.1\n"
"Project-Id-Version: invenio-theme-tugraz 4.0.0\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2021-05-10 10:36+0200\n"
"POT-Creation-Date: 2022-08-05 10:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n"
"Generated-By: Babel 2.10.3\n"
#: invenio_theme_tugraz/config.py:14 invenio_theme_tugraz/config.py:63
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:60
msgid "TU Graz Repository"
msgstr ""
#: invenio_theme_tugraz/config.py:66
#: invenio_theme_tugraz/config.py:63
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:30
msgid "Repository"
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/base.html:26
msgid "Invenio"
@@ -190,14 +186,32 @@ msgstr ""
#, python-format
msgid ""
"<strong>Powered by</strong>\n"
" <a href=\"%(invenio_rdm)s\" target=\"_blank\">"
" <a href=\"%(invenio_rdm)s\" target=\"_blank\" "
"title=\"invenioRDM\">"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:127
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:126
#, python-format
msgid ""
"<strong>Enabled by</strong>\n"
" <a href=\"%(fair_data)s\" target=\"_blank\">"
" <a href=\"%(fair_data)s\" target=\"_blank\" title=\"Fair Data"
" Austria\">"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:140
#, python-format
msgid ""
"\n"
" <a href=\"%(oea)s\" target=\"_blank\" title=\"Open Education "
"Austria\">"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:157
#, python-format
msgid ""
"\n"
" <a href=\"%(re3data)s\" target=\"_blank\" title=\"Registry of "
"Research Data Repositories\">"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/accounts_base.html:61
@@ -210,31 +224,27 @@ msgstr ""
msgid "This is the test instance of the TU Graz Repository."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:39
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:40
msgid "Home"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
msgid "Type and press enter to search"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:43
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:26
msgid "Recent uploads"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:47
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:30
msgid "There are no public records to show."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:61
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:44
msgid "Publication date"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:66
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:49
msgid "Resource type"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:104
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:87
#, python-format
msgid ""
"\n"
@@ -242,73 +252,85 @@ msgid ""
" "
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:131
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:101
msgid "More"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:141
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:111
msgid "Need help?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:145
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:115
msgid "Contact us"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:150
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:120
msgid "prioritizes all Recent uploads."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:153
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:123
msgid "We can help with:"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:158
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:128
msgid "Uploading your research data, software, preprints, etc."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:129
msgid "One-on-one with"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:159
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:129
msgid "supporters."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:160
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:130
msgid "Quota increases beyond our default policy."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:161
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:131
msgid "Scripts for automated uploading of larger datasets."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:166
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136
msgid "Why use"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:66
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:12
msgid "All"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:17
msgid "Publications"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:22
msgid "Open Educational Resources"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:76
msgid "REPOSITORY"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:68
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "LIBRARY & ARCHIVES"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:88
msgid "SCIENCE"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:79
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:89
msgid "PASSION"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:80
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:90
msgid "TECHNOLOGY"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:8
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:59
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:78
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:82
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:86
msgid "Sign up"
msgstr ""
@@ -320,30 +342,34 @@ msgstr ""
msgid "Sign out"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:23
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:24
msgid "Log in to Repository"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:29
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:38
#, python-format
msgid " Log in with %(type)s"
msgid "Log in with %(title)s"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:33
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:52
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Or"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:45
#: 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"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:58
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:81
#, python-format
msgid "New to %(sitename)s?"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:68
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:91
msgid "Forgot password?"
msgstr ""
@@ -385,35 +411,7 @@ msgstr ""
msgid "Sign up with TUGRAZ "
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/deposit/deposit.html:10
msgid "New version"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:65
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 ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:52
msgid "Uploads"
msgstr ""

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.0.3"

View File

@@ -8,113 +8,64 @@
"""invenio module for TUGRAZ theme."""
import binascii
from os import environ
from typing import Dict
import requests
from elasticsearch_dsl.utils import AttrDict
from flask import Blueprint, current_app, g, redirect, render_template, request, url_for
from flask_babelex import get_locale
from flask_login import login_required
from flask_menu import current_menu
from invenio_app_rdm.records_ui.views.decorators import (
pass_is_preview,
pass_record_files,
pass_record_or_draft,
)
from flask import Blueprint, render_template
from invenio_rdm_records.resources.serializers import UIJSONSerializer
from opensearch_dsl.utils import AttrDict
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):
"""Blueprint for the routes and resources provided by Invenio-theme-tugraz."""
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["comingsoon"], view_func=comingsoon)
blueprint.add_url_rule(routes["guide"], view_func=guide)
blueprint.add_url_rule(routes["terms"], view_func=terms)
blueprint.add_url_rule(routes["gdpr"], view_func=gdpr)
@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
def records_serializer(records=None):
"""Serialize list of records."""
record_list = []
for record in records:
record_list.append(UIJSONSerializer().dump_obj(record.to_dict()))
return record_list
def index():
"""Frontpage."""
records = FrontpageRecordsSearch()[:5].sort("-created").execute()
for r in records:
r = UIJSONSerializer().serialize_object_to_dict(r.to_dict())
return render_template(
"invenio_theme_tugraz/index.html",
records=records
"invenio_theme_tugraz/index.html", records=records_serializer(records)
)
def comingsoon():
"""Comingsoon."""
return render_template("invenio_theme_tugraz/comingsoon.html")
def guide():
"""TUGraz_Repository_Guide."""
locale = get_locale()
return redirect(url_for('static',
filename=f'documents/TUGraz_Repository_Guide_01_{locale}.pdf',
_external=True))
def terms():
"""Terms_And_Conditions."""
locale = get_locale()
return redirect(url_for('static',
filename=f'documents/TUGraz_Repository_Terms_And_Conditions_{locale}.pdf',
_external=True))
def gdpr():
"""General_Data_Protection_Rights."""
locale = get_locale()
return redirect(url_for('static',
filename=f'documents/TUGraz_Repository_General_Data_Protection_Rights_{locale}.pdf',
_external=True))
@pass_is_preview
@pass_record_or_draft
@pass_record_files
def record_detail(record=None, files=None, pid_value=None, is_preview=False):
"""Record detail page (aka landing page)."""
files_dict = None if files is None else files.to_dict()
return render_template(
"invenio_theme_tugraz/landingpage/detail.html",
record=UIJSONSerializer().serialize_object_to_dict(record.to_dict()),
pid=pid_value,
files=files_dict,
permissions=record.has_permissions_to(['edit', 'new_version', 'manage',
'update_draft', 'read_files']),
is_preview=is_preview,
)

View File

@@ -17,25 +17,9 @@ theme = WebpackThemeBundle(
entry={
"invenio-theme-tugraz-theme": "./less/invenio_theme_tugraz/theme.less",
"invenio-theme-tugraz-js": "./js/invenio_theme_tugraz/theme.js",
# overrides RDM deposit form
'invenio-theme-tugraz-rdm-deposit': './js/invenio_theme_tugraz/deposit/index.js',
},
dependencies={
# add any additional npm dependencies here...
# Keep these dep: in sync with releases
"@babel/runtime": "^7.9.0",
'formik': '^2.1.4',
'luxon': '^1.23.0',
'path': '^0.12.7',
'prop-types': '^15.7.2',
'react-dnd': '^11.1.3',
'react-dnd-html5-backend': '^11.1.3',
'react-invenio-deposit': '^0.13.5',
'react-invenio-forms': '^0.7.0',
'react-dropzone': "^11.0.3",
'yup': '^0.27.0',
'@ckeditor/ckeditor5-build-classic': '^16.0.0',
'@ckeditor/ckeditor5-react': '^2.1.0',
},
)
},

3
pyproject.toml Normal file
View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "babel>2.8"]
build-backend = "setuptools.build_meta"

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

View File

@@ -16,18 +16,9 @@ set -o errexit
# Quit on unbound symbols
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 sphinx.cmd.build -qnNW docs docs/_build/html
eval "$(docker-services-cli up --db ${DB:-postgresql} --search ${SEARCH:-elasticsearch} --cache ${CACHE:-redis} --env)"
python -m sphinx.cmd.build -qnN docs docs/_build/html
python -m pytest
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"

View File

@@ -6,6 +6,62 @@
# modify it under the terms of the MIT License; see LICENSE file for more
# 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-babel>=2,<3
invenio-assets>=2.0.0,<3.0.0
invenio-i18n>=1.3.1,<1.4.0
invenio_config_tugraz>=0.10.0,<0.11.0
[options.extras_require]
tests =
pytest-black>=0.3.0
Sphinx>=4.5.0
pytest-invenio>=2.1.0,<3.0.0
invenio-app>=1.3.4,<1.4.0
opensearch2 =
invenio-search[opensearch2]>=2.1.0,<3.0.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]
test = pytest
@@ -22,6 +78,7 @@ add_ignore = D401
[compile_catalog]
directory = invenio_theme_tugraz/translations/
use-fuzzy = True
[extract_messages]
copyright_holder = Graz University of Technology
@@ -37,20 +94,14 @@ output-dir = invenio_theme_tugraz/translations/
[update_catalog]
input-file = invenio_theme_tugraz/translations/messages.pot
output-dir = invenio_theme_tugraz/translations/
[flake8]
max-line-length = 88
extend-ignore = E203
select = C,E,F,W,B,B950
ignore = E501
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88
profile=black
[pycodestyle]
ignore = E203,E501
[check-manifest]
ignore =
*-requirements.txt
[tool:pytest]
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

113
setup.py
View File

@@ -1,6 +1,6 @@
# -*- 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
# modify it under the terms of the MIT License; see LICENSE file for more
@@ -8,113 +8,6 @@
"""invenio module for TUGRAZ theme."""
import os
from setuptools import setup
from setuptools import find_packages, 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.5.8",
]
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",
],
)
setup()

View File

@@ -12,62 +12,21 @@ See https://pytest-invenio.readthedocs.io/ for documentation on which test
fixtures are available.
"""
import os
import shutil
import tempfile
import pytest
from flask import Flask
from flask_babelex import Babel
from invenio_db import InvenioDB, db
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
@pytest.fixture(scope="module")
def celery_config():
"""Override pytest-invenio fixture.
TODO: Remove this fixture if you add Celery support.
"""
return {}
@pytest.fixture()
def app(request):
"""Basic Flask application."""
instance_path = tempfile.mkdtemp()
app = Flask("testapp")
DB = os.getenv("SQLALCHEMY_DATABASE_URI", "sqlite://")
app.config.update(
I18N_LANGUAGES=[("en", "English"), ("de", "German")],
SQLALCHEMY_DATABASE_URI=DB,
SQLALCHEMY_TRACK_MODIFICATIONS=False,
)
Babel(app)
InvenioDB(app)
InvenioSearch(app)
InvenioThemeTugraz(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

View File

@@ -35,4 +35,4 @@ def test_init():
def test_app(app):
"""Test extension initialization."""
theme = InvenioThemeTugraz(app)
_ = InvenioThemeTugraz(app)

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

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