Skip to content

Commit ba7d577

Browse files
committed
oaiserver: fix set creation
Co-Authored-by: Peter Weber <[email protected]>
1 parent 965f357 commit ba7d577

File tree

12 files changed

+1045
-955
lines changed

12 files changed

+1045
-955
lines changed

docs/conf.py

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
copyright = u'2018, RERO'
6161
author = u'RERO'
6262

63+
# RERO Services
64+
RERO_SERVICE_ILS = 'https://bib.rero.ch'
65+
RERO_SERVICE_SONAR = 'https://sonar.rero.ch'
66+
6367
# The version info for the project you're documenting, acts as replacement for
6468
# |version| and |release|, also used in various other places throughout the
6569
# built documents.

poetry.lock

+977-930
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ python = ">= 3.9, <3.10"
2323
#------------------------------------------------------------------------------
2424
# Default from Invenio
2525
lxml = ">=4.9.1"
26-
marshmallow = ">=3.0.0,<4.0.0"
2726
uwsgi = ">=2.0"
2827
uwsgi-tools = ">=1.1.1"
2928
uwsgitop = ">=0.11"
3029

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

@@ -57,7 +58,7 @@ invenio-userprofiles = ">=2.2.0,<2.3.0"
5758
# Invenio metadata bundle
5859
invenio-indexer = ">=2.1.0,<2.2.0"
5960
invenio-jsonschemas = ">=1.1.4,<1.2.0"
60-
invenio-oaiserver = ">=2.2.0,<2.3.0"
61+
# invenio-oaiserver = ">=2.2.0,<2.3.0"
6162
invenio-pidstore = ">=1.3.0,<1.4.0"
6263
invenio-records-rest = ">=2.2.0,<2.3.0"
6364
invenio-records-ui = ">=1.2.0,<1.3.0"
@@ -82,7 +83,7 @@ pydocstyle = ">=6.1.1"
8283
## RERO ILS specific python modules
8384
poethepoet = "*"
8485
# rero-invenio-base = ">=0.2.0"
85-
werkzeug = "<2.3.0"
86+
# werkzeug = "<2.3.0"
8687

8788
[tool.poetry.dev-dependencies]
8889
## Python packages development dependencies (order matters)

rero_ebooks/apiharvester/utils.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,19 @@ def add_set(spec, name, pattern, description='...'):
3737
:param description: human readable description
3838
"""
3939
try:
40-
oaiset = OAISet(spec=spec, name=name, description=description)
40+
oaiset = OAISet(
41+
spec=spec,
42+
name=name,
43+
description=description,
44+
system_created=False
45+
)
4146
oaiset.search_pattern = pattern
4247
db.session.add(oaiset)
4348
db.session.commit()
4449
msg = f'OAIset added: {name}'
4550
except Exception as err:
4651
db.session.rollback()
47-
msg = f'OAIset exist: {name}'
52+
msg = f'OAIset exist: {name} {err}'
4853
return msg
4954

5055

rero_ebooks/theme/assets/scss/rero_ebooks/ebooks.scss

+27-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ footer {
1313
}
1414

1515
#header-logo {
16-
margin-top: 14px;
16+
margin-top: 6px;
17+
height: 46px;
1718
}
1819

1920
.ebooks-list {
@@ -44,7 +45,29 @@ footer {
4445
display: inline-block;
4546
}
4647

47-
.service img {
48-
height: 44px;
49-
margin: 4px;
48+
.service-container {
49+
display: flex;
50+
flex-direction: row;
5051
}
52+
53+
.service-container .service {
54+
background-color: #204b73;
55+
height: 60px;
56+
width: 200px;
57+
padding: 5px 20px;
58+
margin-top: 4px;
59+
margin-right: 6px;
60+
border-radius: 5px;
61+
text-align: center;
62+
}
63+
64+
.service-container .service img {
65+
max-height: 50px;
66+
margin: auto;
67+
display: block;
68+
}
69+
70+
.service-container .service .img-sonar {
71+
height: 80%;
72+
margin-top: 0.4em;
73+
}
-15.2 KB
Binary file not shown.
-15.7 KB
Binary file not shown.
Loading
-10.6 KB
Binary file not shown.

rero_ebooks/theme/static/images/logo_sonar.svg

+1
Loading

rero_ebooks/theme/templates/rero_ebooks/frontpage.html

+12-15
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,18 @@ <h1>ebooks</h1>
1515
<div class="row margin-top-large">
1616
<div class="col-md-8">
1717
<h3 class="margin-top-extra-large">Other RERO products</h3>
18-
<a href="https://ils.test.rero.ch" target="_blank">
19-
<div class="service">
20-
<img src="{{ url_for('static', filename='images/logo_rero_ils.png')}}" alt="RERO ILS" />
21-
</div>
22-
</a>
23-
<a href="https://explore.rero.ch" target="_blank">
24-
<div class="service">
25-
<img src="{{ url_for('static', filename='images/logo_explore.png')}}" alt="RERO Explore" />
26-
</div>
27-
</a>
28-
<a href="https://doc.rero.ch" target="_blank">
29-
<div class="service">
30-
<img src="{{ url_for('static', filename='images/logo_rerodoc.png')}}" alt="RERO Doc" />
31-
</div>
32-
</a>
18+
<div class="service-container">
19+
<a href="{{ config.RERO_SERVICE_ILS }}" target="_blank">
20+
<div class="service">
21+
<img src="{{ url_for('static', filename='images/logo_rero_plus.svg')}}" alt="RERO BIB" />
22+
</div>
23+
</a>
24+
<a href="{{ config.RERO_SERVICE_SONAR }}" target="_blank">
25+
<div class="service">
26+
<img class="img-sonar" src="{{ url_for('static', filename='images/logo_sonar.svg')}}" alt="RERO SONAR" />
27+
</div>
28+
</a>
29+
</div>
3330
</div>
3431
<div class="col-md-4">
3532
<h4 class="margin-top-remove">Links</h4>

rero_ebooks/theme/templates/rero_ebooks/header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="container">
33
<div class="row">
44
<div class="col-md-12">
5-
<img id="header-logo" src="{{ url_for('static', filename='images/logo_rero.png')}}" alt="RERO EBOOKS" />
5+
<img id="header-logo" src="{{ url_for('static', filename='images/logo_rero_plus.svg')}}" alt="RERO EBOOKS" />
66
</div>
77
</div>
88
</div>

0 commit comments

Comments
 (0)