Compare commits

...

16 Commits

Author SHA1 Message Date
Mojib Wali
2e5f27a590 v1.3.0 2020-12-14 10:46:22 +01:00
Mojib Wali
42259b4cb5 feature: adding translation. 2020-12-14 10:45:01 +01:00
Mojib Wali
924dde4fa7 v1.2.0 2020-12-10 12:54:15 +01:00
Mojib Wali
204f7b81c3 test: adding tests
* test: removed no cover
* tests: adding tests for functions.
   * test_make_dict_like
   * test_cast_to_dict
2020-12-10 12:25:52 +01:00
Mojib Wali
10881c5627 refactor/accounts (#120)
* style(ui): adding divider for login with.

* login_user.html
* register_user.html

* style(ui): 'login with' hyperlink same style as button.

style(css): adding semantic ui css class.

* build: restricting the version for docker-services-cli

the new release was not stable.
2020-12-10 11:19:35 +01:00
Mojib Wali
804bd108c5 v1.1.0 2020-12-04 10:21:04 +01:00
Mojib Wali
bbea43d227 Refactor header (#116)
* bugfix(ui): home text & icon collapse in small screen.

* added home text & icon inside span tag.
* inline css with nowrap white-space.

* refactor(ui): adding the text of 'Library & Archives', This closes #110

* bugfix(format): adding new line a the end of the file.

* refactor(ui): changing the text to capital letters, to match the other.

* adding extra css for position/style of the text.

* style(ui): fixed misspelled.

* bugfix(format): adding new line a the end of the file.

* modification(ui): from Logout/SignUp to Sign up

* modification(ui): changing texts to - Log in, Log out and Sign up

removing icons from header.
2020-12-04 10:14:02 +01:00
Mojib Wali
84f963b407 ci(repo): migrate to github actions. (#119)
tests(repo): modified to github actions.
2020-12-03 15:19:45 +01:00
Mojib Wali
e45832be2b v1.0.9
Patch change - October release data model fields updated.
2020-11-13 09:28:32 +01:00
mb
75bb5377c8 migrate(datamodel):changed fields to match the new data model structure.
* Orcid => orcid
* filter contributertype_title deprecated
* records.metadata.title and for additional title there is a new field additional_titles.
* records.metadata.description and for additional description there is a new field additional_descriptions.
This closes #114.
2020-11-12 11:12:55 +01:00
Mojib Wali
e4fc2ff14d v1.0.8 2020-10-21 10:59:42 +02:00
Mojib Wali
b33274a3ea repository transfer
Repository transfer from https://github.com/mb-wali to https://github.com/tu-graz-library.

* updated badges
* readthedocs - URL paths 
* Setup.py repository URL
2020-10-21 10:53:10 +02:00
Mojib Wali
11abd513e9 v1.0.7 2020-10-21 09:48:57 +02:00
Mojib Wali
4e35220e5b Update README.rst
badge for code style black.
2020-10-21 09:43:48 +02:00
mb
9126efbe42 repository logo set to library logo. This closes #109 2020-10-21 09:37:54 +02:00
Mojib Wali
2227e8d204 v1.0.6 2020-10-15 11:43:06 +02:00
26 changed files with 296 additions and 216 deletions

View File

@@ -32,8 +32,8 @@ indent_size = 4
[*.{css,html,js,json,yml}]
indent_size = 2
# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
# Matches the exact files either package.json or .github/workflows/*.yml
[{package.json, .github/workflows/*.yml}]
indent_size = 2
# Dockerfile

54
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: CI
on:
push:
branches: master
pull_request:
branches: master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 3 * * 6'
workflow_dispatch:
inputs:
reason:
description: 'Reason'
required: false
default: 'Manual trigger'
jobs:
Tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
requirements-level: [min, pypi]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Generate dependencies
run: |
python -m pip install --upgrade pip setuptools py wheel requirements-builder
requirements-builder -e all --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
- name: Install dependencies
run: |
pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt
pip install .[all]
pip freeze
- name: Run tests
run: |
./run-tests.sh

View File

@@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 mojib wali.
#
# 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.
branches:
except:
- /^v\d+\.\d+(\.\d+)?(\S*)?$/
notifications:
email: false
sudo: false
language: python
matrix:
fast_finish: true
allow_failures:
# To allow failures, you need to specify the full environment
- env: REQUIREMENTS=devel
cache:
- pip
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
- REQUIREMENTS=devel
python:
- "3.6"
- "3.7"
- "3.8"
before_install:
- "nvm install 6; nvm use 6"
- "travis_retry pip install --upgrade pip setuptools py"
- "travis_retry pip install twine wheel coveralls requirements-builder"
- "requirements-builder -e all --level=min setup.py > .travis-lowest-requirements.txt"
- "requirements-builder -e all --level=pypi setup.py > .travis-release-requirements.txt"
- "requirements-builder -e all --level=dev --req requirements-devel.txt setup.py > .travis-devel-requirements.txt"
install:
- "travis_retry pip install -r .travis-${REQUIREMENTS}-requirements.txt"
- "travis_retry pip install -e .[all]"
script:
- "./run-tests.sh"
after_success:
- coveralls

View File

@@ -10,7 +10,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~
Report bugs at https://github.com/mb-wali/invenio-theme-tugraz/issues.
Report bugs at https://github.com/tu-graz-library/invenio-theme-tugraz/issues.
If you are reporting a bug, please include:
@@ -41,7 +41,7 @@ Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at
https://github.com/mb-wali/invenio-theme-tugraz/issues.
https://github.com/tu-graz-library/invenio-theme-tugraz/issues.
If you are proposing a feature:
@@ -55,7 +55,7 @@ Get Started!
Ready to contribute? Here's how to set up `invenio-theme-tugraz` for local development.
1. Fork the `https://github.com/mb-wali/invenio-theme-tugraz.git` repo on GitHub.
1. Fork the `https://github.com/tu-graz-library/invenio-theme-tugraz.git` repo on GitHub.
2. Clone your fork locally:
.. code-block:: console
@@ -114,5 +114,5 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring.
3. The pull request should work for Python 2.7, 3.5 and 3.6. Check
https://travis-ci.com/github/mb-wali/invenio-theme-tugraz/pull_requests
https://github.com/tu-graz-library/invenio-theme-tugraz/actions?query=event%3Apull_request
and make sure that the tests pass for all supported Python versions.

View File

@@ -35,4 +35,5 @@ recursive-include invenio_theme_tugraz *.less
recursive-include invenio_theme_tugraz *.ico
recursive-include tests *.py
recursive-include invenio_theme_tugraz *.jpg
recursive-include invenio_theme_tugraz *.gitkeep
recursive-include invenio_theme_tugraz *.gitkeep
recursive-include .github/workflows *.yml

View File

@@ -9,17 +9,17 @@
invenio-theme-tugraz
======================
.. image:: https://travis-ci.com/mb-wali/invenio-theme-tugraz.svg
:target: https://travis-ci.com/github/mb-wali/invenio-theme-tugraz
.. image:: https://github.com/tu-graz-library/invenio-theme-tugraz/workflows/CI/badge.svg
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/actions
.. image:: https://img.shields.io/pypi/dm/invenio-theme-tugraz.svg
:target: https://pypi.python.org/pypi/invenio-theme-tugraz
.. image:: https://img.shields.io/github/tag/mb-wali/invenio-theme-tugraz.svg
:target: https://github.com/mb-wali/invenio-theme-tugraz/releases
.. image:: https://img.shields.io/github/tag/tu-graz-library/invenio-theme-tugraz.svg
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/releases
.. image:: https://img.shields.io/github/license/mb-wali/invenio-theme-tugraz.svg
:target: https://github.com/mb-wali/invenio-theme-tugraz/blob/master/LICENSE
.. image:: https://img.shields.io/github/license/tu-graz-library/invenio-theme-tugraz.svg
:target: https://github.com/tu-graz-library/invenio-theme-tugraz/blob/master/LICENSE
.. image:: https://readthedocs.org/projects/invenio-theme-tugraz/badge/?version=latest
:target: https://invenio-theme-tugraz.readthedocs.io/en/latest/?badge=latest
@@ -27,6 +27,8 @@
.. image:: https://img.shields.io/coveralls/mb-wali/invenio-theme-tugraz.svg
:target: https://coveralls.io/r/mb-wali/invenio-theme-tugraz
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
TU Graz standard theme.

View File

@@ -116,13 +116,13 @@ html_theme = "alabaster"
html_theme_options = {
"description": "invenio module for TUGRAZ theme.",
"github_user": "inveniosoftware",
"github_user": "TU Graz",
"github_repo": "invenio-theme-tugraz",
"github_button": False,
"github_banner": True,
"show_powered_by": False,
"extra_nav_links": {
"invenio-theme-tugraz@GitHub": "https://github.com/mb-wali/invenio-theme-tugraz",
"invenio-theme-tugraz@GitHub": "https://github.com/tu-graz-library/invenio-theme-tugraz",
"invenio-theme-tugraz@PyPI": "https://pypi.python.org/pypi/invenio-theme-tugraz/",
},
}

View File

@@ -48,4 +48,4 @@
}
.spacer-long{
margin-top: 20px;
}
}

View File

@@ -39,8 +39,9 @@
.affiliation-text {
display: table-cell;
font-size: 17px;
vertical-align: middle;
font-size: 12px;
line-height: 17px;
letter-spacing: 2px;
white-space: nowrap;
}
@@ -248,3 +249,7 @@ svg:not(:root) {
.inline-elements{
display: flex;
}
span.home-inline{
white-space: nowrap;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -5,14 +5,14 @@
{%- if config.SECURITY_REGISTERABLE %}
<div class="short-menu-right-button">
<a href="{{ url_for('security.register') }}">
<i class="user plus icon circular"></i> {{_ ("Sign Up")}}
{{_ ("Sign up")}}
</a>
</div>
{%- endif %}
<div class="short-menu-right-button">
<a href="{{url_for_security('login', next=request.path)}}" style="text-decoration:none">
<i class="sign in icon circular"></i> {{_ ("Log in")}}
{{_ ("Log in")}}
</a>
</div>
@@ -27,7 +27,7 @@
</div>
<div class="short-menu-right-button">
<a class="dropdown-item" href="{{url_for_security('logout')}}">
<i class="sign out icon circular"></i>{{_('Logout')}}
{{_('Sign out')}}
</a>
</div>

View File

@@ -24,11 +24,12 @@
<h3 class="ui login header">{{ _('Log in to Repository') }}</h3>
{%- endblock form_header %}
<!--Login with SSO-->
<!--Log in with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<div class="login-page-button">
<div class="ui divider"></div>
<div class="login-page-button ui fluid large button">
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="inverted tiny image label">
{% trans type='TUGRAZ' %} Login with {{ type }}{% endtrans %}
{% trans type='TUGRAZ' %} Log in with {{ type }}{% endtrans %}
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
</a>
</div>
@@ -56,7 +57,7 @@
{%- if security.registerable %}
<div class="ui primary segment padded text-muted">
{% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %}
<a href="{{ url_for_security('register', next=request.args.get('next')) }}">{{ _('Sign Up') }}</a>
<a href="{{ url_for_security('register', next=request.args.get('next')) }}">{{ _('Sign up') }}</a>
</div>
{%- endif %}
{%- endblock registerable %}

View File

@@ -45,7 +45,8 @@
<!--Sigup with SSO-->
{%- if config.INVENIO_CONFIG_TUGRAZ_SHIBBOLETH %}
<div class="login-page-button">
<div class="ui divider"></div>
<div class="login-page-button ui fluid large button">
<a href="{{ url_for('sso_saml.sso', idp='idp') }}" class="inverted tiny image label">
<span style="font-size: 18px;">{{ _('Sign up with TUGRAZ ') }}</span>
<img src="{{ url_for('static', filename=config.INVENIO_THEME_TUGRAZ_ICON)}}" height="20px" />
@@ -77,7 +78,7 @@
<div class="centered row">
<button type="submit" class="ui fluid large submit button">
<i class="ui edit outline icon"></i>{{ _('Sign Up') }}
<i class="ui edit outline icon"></i>{{ _('Sign up') }}
</button>
</div>
</form>

View File

@@ -19,8 +19,9 @@
<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 main-menu-entry-svg">
<div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home">
<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"
@@ -32,6 +33,7 @@
</polyline>
</svg>
{{_ ("Home")}}
</span>
</a>
</div>
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}

View File

@@ -70,7 +70,7 @@
<h4>
<a href="{{ record_url }}">
{{r.metadata.titles[0].title}}
{{r.metadata.title}}
</a>
</h4>
@@ -80,7 +80,7 @@
<p class="hidden-xs">
<a href="{{record_url}}">
{{ r.metadata.descriptions[0].description | striptags | truncate(300) }}
{{ r.metadata.description | striptags | truncate(300) }}
</a>
</p>

View File

@@ -12,8 +12,8 @@
{%- for creators in authors_list %}
{%- if creators.identifiers.Orcid %}
<a href="{{creators.identifiers.Orcid|pid_url('orcid')}}" target="_blank" ><img class="inline-orcid" src="{{ url_for('static', filename='extra/orcid.png')}}" /></a>
{%- if creators.identifiers.orcid %}
<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.name}}</span>
@@ -25,7 +25,7 @@
<!--TODO: contributers-->
{%- macro contributors(contributors_list) %}
{%- for group in contributors_list|groupby('type')%}
<h5>{{group.grouper|contributortype_title}}(s)</h5>
<h5>{{group.grouper}}(s)</h5>
{{authors(group.list)}}
{%- endfor %}
{%- endmacro %}

View File

@@ -58,13 +58,15 @@
<div class="left floated left aligned six wide column" id="repo-logo">
<div class="inline-elements">
<div class="repo-img">
<img height="51.862" src="{{ url_for('static', filename='images/Icon_1_v2.svg')}}">
<img height="51.862" src="{{ url_for('static', filename='images/library_logo.png')}}">
</div>
<div class="affiliation-text">
<a title="RDM" href="{{url_for('invenio_theme_tugraz.index')}}">
TU Graz
TU GRAZ
<br>
{{_ ("Repository")}}
{{_ ("REPOSITORY")}}
<br>
{{_ ("LIBRARY & ARCHIVES")}}
</a>
</div>
</div>

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-10-06 14:28+0200\n"
"POT-Creation-Date: 2020-12-14 09:17+0100\n"
"PO-Revision-Date: 2020-10-06 10:27+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
@@ -17,19 +17,18 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Generated-By: Babel 2.9.0\n"
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:52
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:50
msgid "TU Graz Repository"
msgstr ""
msgstr "TU Graz Repository"
#: invenio_theme_tugraz/config.py:55
#: invenio_theme_tugraz/config.py:53
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:31
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:67
msgid "Repository"
msgstr "Repository"
#: invenio_theme_tugraz/config.py:80
#: invenio_theme_tugraz/config.py:76
msgid "German"
msgstr "Deutsche"
@@ -52,63 +51,65 @@ msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:4
msgid "Trusted"
msgstr ""
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."
msgstr ""
msgstr "Gebaut und betrieben von CERN und OpenAIRE; um sicherzugehen, dass jedeR Zugang zu Open Science hat"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:5
msgid "Citeable"
msgstr ""
msgstr "Zitierfähig "
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:5
msgid ""
"every upload is assigned a Digital Object Identifier (DOI), to make them "
"citable and trackable."
msgstr ""
msgstr "Jeder Upload erhält eine DOI um sicherzustellen,"
"dass er zitierbar und auffindbar ist"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:6
msgid "No waiting time"
msgstr ""
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."
msgstr ""
msgstr "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"
msgstr ""
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."
msgstr ""
msgstr "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"
msgstr ""
msgstr "Versionierung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:8
msgid "Easily update your dataset with our versioning feature."
msgstr ""
msgstr "Einfaches Updaten ihrer Datensätze mit unserere Versionierung."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:9
msgid "Usage statisics"
msgstr ""
msgstr "Nutzungsstatistiken"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:9
msgid "All uploads display standards compliant usage statistics"
msgstr ""
msgstr "Alle Uploads entsprechen den Standards der Nutzungsstatistiken."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:34
msgid "Impressum"
msgstr ""
msgstr "Imprint"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:38
msgid "Data protection"
@@ -116,43 +117,43 @@ msgstr "Datenschutzerklärung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:42
msgid "Feedback"
msgstr ""
msgstr "Feedback"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:51
msgid "Features"
msgstr ""
msgstr "Features"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:53
msgid "Scalability"
msgstr ""
msgstr "Skalierbarkeit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:55
msgid "Institutional integration"
msgstr ""
msgstr "Institutionelle Einbindung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:57
msgid "Next Generation Repository"
msgstr ""
msgstr "Repositorium der nächsten Generation"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:60
msgid "Repository Profiles"
msgstr ""
msgstr "Repositorienprofile"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:62
msgid "Resilient"
msgstr ""
msgstr "Resilient, widerstandsfähig"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:69
msgid "Connected Services"
msgstr ""
msgstr "Verbundene Services "
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:73
msgid "PURE"
msgstr ""
msgstr "PURE"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:76
msgid "CampusOnline"
msgstr ""
msgstr "CampusOnline"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:79
msgid "Research Data Management"
@@ -160,7 +161,7 @@ msgstr "Forschungsdatenmanagement"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:86
msgid "Accessibility"
msgstr ""
msgstr "Barrierefreiheit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:87
msgid "Tipp:"
@@ -168,15 +169,15 @@ msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:87
msgid "Use Ctrl + and Crtl -"
msgstr ""
msgstr "Verwenden Sie Strg+ und Strg-"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:87
msgid "to change the font size."
msgstr ""
msgstr "Um die Schriftgröße zu ändern."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:34
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:35
msgid "Home"
msgstr ""
msgstr "Startseite"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:24
msgid "Type and press enter to search"
@@ -184,19 +185,19 @@ msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:40
msgid "Recent uploads"
msgstr ""
msgstr "Kürzlich hochgeladene Dateien"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:52
msgid "Publication date"
msgstr ""
msgstr "Datum der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:57
msgid "Version"
msgstr ""
msgstr "Version"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:62
msgid "Resource type"
msgstr ""
msgstr "Art der Veröffentlichung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:91
#, python-format
@@ -204,157 +205,159 @@ msgid ""
"\n"
" Uploaded on %(date)s\n"
" "
msgstr ""
msgstr "Hochgeladen am"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:110
msgid "More"
msgstr ""
msgstr "Mehr"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:119
msgid "Need help?"
msgstr ""
msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:123
msgid "Contact us"
msgstr ""
msgstr "Erreichen Sie uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:127
msgid "prioritizes all Recent uploads."
msgstr ""
msgstr "Reiht die neuesten Uploads vor"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:130
msgid "We can help with:"
msgstr ""
msgstr "Dabei können wir Sie unterstützen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:135
msgid "Uploading your research data, software, preprints, etc."
msgstr ""
msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints, etc."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136
msgid "One-on-one with"
msgstr ""
msgstr "Eins zu eins mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136
msgid "supporters."
msgstr ""
msgstr "Unterstützern"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:137
msgid "Quota increases beyond our default policy."
msgstr ""
msgstr "Erhöhung Ihres Kontingents über das vertraglich Zugesicherte hinaus"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:138
msgid "Scripts for automated uploading of larger datasets."
msgstr ""
msgstr "Programme, die den automatischen Upload großer Datenmengen unterstützen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:143
msgid "Why use"
msgstr ""
msgstr "Warum"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:77
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:67
#, fuzzy
msgid "REPOSITORY"
msgstr "Repository"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:69
msgid "LIBRARY & ARCHIVES"
msgstr "Bibliothek und Archiv"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:79
msgid "SCIENCE"
msgstr "Wissenschaft"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:80
msgid "PASSION"
msgstr "Leidenschaft"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:79
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:81
msgid "TECHNOLOGY"
msgstr "Technik"
#: 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:80
msgid "Sign Up"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:60
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:81
msgid "Sign up"
msgstr "Registrierung"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:15
msgid "Log in"
msgstr "Einloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:30
msgid "Logout"
msgid "Sign out"
msgstr "Ausloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:24
msgid "Log in to Repository"
msgstr ""
msgstr "Ins repositorium einloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:31
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:32
#, python-format
msgid " Login with %(type)s"
msgstr ""
msgid " Log in with %(type)s"
msgstr "Einloggen mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:35
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:54
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:36
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:55
msgid "Or"
msgstr "Oder"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:47
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:59
#, python-format
msgid "New to %(sitename)s?"
msgstr ""
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:69
msgid "Forgot password?"
msgstr ""
msgstr "Passwort vergessen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:22
msgid "Create an Account"
msgstr ""
msgstr "Einen Account erstellen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:27
msgid "Citeable. Discoverable."
msgstr ""
msgstr "Zitierfähig. Auffindbar."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:29
msgid ""
"Uploads get a Digital Object Identifier (DOI) to make them easily and "
"uniquely citeable."
msgstr ""
msgstr "Uploads erhalten eine DOI und werden damit leicht"
"auffindbar und zitierfähig."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:30
msgid "Communities."
msgstr ""
msgstr "Communities"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:32
msgid ""
"Accept or reject uploads to your own community (e.g workshops, EU "
"projects, institutions or entire disciplines)."
msgstr ""
msgstr "Annehmen oder Ablehnen von Uploads in Ihrer eigenen Community (z.B. workshop, EU"
"-Projekt, Forschungseinrichtung, Disziplin)"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:34
msgid "Trusted Research Data Management"
msgstr ""
msgstr "Vertrauenswürdiges Forschungsdatenmanagement"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:36
msgid ""
"Built on top of TU Graz expertise in managing of the research data from "
"the Graz University of Technology."
msgstr ""
msgstr "Gebaut basierend auf Expertise der"
"TU Graz im Bereich Data Management"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:50
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Sign up with TUGRAZ "
msgstr ""
msgstr "Mit Ihrem TUGonline-Account einloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/details/doi.html:28
msgid "RDM DOI Badge"
msgstr ""
msgstr "RDM DOI Abzeichen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/details/doi.html:32
msgid "DOI"
msgstr ""
#~ msgid ""
#~ "your research is stored safely for "
#~ "the future in CERNs Data Centre "
#~ "for as long as CERN exists."
#~ msgstr ""
#~ msgid "One-on-one with {{config.THEME_SITENAME}} supporters."
#~ msgstr ""
msgstr "DOI"

View File

@@ -7,28 +7,27 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
"Project-Id-Version: invenio-theme-tugraz 1.1.0\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-10-06 14:28+0200\n"
"POT-Creation-Date: 2020-12-14 09:17+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Generated-By: Babel 2.9.0\n"
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:52
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:50
msgid "TU Graz Repository"
msgstr ""
#: invenio_theme_tugraz/config.py:55
#: invenio_theme_tugraz/config.py:53
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/footer.html:31
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:67
msgid "Repository"
msgstr ""
#: invenio_theme_tugraz/config.py:80
#: invenio_theme_tugraz/config.py:76
msgid "German"
msgstr ""
@@ -171,7 +170,7 @@ msgstr ""
msgid "to change the font size."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:34
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:35
msgid "Home"
msgstr ""
@@ -247,22 +246,30 @@ msgstr ""
msgid "Why use"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:77
msgid "SCIENCE"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:67
msgid "REPOSITORY"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:78
msgid "PASSION"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:69
msgid "LIBRARY & ARCHIVES"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:79
msgid "SCIENCE"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:80
msgid "PASSION"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/navbar.html:81
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:80
msgid "Sign Up"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:60
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:81
msgid "Sign up"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:15
@@ -270,33 +277,33 @@ msgid "Log in"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/header_login.html:30
msgid "Logout"
msgid "Sign out"
msgstr ""
#: 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:31
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:32
#, python-format
msgid " Login with %(type)s"
msgid " Log in with %(type)s"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:35
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:54
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:36
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:55
msgid "Or"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:46
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:47
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:59
#, 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:69
msgid "Forgot password?"
msgstr ""
@@ -334,7 +341,7 @@ msgid ""
"the Graz University of Technology."
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:50
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Sign up with TUGRAZ "
msgstr ""

View File

@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
and parsed by ``setup.py``.
"""
__version__ = "1.0.5"
__version__ = "1.3.0"

View File

@@ -29,7 +29,7 @@ def index():
return render_template(
"invenio_theme_tugraz/index.html",
records=FrontpageRecordsSearch()[:5].sort("-created").execute(),
) # pragma: no cover
)
@blueprint.app_template_filter("make_dict_like")
@@ -38,10 +38,10 @@ def make_dict_like(value: str, key: str) -> Dict[str, str]:
in the form of a key -> value pair.
"""
return {key: value} # pragma: no cover
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) # pragma: no cover
return AttrDict.to_dict(attr_dict)

View File

@@ -7,6 +7,6 @@
# details.
[pytest]
addopts = --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_theme_tugraz --cov-report=term-missing
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

@@ -7,10 +7,9 @@
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
docker-services-cli up postgresql es redis
python -m check_manifest --ignore ".travis-*" && \
python -m sphinx.cmd.build -qnNW docs docs/_build/html && \
docker-services-cli up es postgresql redis
python -m check_manifest --ignore ".*-requirements.txt"
python -m sphinx.cmd.build -qnNW docs docs/_build/html
docker-services-cli --verbose up es postgresql redis
python -m pytest
tests_exit_code=$?
docker-services-cli down

View File

@@ -17,6 +17,9 @@ history = open("CHANGES.rst").read()
tests_require = [
"pytest-invenio>=1.4.0",
'invenio-app>=1.3.0,<2.0.0',
# TODO: remove once a new release is out
'docker-services-cli>=0.2.1,<0.3.0'
]
extras_require = {
@@ -71,7 +74,7 @@ setup(
license="MIT",
author="mojib wali",
author_email="mojib.wali@tugraz.at",
url="https://github.com/mb-wali/invenio-theme-tugraz",
url="https://github.com/tu-graz-library/invenio-theme-tugraz",
packages=packages,
zip_safe=False,
include_package_data=True,

22
tests/ui/conftest.py Normal file
View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 mojib wali.
#
# invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Pytest configuration.
See https://pytest-invenio.readthedocs.io/ for documentation on which test
fixtures are available.
"""
import pytest
from invenio_app.factory import create_ui
@pytest.fixture(scope='module')
def create_app(instance_path):
"""Application factory fixture."""
return create_ui

33
tests/ui/test_views.py Normal file
View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 mojib wali.
#
# 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