Skip to content

Commit

Permalink
Merge pull request #17 from dataesr/changeMenu
Browse files Browse the repository at this point in the history
adapt new menu
  • Loading branch information
jerem1508 authored Mar 13, 2024
2 parents f3ad231 + d459981 commit ae45b3f
Show file tree
Hide file tree
Showing 47 changed files with 40 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,82 +10,46 @@ export default function CustomBreadcrumb({ pageKey }) {
label: "Tableau de bord des projets européens - Horizon Europe",
link: "/european-projects",
},
"analyse": {
label: "Analyse",
link: "/european-projects/analyse",
"general": {
label: "General",
link: "/european-projects/general",
},
"synthese": {
label: "Synthèse Horizon Europe",
link: "/european-projects/analyse/synthese",
link: "/european-projects/general/synthese",
},
"positionnement": {
label: "Positionnement",
link: "/european-projects/analyse/positionnement",
link: "/european-projects/general/positionnement",
},
"collaboration": {
label: "Collaboration",
link: "/european-projects/analyse/collaboration",
link: "/european-projects/general/collaboration",
},
"evolution": {
label: "Evolution",
link: "/european-projects/analyse/evolution",
link: "/european-projects/general/evolution",
},
"appel-a-projets": {
label: "Appel à projets",
link: "/european-projects/analyse/appel-a-projets",
link: "/european-projects/general/appel-a-projets",
},
"beneficiaires": {
label: "Bénéficiaires",
link: "/european-projects/analyse/beneficiaires",
link: "/european-projects/general/beneficiaires",
},
"erc": {
label: "ERC",
link: "/european-projects/analyse/erc",
link: "/european-projects/erc",
},
"msca": {
label: "MSCA",
link: "/european-projects/analyse/msca",
},
"liste-des-appels-a-projets": {
label: "Liste des appels à projets",
link: "/european-projects/liste-des-appels-a-projets",
},
"chiffres-cles-tableau": {
label: "Chiffres-clés tableau",
link: "/european-projects/chiffres-cles-tableau",
},
"objectifs": {
label: "Objectifs",
link: "/european-projects/objectifs",
},
"collaborations-chiffrees": {
label: "Collaborations chiffrées",
link: "/european-projects/collaborations-chiffrees",
},
"pays": {
label: "Pays",
link: "/european-projects/pays",
},
"pays-evolution": {
label: "Pays évolution",
link: "/european-projects/pays-evolution",
},
"typologie-des-participants": {
label: "Typologie des participants",
link: "/european-projects/typologie-des-participants",
},
"participants-francais": {
label: "Participants français",
link: "/european-projects/participants-francais",
},
"participants-tous-pays": {
label: "Participants tous pays",
link: "/european-projects/participants-tous-pays",
},
"participants-hors-pays": {
label: "Participants hors pays",
link: "/european-projects/participants-hors-pays",
link: "/european-projects/msca",
},
"projets-collaboratifs": {
label: "Projets collaboratifs",
link: "/european-projects/projets-collaboratifs",
}
};

const currentPage = pages[pageKey];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/synthese?${params}`}
href={`/european-projects/general/synthese?${params}`}
aria-current={pathname.split('/')[2] === 'synthese' ? 'page' : undefined}
>
Synthèse
Expand All @@ -23,7 +23,7 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/positionnement?${params}`}
href={`/european-projects/general/positionnement?${params}`}
aria-current={pathname.split('/')[2] === 'positionnement' ? 'page' : undefined}
>
Positionnement
Expand All @@ -32,7 +32,7 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/collaboration?${params}`}
href={`/european-projects/general/collaboration?${params}`}
aria-current={pathname.split('/')[2] === 'collaboration' ? 'page' : undefined}
>
Collaboration
Expand All @@ -41,7 +41,7 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/evolution?${params}`}
href={`/european-projects/general/evolution?${params}`}
aria-current={pathname.split('/')[2] === 'evolution' ? 'page' : undefined}
>
Evolution
Expand All @@ -50,7 +50,7 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/appel-a-projets?${params}`}
href={`/european-projects/general/appel-a-projets?${params}`}
aria-current={pathname.split('/')[2] === 'appel-a-projets' ? 'page' : undefined}
>
Appel à projets
Expand All @@ -59,30 +59,12 @@ export default function Menu() {
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/beneficiaires?${params}`}
href={`/european-projects/general/beneficiaires?${params}`}
aria-current={pathname.split('/')[2] === 'beneficiaires' ? 'page' : undefined}
>
Bénéficiaires
</Link>
</li>
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/erc?${params}`}
aria-current={pathname.split('/')[2] === 'erc' ? 'page' : undefined}
>
ERC
</Link>
</li>
<li className="fr-nav__item">
<Link
className="fr-nav__link"
href={`/european-projects/analyse/msca?${params}`}
aria-current={pathname.split('/')[2] === 'msca' ? 'page' : undefined}
>
MSCA
</Link>
</li>
</ul>
</nav>
);
Expand Down
67 changes: 12 additions & 55 deletions client/src/pages/european-projects/components/side-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,71 +16,28 @@ export default function CustomSideMenu() {
<Col xs={12} md={3} className="fr-pl-2w">
<SideMenu title="" sticky fullHeight className="padded-sidemenu">
<Link
current={is('/european-projects/analyse')}
href={`/european-projects/analyse?${filtersParams}`}
// aria-current={pathname.split('/')[2] === 'general' ? 'page' : undefined}
current={is('/european-projects/general')}
href={`/european-projects/general?${filtersParams}`}
>
Analyse
Général
</Link>
<Link
current={is('/european-projects/liste-des-appels-a-projets')}
href={`/european-projects/liste-des-appels-a-projets?${filtersParams}`}
current={is('/european-projects/projets-collaboratifs')}
href={`/european-projects/projets-collaboratifs?${filtersParams}`}
>
Liste des appels à projets
Projets collaboratifs
</Link>
<Link
current={is('/european-projects/chiffres-cles-tableau')}
href={`/european-projects/chiffres-cles-tableau?${filtersParams}`}
current={is('/european-projects/msca')}
href={`/european-projects/msca?${filtersParams}`}
>
Chiffres-clés tableau
MSCA
</Link>
<Link
current={is('/european-projects/objectifs')}
href={`/european-projects/objectifs?${filtersParams}`}
current={is('/european-projects/erc')}
href={`/european-projects/erc?${filtersParams}`}
>
Objectifs
</Link>
<Link
current={is('/european-projects/collaborations-chiffrees')}
href={`/european-projects/collaborations-chiffrees?${filtersParams}`}
>
Collaborations chiffrées
</Link>
<Link
current={is('/european-projects/pays')}
href={`/european-projects/pays?${filtersParams}`}
>
Pays
</Link>
<Link
current={is('/european-projects/pays-evolution')}
href={`/european-projects/pays-evolution?${filtersParams}`}
>
Pays évolution
</Link>
<Link
current={is('/european-projects/typologie-des-participants')}
href={`/european-projects/typologie-des-participants?${filtersParams}`}
>
Typologie des participants
</Link>
<Link
current={is('/european-projects/participants-francais')}
href={`/european-projects/participants-francais?${filtersParams}`}
>
Participants français
</Link>
<Link
current={is('/european-projects/participants-tous-pays')}
href={`/european-projects/participants-tous-pays?${filtersParams}`}
>
Participants tous pays
</Link>
<Link
current={is('/european-projects/participants-hors-pays')}
href={`/european-projects/participants-hors-pays?${filtersParams}`}
>
Participants hors pays
ERC
</Link>
</SideMenu>
</Col>
Expand Down
23 changes: 7 additions & 16 deletions client/src/pages/european-projects/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
import { Routes, Route } from 'react-router-dom';

import Main from './index.tsx';
import AnalysisHomepage from './components/pages/analysis/index.tsx';
import Overview from './components/pages/analysis/overview/index.tsx';
import Positioning from './components/pages/analysis/positioning/index.tsx';
import AnalysisHomepage from './components/pages/general/index.tsx';
import Overview from './components/pages/general/overview/index.tsx';
import Positioning from './components/pages/general/positioning/index.tsx';

export default function EuropeanProjectsRoutes() {
return (
<Routes>
<Route path="/" element={<Main />}>
<Route path="/analyse" element={<AnalysisHomepage />}>
<Route path="/general" element={<AnalysisHomepage />}>
<Route path="synthese" element={<Overview />} />
<Route path="positionnement" element={<Positioning />} />
<Route path="collaboration" element={<div>Collaboration</div>} />
<Route path="evolution" element={<div>Evolution</div>} />
<Route path="appel-a-projets" element={<div>Appel à projets</div>} />
<Route path="beneficiaires" element={<div>Bénéficiaires</div>} />
<Route path="erc" element={<div>ERC</div>} />
<Route path="msca" element={<div>MSCA</div>} />
</Route>
<Route path="/liste-des-appels-a-projets" element={<div>Liste des appels à projets</div>} />
<Route path="/chiffres-cles-tableau" element={<div>Chiffres-clés tableau</div>} />
<Route path="/objectifs" element={<div>Objectifs</div>} />
<Route path="/collaborations-chiffrees" element={<div>Collaborations chiffrées</div>} />
<Route path="/pays" element={<div>Pays</div>} />
<Route path="/pays-evolution" element={<div>Pays évolution</div>} />
<Route path="/typologie-des-participants" element={<div>Typologie des participants</div>} />
<Route path="/participants-francais" element={<div>Participants français</div>} />
<Route path="/participants-tous-pays" element={<div>Participants tous pays</div>} />
<Route path="/participants-hors-pays" element={<div>Participants hors pays</div>} />
<Route path="/projets-collaboratifs" element={<div>Projets collaboratifs</div>} />
<Route path="/msca" element={<div>MSCA</div>} />
<Route path="/erc" element={<div>ERC</div>} />
</Route>
</Routes>
);
Expand Down

0 comments on commit ae45b3f

Please sign in to comment.