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

feat(website): submit nav link always goes to submission portal #1419

Merged
merged 3 commits into from
Mar 22, 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
45 changes: 37 additions & 8 deletions website/src/pages/[organism]/submission/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,46 @@ import BaseLayout from '../../../layouts/BaseLayout.astro';
import { routes } from '../../../routes/routes';

const { organism } = cleanOrganism(Astro.params.organism);

const options = [
{
title: 'Submit',
description: 'Upload new sequences.',
route: routes.submitPage(organism!.key),
},
{
title: 'Revise',
description: 'Upload revisions for existing sequences.',
route: routes.revisePage(organism!.key),
},
{
title: 'Review',
description: 'Review your unreleased submissions.',
route: routes.userSequenceReviewPage(organism!.key),
},
{
title: 'View',
description: "View your group's released sequences.",
route: routes.mySequencesWithoutGroup(organism!.key),
},
];
---

<BaseLayout title='Submit'>
<h1 class='title'>Submission portal for {organism!.displayName}</h1>

<div>
<a href={routes.submitPage(organism!.key)}>Make a new submission</a><br />
<a href={routes.revisePage(organism!.key)}>Make a revision</a>
<br />
<a href={routes.userSequenceReviewPage(organism!.key)}>My unreleased sequences</a>
<br />
<a href={routes.mySequencesWithoutGroup(organism!.key)}>My released sequences</a>
<div class='max-w-2xl mx-auto p-8'>
<div class='flex flex-wrap'>
{
options.map((option) => (
<a
href={option.route}
class='block rounded border border-gray-300 p-8 m-2 w-64 text-center hover:bg-gray-100'
>
<h3 class='font-semibold text-gray-700'>{option.title}</h3>
<p class='text-gray-700 text-sm'>{option.description}</p>
</a>
))
}
</div>
</div>
</BaseLayout>
6 changes: 3 additions & 3 deletions website/src/pages/organism-selector/[redirectTo].astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { routes } from '../../routes/routes';
const redirectTo = Astro.params.redirectTo;

const purposes: { [key: string]: string } = {
submit: 'for which you want to submit data',
submission: 'for which you want to submit data',
search: 'for which you want to browse data',
};

Expand All @@ -14,15 +14,15 @@ interface Routes {
}

const myRoutes: Routes = {
submit: routes.submitPage,
submission: routes.submissionPage,
search: routes.searchPage,
};

const purpose = purposes[redirectTo!];
---

<BaseLayout title='Home'>
<div class='max-w-6xl mx-auto'>
<div class='max-w-4xl mx-auto'>
<p class='text-gray-700 my-4'>
Please select an organism {purpose}.
</p>
Expand Down
2 changes: 1 addition & 1 deletion website/src/routes/navigationItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function topNavigationItems(organism: string | undefined, isLoggedIn: boolean, l
},
{
text: 'Submit',
path: routes.organismSelectorPage('submit'),
path: routes.organismSelectorPage('submission'),
},
{
text: 'Datasets',
Expand Down
Loading