Skip to content
Snippets Groups Projects
Commit 5281d037 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

sound

parent 32a5963f
No related branches found
No related tags found
No related merge requests found
<div class="row pure__row--small">
<div class="col-md-6">
<%= block_component_edit :file %>
<%= block_component_edit :title %>
<%= block_component_edit block, :file %>
<%= block_component_edit block, :title %>
</div>
<div class="col-md-6">
<%= block_component_edit :transcription,
<%= block_component_edit block, :transcription,
label: t('admin.communication.blocks.components.text.transcription.label'),
placeholder: t('admin.communication.blocks.components.text.transcription.placeholder'), rows: 10 %>
</div>
......
<%
class_name = "block block-sound"
unless @block.title.blank?
unless block.title.blank?
class_name += " block-with-title"
end
%>
<section class="<%= class_name %>">
<div class="container">
<div class="block-content">
<% unless @block.title.blank? %>
<% unless block.title.blank? %>
<div class="top">
<h2><%= @block.title %></h2>
<h2><%= block.title %></h2>
</div>
<% end %>
<% if @block.template.file.present? %>
<% blob = @block.template.file_component.blob %>
<% if block.template.file.present? %>
<% blob = block.template.file_component.blob %>
<% if blob %>
<audio controls src="<%= blob.url %>"></audio>
<% end %>
<% end %>
<% if @block.template.title %>
<p><%= block_component_preview :title %></p>
<% if block.template.title %>
<p><%= block_component_show block, :title %></p>
<% end %>
<% unless @block.template.transcription.blank? %>
<% unless block.template.transcription.blank? %>
<div class="transcription">
<details>
<summary><%= t 'accessibility.transcription' %></summary>
<p><%= block_component_preview :transcription %></p>
<p><%= block_component_show block, :transcription %></p>
</details>
</div>
<% end %>
......
<p>
<% if block.template.file.present? %>
<%= block.template.file['filename'] %>
<% end %>
</p>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment