mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2026-01-06 11:01:57 +00:00
Compare commits
2 Commits
v3.7.1.dev
...
v3.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8c91df396 | ||
|
|
0da96559ec |
@@ -5,6 +5,11 @@
|
|||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
# details.
|
# details.
|
||||||
|
#
|
||||||
|
# 1) Create message catalog:
|
||||||
|
# $ python setup.py extract_messages
|
||||||
|
# $ python setup.py update_catalog -l de
|
||||||
|
# $ python setup.py compile_catalog
|
||||||
|
|
||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
Version 3.7.1.dev2 (released 2022-01-13)
|
Version 3.8.0 (released 2022-03-03)
|
||||||
|
|
||||||
- modify: override record deposit template and increase upload size #256
|
- global: migrate to v8 of invenioRDM #257
|
||||||
|
|
||||||
Version 3.7.0 (released 2021-12-07)
|
Version 3.7.0 (released 2021-12-07)
|
||||||
|
|
||||||
|
|||||||
@@ -1,398 +0,0 @@
|
|||||||
// This file is part of InvenioRDM
|
|
||||||
// Copyright (C) 2020 CERN.
|
|
||||||
// Copyright (C) 2020 Northwestern University.
|
|
||||||
// Copyright (C) 2022 Graz University of Technology.
|
|
||||||
//
|
|
||||||
// Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
||||||
// under the terms of the MIT License; see LICENSE file for more details.
|
|
||||||
|
|
||||||
import _get from "lodash/get";
|
|
||||||
import React, { Component, createRef, Fragment } from "react";
|
|
||||||
import {
|
|
||||||
AccessRightField,
|
|
||||||
CreatibutorsField,
|
|
||||||
DatesField,
|
|
||||||
DeleteButton,
|
|
||||||
DepositFormApp,
|
|
||||||
DepositFormTitle,
|
|
||||||
DescriptionsField,
|
|
||||||
FileUploader,
|
|
||||||
FormFeedback,
|
|
||||||
IdentifiersField,
|
|
||||||
LanguagesField,
|
|
||||||
SubjectsField,
|
|
||||||
LicenseField,
|
|
||||||
PIDField,
|
|
||||||
PreviewButton,
|
|
||||||
PublicationDateField,
|
|
||||||
PublishButton,
|
|
||||||
PublisherField,
|
|
||||||
RelatedWorksField,
|
|
||||||
ResourceTypeField,
|
|
||||||
SaveButton,
|
|
||||||
TitlesField,
|
|
||||||
VersionField,
|
|
||||||
} from "react-invenio-deposit";
|
|
||||||
import { AccordionField } from "react-invenio-forms";
|
|
||||||
import { Card, Container, Divider, Grid, Ref, Sticky } from "semantic-ui-react";
|
|
||||||
import { i18next } from "@translations/invenio_app_rdm/i18next";
|
|
||||||
|
|
||||||
export class RDMDepositForm extends Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.config = props.config || {};
|
|
||||||
// TODO: retrieve from backend
|
|
||||||
this.config["canHaveMetadataOnlyRecords"] = true;
|
|
||||||
|
|
||||||
// TODO: Make ALL vocabulary be generated by backend.
|
|
||||||
// Currently, some vocabulary is generated by backend and some is
|
|
||||||
// generated by frontend here. Iteration is faster and abstractions can be
|
|
||||||
// discovered by generating vocabulary here. Once happy with vocabularies,
|
|
||||||
// then we can generate it in the backend.
|
|
||||||
this.vocabularies = {
|
|
||||||
metadata: {
|
|
||||||
...this.config.vocabularies,
|
|
||||||
|
|
||||||
creators: {
|
|
||||||
...this.config.vocabularies.creators,
|
|
||||||
type: [
|
|
||||||
{ text: "Person", value: "personal" },
|
|
||||||
{ text: "Organization", value: "organizational" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
contributors: {
|
|
||||||
...this.config.vocabularies.creators,
|
|
||||||
type: [
|
|
||||||
{ text: "Person", value: "personal" },
|
|
||||||
{ text: "Organization", value: "organizational" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
// TODO: Replace with an API backend
|
|
||||||
funding: {
|
|
||||||
funder: [
|
|
||||||
{
|
|
||||||
name: "National Institutes of Health (US)",
|
|
||||||
identifier: "funder1",
|
|
||||||
scheme: "funderScheme1",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "European Commission (EU)",
|
|
||||||
identifier: "funder2",
|
|
||||||
scheme: "funderScheme2",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
award: [
|
|
||||||
{
|
|
||||||
title: "CANCER &AIDS DRUGS--PRECLIN PHARMACOL/TOXICOLOGY",
|
|
||||||
number: "N01CM037835-016",
|
|
||||||
identifier: "awardA",
|
|
||||||
scheme: "awardSchemeA",
|
|
||||||
parentScheme: "funderScheme1",
|
|
||||||
parentIdentifier: "funder1",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title:
|
|
||||||
"Beyond the Standard Model at the LHC and with Atom Interferometers.",
|
|
||||||
number: "228169",
|
|
||||||
identifier: "awardB1",
|
|
||||||
scheme: "awardSchemeB",
|
|
||||||
parentScheme: "funderScheme2",
|
|
||||||
parentIdentifier: "funder2",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "ENvironmental COnditions in GLAucoma Patients",
|
|
||||||
number: "747441",
|
|
||||||
identifier: "awardB2",
|
|
||||||
scheme: "awardSchemeB",
|
|
||||||
parentScheme: "funderScheme2",
|
|
||||||
parentIdentifier: "funder2",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
identifiers: {
|
|
||||||
...this.config.vocabularies.identifiers,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// check if files are present
|
|
||||||
this.noFiles = false;
|
|
||||||
if (
|
|
||||||
!Array.isArray(this.props.files.entries) ||
|
|
||||||
(!this.props.files.entries.length && this.props.record.is_published)
|
|
||||||
) {
|
|
||||||
this.noFiles = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
formFeedbackRef = createRef();
|
|
||||||
sidebarRef = createRef();
|
|
||||||
|
|
||||||
accordionStyle = {
|
|
||||||
header: { className: "inverted brand", style: { cursor: "pointer" } },
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<DepositFormApp
|
|
||||||
config={this.config}
|
|
||||||
record={this.props.record}
|
|
||||||
files={this.props.files}
|
|
||||||
permissions={this.props.permissions}
|
|
||||||
>
|
|
||||||
<FormFeedback fieldPath="message" />
|
|
||||||
<Container style={{ marginTop: "10px" }}>
|
|
||||||
<DepositFormTitle />
|
|
||||||
<Grid>
|
|
||||||
<Grid.Row>
|
|
||||||
<Grid.Column width={11}>
|
|
||||||
<AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={i18next.t("Files")}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
{this.noFiles && this.props.record.is_published && (
|
|
||||||
<p
|
|
||||||
style={{
|
|
||||||
textAlign: "center",
|
|
||||||
opacity: "0.5",
|
|
||||||
cursor: "default !important",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<em>{i18next.t("The record has no files.")}</em>
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
<FileUploader
|
|
||||||
isDraftRecord={!this.props.record.is_published}
|
|
||||||
quota={{
|
|
||||||
maxFiles: 100,
|
|
||||||
maxStorage: 10 ** 11,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</AccordionField>
|
|
||||||
|
|
||||||
<AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={i18next.t("Basic information")}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
{this.config.pids.map((pid) => (
|
|
||||||
<Fragment key={pid.scheme}>
|
|
||||||
<PIDField
|
|
||||||
btnLabelDiscardPID={pid.btn_label_discard_pid}
|
|
||||||
btnLabelGetPID={pid.btn_label_get_pid}
|
|
||||||
canBeManaged={pid.can_be_managed}
|
|
||||||
canBeUnmanaged={pid.can_be_unmanaged}
|
|
||||||
fieldPath={`pids.${pid.scheme}`}
|
|
||||||
fieldLabel={pid.field_label}
|
|
||||||
isEditingPublishedRecord={
|
|
||||||
this.props.record.is_published === true // is_published is `null` at first upload
|
|
||||||
}
|
|
||||||
managedHelpText={pid.managed_help_text}
|
|
||||||
pidLabel={pid.pid_label}
|
|
||||||
pidPlaceholder={pid.pid_placeholder}
|
|
||||||
pidType={pid.scheme}
|
|
||||||
unmanagedHelpText={pid.unmanaged_help_text}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<Divider />
|
|
||||||
</Fragment>
|
|
||||||
))}
|
|
||||||
|
|
||||||
<ResourceTypeField
|
|
||||||
options={this.vocabularies.metadata.resource_type}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<TitlesField
|
|
||||||
options={this.vocabularies.metadata.titles}
|
|
||||||
recordUI={this.props.record.ui}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<PublicationDateField required />
|
|
||||||
<CreatibutorsField
|
|
||||||
label={i18next.t("Creators")}
|
|
||||||
labelIcon={"user"}
|
|
||||||
fieldPath={"metadata.creators"}
|
|
||||||
roleOptions={this.vocabularies.metadata.creators.role}
|
|
||||||
schema="creators"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
<DescriptionsField
|
|
||||||
options={this.vocabularies.metadata.descriptions}
|
|
||||||
recordUI={_get(this.props.record, "ui", null)}
|
|
||||||
editorConfig={{
|
|
||||||
removePlugins: [
|
|
||||||
"Image",
|
|
||||||
"ImageCaption",
|
|
||||||
"ImageStyle",
|
|
||||||
"ImageToolbar",
|
|
||||||
"ImageUpload",
|
|
||||||
"MediaEmbed",
|
|
||||||
"Table",
|
|
||||||
"TableToolbar",
|
|
||||||
"TableProperties",
|
|
||||||
"TableCellProperties",
|
|
||||||
],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<LicenseField
|
|
||||||
fieldPath="metadata.rights"
|
|
||||||
searchConfig={{
|
|
||||||
searchApi: {
|
|
||||||
axios: {
|
|
||||||
headers: {
|
|
||||||
Accept: "application/vnd.inveniordm.v1+json",
|
|
||||||
},
|
|
||||||
url: "/api/vocabularies/licenses",
|
|
||||||
withCredentials: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
initialQueryState: {
|
|
||||||
filters: [["tags", "recommended"]],
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
serializeLicenses={(result) => ({
|
|
||||||
title: result.title_l10n,
|
|
||||||
description: result.description_l10n,
|
|
||||||
id: result.id,
|
|
||||||
link: result.props.url,
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<br />
|
|
||||||
</AccordionField>
|
|
||||||
|
|
||||||
<AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={i18next.t("Recommended information")}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
<CreatibutorsField
|
|
||||||
addButtonLabel={i18next.t("Add contributor")}
|
|
||||||
label={i18next.t("Contributors")}
|
|
||||||
labelIcon={"user plus"}
|
|
||||||
fieldPath={"metadata.contributors"}
|
|
||||||
roleOptions={this.vocabularies.metadata.contributors.role}
|
|
||||||
schema="contributors"
|
|
||||||
modal={{
|
|
||||||
addLabel: "Add contributor",
|
|
||||||
editLabel: "Edit contributor",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<SubjectsField
|
|
||||||
initialOptions={_get(
|
|
||||||
this.props.record,
|
|
||||||
"ui.subjects",
|
|
||||||
null
|
|
||||||
)}
|
|
||||||
limitToOptions={
|
|
||||||
this.vocabularies.metadata.subjects.limit_to
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LanguagesField
|
|
||||||
initialOptions={_get(
|
|
||||||
this.props.record,
|
|
||||||
"ui.languages",
|
|
||||||
[]
|
|
||||||
).filter((lang) => lang !== null)} // needed because dumped empty record from backend gives [null]
|
|
||||||
serializeSuggestions={(suggestions) =>
|
|
||||||
suggestions.map((item) => ({
|
|
||||||
text: item.title_l10n,
|
|
||||||
value: item.id,
|
|
||||||
key: item.id,
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<DatesField options={this.vocabularies.metadata.dates} />
|
|
||||||
<VersionField />
|
|
||||||
<PublisherField />
|
|
||||||
<br />
|
|
||||||
</AccordionField>
|
|
||||||
{/**TODO: uncomment to use FundingField*/}
|
|
||||||
{/* <AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={"Funding"}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
<FundingField options={this.vocabularies.metadata.funding} />
|
|
||||||
<ComingSoonField
|
|
||||||
fieldPath="metadata.funding"
|
|
||||||
label="Awards"
|
|
||||||
labelIcon="money bill alternate outline"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
</AccordionField> */}
|
|
||||||
|
|
||||||
<AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={i18next.t("Alternate identifiers")}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
<IdentifiersField
|
|
||||||
fieldPath="metadata.identifiers"
|
|
||||||
label={i18next.t("Alternate identifier(s)")}
|
|
||||||
labelIcon="barcode"
|
|
||||||
schemeOptions={
|
|
||||||
this.vocabularies.metadata.identifiers.scheme
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</AccordionField>
|
|
||||||
|
|
||||||
<AccordionField
|
|
||||||
fieldPath=""
|
|
||||||
active={true}
|
|
||||||
label={i18next.t("Related works")}
|
|
||||||
ui={this.accordionStyle}
|
|
||||||
>
|
|
||||||
<RelatedWorksField
|
|
||||||
options={this.vocabularies.metadata.identifiers}
|
|
||||||
/>
|
|
||||||
<br />
|
|
||||||
</AccordionField>
|
|
||||||
</Grid.Column>
|
|
||||||
<Ref innerRef={this.sidebarRef}>
|
|
||||||
<Grid.Column width={5} className="deposit-sidebar">
|
|
||||||
<Sticky context={this.sidebarRef} offset={20}>
|
|
||||||
<Card className="actions">
|
|
||||||
<Card.Content>
|
|
||||||
<div className="sidebar-buttons">
|
|
||||||
<SaveButton fluid className="save-button" />
|
|
||||||
<PreviewButton fluid className="preview-button" />
|
|
||||||
</div>
|
|
||||||
<PublishButton fluid />
|
|
||||||
</Card.Content>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card className="actions">
|
|
||||||
<Card.Content>
|
|
||||||
<DeleteButton
|
|
||||||
fluid
|
|
||||||
// TODO: make is_published part of the API response
|
|
||||||
// so we don't have to do this
|
|
||||||
isPublished={this.props.record.is_published}
|
|
||||||
/>
|
|
||||||
</Card.Content>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<AccessRightField
|
|
||||||
label={i18next.t("Visibility")}
|
|
||||||
labelIcon={"shield"}
|
|
||||||
/>
|
|
||||||
</Sticky>
|
|
||||||
</Grid.Column>
|
|
||||||
</Ref>
|
|
||||||
</Grid.Row>
|
|
||||||
</Grid>
|
|
||||||
</Container>
|
|
||||||
</DepositFormApp>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
// This file is part of InvenioRDM
|
|
||||||
// Copyright (C) 2020 CERN.
|
|
||||||
// Copyright (C) 2020 Northwestern University.
|
|
||||||
//
|
|
||||||
// Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
||||||
// under the terms of the MIT License; see LICENSE file for more details.
|
|
||||||
|
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom";
|
|
||||||
import "semantic-ui-css/semantic.min.css";
|
|
||||||
import { i18next } from "@translations/invenio_app_rdm/i18next";
|
|
||||||
import { getInputFromDOM } from "react-invenio-deposit";
|
|
||||||
import { RDMDepositForm } from "./RDMDepositForm";
|
|
||||||
|
|
||||||
ReactDOM.render(
|
|
||||||
<RDMDepositForm
|
|
||||||
record={getInputFromDOM("deposits-record")}
|
|
||||||
files={getInputFromDOM("deposits-record-files")}
|
|
||||||
config={getInputFromDOM("deposits-config")}
|
|
||||||
permissions={getInputFromDOM("deposits-record-permissions")}
|
|
||||||
/>,
|
|
||||||
document.getElementById("deposit-form")
|
|
||||||
);
|
|
||||||
@@ -32,3 +32,7 @@
|
|||||||
transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
|
transition: background-color 0.15s ease 0s, color 0.15s ease 0s;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nowrap-link {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (C) 2020-2022 Graz University of Technology.
|
|
||||||
#
|
|
||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
||||||
# details.
|
|
||||||
|
|
||||||
"""Routes for record-related pages provided by Invenio-App-RDM."""
|
|
||||||
|
|
||||||
from flask import render_template
|
|
||||||
from flask_login import login_required
|
|
||||||
from invenio_app_rdm.records_ui.views.decorators import pass_draft, pass_draft_files
|
|
||||||
from invenio_app_rdm.records_ui.views.deposits import (
|
|
||||||
get_form_config,
|
|
||||||
get_search_url,
|
|
||||||
new_record,
|
|
||||||
)
|
|
||||||
from invenio_rdm_records.resources.serializers import UIJSONSerializer
|
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
|
||||||
def deposit_create():
|
|
||||||
"""Create a new deposit."""
|
|
||||||
return render_template(
|
|
||||||
"invenio_theme_tugraz/records/deposit.html",
|
|
||||||
forms_config=get_form_config(createUrl=("/api/records")),
|
|
||||||
searchbar_config=dict(searchUrl=get_search_url()),
|
|
||||||
record=new_record(),
|
|
||||||
files=dict(
|
|
||||||
default_preview=None, entries=[], links={}
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
|
||||||
@pass_draft
|
|
||||||
@pass_draft_files
|
|
||||||
def deposit_edit(draft=None, draft_files=None, pid_value=None):
|
|
||||||
"""Edit an existing deposit."""
|
|
||||||
record = UIJSONSerializer().serialize_object_to_dict(draft.to_dict())
|
|
||||||
|
|
||||||
return render_template(
|
|
||||||
"invenio_theme_tugraz/records/deposit.html",
|
|
||||||
forms_config=get_form_config(apiUrl=f"/api/records/{pid_value}/draft"),
|
|
||||||
record=record,
|
|
||||||
files=draft_files.to_dict(),
|
|
||||||
searchbar_config=dict(searchUrl=get_search_url()),
|
|
||||||
permissions=draft.has_permissions_to(['new_version'])
|
|
||||||
)
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020-2022 Graz University of Technology.
|
# Copyright (C) 2020-2021 Graz University of Technology.
|
||||||
#
|
#
|
||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
"""invenio module for TUGRAZ theme."""
|
"""invenio module for TUGRAZ theme."""
|
||||||
|
|
||||||
from invenio_theme_tugraz.deposits import deposit_create, deposit_edit
|
|
||||||
|
|
||||||
from . import config
|
from . import config
|
||||||
from .views import index
|
from .views import index
|
||||||
|
|
||||||
@@ -27,8 +25,6 @@ class InvenioThemeTugraz(object):
|
|||||||
# add index route rule
|
# add index route rule
|
||||||
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule
|
# https://flask.palletsprojects.com/en/1.1.x/api/#flask.Flask.add_url_rule
|
||||||
app.add_url_rule("/", "index", index)
|
app.add_url_rule("/", "index", index)
|
||||||
app.add_url_rule("/uploads/new", "deposit_create", deposit_create)
|
|
||||||
app.add_url_rule("/uploads/<pid_value>", "deposit_edit", deposit_edit)
|
|
||||||
self.init_config(app)
|
self.init_config(app)
|
||||||
app.extensions["invenio-theme-tugraz"] = self
|
app.extensions["invenio-theme-tugraz"] = self
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,9 @@
|
|||||||
<a href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
|
<a href="{{ item.url }}" class="no-decoration">{{ item.text|safe }}</a>
|
||||||
</div>
|
</div>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
<div class="two wide column main-menu-entry">
|
||||||
|
<a href="{{ url_for('invenio_app_rdm_records.dashboard') }}" class="no-decoration nowrap-link">{{_ ("My dashboard")}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="margin-divider" class="ui divider main-menu-underline-line">
|
<div id="margin-divider" class="ui divider main-menu-underline-line">
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
{#
|
|
||||||
Copyright (C) 2020 CERN.
|
|
||||||
Copyright (C) 2020 Northwestern University.
|
|
||||||
Copyright (C) 2022 Graz University of Technology.
|
|
||||||
|
|
||||||
Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the MIT License; see LICENSE file for more details.
|
|
||||||
#}
|
|
||||||
{%- if not record.is_published and record.versions.index and record.versions.index > 1%}
|
|
||||||
{%- set title = _("New version") %}
|
|
||||||
{%- elif not record.is_published %}
|
|
||||||
{%- set title = _("New upload") %}
|
|
||||||
{% else %}
|
|
||||||
{%- set title = _("Edit upload") %}
|
|
||||||
{%- endif %}
|
|
||||||
{%- extends config.BASE_TEMPLATE %}
|
|
||||||
|
|
||||||
{%- block page_body %}
|
|
||||||
{%- if record %}
|
|
||||||
<input id="deposits-record" type="hidden" name="deposits-record" value='{{record | tojson }}'></input>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if files %}
|
|
||||||
<input id="deposits-record-files" type="hidden" name="deposits-record-files" value='{{files | tojson }}'></input>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if forms_config %}
|
|
||||||
<input type="hidden" name="deposits-config" value='{{forms_config | tojson }}'></input>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if permissions %}
|
|
||||||
<input id="deposits-record-permissions" type="hidden" name="deposits-record-permissions" value='{{permissions | tojson }}'></input>
|
|
||||||
{%- endif %}
|
|
||||||
<div id="deposit-form"></div>
|
|
||||||
{%- endblock page_body %}
|
|
||||||
|
|
||||||
{%- block javascript %}
|
|
||||||
{{ super() }}
|
|
||||||
{{ webpack['invenio-theme-tugraz-rdm-deposit.js'] }}
|
|
||||||
|
|
||||||
{%- endblock %}
|
|
||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
|
"Project-Id-Version: invenio-theme-tugraz 1.0.4\n"
|
||||||
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
||||||
"POT-Creation-Date: 2021-11-02 15:12+0100\n"
|
"POT-Creation-Date: 2022-03-03 10:34+0100\n"
|
||||||
"PO-Revision-Date: 2020-10-06 10:27+0200\n"
|
"PO-Revision-Date: 2020-10-06 10:27+0200\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
@@ -17,7 +17,7 @@ msgstr ""
|
|||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: Babel 2.9.0\n"
|
"Generated-By: Babel 2.9.1\n"
|
||||||
|
|
||||||
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
|
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
|
||||||
msgid "TU Graz Repository"
|
msgid "TU Graz Repository"
|
||||||
@@ -239,6 +239,10 @@ msgstr "Dies ist die Testumgebung des TU Graz Repositorys."
|
|||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr "Startseite"
|
msgstr "Startseite"
|
||||||
|
|
||||||
|
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:49
|
||||||
|
msgid "My dashboard"
|
||||||
|
msgstr "Meine Übersicht"
|
||||||
|
|
||||||
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
|
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
|
||||||
msgid "Type and press enter to search"
|
msgid "Type and press enter to search"
|
||||||
msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
|
msgstr "Suchbegriff eingeben und “Enter” drücken (?)"
|
||||||
@@ -482,3 +486,6 @@ msgstr "Mit Ihren Repository Daten registrieren"
|
|||||||
#~ msgid "Reason"
|
#~ msgid "Reason"
|
||||||
#~ msgstr "Grund"
|
#~ msgstr "Grund"
|
||||||
|
|
||||||
|
#~ msgid "Dashboard"
|
||||||
|
#~ msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
# Translations template for invenio-theme-tugraz.
|
# Translations template for invenio-theme-tugraz.
|
||||||
# Copyright (C) 2021 Graz University of Technology
|
# Copyright (C) 2022 Graz University of Technology
|
||||||
# This file is distributed under the same license as the
|
# This file is distributed under the same license as the
|
||||||
# invenio-theme-tugraz project.
|
# invenio-theme-tugraz project.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
||||||
#
|
#
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: invenio-theme-tugraz 3.6.1\n"
|
"Project-Id-Version: invenio-theme-tugraz 3.7.0\n"
|
||||||
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
"Report-Msgid-Bugs-To: mojib.wali@tugraz.at\n"
|
||||||
"POT-Creation-Date: 2021-11-02 15:12+0100\n"
|
"POT-Creation-Date: 2022-03-03 10:34+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=utf-8\n"
|
"Content-Type: text/plain; charset=utf-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: Babel 2.9.0\n"
|
"Generated-By: Babel 2.9.1\n"
|
||||||
|
|
||||||
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
|
#: invenio_theme_tugraz/config.py:13 invenio_theme_tugraz/config.py:62
|
||||||
msgid "TU Graz Repository"
|
msgid "TU Graz Repository"
|
||||||
@@ -227,6 +228,10 @@ msgstr ""
|
|||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/header.html:49
|
||||||
|
msgid "My dashboard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
|
#: invenio_theme_tugraz/templates/invenio_theme_tugraz/index.html:27
|
||||||
msgid "Type and press enter to search"
|
msgid "Type and press enter to search"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020-2021 Graz University of Technology.
|
# Copyright (C) 2020-2022 Graz University of Technology.
|
||||||
#
|
#
|
||||||
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
|
|||||||
and parsed by ``setup.py``.
|
and parsed by ``setup.py``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "3.7.1.dev2"
|
__version__ = "3.8.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2022 TUGRAZ.
|
# Copyright (C) 2020 TUGRAZ.
|
||||||
#
|
#
|
||||||
# invenio-theme-tugraz is free software.
|
# invenio-theme-tugraz is free software.
|
||||||
|
|
||||||
@@ -17,7 +17,6 @@ theme = WebpackThemeBundle(
|
|||||||
entry={
|
entry={
|
||||||
"invenio-theme-tugraz-theme": "./less/invenio_theme_tugraz/theme.less",
|
"invenio-theme-tugraz-theme": "./less/invenio_theme_tugraz/theme.less",
|
||||||
"invenio-theme-tugraz-js": "./js/invenio_theme_tugraz/theme.js",
|
"invenio-theme-tugraz-js": "./js/invenio_theme_tugraz/theme.js",
|
||||||
"invenio-theme-tugraz-rdm-deposit": "./js/invenio_theme_tugraz/deposit/index.js",
|
|
||||||
},
|
},
|
||||||
dependencies={
|
dependencies={
|
||||||
# add any additional npm dependencies here...
|
# add any additional npm dependencies here...
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ add_ignore = D401
|
|||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = invenio_theme_tugraz/translations/
|
directory = invenio_theme_tugraz/translations/
|
||||||
|
use-fuzzy = True
|
||||||
|
|
||||||
[extract_messages]
|
[extract_messages]
|
||||||
copyright_holder = Graz University of Technology
|
copyright_holder = Graz University of Technology
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -18,7 +18,6 @@ history = open("CHANGES.rst").read()
|
|||||||
tests_require = [
|
tests_require = [
|
||||||
"pytest-invenio>=1.4.0",
|
"pytest-invenio>=1.4.0",
|
||||||
"invenio-app>=1.3.0,<2.0.0",
|
"invenio-app>=1.3.0,<2.0.0",
|
||||||
"invenio-app-rdm>=7.0.1,<8.0.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Should follow invenio-app-rdm
|
# Should follow invenio-app-rdm
|
||||||
@@ -57,7 +56,7 @@ install_requires = [
|
|||||||
"Flask-WebpackExt>=1.0.0",
|
"Flask-WebpackExt>=1.0.0",
|
||||||
"invenio-assets>=1.2.0",
|
"invenio-assets>=1.2.0",
|
||||||
"invenio-i18n>=1.2.0",
|
"invenio-i18n>=1.2.0",
|
||||||
"invenio_config_tugraz>=0.7.0,<0.8.0",
|
"invenio_config_tugraz>=0.8.2,<0.9.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
packages = find_packages()
|
packages = find_packages()
|
||||||
|
|||||||
Reference in New Issue
Block a user