diff --git a/data/oai_sources.json b/data/oai_sources.json index 03cb8ffe..228fa737 100644 --- a/data/oai_sources.json +++ b/data/oai_sources.json @@ -5,7 +5,7 @@ "url": "http://doc.rero.ch/oai2d", "metadataprefix": "marcxml", "comment": "", - "setspecs": "unisi unifr nl-epfl nl-ethz nl-fachhochschulen nl-lib4ri nl-unibas nl-unibe nl-unifr nl-unige nl-unil nl-unilu nl-unine nl-unisg nl-usi nl-uzh bge mhnge baage bmuge imvge mhsge" + "setspecs": "unisi unifr nl-epfl nl-ethz nl-fachhochschulen nl-lib4ri nl-unibas nl-unibe nl-unifr nl-unige nl-unil nl-unilu nl-unine nl-unisg nl-usi nl-uzh bge mhnge baage bmuge imvge mhsge hepbejune" }, { "key": "archive_ouverte_unige", diff --git a/data/organisations/data.json b/data/organisations/data.json index 35858a89..d2c17121 100644 --- a/data/organisations/data.json +++ b/data/organisations/data.json @@ -23,5 +23,18 @@ "path": "./hepvs/hepvs.png" } ] + }, + { + "code": "hepbejune", + "name": "Haute École Pédagogique BEJUNE", + "isShared": true, + "isDedicated": true, + "platformName": "# ROAR\n#### Répertoire ouvert et archives BEJUNE", + "files": [ + { + "key": "logo.jpg", + "path": "./hepbejune/logo.png" + } + ] } ] diff --git a/data/organisations/hepbejune/logo.png b/data/organisations/hepbejune/logo.png new file mode 100644 index 00000000..8f241889 Binary files /dev/null and b/data/organisations/hepbejune/logo.png differ diff --git a/sonar/modules/documents/dojson/rerodoc/model.py b/sonar/modules/documents/dojson/rerodoc/model.py index 35f3e7ae..48dab0ce 100644 --- a/sonar/modules/documents/dojson/rerodoc/model.py +++ b/sonar/modules/documents/dojson/rerodoc/model.py @@ -135,7 +135,7 @@ def marc21_to_title_245(self, key, value): title = { 'type': 'bf:Title', 'mainTitle': [{ - 'value': main_title, + 'value': main_title.rstrip(':'), 'language': language }] } diff --git a/sonar/modules/documents/dojson/rerodoc/overdo.py b/sonar/modules/documents/dojson/rerodoc/overdo.py index c027b217..6917308f 100644 --- a/sonar/modules/documents/dojson/rerodoc/overdo.py +++ b/sonar/modules/documents/dojson/rerodoc/overdo.py @@ -44,12 +44,14 @@ def create_organisation(organisation_key): if not organisation: # Create organisation record - organisation = OrganisationRecord.create({ - 'code': organisation_key, - 'name': organisation_key, - 'isShared': False, - 'isDedicated': False - }, dbcommit=True) + organisation = OrganisationRecord.create( + { + 'code': organisation_key, + 'name': organisation_key, + 'isShared': False, + 'isDedicated': False + }, + dbcommit=True) organisation.reindex() @staticmethod @@ -94,7 +96,12 @@ def do(self, blob, ignore_missing=True, exception_handlers=None): # Add default license if not set. if not result.get('usageAndAccessPolicy'): - result['usageAndAccessPolicy'] = {'license': 'License undefined'} + default_license = 'License undefined' + if result.get('organisation') and result['organisation'][0][ + '$ref'] == 'https://sonar.ch/api/organisations/hepbejune': + default_license = 'CC BY-NC-SA' + + result['usageAndAccessPolicy'] = {'license': default_license} return result diff --git a/sonar/theme/assets/scss/hepbejune/_variables.scss b/sonar/theme/assets/scss/hepbejune/_variables.scss new file mode 100644 index 00000000..7d080690 --- /dev/null +++ b/sonar/theme/assets/scss/hepbejune/_variables.scss @@ -0,0 +1,22 @@ +/* + Swiss Open Access Repository + Copyright (C) 2021 RERO + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +$primary: #0065a9 !default; +$secondary: #adcb57 !default; +$color-white: #ffffff !default; + +@import "../common/variables"; diff --git a/sonar/theme/assets/scss/hepbejune/theme.scss b/sonar/theme/assets/scss/hepbejune/theme.scss new file mode 100644 index 00000000..510ccc99 --- /dev/null +++ b/sonar/theme/assets/scss/hepbejune/theme.scss @@ -0,0 +1,41 @@ +/* + Swiss Open Access Repository + Copyright (C) 2021 RERO + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, version 3 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +@import "variables"; +@import "../common/theme"; + +.bg-header { + background-color: darken($primary, 5%); + @extend .navbar-dark; + + .nav-link { + color: $color-white !important; + } +} + +.bg-organisation { + @extend .navbar-dark; + color: $color-white !important; + + .nav-link { + color: $color-white !important; + } + + .form-control { + border: 1px solid $color-white !important; + } +} diff --git a/sonar/theme/webpack.py b/sonar/theme/webpack.py index 0a6b11ba..1f61a1e2 100644 --- a/sonar/theme/webpack.py +++ b/sonar/theme/webpack.py @@ -30,6 +30,7 @@ 'usi-theme': './scss/usi/theme.scss', 'hepvs-theme': './scss/hepvs/theme.scss', 'vge-theme': './scss/vge/theme.scss', + 'hepbejune-theme': './scss/hepbejune/theme.scss', 'preview': './scss/preview.scss', }, dependencies={