mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4f80c42a1 | ||
|
|
4698c797b2 | ||
|
|
0e5f08768d | ||
|
|
e4d38632a9 | ||
|
|
4fa0e2851f | ||
|
|
2c10cc885d | ||
|
|
f993fda3f6 | ||
|
|
ecacf0ba59 | ||
|
|
592d59e54d | ||
|
|
f40fb37ec4 | ||
|
|
44e4b01332 |
@@ -58,10 +58,11 @@ export class DoiMint extends Component {
|
|||||||
// get the prefix from backend
|
// get the prefix from backend
|
||||||
const prefix = this.configs.datacite_prefix;
|
const prefix = this.configs.datacite_prefix;
|
||||||
const suffix = this.configs.datacite_suffix;
|
const suffix = this.configs.datacite_suffix;
|
||||||
|
const host_url = this.configs.datacite_host_url
|
||||||
|
|
||||||
if (prefix !== null && suffix !== null) {
|
if (prefix !== null && suffix !== null) {
|
||||||
// get mapped DOI
|
// get mapped DOI
|
||||||
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix);
|
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix, host_url);
|
||||||
|
|
||||||
const _fetchdoi = new FetchDoi("/getdoi");
|
const _fetchdoi = new FetchDoi("/getdoi");
|
||||||
|
|
||||||
@@ -113,10 +114,10 @@ export class DoiMint extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// get a link of dio
|
// // get a link of dio
|
||||||
var doiLink = (doiId) => {
|
// var doiLink = (doiId) => {
|
||||||
window.open(`https://doi.org/${doiId}`, "_blank");
|
// window.open(`https://doi.org/${doiId}`, "_blank");
|
||||||
};
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="actions">
|
<Card className="actions">
|
||||||
@@ -187,13 +188,8 @@ export class DoiMint extends Component {
|
|||||||
</Message>
|
</Message>
|
||||||
)}
|
)}
|
||||||
<Label
|
<Label
|
||||||
style={{
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
size="large"
|
size="large"
|
||||||
as="a"
|
|
||||||
color="blue"
|
color="blue"
|
||||||
onClick={() => doiLink(this.state.doi_id || this.id_doi)}
|
|
||||||
>
|
>
|
||||||
<strong>DOI: </strong>
|
<strong>DOI: </strong>
|
||||||
<Label.Detail>{this.state.doi_id || this.id_doi}</Label.Detail>
|
<Label.Detail>{this.state.doi_id || this.id_doi}</Label.Detail>
|
||||||
|
|||||||
@@ -428,8 +428,10 @@ export class RDMDepositForm extends Component {
|
|||||||
label="Subjects"
|
label="Subjects"
|
||||||
labelIcon="tag"
|
labelIcon="tag"
|
||||||
/> */}
|
/> */}
|
||||||
|
{/**TODO- enable once issue is solved:
|
||||||
<LanguagesField
|
* https://github.com/inveniosoftware/invenio-app-rdm/issues/738
|
||||||
|
*/}
|
||||||
|
{/* <LanguagesField
|
||||||
initialOptions={_get(
|
initialOptions={_get(
|
||||||
this.props.record,
|
this.props.record,
|
||||||
"ui.languages",
|
"ui.languages",
|
||||||
@@ -442,7 +444,7 @@ export class RDMDepositForm extends Component {
|
|||||||
key: item.id,
|
key: item.id,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
<DatesField options={this.vocabularies.metadata.dates} />
|
<DatesField options={this.vocabularies.metadata.dates} />
|
||||||
<VersionField />
|
<VersionField />
|
||||||
<PublisherField required />
|
<PublisherField required />
|
||||||
|
|||||||
@@ -54,11 +54,6 @@
|
|||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
|
|
||||||
}
|
|
||||||
/*****END logo section******/
|
/*****END logo section******/
|
||||||
|
|
||||||
.short-menu {
|
.short-menu {
|
||||||
|
|||||||
@@ -24,3 +24,11 @@
|
|||||||
|
|
||||||
//@import "../invenio_app_rdm/theme";
|
//@import "../invenio_app_rdm/theme";
|
||||||
//@import "variables";
|
//@import "variables";
|
||||||
|
|
||||||
|
// used in various templates
|
||||||
|
// add no hyperlink decoration
|
||||||
|
.no-decoration{
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ class FrontpageRecordsSearch(RecordsSearch):
|
|||||||
index = "rdmrecords-records"
|
index = "rdmrecords-records"
|
||||||
default_filter = Q(
|
default_filter = Q(
|
||||||
"query_string", query=(
|
"query_string", query=(
|
||||||
"access.record:public" "AND versions.is_latest:true"))
|
"access.record:public " "AND versions.is_latest:true"))
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
{%- if config.SECURITY_REGISTERABLE %}
|
{%- if config.SECURITY_REGISTERABLE %}
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a href="{{ url_for('security.register') }}">
|
<a href="{{ url_for('security.register') }}" class="no-decoration">
|
||||||
{{_ ("Sign up")}}
|
{{_ ("Sign up")}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a href="{{url_for_security('login', next=request.path)}}" style="text-decoration:none">
|
<a href="{{url_for_security('login', next=request.path)}}" class="no-decoration">
|
||||||
{{_ ("Log in")}}
|
{{_ ("Log in")}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
{%- if config.USERPROFILES %}
|
{%- if config.USERPROFILES %}
|
||||||
|
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a href="{{ url_for('invenio_userprofiles.profile') }}">
|
<a href="{{ url_for('invenio_userprofiles.profile') }}" class="no-decoration">
|
||||||
<i class="user icon"></i> {{ current_user.email }}
|
<i class="user icon"></i> {{ current_user.email }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="short-menu-right-button">
|
<div class="short-menu-right-button">
|
||||||
<a class="dropdown-item" href="{{url_for_security('logout')}}">
|
<a class="dropdown-item no-decoration" href="{{url_for_security('logout')}}">
|
||||||
{{_('Sign out')}}
|
{{_('Sign out')}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="ui grid stackable container">
|
<div class="ui grid stackable container">
|
||||||
<div class="three column row centered" style="padding-bottom: 0;">
|
<div class="three column row centered" style="padding-bottom: 0;">
|
||||||
<div class="two wide column main-menu-entry">
|
<div class="two wide column main-menu-entry">
|
||||||
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home">
|
<a href="{{url_for('invenio_theme_tugraz.index')}}" title="Home" class="no-decoration">
|
||||||
<span class="home-inline">
|
<span class="home-inline">
|
||||||
<svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon"
|
<svg shape-rendering="geometricPrecision" id="int-menu-q-home-icon"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<!--TODO: remove this once above is uncommented-->
|
<!--TODO: remove this once above is uncommented-->
|
||||||
<div class="two wide column main-menu-entry">
|
<div class="two wide column main-menu-entry">
|
||||||
<a href="{{url_for('invenio_app_rdm_records.deposit_search')}}">{{_ ("Uploads")}}</a>
|
<a href="{{url_for('invenio_app_rdm_records.deposit_search')}}" class="no-decoration">{{_ ("Uploads")}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
<a href="{{ record_url }}">
|
<a href="{{ record_url }}" class="no-decoration">
|
||||||
{{r.metadata.title}}
|
{{r.metadata.title}}
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="hidden-xs">
|
<p class="hidden-xs">
|
||||||
<a href="{{record_url}}">
|
<a href="{{record_url}}" class="no-decoration">
|
||||||
{{ r.metadata.description | striptags | truncate(300) }}
|
{{ r.metadata.description | striptags | truncate(300) }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
{%- for l in current_i18n.get_locales() %}
|
{%- for l in current_i18n.get_locales() %}
|
||||||
{%- if current_i18n.language != l.language %}
|
{%- if current_i18n.language != l.language %}
|
||||||
<a
|
<a
|
||||||
href="{{ url_for('invenio_i18n.set_lang', lang_code=l.language) }}">{{ l.get_display_name().upper() [0:2]}}</a>
|
href="{{ url_for('invenio_i18n.set_lang', lang_code=l.language) }}" class="no-decoration">{{ l.get_display_name().upper() [0:2]}}</a>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<div class="search-icon-header">
|
<div class="search-icon-header">
|
||||||
<a href="{{url_for('invenio_search_ui.search')}}">
|
<a href="{{url_for('invenio_search_ui.search')}}" class="no-decoration">
|
||||||
<svg class="short-menu-icon" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
<svg class="short-menu-icon" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns="http://www.w3.org/2000/svg" height="26.015" width="26.015" version="1.1"
|
xmlns="http://www.w3.org/2000/svg" height="26.015" width="26.015" version="1.1"
|
||||||
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<img height="51.862" src="{{ url_for('static', filename='images/library_logo.png')}}">
|
<img height="51.862" src="{{ url_for('static', filename='images/library_logo.png')}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="affiliation-text">
|
<div class="affiliation-text">
|
||||||
<a title="Home" href="{{url_for('invenio_theme_tugraz.index')}}">
|
<a title="Home" href="{{url_for('invenio_theme_tugraz.index')}}" class="no-decoration">
|
||||||
TU GRAZ
|
TU GRAZ
|
||||||
<br>
|
<br>
|
||||||
{{_ ("REPOSITORY")}}
|
{{_ ("REPOSITORY")}}
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<!--Right-->
|
<!--Right-->
|
||||||
<div class="right floated right aligned six wide column">
|
<div class="right floated right aligned six wide column">
|
||||||
<div class="affiliation-logo" id="int-header-logo">
|
<div class="affiliation-logo" id="int-header-logo">
|
||||||
<a href="https://www.tugraz.at" title="TU Graz Home" target="_blank">
|
<a href="https://www.tugraz.at" title="TU Graz Home" target="_blank" class="no-decoration">
|
||||||
<div class="affiliation-logo-claim">
|
<div class="affiliation-logo-claim">
|
||||||
<div class="affiliation-logo-claim-single">{{_ ("SCIENCE")}}</div>
|
<div class="affiliation-logo-claim-single">{{_ ("SCIENCE")}}</div>
|
||||||
<div class="affiliation-logo-claim-single">{{_ ("PASSION")}}</div>
|
<div class="affiliation-logo-claim-single">{{_ ("PASSION")}}</div>
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
|
|||||||
and parsed by ``setup.py``.
|
and parsed by ``setup.py``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "2.0.0"
|
__version__ = "2.0.5"
|
||||||
|
|||||||
@@ -86,10 +86,12 @@ def get_datacite_details():
|
|||||||
"""Application credentials for DOI."""
|
"""Application credentials for DOI."""
|
||||||
prefix = environ.get("INVENIO_DATACITE_PREFIX")
|
prefix = environ.get("INVENIO_DATACITE_PREFIX")
|
||||||
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
|
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
|
||||||
|
host_url = environ.get("INVENIO_SITE_HOSTNAME")
|
||||||
|
|
||||||
details = {
|
details = {
|
||||||
"datacite_prefix": prefix,
|
"datacite_prefix": prefix,
|
||||||
"datacite_suffix": suffix,
|
"datacite_suffix": suffix,
|
||||||
|
"datacite_host_url": host_url,
|
||||||
}
|
}
|
||||||
return details
|
return details
|
||||||
|
|
||||||
@@ -105,7 +107,7 @@ def retrieve_doi():
|
|||||||
|
|
||||||
doi_response = requests.post(
|
doi_response = requests.post(
|
||||||
url,
|
url,
|
||||||
auth=(username, password),
|
auth=(username, password.encode('utf-8')),
|
||||||
json=doi_metadata,
|
json=doi_metadata,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ theme = WebpackThemeBundle(
|
|||||||
'@ckeditor/ckeditor5-react': '^2.1.0',
|
'@ckeditor/ckeditor5-react': '^2.1.0',
|
||||||
|
|
||||||
# datacite - rest api plugin
|
# datacite - rest api plugin
|
||||||
'datacite-rest': '^0.1.7',
|
'datacite-rest': '^0.1.8',
|
||||||
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user