Compare commits

...

13 Commits

Author SHA1 Message Date
Mojib Wali
5cf0a5482d v1.5.0 2021-01-20 17:54:25 +01:00
Mojib Wali
ad8eb897f4 v1.4.1 2021-01-20 17:52:20 +01:00
Mojib Wali
b09c491e9c bugfix: sigup page 2021-01-12 12:58:56 +01:00
Mojib Wali
858f02ba19 bugfix: search for published records. (#139)
This closes #126
2021-01-08 13:05:25 +01:00
Mojib Wali
a4a4d13322 refactor: coming_soon url change 2021-01-08 13:05:01 +01:00
Christoph Ladurner
02d171009e Merge pull request #133 from utnapischtim/feature/various-ui-bugfixes
Feature/various UI bugfixes
2021-01-07 21:39:50 +01:00
Mojib Wali
a6681cbe4b feature(ui): refactor submenu
* get rid of Communities link
* adding translation to Uploads

This closes #131
2021-01-05 09:46:25 +01:00
Mojib Wali
4e613637f9 refactor: translations
* bugfix: adding missing (date) var.

* refactor(translations): re-translat of some texts.

* modification(translate): changed the translation text
2020-12-30 10:42:43 +01:00
Christoph Ladurner
4af121bda3 feature(ui): add subjects to frontpage article items 2020-12-29 15:56:08 +01:00
Christoph Ladurner
feba2ff440 bugfix(ui): adapt badges on frontpage to look the same as on search page
resource type color was different. publication date badge and version badge were
moved together into one badge.
2020-12-29 15:56:03 +01:00
Christoph Ladurner
5eb9c40081 bugfix(ui): display access right on frontpage the same way as in search page 2020-12-29 15:55:57 +01:00
Christoph Ladurner
22aed7444a bugfix(ui): center More button
the More button was slightly floated to the left side of the column. This looked
weird. Now it is in the center of the column.
2020-12-29 15:55:51 +01:00
Mojib Wali
0a0ae05331 global(module): refactor tests and ci
modified run-test.sh to newer invenio-pytest commands- which will now also run the tests written /test directory.
* removed docker-service-cli version restriction
* bump Sphinx version
*added missing imports (tests)
2020-12-21 15:28:06 +01:00
11 changed files with 98 additions and 58 deletions

View File

@@ -21,5 +21,5 @@ class FrontpageRecordsSearch(RecordsSearch):
class Meta: class Meta:
"""Default index and filter for frontpage search.""" """Default index and filter for frontpage search."""
index = "rdmrecords" index = "rdmrecords-records"
default_filter = Q("query_string", query=("access.access_right:open")) default_filter = Q("query_string", query=("access.access_right:open"))

View File

@@ -17,7 +17,7 @@
<div class="ui container"> <div class="ui container">
<div class="ui two column stackable centered grid switch-grid"> <div class="ui stackable two column grid">
<div class="centered row"> <div class="centered row">
<h1 class="ui header">{{ _('Create an Account') }}</h1> <h1 class="ui header">{{ _('Create an Account') }}</h1>
</div> </div>

View File

@@ -30,15 +30,15 @@
<h2>{{_ ("Repository")}}</h2> <h2>{{_ ("Repository")}}</h2>
<p class="bodytext"> <p class="bodytext">
<a href="{{ url_for('invenio_rdm_records.coming_soon') }}"> <a href="{{ url_for('invenio_app_rdm.coming_soon') }}">
{{_ ("Impressum")}}<i class="angle right icon"></i> {{_ ("Impressum")}}<i class="angle right icon"></i>
</a> </a>
<br> <br>
<a href="{{ url_for('invenio_rdm_records.coming_soon') }}"> <a href="{{ url_for('invenio_app_rdm.coming_soon') }}">
{{_ ("Data protection")}}<i class="angle right icon"></i> {{_ ("Data protection")}}<i class="angle right icon"></i>
</a> </a>
<br> <br>
<a href="{{ url_for('invenio_rdm_records.coming_soon') }}"> <a href="{{ url_for('invenio_app_rdm.coming_soon') }}">
{{_ ("Feedback")}}<i class="angle right icon"></i> {{_ ("Feedback")}}<i class="angle right icon"></i>
</a> </a>
</p> </p>

View File

@@ -36,11 +36,17 @@
</span> </span>
</a> </a>
</div> </div>
{%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %} <!--TODO: uncomment this once translation is on place-->
<!-- {%- for item in current_menu.submenu('main').children|sort(attribute='order') if item.visible recursive %}
<div class="two wide column main-menu-entry"> <div class="two wide column main-menu-entry">
<a href="{{ item.url }}">{{ item.text|safe }}</a> <a href="{{ item.url }}">{{ item.text|safe }}</a>
</div> </div>
{%- endfor %} {%- endfor %} -->
<!--TODO: remove this once above is uncommented-->
<div class="two wide column main-menu-entry">
<a href="{{url_for('invenio_app_rdm.deposits_user')}}">{{_ ("Uploads")}}</a>
</div>
</div> </div>
<div id="margin-divider" class="ui divider main-menu-underline-line"> <div id="margin-divider" class="ui divider main-menu-underline-line">

View File

@@ -48,18 +48,13 @@
something with doi something with doi
--> -->
<div class="badges"> <div class="badges">
<!--Publication date badge--> <!--Publication date/Version badge-->
<span class="ui label teal" title="{{_('Publication date')}}"> <span class="ui label record-version" title="{{_('Publication date')}}">
{{ r.metadata.publication_date }} {{ r.metadata.publication_date }} {{ '(' ~ r.metadata.version ~ ')' if r.metadata.version }}
</span>
<!--Version badge-->
<span class="ui label record-version" title="{{_('Version')}}">
{{ (' Version ' ~ r.version ~ '') if r.version else 'Version' }}
</span> </span>
<!--Resource type badge--> <!--Resource type badge-->
<span class="ui label grey" title="{{_('Resource type')}}"> <span class="ui label teal" title="{{_('Resource type')}}">
{{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }} {{r.metadata.resource_type | cast_to_dict | vocabulary_title('resource_type') }}
</span> </span>
@@ -87,16 +82,22 @@
<div class="ui grid"> <div class="ui grid">
<div class="two column row"> <div class="two column row">
<div class="left floated column"> <div class="left floated column">
<small> {%- for s in r.metadata.subjects %}
{% trans user=userprofile, date=creation_date | dateformat('long')%} <div class="ui tiny label">{{s.subject}}</div>
Uploaded on {{date}} {%- endfor %}
{% endtrans %} <div>
</small> <small>
{% trans user=userprofile, date=creation_date | dateformat('long')%}
Uploaded on {{date}}
{% endtrans %}
</small>
</div>
</div> </div>
<div class="right floated column"> <div class="right floated column">
<span class="access-right"> <span class="access-right">
{{ r.access.access_right | make_dict_like('access_right') | vocabulary_title('access_right') | lower }} <i class="icon lock open"></i>
{{ r.access.access_right | make_dict_like('access_right') | vocabulary_title('access_right') }}
</span> </span>
</div> </div>
</div> </div>
@@ -106,7 +107,7 @@
--> -->
{%- endfor %} {%- endfor %}
<div class="ui two column centered grid"> <div class="ui centered grid">
<a class="ui button more" href="{{url_for('invenio_search_ui.search')}}">{{_('More')}}</a> <a class="ui button more" href="{{url_for('invenio_search_ui.search')}}">{{_('More')}}</a>
</div> </div>
</div> </div>

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n" "Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-12-14 09:17+0100\n" "POT-Creation-Date: 2021-01-04 14:18+0100\n"
"PO-Revision-Date: 2020-10-06 10:27+0200\n" "PO-Revision-Date: 2020-10-06 10:27+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n" "Language: de\n"
@@ -57,7 +57,9 @@ msgstr "Vertrauenswürdig"
msgid "" msgid ""
"built and operated by CERN and OpenAIRE to ensure that everyone can join " "built and operated by CERN and OpenAIRE to ensure that everyone can join "
"in Open Science." "in Open Science."
msgstr "Gebaut und betrieben von CERN und OpenAIRE; um sicherzugehen, dass jedeR Zugang zu Open Science hat" 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 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:5
msgid "Citeable" msgid "Citeable"
@@ -67,8 +69,9 @@ msgstr "Zitierfähig "
msgid "" msgid ""
"every upload is assigned a Digital Object Identifier (DOI), to make them " "every upload is assigned a Digital Object Identifier (DOI), to make them "
"citable and trackable." "citable and trackable."
msgstr "Jeder Upload erhält eine DOI um sicherzustellen," msgstr ""
"dass er zitierbar und auffindbar ist" "Jeder Upload erhält eine DOI um sicherzustellen,dass er zitierbar und "
"auffindbar ist"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:6 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:6
msgid "No waiting time" msgid "No waiting time"
@@ -78,7 +81,9 @@ msgstr "Keine Wartezeit"
msgid "" msgid ""
"Uploads are made available online as soon as you hit publish, and your " "Uploads are made available online as soon as you hit publish, and your "
"DOI is registered within seconds." "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." 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 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:7
msgid "Open or closed" msgid "Open or closed"
@@ -88,8 +93,9 @@ msgstr "Offen oder geschlossen"
msgid "" msgid ""
"Share e.g. anonymized clinical trial data with only medical professionals" "Share e.g. anonymized clinical trial data with only medical professionals"
" via our restricted access mode." " via our restricted access mode."
msgstr "Teilen Sie z.B. anonymisierte klinische Studiendaten nur mit medizinischem Fachpersonal" msgstr ""
"ü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 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/benefits.html:8
msgid "Versioning" msgid "Versioning"
@@ -179,6 +185,10 @@ msgstr "Um die Schriftgröße zu ändern."
msgid "Home" msgid "Home"
msgstr "Startseite" msgstr "Startseite"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:48
msgid "Uploads"
msgstr "Hochladen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:24 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:24
msgid "Type and press enter to search" msgid "Type and press enter to search"
msgstr "Suchbegriff eingeben und “Enter” drücken (?)" msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
@@ -205,7 +215,7 @@ msgid ""
"\n" "\n"
" Uploaded on %(date)s\n" " Uploaded on %(date)s\n"
" " " "
msgstr "Hochgeladen am" msgstr "Hochgeladen am %(date)s\n"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:110 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:110
msgid "More" msgid "More"
@@ -217,23 +227,23 @@ msgstr "Brauchen Sie Hilfe?"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:123 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:123
msgid "Contact us" msgid "Contact us"
msgstr "Erreichen Sie uns" msgstr "Kontaktiere uns"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:127 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:127
msgid "prioritizes all Recent uploads." msgid "prioritizes all Recent uploads."
msgstr "Reiht die neuesten Uploads vor" msgstr "Reiht die neuesten Uploads vor."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:130 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:130
msgid "We can help with:" msgid "We can help with:"
msgstr "Dabei können wir Sie unterstützen" msgstr "Wir können helfen bei:"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:135 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:135
msgid "Uploading your research data, software, preprints, etc." msgid "Uploading your research data, software, preprints, etc."
msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints, etc." msgstr "Hochladen Ihrer Forschungsdaten, Software, Preprints usw."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136
msgid "One-on-one with" msgid "One-on-one with"
msgstr "Eins zu eins mit" msgstr "Eins-zu-eins mit"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:136
msgid "supporters." msgid "supporters."
@@ -241,11 +251,11 @@ msgstr "Unterstützern"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:137 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:137
msgid "Quota increases beyond our default policy." msgid "Quota increases beyond our default policy."
msgstr "Erhöhung Ihres Kontingents über das vertraglich Zugesicherte hinaus" msgstr "Erhöhung Ihres Kontingents über das vertraglich Zugesicherte hinaus."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:138 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:138
msgid "Scripts for automated uploading of larger datasets." msgid "Scripts for automated uploading of larger datasets."
msgstr "Programme, die den automatischen Upload großer Datenmengen unterstützen" msgstr "Skripte zum automatisierten Hochladen größerer Datensätze."
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:143 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:143
msgid "Why use" msgid "Why use"
@@ -288,7 +298,7 @@ msgstr "Ausloggen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:24 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:24
msgid "Log in to Repository" msgid "Log in to Repository"
msgstr "Ins repositorium einloggen" msgstr "Anmelden"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:32 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/login_user.html:32
#, python-format #, python-format
@@ -325,8 +335,9 @@ msgstr "Zitierfähig. Auffindbar."
msgid "" msgid ""
"Uploads get a Digital Object Identifier (DOI) to make them easily and " "Uploads get a Digital Object Identifier (DOI) to make them easily and "
"uniquely citeable." "uniquely citeable."
msgstr "Uploads erhalten eine DOI und werden damit leicht" msgstr ""
"auffindbar 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:30 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:30
msgid "Communities." msgid "Communities."
@@ -336,8 +347,9 @@ msgstr "Communities"
msgid "" msgid ""
"Accept or reject uploads to your own community (e.g workshops, EU " "Accept or reject uploads to your own community (e.g workshops, EU "
"projects, institutions or entire disciplines)." "projects, institutions or entire disciplines)."
msgstr "Annehmen oder Ablehnen von Uploads in Ihrer eigenen Community (z.B. workshop, EU" msgstr ""
"-Projekt, Forschungseinrichtung, Disziplin)" "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 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:34
msgid "Trusted Research Data Management" msgid "Trusted Research Data Management"
@@ -347,8 +359,7 @@ msgstr "Vertrauenswürdiges Forschungsdatenmanagement"
msgid "" msgid ""
"Built on top of TU Graz expertise in managing of the research data from " "Built on top of TU Graz expertise in managing of the research data from "
"the Graz University of Technology." "the Graz University of Technology."
msgstr "Gebaut basierend auf Expertise der" msgstr "Gebaut basierend auf Expertise derTU Graz im Bereich Data Management"
"TU Graz im Bereich Data Management"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/accounts/register_user.html:51
msgid "Sign up with TUGRAZ " msgid "Sign up with TUGRAZ "
@@ -361,3 +372,4 @@ msgstr "RDM DOI Abzeichen"
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/details/doi.html:32 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/details/doi.html:32
msgid "DOI" msgid "DOI"
msgstr "DOI" msgstr "DOI"

View File

@@ -1,15 +1,15 @@
# Translations template for invenio-theme-tugraz. # Translations template for invenio-theme-tugraz.
# Copyright (C) 2020 mojib wali # Copyright (C) 2021 mojib wali
# This file is distributed under the same license as the # This file is distributed under the same license as the
# invenio-theme-tugraz project. # invenio-theme-tugraz project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2020. # FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: invenio-theme-tugraz 1.1.0\n" "Project-Id-Version: invenio-theme-tugraz 1.3.1\n"
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n" "Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
"POT-Creation-Date: 2020-12-14 09:17+0100\n" "POT-Creation-Date: 2021-01-04 14:18+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -174,6 +174,10 @@ msgstr ""
msgid "Home" msgid "Home"
msgstr "" msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:48
msgid "Uploads"
msgstr ""
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:24 #: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:24
msgid "Type and press enter to search" msgid "Type and press enter to search"
msgstr "" msgstr ""

View File

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

View File

@@ -1,16 +1,33 @@
#!/usr/bin/env sh #!/usr/bin/env bash
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (C) 2020 mojib wali. # Copyright (C) 2019-2020 CERN.
# Copyright (C) 2019-2020 Northwestern University.
# Copyright (C) 2020 Graz University of Technology.
# #
# invenio-theme-tugraz is free software; you can redistribute it and/or # invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more # modify it under the terms of the MIT License; see LICENSE file for more
# details. # details.
# Quit on errors
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 check_manifest --ignore ".*-requirements.txt"
python -m sphinx.cmd.build -qnNW docs docs/_build/html python -m sphinx.cmd.build -qnNW docs docs/_build/html
docker-services-cli --verbose up es postgresql redis eval "$(docker-services-cli up --db ${DB:-postgresql} --search ${SEARCH:-elasticsearch} --cache ${CACHE:-redis} --env)"
python -m pytest python -m pytest
tests_exit_code=$? tests_exit_code=$?
docker-services-cli down python -m sphinx.cmd.build -qnNW -b doctest docs docs/_build/doctest
exit "$tests_exit_code" exit "$tests_exit_code"

View File

@@ -18,13 +18,12 @@ history = open("CHANGES.rst").read()
tests_require = [ tests_require = [
"pytest-invenio>=1.4.0", "pytest-invenio>=1.4.0",
'invenio-app>=1.3.0,<2.0.0', 'invenio-app>=1.3.0,<2.0.0',
# TODO: remove once a new release is out "psycopg2-binary>=2.8.6",
'docker-services-cli>=0.2.1,<0.3.0'
] ]
extras_require = { extras_require = {
"docs": [ "docs": [
"Sphinx>=1.5.1", "Sphinx>=3",
], ],
"mysql": [ "mysql": [
"invenio-db[mysql]>=1.0.0", "invenio-db[mysql]>=1.0.0",

View File

@@ -22,6 +22,7 @@ from flask_babelex import Babel
from invenio_db import InvenioDB, db from invenio_db import InvenioDB, db
from invenio_i18n import InvenioI18N from invenio_i18n import InvenioI18N
from invenio_search import InvenioSearch from invenio_search import InvenioSearch
from sqlalchemy_utils.functions import create_database, database_exists, drop_database
from invenio_theme_tugraz import InvenioThemeTugraz from invenio_theme_tugraz import InvenioThemeTugraz