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

Address additional layout requests #1181

Merged
merged 2 commits into from
Mar 18, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export default defineComponent({
</script>

<template>
<v-row class="my-6">
<!-- Adjust alignment when there isn't an image to display -->
<v-row
class="my-6"
:no-gutters=" !item.image_url && !item.principal_investigator_image_url"
>
<v-col
class="shrink"
offset="1"
Expand All @@ -41,7 +45,7 @@ export default defineComponent({
width="200"
/>
<v-avatar
v-else
v-else-if="item.principal_investigator_image_url"
:size="200"
>
<v-img
Expand All @@ -50,14 +54,16 @@ export default defineComponent({
/>
</v-avatar>
</v-col>
<v-col class="grow mx-2 pr-8">
<v-col
class="grow mx-4 pr-8"
>
<v-row
align="center"
justify="start"
style="height: 100%"
>
<v-card flat>
<div v-if="item.study_category != 'consortium'">
<div v-if="item.study_category != 'consortium' && item.principal_investigator">
<div class="text-h3">
{{ item.principal_investigator_name }}
</div>
Expand Down
102 changes: 44 additions & 58 deletions web/src/views/IndividualResults/StudyPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { setUniqueCondition, setConditions } from '@/store';
import { useRouter } from '@/use/useRouter';
import AttributeItem from '@/components/Presentation/AttributeItem.vue';
import IndividualTitle from '@/views/IndividualResults/IndividualTitle.vue';
import InvestigatorBio from '@/components/InvestigatorBio.vue';
import TeamInfo from '@/components/TeamInfo.vue';
/**
* Override citations for certain DOIs
*/
Expand All @@ -33,7 +33,7 @@ export default defineComponent({
components: {
AttributeItem,
IndividualTitle,
InvestigatorBio,
TeamInfo,
},

props: {
Expand Down Expand Up @@ -238,27 +238,28 @@ export default defineComponent({
cols="12"
md="7"
>
<IndividualTitle :item="item">
<template #default>
<div v-if="item.omics_processing_counts">
<template v-for="val in item.omics_processing_counts">
<v-chip
v-if="val.count && (val.type.toLowerCase() !== 'lipidomics')"
:key="val.type"
small
class="mr-2 my-1"
@click="seeOmicsForStudy(val.type)"
>
{{ fieldDisplayName(val.type) }}: {{ val.count }}
</v-chip>
</template>
</div>
</template>
</IndividualTitle>
<InvestigatorBio
v-if="item.principal_investigator"
:item="item"
/>
<v-container>
<IndividualTitle :item="item">
<template #default>
<div v-if="item.omics_processing_counts">
<template v-for="val in item.omics_processing_counts">
<v-chip
v-if="val.count && (val.type.toLowerCase() !== 'lipidomics')"
:key="val.type"
small
class="mr-2 my-1"
@click="seeOmicsForStudy(val.type)"
>
{{ fieldDisplayName(val.type) }}: {{ val.count }}
</v-chip>
</template>
</div>
</template>
</IndividualTitle>
<TeamInfo
:item="item"
/>
</v-container>
<v-col offset="1">
<div class="display-1">
NMDC Details
Expand All @@ -285,54 +286,26 @@ export default defineComponent({
<v-list
v-if="goldLinks || item.relevant_protocols.length > 0"
>
<v-list-item
v-if="(goldLinks && goldLinks.keys.length > 0) || item.relevant_protocols"
>
<v-list-item v-if="item.relevant_protocols">
<v-list-item-avatar>
<v-icon>mdi-file-document</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="text-h6">
Data
Protocols
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<AttributeItem
v-for="link in goldLinks"
:key="link"
v-for="proto in (item.relevant_protocols || [])"
:key="proto"
style="padding-left: 60px;"
v-bind="{
item,
link: {
name: 'GOLD Metadata',
target: link
}
}"
:image="images.gold"
link: { name: proto, target: proto},
field: 'relevant_protocols' }
"
/>
<v-list-item v-if="item.relevant_protocols">
<v-list-item-avatar>
<v-icon>mdi-file-document</v-icon>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title class="text-h6">
Protocols
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<template
v-for="proto in (item.relevant_protocols || [])"
>
<AttributeItem
:key="proto"
style="padding-left: 60px;"
v-bind="{
item,
link: { name: proto, target: proto},
field: 'relevant_protocols' }
"
/>
</template>
<v-list-item v-if="item.principal_investigator_websites.length > 0">
<v-list-item-avatar>
<v-icon>mdi-file-document</v-icon>
Expand All @@ -343,6 +316,19 @@ export default defineComponent({
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<AttributeItem
v-for="link in goldLinks"
:key="link"
style="padding-left: 60px;"
v-bind="{
item,
link: {
name: 'GOLD Metadata',
target: link
}
}"
:image="images.gold"
/>
<template
v-for="site in (item.principal_investigator_websites || [])"
>
Expand Down
Loading