Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

projects: dedicated view for HEP BEJUNE. #591

Merged
merged 1 commit into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/oai_sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions data/organisations/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
]
Binary file added data/organisations/hepbejune/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sonar/modules/documents/dojson/rerodoc/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}]
}
Expand Down
21 changes: 14 additions & 7 deletions sonar/modules/documents/dojson/rerodoc/overdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
22 changes: 22 additions & 0 deletions sonar/theme/assets/scss/hepbejune/_variables.scss
Original file line number Diff line number Diff line change
@@ -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";
41 changes: 41 additions & 0 deletions sonar/theme/assets/scss/hepbejune/theme.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions sonar/theme/webpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down