-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(announces): main navigation across announces
- Loading branch information
Showing
9 changed files
with
57 additions
and
19 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
17 changes: 17 additions & 0 deletions
17
app/views/super_admins/release_notes/_main_navigation.html.haml
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- content_for(:navigation_principale) do | ||
.fr-container | ||
%nav.fr-nav#header-navigation{ role: "navigation", aria: { label: 'Menu principal annonces' } } | ||
%ul.fr-nav__list | ||
%li.fr-nav__item | ||
= link_to "Toutes les annonces", super_admins_release_notes_path, class: "fr-nav__link", target: "_self", aria: { current: action == :index ? "page" : nil } | ||
|
||
%li.fr-nav__item | ||
= link_to("Nouvelle annonce", new_super_admins_release_note_path(date: @release_note&.released_on), class: "fr-nav__link", target: "_self", aria: { current: action == :new ? "page" : nil }) | ||
|
||
- if action == :edit | ||
%li.fr-nav__item | ||
= link_to "Annonce", '', class: "fr-nav__link", target: "_self", aria: { current: "page" } | ||
|
||
%li.fr-nav__item | ||
= link_to "Annonces publiées", release_notes_path, class: "fr-nav__link", target: "_self" | ||
|
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,3 +1,5 @@ | ||
= render "main_navigation", action: :edit | ||
|
||
.fr-container.fr-my-5w | ||
.fr-grid-row.fr-grid-row--center | ||
.fr-col-lg-10 | ||
|
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,24 +1,31 @@ | ||
= render "main_navigation", action: :index | ||
|
||
.fr-container.fr-my-5w | ||
.fr-grid-row.fr-grid-row--center | ||
.fr-col-lg-10 | ||
%h1.fr-h2 Liste des annonces | ||
|
||
= link_to("Créer une annonce", new_super_admins_release_note_path, class: "fr-btn") | ||
%h1.fr-h2 Liste des annonces | ||
|
||
%table.fr-table | ||
%thead | ||
%th Annoncé le | ||
%th Publié? | ||
%th Actions | ||
%tbody | ||
- @release_notes.each do |note| | ||
%tr | ||
%td= l(note.released_on) if note.released_on | ||
%td | ||
- if note.published? | ||
%span.fr-badge.fr-badge--success.fr-badge--no-icon Publié | ||
- else | ||
%span.fr-badge.fr-badge--warning.fr-badge--no-icon Brouillon | ||
%td | ||
= link_to 'Modifier', edit_super_admins_release_note_path(note), class: 'fr-btn fr-btn--secondary' | ||
-# haml-lint:disable ApplicationNameLinter | ||
= link_to "Releases sur GitHub", "https://github.com/demarches-simplifiees/demarches-simplifiees.fr/releases", **external_link_attributes | ||
-# haml-lint:enable ApplicationNameLinter | ||
.fr-table | ||
%table | ||
%thead | ||
%th Annoncé le | ||
%th Publié? | ||
%th Notes | ||
%th Actions | ||
%tbody | ||
- @release_notes.each do |note| | ||
%tr | ||
%td= l(note.released_on) if note.released_on | ||
%td | ||
- if note.published? | ||
%span.fr-badge.fr-badge--success.fr-badge--no-icon Publié | ||
- else | ||
%span.fr-badge.fr-badge--warning.fr-badge--no-icon Brouillon | ||
%td= note.body.to_plain_text.truncate_words(12) | ||
%td | ||
= link_to 'Modifier', edit_super_admins_release_note_path(note), class: 'fr-btn fr-btn--secondary' |
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,3 +1,5 @@ | ||
= render "main_navigation", action: :new | ||
|
||
.fr-container.fr-my-5w | ||
.fr-grid-row.fr-grid-row--center | ||
.fr-col-lg-10 | ||
|
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