diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff b/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff index 944edc3063..238a61ea14 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff and b/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff2 b/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff2 index 7802821361..ca80a1d092 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff2 and b/app/assets/fonts/inclusive-sans/InclusiveSans-Bold.woff2 differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff b/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff index 37f526b2d9..1f1de1671b 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff and b/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff2 b/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff2 index 2456c5eb95..028d7ebc8a 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff2 and b/app/assets/fonts/inclusive-sans/InclusiveSans-BoldItalic.woff2 differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff b/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff index 2dc47cd985..816fb61e8d 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff and b/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff2 b/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff2 index 60ef3c648b..2bb81cfe32 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff2 and b/app/assets/fonts/inclusive-sans/InclusiveSans-Italic.woff2 differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff b/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff index 3d116fe1c0..28a63def6b 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff and b/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff differ diff --git a/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff2 b/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff2 index 01b2019a58..cc7017f03d 100644 Binary files a/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff2 and b/app/assets/fonts/inclusive-sans/InclusiveSans-Regular.woff2 differ diff --git a/app/assets/stylesheets/admin/_variables.sass b/app/assets/stylesheets/admin/_variables.sass index f86ab31325..3508be2b98 100644 --- a/app/assets/stylesheets/admin/_variables.sass +++ b/app/assets/stylesheets/admin/_variables.sass @@ -6,7 +6,8 @@ $color-white: #FFFFFF // MAIN COLORS $color-accent: $color-flexoki-blue-a11y $color-text: #000000 -$color-text-alt: #454545 +$color-text-alt: #585653 +$color-text-alt-large: #75746F $color-border: rgba(0, 0, 0, 0.1) $color-background-alt: #F2F2F2 $color-background: #FFFFFF diff --git a/app/assets/stylesheets/admin/components/card.sass b/app/assets/stylesheets/admin/components/card.sass index 6872aff185..463a0cb5cf 100644 --- a/app/assets/stylesheets/admin/components/card.sass +++ b/app/assets/stylesheets/admin/components/card.sass @@ -4,6 +4,21 @@ &--osuny height: 100% overflow: hidden + &--all + background: none + box-shadow: none + &:hover + box-shadow: none !important + .osuny__thumbnail + background: $color-flexoki-200 + .osuny__thumbnail__initials + color: $color-text + .osuny__thumbnail + border-radius: var(--bs-card-border-radius) + transition: background 0.3s ease-in-out + .osuny__thumbnail__initials + margin-top: -6px + transition: color 0.3s ease-in-out &--horizontal align-items: center flex-direction: row @@ -17,7 +32,7 @@ font-weight: normal .card-body, .card-footer - line-height: 120% + line-height: 110% .table margin-bottom: 0 th, diff --git a/app/assets/stylesheets/admin/design-system/fonts.sass b/app/assets/stylesheets/admin/design-system/fonts.sass index b7e893aa26..d68ecd4fd8 100644 --- a/app/assets/stylesheets/admin/design-system/fonts.sass +++ b/app/assets/stylesheets/admin/design-system/fonts.sass @@ -49,12 +49,12 @@ font-family: 'Adelphe' font-style: normal font-weight: bold - src: asset-url("adelphe/Adelphe-GerminalBold.woff2") format("woff2"), url("adelphe/Adelphe-GerminalBold.woff") format("woff") + src: asset-url("adelphe/Adelphe-GerminalSemiBold.woff2") format("woff2"), url("adelphe/Adelphe-GerminalSemiBold.woff") format("woff") @font-face font-display: swap font-family: 'Adelphe' font-style: italic font-weight: bold - src: asset-url("adelphe/Adelphe-GerminalBoldItalic.woff2") format("woff2"), url("adelphe/Adelphe-GerminalBoldItalic.woff") format("woff") + src: asset-url("adelphe/Adelphe-GerminalSemiBoldItalic.woff2") format("woff2"), url("adelphe/Adelphe-GerminalSemiBoldItalic.woff") format("woff") diff --git a/app/assets/stylesheets/admin/design-system/hero.sass b/app/assets/stylesheets/admin/design-system/hero.sass index b55dc3abed..fad66a3864 100644 --- a/app/assets/stylesheets/admin/design-system/hero.sass +++ b/app/assets/stylesheets/admin/design-system/hero.sass @@ -1,6 +1,16 @@ .hero - margin-bottom: 50px - min-height: 200px + margin-bottom: $spacing0 + &__content + border-bottom: 1px solid $color-border + margin-top: $spacing2 + padding-bottom: $spacing0 + h1 + line-height: 100% + margin-bottom: 0 + &--summary + .hero__content + border-bottom: none + margin-bottom: $spacing2 .welcome color: $color-text-alt font-size: pxToRem(14) diff --git a/app/assets/stylesheets/admin/design-system/nav.sass b/app/assets/stylesheets/admin/design-system/nav.sass index ff506f0224..f005dde8d7 100644 --- a/app/assets/stylesheets/admin/design-system/nav.sass +++ b/app/assets/stylesheets/admin/design-system/nav.sass @@ -83,9 +83,12 @@ nav[aria-label="breadcrumb"] overflow-x: scroll padding-left: var(--bs-gutter-x) padding-right: var(--bs-gutter-x) + @include media-breakpoint-up(sm) + padding-bottom: $spacing1 .breadcrumb align-items: center flex-wrap: nowrap + text-transform: uppercase * color: $color-text-alt !important .breadcrumb-item @@ -138,9 +141,6 @@ nav[aria-label="breadcrumb"] .feature-nav line-height: 100% - a - color: $color-flexoki-600 - font-family: $font-family-serif h1, a display: inline-block font-size: $h1-font-size !important @@ -148,6 +148,11 @@ nav[aria-label="breadcrumb"] margin-bottom: 0 margin-right: pxToRem(40) margin-top: 0 + a + color: $color-text-alt-large + font-family: $font-family-serif + h1 + font-weight: bold #menu-main .menu-content diff --git a/app/assets/stylesheets/admin/osuny/thumbnail.sass b/app/assets/stylesheets/admin/osuny/thumbnail.sass index fa8e937d36..4d63578a5d 100644 --- a/app/assets/stylesheets/admin/osuny/thumbnail.sass +++ b/app/assets/stylesheets/admin/osuny/thumbnail.sass @@ -8,7 +8,7 @@ @include media-breakpoint-down(md) display: none &__initials - color: #CCCCCC + color: $color-flexoki-200 display: block font-family: $font-family-serif font-size: pxToRem(30) diff --git a/app/controllers/admin/administration/dashboard_controller.rb b/app/controllers/admin/administration/dashboard_controller.rb index 58b679812d..f5f2c8e39a 100644 --- a/app/controllers/admin/administration/dashboard_controller.rb +++ b/app/controllers/admin/administration/dashboard_controller.rb @@ -3,6 +3,7 @@ class Admin::Administration::DashboardController < Admin::Administration::Applic def index raise_403_unless feature_administration? @namespace = Administration + @hero_summary = true breadcrumb render 'admin/dashboard/namespace' end diff --git a/app/controllers/admin/communication/dashboard_controller.rb b/app/controllers/admin/communication/dashboard_controller.rb index c8acc704aa..f6d4a1f1e8 100644 --- a/app/controllers/admin/communication/dashboard_controller.rb +++ b/app/controllers/admin/communication/dashboard_controller.rb @@ -3,6 +3,7 @@ class Admin::Communication::DashboardController < Admin::Communication::Applicat def index raise_403_unless feature_communication? @namespace = Communication + @hero_summary = true breadcrumb render 'admin/dashboard/namespace' end diff --git a/app/controllers/admin/communication/extranets_controller.rb b/app/controllers/admin/communication/extranets_controller.rb index 9756c0cc37..6af8f322ac 100644 --- a/app/controllers/admin/communication/extranets_controller.rb +++ b/app/controllers/admin/communication/extranets_controller.rb @@ -13,6 +13,7 @@ def index end def show + @hero_summary = true breadcrumb end diff --git a/app/controllers/admin/communication/websites/agenda/application_controller.rb b/app/controllers/admin/communication/websites/agenda/application_controller.rb index facc2c2b1e..3cc988644f 100644 --- a/app/controllers/admin/communication/websites/agenda/application_controller.rb +++ b/app/controllers/admin/communication/websites/agenda/application_controller.rb @@ -4,7 +4,7 @@ class Admin::Communication::Websites::Agenda::ApplicationController < Admin::Com def breadcrumb super - add_breadcrumb Communication::Website::Agenda.model_name.human(count: 2), + add_breadcrumb @website.feature_agenda_name(current_language), admin_communication_website_agenda_events_path end end diff --git a/app/controllers/admin/communication/websites/agenda/events_controller.rb b/app/controllers/admin/communication/websites/agenda/events_controller.rb index 4778541ce5..a3510fd0c0 100644 --- a/app/controllers/admin/communication/websites/agenda/events_controller.rb +++ b/app/controllers/admin/communication/websites/agenda/events_controller.rb @@ -79,8 +79,6 @@ def destroy def breadcrumb super - add_breadcrumb Communication::Website::Agenda::Event.model_name.human(count: 2), - admin_communication_website_agenda_events_path breadcrumb_for @event end diff --git a/app/controllers/admin/communication/websites/portfolio/application_controller.rb b/app/controllers/admin/communication/websites/portfolio/application_controller.rb index b82998d3cc..7c4fec19c5 100644 --- a/app/controllers/admin/communication/websites/portfolio/application_controller.rb +++ b/app/controllers/admin/communication/websites/portfolio/application_controller.rb @@ -4,7 +4,7 @@ class Admin::Communication::Websites::Portfolio::ApplicationController < Admin:: def breadcrumb super - add_breadcrumb Communication::Website::Portfolio.model_name.human(count: 2), + add_breadcrumb @website.feature_portfolio_name(current_language), admin_communication_website_portfolio_projects_path end end diff --git a/app/controllers/admin/communication/websites/posts/application_controller.rb b/app/controllers/admin/communication/websites/posts/application_controller.rb index 221b50d1ad..7ac5a3a9b7 100644 --- a/app/controllers/admin/communication/websites/posts/application_controller.rb +++ b/app/controllers/admin/communication/websites/posts/application_controller.rb @@ -4,7 +4,7 @@ class Admin::Communication::Websites::Posts::ApplicationController < Admin::Comm def breadcrumb super - add_breadcrumb Communication::Website::Post.model_name.human(count: 2), + add_breadcrumb @website.feature_posts_name(current_language), admin_communication_website_posts_path end end diff --git a/app/controllers/admin/communication/websites/posts_controller.rb b/app/controllers/admin/communication/websites/posts_controller.rb index 16927bc0f0..371a2aab72 100644 --- a/app/controllers/admin/communication/websites/posts_controller.rb +++ b/app/controllers/admin/communication/websites/posts_controller.rb @@ -101,7 +101,7 @@ def destroy def breadcrumb super - add_breadcrumb Communication::Website::Post.model_name.human(count: 2), + add_breadcrumb @website.feature_posts_name(current_language), admin_communication_website_posts_path breadcrumb_for @post end diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 1936d45763..e69c4e5036 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -35,6 +35,7 @@ def show @events = @all_events.latest_in(current_language) @all_projects = @website.projects.accessible_by(current_ability) @projects = @all_projects.latest_in(current_language) + @hero_summary = true breadcrumb end diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 6edfbed00e..3d9496cad9 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -5,6 +5,7 @@ def index @namespaces << Research if feature_research? @namespaces << Communication if feature_communication? @namespaces << Administration if feature_administration? + @hero_summary = true breadcrumb end diff --git a/app/controllers/admin/education/dashboard_controller.rb b/app/controllers/admin/education/dashboard_controller.rb index 03824a39fa..37ac924faa 100644 --- a/app/controllers/admin/education/dashboard_controller.rb +++ b/app/controllers/admin/education/dashboard_controller.rb @@ -3,6 +3,7 @@ class Admin::Education::DashboardController < Admin::Education::ApplicationContr def index raise_403_unless feature_education? @namespace = Education + @hero_summary = true breadcrumb render 'admin/dashboard/namespace' end diff --git a/app/controllers/admin/education/programs_controller.rb b/app/controllers/admin/education/programs_controller.rb index c892cddacc..a2a6ffbf33 100644 --- a/app/controllers/admin/education/programs_controller.rb +++ b/app/controllers/admin/education/programs_controller.rb @@ -33,6 +33,7 @@ def children def show @preview = true + @hero_summary = true breadcrumb end diff --git a/app/controllers/admin/research/dashboard_controller.rb b/app/controllers/admin/research/dashboard_controller.rb index 25bc14de7b..c6017033a7 100644 --- a/app/controllers/admin/research/dashboard_controller.rb +++ b/app/controllers/admin/research/dashboard_controller.rb @@ -3,6 +3,7 @@ class Admin::Research::DashboardController < Admin::Research::ApplicationControl def index raise_403_unless feature_research? @namespace = Research + @hero_summary = true breadcrumb render 'admin/dashboard/namespace' end diff --git a/app/controllers/admin/research/journals_controller.rb b/app/controllers/admin/research/journals_controller.rb index 80057a9320..52793a4fa8 100644 --- a/app/controllers/admin/research/journals_controller.rb +++ b/app/controllers/admin/research/journals_controller.rb @@ -22,6 +22,7 @@ def show @volumes = @journal.volumes .ordered(current_language) .limit(6) + @hero_summary = true breadcrumb end diff --git a/app/controllers/admin/university/dashboard_controller.rb b/app/controllers/admin/university/dashboard_controller.rb index c8f2c91f46..346581bf47 100644 --- a/app/controllers/admin/university/dashboard_controller.rb +++ b/app/controllers/admin/university/dashboard_controller.rb @@ -3,6 +3,7 @@ class Admin::University::DashboardController < Admin::University::ApplicationCon def index raise_403_unless feature_settings? @namespace = University + @hero_summary = true breadcrumb render 'admin/dashboard/namespace' end diff --git a/app/models/communication/website/with_feature_agenda.rb b/app/models/communication/website/with_feature_agenda.rb index 65dcf356ea..6d6c7e6222 100644 --- a/app/models/communication/website/with_feature_agenda.rb +++ b/app/models/communication/website/with_feature_agenda.rb @@ -16,4 +16,12 @@ module Communication::Website::WithFeatureAgenda scope :with_feature_agenda, -> { where(feature_agenda: true) } end + def feature_agenda_name(language) + begin + special_page(Communication::Website::Page::CommunicationAgenda).best_localization_for(language) + rescue + Communication::Website::Agenda::Event.model_name.human(count: 2) + end + end + end \ No newline at end of file diff --git a/app/models/communication/website/with_feature_portfolio.rb b/app/models/communication/website/with_feature_portfolio.rb index 5dfb80a25a..88296cefcd 100644 --- a/app/models/communication/website/with_feature_portfolio.rb +++ b/app/models/communication/website/with_feature_portfolio.rb @@ -17,4 +17,11 @@ module Communication::Website::WithFeaturePortfolio scope :with_feature_portfolio, -> { where(feature_portfolio: true) } end + def feature_portfolio_name(language) + begin + special_page(Communication::Website::Page::CommunicationPortfolio).best_localization_for(language) + rescue + Communication::Website::Portfolio::Project.model_name.human(count: 2) + end + end end \ No newline at end of file diff --git a/app/models/communication/website/with_feature_posts.rb b/app/models/communication/website/with_feature_posts.rb index 4d8b56edf7..7d17e0f638 100644 --- a/app/models/communication/website/with_feature_posts.rb +++ b/app/models/communication/website/with_feature_posts.rb @@ -16,4 +16,11 @@ module Communication::Website::WithFeaturePosts scope :with_feature_posts, -> { where(feature_posts: true) } end + def feature_posts_name(language) + begin + special_page(Communication::Website::Page::CommunicationPost).best_localization_for(language) + rescue + Communication::Website::Post.model_name.human(count: 2) + end + end end \ No newline at end of file diff --git a/app/views/admin/application/components/_all.html.erb b/app/views/admin/application/components/_all.html.erb new file mode 100644 index 0000000000..740bdf05c9 --- /dev/null +++ b/app/views/admin/application/components/_all.html.erb @@ -0,0 +1,12 @@ +
+
+
+ + <%= lucide_icon('arrow-right') %> + +
+ +
+
\ No newline at end of file diff --git a/app/views/admin/application/components/_hero.html.erb b/app/views/admin/application/components/_hero.html.erb index 7786e7fea5..7a9c94cfcf 100644 --- a/app/views/admin/application/components/_hero.html.erb +++ b/app/views/admin/application/components/_hero.html.erb @@ -1,4 +1,4 @@ -
+
<% if breadcrumbs.one? %>
@@ -7,20 +7,22 @@ <% else %> <%= render_breadcrumbs builder: Osuny::BreadcrumbsOnRailsBuilder %> <% end %> -
- <% if @feature_nav.present? %> - <%= render_navigation context: @feature_nav %> - <% else %> -

<%= yield :title %>

- <% end %> -
- <%= yield :title_right %> +
+
+ <% if @feature_nav.present? %> + <%= render_navigation context: @feature_nav %> + <% else %> +

<%= yield :title %>

+ <% end %> +
+ <%= yield :title_right %> +
+ <% if content_for(:title_left) %> +
+ <%= yield :title_left %> +
+ <% end %>
- <% if content_for(:title_left) %> -
- <%= yield :title_left %> -
- <% end %>
\ No newline at end of file diff --git a/app/views/admin/application/components/_panel.html.erb b/app/views/admin/application/components/_panel.html.erb index ccb842d2f3..f9ab71cbfe 100644 --- a/app/views/admin/application/components/_panel.html.erb +++ b/app/views/admin/application/components/_panel.html.erb @@ -5,7 +5,7 @@ <% if small %> <%= osuny_label title %> <% else %> -

<%= title %>

+

<%= title %>

<% end %> <% end %> <% if action %> diff --git a/app/views/admin/communication/websites/agenda/events/_list.html.erb b/app/views/admin/communication/websites/agenda/events/_list.html.erb index 061ed5ef49..f5dc51a1e9 100644 --- a/app/views/admin/communication/websites/agenda/events/_list.html.erb +++ b/app/views/admin/communication/websites/agenda/events/_list.html.erb @@ -1,5 +1,6 @@ <% small ||= false +link_to_all ||= false %> <% if events.none? %>

<%= t('admin.communication.website.agenda.events.none') %>

@@ -12,20 +13,25 @@ small ||= false
<%= osuny_thumbnail_localized event %> -
- <%= osuny_published_localized event unless small %> - <%= osuny_link_localized event, - admin_communication_website_agenda_event_path( - website_id: event.website.id, - id: event.id - ), - classes: "stretched-link" %> - <% if event_l10n&.subtitle.present? %> -
- - <%= event_l10n.subtitle.truncate(45) %> - +
+ <% unless small %> +
+ <%= osuny_published_localized event %> +
<% end %> +
+ <%= osuny_link_localized event, + admin_communication_website_agenda_event_path( + website_id: event.website.id, + id: event.id + ), + classes: "stretched-link" %> + <% if event_l10n&.subtitle.present? %> +
+ <%= event_l10n.subtitle.truncate(45) %> +
+ <% end %> +
<% end %> + <%= render 'admin/application/components/all', + link: admin_communication_website_agenda_events_path(website_id: @website) if link_to_all %>
<% end %> \ No newline at end of file diff --git a/app/views/admin/communication/websites/agenda/events/index.html.erb b/app/views/admin/communication/websites/agenda/events/index.html.erb index e5ac386942..35e6d6528e 100644 --- a/app/views/admin/communication/websites/agenda/events/index.html.erb +++ b/app/views/admin/communication/websites/agenda/events/index.html.erb @@ -1,9 +1,9 @@ -<% content_for :title, Communication::Website::Agenda::Event.model_name.human(count: 2) %> +<% content_for :title, t('create') %>

<%= @events.total_count %> - <%= Communication::Website::Agenda::Event.model_name.human(count: @events.total_count).downcase %> + <%= t('admin.item', count: @events.total_count) %>

<%= render 'filters', current_path: admin_communication_website_agenda_events_path, website: @website %>
diff --git a/app/views/admin/communication/websites/agenda/events/new.html.erb b/app/views/admin/communication/websites/agenda/events/new.html.erb index fbfc590f10..f86b5aec11 100644 --- a/app/views/admin/communication/websites/agenda/events/new.html.erb +++ b/app/views/admin/communication/websites/agenda/events/new.html.erb @@ -1,2 +1,2 @@ -<% content_for :title, Communication::Website::Agenda::Event.model_name.human %> +<% content_for :title, t('create') %> <%= render 'form', event: @event, l10n: @l10n %> diff --git a/app/views/admin/communication/websites/portfolio/projects/_list.html.erb b/app/views/admin/communication/websites/portfolio/projects/_list.html.erb index 296313850b..695e32175e 100644 --- a/app/views/admin/communication/websites/portfolio/projects/_list.html.erb +++ b/app/views/admin/communication/websites/portfolio/projects/_list.html.erb @@ -1,5 +1,6 @@ <% small ||= false +link_to_all ||= false %> <% if projects.none? %>

<%= t('admin.communication.website.portfolio.projects.none') %>

@@ -24,5 +25,7 @@ small ||= false
<% end %> + <%= render 'admin/application/components/all', + link: admin_communication_website_portfolio_projects_path(website_id: @website) if link_to_all %>
<% end %> \ No newline at end of file diff --git a/app/views/admin/communication/websites/portfolio/projects/index.html.erb b/app/views/admin/communication/websites/portfolio/projects/index.html.erb index 47effeadf5..e76067b3b2 100644 --- a/app/views/admin/communication/websites/portfolio/projects/index.html.erb +++ b/app/views/admin/communication/websites/portfolio/projects/index.html.erb @@ -1,9 +1,9 @@ -<% content_for :title, Communication::Website::Portfolio::Project.model_name.human(count: 2) %> +<% content_for :title, t('create') %>

<%= @projects.total_count %> - <%= Communication::Website::Portfolio::Project.model_name.human(count: @projects.total_count).downcase %> + <%= t('admin.item', count: @projects.total_count) %>

<%= render 'filters', current_path: admin_communication_website_portfolio_projects_path, website: @website %>
diff --git a/app/views/admin/communication/websites/portfolio/projects/new.html.erb b/app/views/admin/communication/websites/portfolio/projects/new.html.erb index d759f03e69..7ab76908fe 100644 --- a/app/views/admin/communication/websites/portfolio/projects/new.html.erb +++ b/app/views/admin/communication/websites/portfolio/projects/new.html.erb @@ -1,3 +1,2 @@ -<% content_for :title, Communication::Website::Portfolio::Project.model_name.human %> - +<% content_for :title, t('create') %> <%= render 'form', project: @project, l10n: @l10n %> diff --git a/app/views/admin/communication/websites/posts/_list.html.erb b/app/views/admin/communication/websites/posts/_list.html.erb index 98aabe2353..83852bbae3 100644 --- a/app/views/admin/communication/websites/posts/_list.html.erb +++ b/app/views/admin/communication/websites/posts/_list.html.erb @@ -6,6 +6,7 @@ selectable ||= false if small hide_buttons = true end +link_to_all ||= false %> <% if posts.none? %>

<%= t('communication.website.posts.none') %>

@@ -69,6 +70,15 @@ end <% end %> + <% if link_to_all %> + + + + <%= render 'admin/application/components/all', + link: admin_communication_website_posts_path(website_id: @website) %> + + + <% end %>
diff --git a/app/views/admin/communication/websites/posts/index.html.erb b/app/views/admin/communication/websites/posts/index.html.erb index 61c158ebe8..de6933727b 100644 --- a/app/views/admin/communication/websites/posts/index.html.erb +++ b/app/views/admin/communication/websites/posts/index.html.erb @@ -3,7 +3,7 @@

<%= @posts.total_count %> - <%= Communication::Website::Post.model_name.human(count: @posts.total_count).downcase %> + <%= t('admin.item', count: @posts.total_count) %>

<%= render 'filters', current_path: admin_communication_website_posts_path, website: @website %>
diff --git a/app/views/admin/communication/websites/posts/new.html.erb b/app/views/admin/communication/websites/posts/new.html.erb index fc75ad158d..a8796a3a67 100644 --- a/app/views/admin/communication/websites/posts/new.html.erb +++ b/app/views/admin/communication/websites/posts/new.html.erb @@ -1,4 +1,2 @@ -<% content_for :title, Communication::Website::Post.model_name.human %> -<%= render 'form', - post: @post, - l10n: @l10n %> +<% content_for :title, t('create') %> +<%= render 'form', post: @post, l10n: @l10n %> diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index 10c83a7ae0..ded8c8a275 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -3,12 +3,12 @@ <% content_for :title_right do %> <%= render 'admin/application/favorites/widget', about: @website %> <%= link_to @website.url, @website.url, target: :_blank unless @website.url.blank? %> -
- <% if @website.about.present? %> + <% if @website.about.present? %> +
<%= I18n.t("activerecord.attributes.communication/website.about_#{@website.about_type}") %> — <%= osuny_link_localized_if can?(:read, @website.about), @website.about, [:admin, @website.about] %> - <% end %> -
+
+ <% end %> <% end %> <% @@ -38,10 +38,10 @@ number_of_panels = 0
-<%= image_tag @website.deployment_status_badge, alt: '' if @website.deployment_status_badge.present? %> - <%= render 'admin/application/l10n/widget', about: @website, l10n: @l10n, small: true %> +<%= image_tag @website.deployment_status_badge, alt: '' if @website.deployment_status_badge.present? %> + <% if current_user.server_admin? %> <% content_for :action_bar_left do %> <%= destroy_link @website %> diff --git a/app/views/admin/communication/websites/show/_events.html.erb b/app/views/admin/communication/websites/show/_events.html.erb index 33b2ec64e0..96e963efe4 100644 --- a/app/views/admin/communication/websites/show/_events.html.erb +++ b/app/views/admin/communication/websites/show/_events.html.erb @@ -1,5 +1,5 @@ <% -title = t('communication.website.last_events') +title = @website.feature_agenda_name(current_language) action = '' action += link_to t('create'), new_admin_communication_website_agenda_event_path(website_id: @website), @@ -8,7 +8,6 @@ action += link_to t('create'), <%= osuny_panel title, action: action do %> <%= render 'admin/communication/websites/agenda/events/list', events: @events, - small: true %> - <%= link_to t('communication.website.see_all', number: @all_events.size), - admin_communication_website_agenda_events_path(website_id: @website) if @all_events.any? %> + small: true, + link_to_all: true %> <% end %> diff --git a/app/views/admin/communication/websites/show/_pages.html.erb b/app/views/admin/communication/websites/show/_pages.html.erb index cbfbdd1788..ff51c3171a 100644 --- a/app/views/admin/communication/websites/show/_pages.html.erb +++ b/app/views/admin/communication/websites/show/_pages.html.erb @@ -1,11 +1,11 @@ <% +title = Communication::Website::Page.model_name.human(count: 2) action = '' action += link_to t('create'), new_admin_communication_website_page_path(website_id: @website), class: button_classes if can?(:create, Communication::Website::Page) %> -<%= osuny_panel t('communication.website.last_pages'), - action: action do %> +<%= osuny_panel title, action: action do %>
<% @pages.each do |page| %>
@@ -20,7 +20,7 @@ action += link_to t('create'),
<% end %> + <%= render 'admin/application/components/all', + link: admin_communication_website_pages_path(website_id: @website) %> - <%= link_to t('communication.website.see_all', number: @all_pages.count), - admin_communication_website_pages_path(website_id: @website) %> <% end %> diff --git a/app/views/admin/communication/websites/show/_posts.html.erb b/app/views/admin/communication/websites/show/_posts.html.erb index 3624648597..cfe47b2ad2 100644 --- a/app/views/admin/communication/websites/show/_posts.html.erb +++ b/app/views/admin/communication/websites/show/_posts.html.erb @@ -1,5 +1,5 @@ <% -title = t('communication.website.last_posts') +title = @website.feature_posts_name(current_language) action = '' action += link_to t('create'), new_admin_communication_website_post_path(website_id: @website), @@ -11,7 +11,6 @@ action += link_to t('communication.website.posts.new_curation'), <%= osuny_panel title, action: action do %> <%= render 'admin/communication/websites/posts/list', posts: @posts, - small: true %> - <%= link_to t('communication.website.see_all', number: @all_posts.size), - admin_communication_website_posts_path(website_id: @website) if @all_posts.any? %> + small: true, + link_to_all: true %> <% end %> diff --git a/app/views/admin/communication/websites/show/_projects.html.erb b/app/views/admin/communication/websites/show/_projects.html.erb index 60e3c67dbc..2a5f10b57c 100644 --- a/app/views/admin/communication/websites/show/_projects.html.erb +++ b/app/views/admin/communication/websites/show/_projects.html.erb @@ -1,5 +1,5 @@ <% -title = t('communication.website.last_projects') +title = @website.feature_portfolio_name(current_language) action = '' action += link_to t('create'), new_admin_communication_website_portfolio_project_path(website_id: @website), @@ -8,7 +8,6 @@ action += link_to t('create'), <%= osuny_panel title, action: action do %> <%= render 'admin/communication/websites/portfolio/projects/list', projects: @projects, - small: true %> - <%= link_to t('communication.website.see_all', number: @all_projects.size), - admin_communication_website_portfolio_projects_path(website_id: @website) if @all_projects.any? %> + small: true, + link_to_all: true %> <% end %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index e515ef071c..8a5f2de977 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -452,10 +452,6 @@ en: button: Go live title: Go live hosting: Hosting - last_events: Last events - last_pages: Last pages - last_posts: Last posts - last_projects: Last projects menus: automatic: This menu is created automatically.
This means that it reflects the site's tree structure.
As soon as you want to modify it, by creating an item, the automatism will stop. default_title: diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 357fcd4083..d017b54f4c 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -452,10 +452,6 @@ fr: button: Mettre en production title: Mise en production hosting: Hébergement - last_events: Derniers événements - last_pages: Dernières pages - last_posts: Dernières actualités - last_projects: Derniers projets menus: automatic: Ce menu se constitue automatiquement.
Cela signifie qu'il reflète l'arborescence du site.
Dès que vous souhaiterez le modifier, en créant un élément, l'automatisme s'arrêtera. default_title: diff --git a/config/locales/en.yml b/config/locales/en.yml index f8c487f2d3..8b0da04a9c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -136,6 +136,10 @@ en: in: in %{lang} switch_to: switch to %{choices} infos: Informations + items: + one: item + other: items + see_all: See all inheritance: sentence_html: Value inherited from %{link} sentence_without_link: Value inherited diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c1f44adb5f..0eb6e1be0c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -140,6 +140,10 @@ fr: sentence_html: Valeur héritée de %{link} sentence_without_link: Valeur héritée status: Valeur héritée + item: + one: élément + other: éléments + see_all: Voir tout meta_description: hint: Texte simple, dédié au à l'optimisation pour les moteurs de recherche (Search Engine Optimization, SEO). label: Description pour les moteurs de recherche (meta) diff --git a/config/navigation/admin/communication/website/agenda_navigation.rb b/config/navigation/admin/communication/website/agenda_navigation.rb index 6b0d20b7b8..f96ddd8619 100644 --- a/config/navigation/admin/communication/website/agenda_navigation.rb +++ b/config/navigation/admin/communication/website/agenda_navigation.rb @@ -5,7 +5,7 @@ navigation.items do |primary| primary.item :feature_nav_events, - Communication::Website::Agenda::Event.model_name.human(count: 2), + @website.feature_agenda_name(current_language), admin_communication_website_agenda_events_path(website_id: @website.id) primary.item :feature_nav_categories, Communication::Website::Agenda::Category.model_name.human(count: 2), diff --git a/config/navigation/admin/communication/website/portfolio_navigation.rb b/config/navigation/admin/communication/website/portfolio_navigation.rb index 59404e0fd8..4919786a6b 100644 --- a/config/navigation/admin/communication/website/portfolio_navigation.rb +++ b/config/navigation/admin/communication/website/portfolio_navigation.rb @@ -5,7 +5,7 @@ navigation.items do |primary| primary.item :feature_nav_projects, - Communication::Website::Portfolio::Project.model_name.human(count: 2), + @website.feature_portfolio_name(current_language), admin_communication_website_portfolio_projects_path(website_id: @website.id) primary.item :feature_nav_categories, Communication::Website::Portfolio::Category.model_name.human(count: 2), diff --git a/config/navigation/admin/communication/website/posts_navigation.rb b/config/navigation/admin/communication/website/posts_navigation.rb index f52d65a414..70c5bbad97 100644 --- a/config/navigation/admin/communication/website/posts_navigation.rb +++ b/config/navigation/admin/communication/website/posts_navigation.rb @@ -5,7 +5,7 @@ navigation.items do |primary| primary.item :feature_nav_posts, - Communication::Website::Post.model_name.human(count: 2), + @website.feature_posts_name(current_language), admin_communication_website_posts_path(website_id: @website.id), highlights_on: lambda { controller_name == "posts" && action_name == "index" diff --git a/config/navigation/admin/communication/website_navigation.rb b/config/navigation/admin/communication/website_navigation.rb index 0865adb543..411cddb723 100644 --- a/config/navigation/admin/communication/website_navigation.rb +++ b/config/navigation/admin/communication/website_navigation.rb @@ -12,7 +12,7 @@ controller_name == "websites" && action_name == "show" } if can?(:read, @website) primary.item :subnav_posts, - Communication::Website::Post.model_name.human(count: 2), + @website.feature_posts_name(current_language), admin_communication_website_posts_path(website_id: @website.id), highlights_on: lambda { admin_communication_website_posts_path(website_id: @website.id).in?(request.path) || @@ -20,13 +20,13 @@ admin_communication_website_post_authors_path(website_id: @website.id).in?(request.path) } if @website.feature_posts primary.item :subnav_agenda, - Communication::Website::Agenda.model_name.human(count: 2), + @website.feature_agenda_name(current_language), admin_communication_website_agenda_events_path(website_id: @website.id), highlights_on: lambda { admin_communication_website_agenda_root_path(website_id: @website.id).in?(request.path) } if @website.feature_agenda primary.item :subnav_portfolio, - Communication::Website::Portfolio.model_name.human(count: 2), + @website.feature_portfolio_name(current_language), admin_communication_website_portfolio_projects_path(website_id: @website.id), highlights_on: lambda { admin_communication_website_portfolio_root_path(website_id: @website.id).in?(request.path)