mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Implement bioconductor xref on the frontend.
Cleanup xref rendering a bit.
This commit is contained in:
@@ -35,11 +35,10 @@
|
||||
<div v-if="hasReferences" class="mb-1">
|
||||
<span class="font-weight-bold">References:</span>
|
||||
<div v-for="(xref, index) in xrefs" :key="index">
|
||||
- {{ xref.reftype }}:
|
||||
-
|
||||
<template v-if="xref.reftype == 'bio.tools'">
|
||||
{{ xref.value }}
|
||||
(<a :href="`https://bio.tools/${xref.value}`" target="_blank">
|
||||
bio.tools
|
||||
bio.tools: {{ xref.value }} (<a :href="`https://bio.tools/${xref.value}`" target="_blank"
|
||||
>bio.tools
|
||||
<font-awesome-icon
|
||||
v-b-tooltip.hover
|
||||
title="Visit bio.tools reference"
|
||||
@@ -52,9 +51,13 @@
|
||||
icon="external-link-alt" /> </a
|
||||
>)
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ xref.value }}
|
||||
<template v-else-if="xref.reftype == 'bioconductor'">
|
||||
Bioconductor Package:
|
||||
<a :href="`https://bioconductor.org/packages/${xref.value}/`" target="_blank"
|
||||
>{{ xref.value }} (doi:10.18129/B9.bioc.{{ xref.value }})</a
|
||||
>
|
||||
</template>
|
||||
<template v-else> {{ xref.reftype }}: {{ xref.value }} </template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="hasCreators" class="mb-1">
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<template>
|
||||
<b-card>
|
||||
<template v-slot:header>
|
||||
<h4 class="mb-0">References</h4>
|
||||
</template>
|
||||
<table>
|
||||
<tr v-for="(xref, index) in xrefs" :key="index">
|
||||
<th>- {{ xref.reftype }}:</th>
|
||||
<td>
|
||||
<template v-if="xref.reftype == 'bio.tools'">
|
||||
<a :href="`https://bio.tools/${xref.value}`" target="_blank">{{ xref.value }}</a>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ xref.value }}
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</b-card>
|
||||
</template>
|
||||
<script>
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
source: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
xrefs: [],
|
||||
errors: [],
|
||||
};
|
||||
},
|
||||
created: function () {
|
||||
axios
|
||||
.get(`${getAppRoot()}api/${this.source}/${this.id}/xrefs`)
|
||||
.then((response) => {
|
||||
this.xrefs = response.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -16,6 +16,9 @@ bwa > $output_1 2>&1
|
||||
</outputs>
|
||||
<tests>
|
||||
</tests>
|
||||
<xrefs>
|
||||
<xref type="bioconductor">dada2</xref>
|
||||
</xrefs>
|
||||
<help><![CDATA[
|
||||
TODO: Fill in help.
|
||||
]]></help>
|
||||
|
||||
Reference in New Issue
Block a user