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

Renommage "organization_chart" en "people" et "partners" en "organizations" #1275

Merged
merged 2 commits into from
Oct 2, 2023
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
2 changes: 1 addition & 1 deletion app/assets/stylesheets/admin/commons/content-editor.sass
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
iframe
height: 90px
width: 160px
&--partners
&--organizations
display: flex
div
align-items: center
Expand Down
6 changes: 3 additions & 3 deletions app/models/communication/block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class Communication::Block < ApplicationRecord
image: 51,
key_figures: 56,
license: 4040,
organization_chart: 100,
organizations: 200,
pages: 600,
partners: 200,
people: 100,
posts: 500,
programs: 58,
sound: 1005,
Expand All @@ -89,7 +89,7 @@ class Communication::Block < ApplicationRecord
CATEGORIES = {
basic: [:chapter, :image, :video, :sound, :datatable],
storytelling: [:key_figures, :features, :gallery, :call_to_action, :testimonials, :timeline],
references: [:pages, :posts, :organization_chart, :partners, :agenda, :programs],
references: [:pages, :posts, :people, :organizations, :agenda, :programs],
utilities: [:files, :definitions, :contact, :license, :embed]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Communication::Block::Template::Partner < Communication::Block::Template::Base
class Communication::Block::Template::Organization < Communication::Block::Template::Base

has_elements
has_layouts [:grid, :map]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Communication::Block::Template::Partner::Element < Communication::Block::Template::Base
class Communication::Block::Template::Organization::Element < Communication::Block::Template::Base

has_component :id, :organization
has_component :name, :string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Communication::Block::Template::OrganizationChart < Communication::Block::Template::Base
class Communication::Block::Template::Person < Communication::Block::Template::Base

has_elements
has_component :description, :rich_text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Communication::Block::Template::OrganizationChart::Element < Communication::Block::Template::Base
class Communication::Block::Template::Person::Element < Communication::Block::Template::Base

has_component :id, :person
has_component :role, :string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%
class_name = "block block-partners"
class_name = "block block-organizations"
unless block.title.blank?
class_name += " block-with-title"
end
class_name += " block-partners--" + block.template.layout
class_name += " block-organizations--" + block.template.layout
%>

<div class="<%= class_name %>">
Expand All @@ -26,7 +26,7 @@
<div class="organizations grid">
<% else # Map %>
<div class="map" data-marker-icon="<%= image_path 'map-marker.svg' %>">
<link rel="stylesheet"
<link rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI="
crossorigin=""/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
layout: <%= block.template.layout %>
<%= block_component_static block, :description %>
<%= block_component_static block, :with_link %>
partners:
organizations:
<% block.template.elements.each do |element| %>
<% next if element.best_name.blank? %>
<% if element.organization %>
Expand All @@ -22,18 +22,18 @@
url: "<%= element.organization.current_permalink_in_website(@website)&.path %>"
logo:
<% if element.organization.logo.attached? %>
light_background:
light_background:
id: "<%= element.organization.logo.blob.id %>"
<% end %>
<% if element.organization.logo_on_dark_background.attached? %>
dark_background:
dark_background:
id: "<%= element.organization.logo_on_dark_background.blob.id %>"
<% end %>
<% else %>
kind: "external"
url: "<%= element.url %>"
<% if element.logo_component.blob %>
logo:
logo:
id: "<%= element.logo_component.blob&.id %>"
<% end %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
json.layout block.template.layout
json.description block.template.description
json.with_link block.template.with_link
json.partners block.template.elements do |element|
json.organizations block.template.elements do |element|
if element.organization
json.slug element.organization.slug
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%
class_name = "block block-organization_chart"
class_name = "block block-people"
unless block.title.blank?
class_name += " block-with-title"
end
Expand Down Expand Up @@ -29,7 +29,7 @@ end
<div class="description">
<h3 class="name" itemprop="name">
<% if block.template.with_link %>
<%= link_to person, [:admin, person] %>
<%= link_to person, [:admin, person] %>
<% else %>
<%= element.person %>
<% end %>
Expand Down
92 changes: 46 additions & 46 deletions config/locales/communication/contents/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ en:
headings:
add: Add a title
templates:
agenda:
agenda:
description: A list of upcoming events.
edit:
events_quantity:
Expand Down Expand Up @@ -288,27 +288,38 @@ en:
false: No. Others must use the same CC license if they adapt my work.
description:
label: Description
organization_chart:
description: People and their jobs.
organizations:
description: A list of organizations with logo, name and website.
layouts:
grid:
label: Grid
description: Square logos and a simple text below.
map:
label: Map
description: A geographic map, with a pin for every organization with a known location.
edit:
add_person: Add person
drag_title: Drag and drop to organize persons
delete_title: Remove person
add_partner: Add organization
alphabetical:
label: Alphabetical order
description:
label: Description
with_link:
label: With clickable link to each person's page?
with_photo:
label: With a portrait for each person?
element:
person:
label: Person
placeholder: Select the person
role:
label: Role
placeholder: Enter person's role
id:
label: Organization
placeholder: Choose organization
unregistered: Unregistered organization
name:
label: Nom
placeholder: Enter organization's name
url:
label: Website
placeholder: https://
logo:
label: Logo
remove_logo: Remove logo
remove_partner: Remove organization
with_link:
label: With clickable link to each organization's page?
pages:
description: A highlight of some pages, with multiple layout options.
layouts:
Expand Down Expand Up @@ -350,38 +361,27 @@ en:
title: Selected pages
display:
title: Layout options
partners:
description: A list of organizations with logo, name and website.
layouts:
grid:
label: Grid
description: Square logos and a simple text below.
map:
label: Map
description: A geographic map, with a pin for every organization with a known location.
people:
description: People and their jobs.
edit:
add_partner: Add organization
add_person: Add person
drag_title: Drag and drop to organize persons
delete_title: Remove person
alphabetical:
label: Alphabetical order
description:
label: Description
element:
id:
label: Organization
placeholder: Choose organization
unregistered: Unregistered organization
name:
label: Nom
placeholder: Enter organization's name
url:
label: Website
placeholder: https://
logo:
label: Logo
remove_logo: Remove logo
remove_partner: Remove organization
with_link:
label: With clickable link to each organization's page?
label: With clickable link to each person's page?
with_photo:
label: With a portrait for each person?
element:
person:
label: Person
placeholder: Select the person
role:
label: Role
placeholder: Enter person's role
posts:
description: A list of highlighted news.
layouts:
Expand Down Expand Up @@ -419,12 +419,12 @@ en:
description: A selection of programs.
edit:
add: Add a program
sound:
sound:
description: An audio recording with a text transcription for a proper accessibility.
edit:
file:
label: Audio file encoded for the Web (.mp3, .m4a...)
title:
title:
label: Recording title
placeholder: Enter the title
testimonials:
Expand Down Expand Up @@ -511,9 +511,9 @@ en:
image: Image
key_figures: Key figures
license: License
organization_chart: People
organizations: Organizations
pages: Pages
partners: Organizations
people: People
posts: Posts
programs: Programs
sound: Sound
Expand Down
Loading
Loading