Skip to content

Commit

Permalink
Add Zenodo as export for histories
Browse files Browse the repository at this point in the history
If the plugin is setup it will show up as a first class option when exporting a history.
  • Loading branch information
davelopez committed Apr 18, 2024
1 parent e3e7d3b commit b74edd9
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion client/src/components/History/Export/HistoryExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const {
} = useTaskMonitor();
const { hasWritable: hasWritableFileSources } = useFileSources({ exclude: ["rdm"] });
const { hasWritable: hasWritableRDMFileSources } = useFileSources({ include: ["rdm"] });
const { hasWritable: hasWritableRDMFileSources, getFileSourceById } = useFileSources({ include: ["rdm"] });
const {
isPreparing: isPreparingDownload,
Expand Down Expand Up @@ -92,6 +92,7 @@ const history = computed(() => {
const errorMessage = ref<string | undefined>(undefined);
const actionMessage = ref<string | undefined>(undefined);
const actionMessageVariant = ref<ColorVariant | undefined>(undefined);
const zenodoSource = computed(() => getFileSourceById("zenodo"));
onMounted(async () => {
updateExports();
Expand Down Expand Up @@ -260,6 +261,37 @@ function updateExportParams(newParams: ExportParams) {
:clear-input-after-export="true"
@export="doExportToFileSource" />
</BTab>
<BTab
v-if="zenodoSource"
id="zenodo-file-source-tab"
title="to ZENODO"
title-link-class="tab-export-to-zenodo-repo">
<div class="zenodo-info">
<img
src="https://raw.githubusercontent.com/zenodo/zenodo/master/zenodo/modules/theme/static/img/logos/zenodo-gradient-square.svg"
alt="ZENODO Logo" />
<p>
<ExternalLink href="https://zenodo.org"><b>Zenodo</b></ExternalLink> is a general-purpose
open repository developed under the
<ExternalLink href="https://www.openaire.eu">European OpenAIRE</ExternalLink> program and
operated by <ExternalLink href="https://home.cern">CERN</ExternalLink>. It allows
researchers to deposit research papers, data sets, research software, reports, and any other
research related digital artefacts. For each submission, a persistent
<b>digital object identifier (DOI)</b> is minted, which makes the stored items easily
citeable.
</p>
</div>

<RDMCredentialsInfo what="history export archive" selected-repository="ZENODO" />
<ExportToRDMRepositoryForm
what="history"
:default-filename="defaultFileName"
:default-record-name="historyName"
:clear-input-after-export="true"
:file-source="zenodoSource"
@export="doExportToFileSource">
</ExportToRDMRepositoryForm>
</BTab>
</BTabs>
</BCard>

Expand Down Expand Up @@ -292,3 +324,11 @@ function updateExportParams(newParams: ExportParams) {
@onReimport="reimportFromRecord" />
</span>
</template>

<style scoped>
.zenodo-info {
display: flex;
align-items: start;
gap: 0.5rem;
}
</style>

0 comments on commit b74edd9

Please sign in to comment.