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

Update B2NOTE integration #1799

Closed
wants to merge 18 commits into from
Closed
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
3 changes: 2 additions & 1 deletion b2share/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,12 @@


# comment B2NOTE_URL to hide b2note buttons
B2NOTE_URL = 'https://b2note.bsc.es/interface_main.html'
B2NOTE_URL = 'https://b2note.bsc.es'

# displayed in the UI
TERMS_OF_USE_LINK = 'http://hdl.handle.net/11304/e43b2e3f-83c5-4e3f-b8b7-18d38d37a6cd'
HELP_LINKS = {
'b2note': 'https://b2note.eudat.eu/',
'issues': 'https://github.com/EUDAT-B2SHARE/b2share/issues',
'rest-api': 'https://eudat.eu/services/userdoc/b2share-http-rest-api',
'search': 'https://eudat.eu/services/userdoc/b2share-advanced-search',
Expand Down
1 change: 0 additions & 1 deletion b2share/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def create_app(**kwargs):


def add_routes(app_ui):

@app_ui.route('/')
def root():
return app_ui.send_static_file('index.html')
Expand Down
8 changes: 1 addition & 7 deletions b2share/modules/apiroot/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,14 @@ def __init__(self, *args, **kwargs):
def get(self, **kwargs):
b2access = current_app.config.get('OAUTHCLIENT_REMOTE_APPS', {}).get(
'b2access', {})
help_links = current_app.config.get('HELP_LINKS')
data = {
'version': __version__,
'site_function': current_app.config.get('SITE_FUNCTION', ''),
'training_site_link': current_app.config.get('TRAINING_SITE_LINK', ''),
'b2access_registration_link': b2access.get('registration_url'),
'b2note_url': current_app.config.get('B2NOTE_URL'),
'terms_of_use_link': current_app.config.get('TERMS_OF_USE_LINK'),
'help_links': {
'issues': help_links.get('issues', ''),
'user-guide': help_links.get('user-guide', ''),
'rest-api': help_links.get('rest-api', ''),
'search': help_links.get('search', '')
}
'help_links': current_app.config.get('HELP_LINKS')
}
response = jsonify(data)
return response
Expand Down
2 changes: 1 addition & 1 deletion demo/b2share_demo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
TRAINING_SITE_LINK = ""

# comment B2NOTE_URL to hide b2note buttons
B2NOTE_URL = 'https://b2note.bsc.es/interface_main.html'
B2NOTE_URL = 'https://b2note.bsc.es'

# displayed in the UI
TERMS_OF_USE_LINK = 'http://hdl.handle.net/11304/e43b2e3f-83c5-4e3f-b8b7-18d38d37a6cd'
Expand Down
76 changes: 66 additions & 10 deletions webui/app/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ input:focus, select:focus, textarea:focus, button:focus, a:focus {
overflow: auto;
color: #888;
white-space: nowrap;
margin-left: 0.8em;
}

.site-function {
Expand Down Expand Up @@ -555,6 +556,26 @@ a.navbar-brand {
content: "»";
}

/*****************************************************************************/
/* padding, margin */

.p-0 {
padding: 0px;
}

.m-0 {
margin: 0px;
}

.p-x-0 {
padding-left: 0px;
padding-right: 0px;
}

.m-x-0 {
margin-left: 0px;
margin-right: 0px;
}

/*****************************************************************************/
/* dashboard last records*/
Expand Down Expand Up @@ -644,8 +665,12 @@ a.navbar-brand {
font-weight: bold;
}

.pids {
margin-bottom: 10px;
}

.pid {
margin-bottom: 0;
margin-bottom: 0;
}

.pid > span:first-of-type {
Expand Down Expand Up @@ -830,6 +855,26 @@ a.navbar-brand {
padding-bottom:1em;
}

.edit-record .submit {
margin-top: 2em 0;
padding-top: 2em;
border-top: 1px solid #eee;
}

.edit-record .submit .buttons {
margin-top: 1em;
}

.edit-record .submit label {
font-size: 18px;
font-weight: normal;
}

.edit-record .submit .discard {
color: #c73118;
border-color: #ccc;
}

.new-record {
margin-top: 2em;
}
Expand Down Expand Up @@ -861,6 +906,10 @@ a.navbar-brand {
width: 17em;
}

.large-record .metadata-main .pid:last-child {
margin-bottom: 10px;
}

.large-record .metadata-main .community {
float: right;
width: 10em;
Expand All @@ -881,7 +930,7 @@ a.navbar-brand {
border: 1px solid #ddd;
}

.large-record .bottom-buttons a {
.large-record .bottom-buttons > *:not(:first-child) {
margin: 0em 0.5em;
}

Expand Down Expand Up @@ -1020,25 +1069,32 @@ a.navbar-brand {
filter: none;
}

.fileList {
/*background-color: white;*/
}

.fileList .fileHeader {
margin: 0.5em 0px;
padding: 0.5em 0;
border-bottom: 1px solid #ddd;
}
.fileList .fileHeader *{
font-weight: bold;
}
.fileList .buttons {
padding: 0px;
overflow-x: auto;
}
.fileList .buttons > *:not(:first-child) {
margin-left: 5px;
}
.fileList .file {
padding: 0.5em 0;
word-wrap: break-word;
}
.fileList .file .details{
.fileList .file .details {
margin-left: 1em;
overflow-x: auto;
}
.fileList .file .details > div {
margin-left: 1em;
white-space: nowrap
}
.fileList .file:nth-child(odd) {
background-color: #f4f4f4;
}
Expand All @@ -1052,8 +1108,8 @@ a.navbar-brand {
.fileList .file .btn.remove {
float: right;
color: #F45D00;
border: none;
background-color: transparent;
margin-right: 1em;
border-color: #eee;
}
.fileList .file .btn.remove:hover {
color: red;
Expand Down
3 changes: 0 additions & 3 deletions webui/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<link rel="shortcut icon" href="/favicon.ico"/>

<!-- new header -->
<link rel="stylesheet" href="/css/bootstrap-grid.min.css" />
<link rel="stylesheet" href="/css/bootstrap.min.css" />

<link rel="stylesheet" href="/lib/css/font-awesome.min.css">
<link rel="stylesheet" href="/lib/css/toggle-style.css">
<link rel="stylesheet" href="/lib/css/react-widgets.css">
Expand Down
Loading