-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Intégrer le nouvelle navigation sur PixOrga (PIX-15369)
- Loading branch information
Showing
26 changed files
with
348 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,77 @@ | ||
<aside class="sidebar"> | ||
<header class="sidebar__logo hide-on-mobile"> | ||
<PixNavigation @variant="orga" @navigationAriaLabel={{t "navigation.main.aria-label"}} @menuLabel="Menu"> | ||
<:brand> | ||
<LinkTo @route={{this.redirectionRoute}}> | ||
<img src="{{this.rootUrl}}/pix-orga.svg" alt="{{t 'common.home-page'}}" /> | ||
<img src="{{this.rootUrl}}/pix-orga.svg" class="pix-orga-logo" alt="{{t 'common.home-page'}}" /> | ||
</LinkTo> | ||
</header> | ||
|
||
<nav class="sidebar-nav" aria-label={{t "navigation.main.aria-label"}}> | ||
</:brand> | ||
<:navElements> | ||
{{#if this.shouldDisplayCampaignsEntry}} | ||
<LinkTo @route="authenticated.campaigns" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="conversionPath" role="none" /> | ||
</span> | ||
{{t "navigation.main.campaigns"}} | ||
</LinkTo> | ||
<PixNavigationButton @route={{this.redirectionRoute}} @icon="conversionPath"> | ||
{{t "navigation.main.campaigns"}}</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.shouldDisplayCertificationsEntry}} | ||
<LinkTo @route="authenticated.certifications" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="awards" role="none" /> | ||
</span> | ||
{{t "navigation.main.certifications"}} | ||
</LinkTo> | ||
<PixNavigationButton @route="authenticated.certifications" @icon="awards"> | ||
{{t "navigation.main.certifications"}}</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.shouldDisplayAttestationsEntry}} | ||
<LinkTo @route="authenticated.attestations" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="assignment" role="none" /> | ||
</span> | ||
{{t "navigation.main.attestations"}} | ||
</LinkTo> | ||
<PixNavigationButton @route="authenticated.attestations" @icon="assignment"> | ||
{{t "navigation.main.attestations"}}</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.shouldDisplayMissionsEntry}} | ||
<LinkTo @route="authenticated.missions" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="conversionPath" role="none" /> | ||
</span> | ||
<PixNavigationButton @route="authenticated.missions" @icon="conversionPath"> | ||
{{t "navigation.main.missions"}} | ||
</LinkTo> | ||
</PixNavigationButton> | ||
{{/if}} | ||
<LinkTo @route={{this.organizationLearnersList.route}} class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="infoUser" role="none" /> | ||
</span> | ||
|
||
<PixNavigationButton @route={{this.organizationLearnersList.route}} @icon="infoUser"> | ||
{{t this.organizationLearnersList.label}} | ||
</LinkTo> | ||
<LinkTo @route="authenticated.team" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="users" role="none" /> | ||
</span> | ||
</PixNavigationButton> | ||
|
||
<PixNavigationButton @route="authenticated.team" @icon="users"> | ||
{{t "navigation.main.team"}} | ||
</LinkTo> | ||
</PixNavigationButton> | ||
|
||
{{#if this.shouldDisplayStatisticsEntry}} | ||
<PixNavigationButton @route="authenticated.statistics" @icon="monitoring"> | ||
{{t "navigation.main.statistics"}} | ||
</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.shouldDisplayPlacesEntry}} | ||
<LinkTo @route="authenticated.places" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="seat" role="none" /> | ||
</span> | ||
<PixNavigationButton @route="authenticated.places" @icon="seat"> | ||
{{t "navigation.main.places"}} | ||
</LinkTo> | ||
</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.documentationUrl}} | ||
<a class="sidebar-nav__item" href={{this.documentationUrl}} target="_blank" rel="noopener noreferrer"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="book" role="none" /> | ||
</span> | ||
<PixNavigationButton href={{this.documentationUrl}} @target="_blank" rel="noopener noreferrer" @icon="book"> | ||
{{t "navigation.main.documentation"}} | ||
</a> | ||
</PixNavigationButton> | ||
{{/if}} | ||
|
||
{{#if this.shouldDisplayMissionsEntry}} | ||
<a | ||
<PixNavigationButton | ||
href="https://pix.fr/support/enseignement-scolaire/1er-degre" | ||
target="_blank" | ||
class="sidebar-nav__item" | ||
@target="_blank" | ||
rel="noopener noreferrer" | ||
@icon="help" | ||
> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="help" role="none" /> | ||
</span> | ||
{{t "navigation.main.support"}} | ||
</a> | ||
</PixNavigationButton> | ||
{{/if}} | ||
{{#if this.shouldDisplayStatisticsEntry}} | ||
<LinkTo @route="authenticated.statistics" class="sidebar-nav__item"> | ||
<span class="sidebar-nav__item-icon"> | ||
<PixIcon @name="monitoring" role="none" /> | ||
</span> | ||
{{t "navigation.main.statistics"}} | ||
</LinkTo> | ||
</:navElements> | ||
<:footer> | ||
<Layout::OrganizationPlacesOrCreditInfo | ||
@placesCount={{@placesCount}} | ||
@onCanShowCredit={{this.handleCanShowCredit}} | ||
/> | ||
<Layout::SchoolSessionManagement /> | ||
{{#if this.shouldDisplaySeparator}} | ||
<PixNavigationSeparator /> | ||
{{/if}} | ||
</nav> | ||
</aside> | ||
<Layout::UserLoggedMenu @onChangeOrganization={{@onChangeOrganization}} /> | ||
</:footer> | ||
</PixNavigation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,17 @@ | ||
<button | ||
type="button" | ||
{{on "click" this.toggleUserMenu}} | ||
aria-haspopup="listbox" | ||
aria-expanded="{{this.isMenuOpen}}" | ||
aria-label={{t "navigation.user-logged-menu.button"}} | ||
class="user-logged-button" | ||
...attributes | ||
> | ||
<span class="user-logged-button__text"> | ||
<span>{{this.currentUser.prescriber.firstName}} {{this.currentUser.prescriber.lastName}}</span> | ||
<span>{{this.organizationNameAndExternalId}}</span> | ||
</span> | ||
<PixIcon @name={{if this.isMenuOpen "chevronTop" "chevronBottom"}} /> | ||
</button> | ||
|
||
<Dropdown::Content @display={{this.isMenuOpen}} @close={{this.closeMenu}} class="user-logged-menu"> | ||
{{#each this.eligibleOrganizations as |organization|}} | ||
<Dropdown::Item @onClick={{fn this.onOrganizationChange organization}}> | ||
{{organization.name}} | ||
{{#if organization.externalId}}({{organization.externalId}}){{/if}} | ||
</Dropdown::Item> | ||
{{/each}} | ||
<Dropdown::ItemLink @linkTo="logout"> | ||
<PixIcon @name="logout" class="user-logged-menu__icon" /> | ||
{{t "navigation.user-logged-menu.logout"}} | ||
</Dropdown::ItemLink> | ||
</Dropdown::Content> | ||
<p> | ||
<strong> | ||
{{this.currentUser.prescriber.firstName}} | ||
{{this.currentUser.prescriber.lastName}} | ||
</strong> | ||
<br /> | ||
{{this.organizationNameAndExternalId}} | ||
</p> | ||
{{#if this.belongsToSeveralOrganizations}} | ||
<PixStructureSwitcher | ||
@value={{this.currentUser.organization.id}} | ||
@structures={{this.eligibleOrganizations}} | ||
@label={{t "navigation.user-logged-menu.button"}} | ||
@onChange={{this.onOrganizationChange}} | ||
/> | ||
{{/if}} | ||
<PixButtonLink @variant="tertiary" class="" @route="logout">{{t "navigation.user-logged-menu.logout"}}</PixButtonLink> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,4 @@ | |
height: auto; | ||
} | ||
} | ||
|
Oops, something went wrong.