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

Image dans les chiffres clés #1616

Merged
merged 3 commits into from
Feb 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ class Communication::Block::Template::KeyFigure::Element < Communication::Block:
has_component :number, :number
has_component :unit, :string
has_component :description, :text
has_component :image, :image

def blob
image_component.blob
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@
<div class="col-lg-3">
<%= block_component_edit block, :unit, template: @element %>
</div>
<div class="col-lg-7">
<div class="col-lg-4">
<%= block_component_edit block, :description, template: @element, rows: 1 %>
</div>
<div class="col-lg-3">
<%= block_component_edit block, :image, template: @element %>
</div>
</div>
</div>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ end
<% block.template.elements.each do |element| %>
<li>
<dl>
<% if element.image %>
<%= block_component_show block, :image, template: element %>
<% end %>
<dt><strong><%= block_component_show block, :number, template: element %></strong><%= block_component_show block, :unit, template: element %></dt>
<dd><%= block_component_show block, :description, template: element %></dd>
</dl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
- <%= block_component_static block, :number, template: element, depth: 0 %>
<%= block_component_static block, :unit, template: element, depth: 5 %>
<%= block_component_static block, :description, template: element, depth: 5 %>
<%= block_component_static block, :image, template: element, depth: 5 %>
<% end %>
Loading