Skip to content

Commit

Permalink
oaiserver: fix set creation
Browse files Browse the repository at this point in the history
Co-Authored-by: Peter Weber <[email protected]>
  • Loading branch information
rerowep committed Nov 20, 2023
1 parent 965f357 commit ba7d577
Show file tree
Hide file tree
Showing 12 changed files with 1,045 additions and 955 deletions.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
copyright = u'2018, RERO'
author = u'RERO'

# RERO Services
RERO_SERVICE_ILS = 'https://bib.rero.ch'
RERO_SERVICE_SONAR = 'https://sonar.rero.ch'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down
1,907 changes: 977 additions & 930 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ python = ">= 3.9, <3.10"
#------------------------------------------------------------------------------
# Default from Invenio
lxml = ">=4.9.1"
marshmallow = ">=3.0.0,<4.0.0"
uwsgi = ">=2.0"
uwsgi-tools = ">=1.1.1"
uwsgitop = ">=0.11"

## Third party invenio modules used by RERO EBOOKS
# TODO: needed for `parameter from` fix.
invenio-oaiserver = { git = "https://github.com/rerowep/invenio-oaiserver.git", branch = "wep-fix-from" }
invenio-oaiharvester = { git = "https://github.com/inveniosoftware/invenio-oaiharvester.git", tag = "v1.0.0a4" }
invenio-search = {version = ">=2.1.0,<3.0.0", extras = ["elasticsearch7"]}

Expand Down Expand Up @@ -57,7 +58,7 @@ invenio-userprofiles = ">=2.2.0,<2.3.0"
# Invenio metadata bundle
invenio-indexer = ">=2.1.0,<2.2.0"
invenio-jsonschemas = ">=1.1.4,<1.2.0"
invenio-oaiserver = ">=2.2.0,<2.3.0"
# invenio-oaiserver = ">=2.2.0,<2.3.0"
invenio-pidstore = ">=1.3.0,<1.4.0"
invenio-records-rest = ">=2.2.0,<2.3.0"
invenio-records-ui = ">=1.2.0,<1.3.0"
Expand All @@ -82,7 +83,7 @@ pydocstyle = ">=6.1.1"
## RERO ILS specific python modules
poethepoet = "*"
# rero-invenio-base = ">=0.2.0"
werkzeug = "<2.3.0"
# werkzeug = "<2.3.0"

[tool.poetry.dev-dependencies]
## Python packages development dependencies (order matters)
Expand Down
9 changes: 7 additions & 2 deletions rero_ebooks/apiharvester/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ def add_set(spec, name, pattern, description='...'):
:param description: human readable description
"""
try:
oaiset = OAISet(spec=spec, name=name, description=description)
oaiset = OAISet(
spec=spec,
name=name,
description=description,
system_created=False
)
oaiset.search_pattern = pattern
db.session.add(oaiset)
db.session.commit()
msg = f'OAIset added: {name}'
except Exception as err:
db.session.rollback()
msg = f'OAIset exist: {name}'
msg = f'OAIset exist: {name} {err}'
return msg


Expand Down
31 changes: 27 additions & 4 deletions rero_ebooks/theme/assets/scss/rero_ebooks/ebooks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ footer {
}

#header-logo {
margin-top: 14px;
margin-top: 6px;
height: 46px;
}

.ebooks-list {
Expand Down Expand Up @@ -44,7 +45,29 @@ footer {
display: inline-block;
}

.service img {
height: 44px;
margin: 4px;
.service-container {
display: flex;
flex-direction: row;
}

.service-container .service {
background-color: #204b73;
height: 60px;
width: 200px;
padding: 5px 20px;
margin-top: 4px;
margin-right: 6px;
border-radius: 5px;
text-align: center;
}

.service-container .service img {
max-height: 50px;
margin: auto;
display: block;
}

.service-container .service .img-sonar {
height: 80%;
margin-top: 0.4em;
}
Binary file removed rero_ebooks/theme/static/images/logo_explore.png
Binary file not shown.
Binary file removed rero_ebooks/theme/static/images/logo_rero_ils.png
Binary file not shown.
12 changes: 12 additions & 0 deletions rero_ebooks/theme/static/images/logo_rero_plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed rero_ebooks/theme/static/images/logo_rerodoc.png
Binary file not shown.
1 change: 1 addition & 0 deletions rero_ebooks/theme/static/images/logo_sonar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 12 additions & 15 deletions rero_ebooks/theme/templates/rero_ebooks/frontpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ <h1>ebooks</h1>
<div class="row margin-top-large">
<div class="col-md-8">
<h3 class="margin-top-extra-large">Other RERO products</h3>
<a href="https://ils.test.rero.ch" target="_blank">
<div class="service">
<img src="{{ url_for('static', filename='images/logo_rero_ils.png')}}" alt="RERO ILS" />
</div>
</a>
<a href="https://explore.rero.ch" target="_blank">
<div class="service">
<img src="{{ url_for('static', filename='images/logo_explore.png')}}" alt="RERO Explore" />
</div>
</a>
<a href="https://doc.rero.ch" target="_blank">
<div class="service">
<img src="{{ url_for('static', filename='images/logo_rerodoc.png')}}" alt="RERO Doc" />
</div>
</a>
<div class="service-container">
<a href="{{ config.RERO_SERVICE_ILS }}" target="_blank">
<div class="service">
<img src="{{ url_for('static', filename='images/logo_rero_plus.svg')}}" alt="RERO BIB" />
</div>
</a>
<a href="{{ config.RERO_SERVICE_SONAR }}" target="_blank">
<div class="service">
<img class="img-sonar" src="{{ url_for('static', filename='images/logo_sonar.svg')}}" alt="RERO SONAR" />
</div>
</a>
</div>
</div>
<div class="col-md-4">
<h4 class="margin-top-remove">Links</h4>
Expand Down
2 changes: 1 addition & 1 deletion rero_ebooks/theme/templates/rero_ebooks/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container">
<div class="row">
<div class="col-md-12">
<img id="header-logo" src="{{ url_for('static', filename='images/logo_rero.png')}}" alt="RERO EBOOKS" />
<img id="header-logo" src="{{ url_for('static', filename='images/logo_rero_plus.svg')}}" alt="RERO EBOOKS" />
</div>
</div>
</div>
Expand Down

0 comments on commit ba7d577

Please sign in to comment.