Skip to content
Snippets Groups Projects
Commit 3959b33a authored by Olivia Simonet's avatar Olivia Simonet
Browse files

Refactor embed incomplete

parent 0b8d97f1
No related branches found
No related tags found
No related merge requests found
class Communication::Block::Template::Embed < Communication::Block::Template::Base
def build_git_dependencies
end
def code
"#{data['code']}"
end
has_text :code
has_text :transcription
def transcription
"#{data['transcription']}"
end
end
<div class="row mb-4">
<div class="col-md-6">
<label class="form-label"
for="text">
<%= t '.code_label' %>
</label>
<div class="mb-3">
<textarea id="text"
rows="10"
class="form-control"
v-model="data.code"
placeholder="<%= t '.code_placeholder' %>"></textarea>
<%= block_component_edit :code %>
</div>
</div>
<div class="col-md-6">
<label class="form-label"
for="transcription">
<%= t '.transcription_label' %>
</label>
<div class="mb-3">
<textarea id="transcription"
rows="10"
class="form-control"
v-model="data.transcription"
placeholder="<%= t '.transcription_placeholder' %>"></textarea>
<%= block_component_edit :transcription,
label: t('admin.communication.blocks.components.text.transcription.label'),
placeholder: t('admin.communication.blocks.components.text.transcription.placeholder') %>
</div>
</div>
</div>
<%= @block.template.code.html_safe %>
<p><%= @block.template.transcription %></p>
\ No newline at end of file
<%= block_component_preview :code %>
<%= block_component_preview :transcription %>
code: >-
<%= prepare_html_for_static block.template.code, about.university %>
transcription: >-
<%= prepare_text_for_static block.template.transcription, 4 %>
<%= block_component_static :code %>
<%= block_component_static :transcription %>
......@@ -4,6 +4,8 @@
<%= block_component_edit :video_title %>
</div>
<div class="col-md-6">
<%= block_component_edit :transcription, rows: 10 %>
<%= block_component_edit :transcription,,
label: t('admin.communication.blocks.components.text.transcription.label'),
placeholder: t('admin.communication.blocks.components.text.transcription.placeholder'), rows: 10 %>
</div>
</div>
......@@ -140,6 +140,9 @@ en:
text:
label: Text
placeholder: Enter text
transcription:
label: Text transcript
placeholder: Enter text transcript
image:
input:
label: Image (.png, .jpg, .svg)
......@@ -198,10 +201,9 @@ en:
embed:
description: HTML raw code, so you can integrate maps or iframe components.
edit:
code_label: Code
code_placeholder: Enter code
transcription_label: Text transcript
transcription_placeholder: Enter text transcript
code:
label: Code
code_placeholder: Enter code
files:
description: A list of downloadable files, mentioning their file size.
edit:
......@@ -323,9 +325,6 @@ en:
video:
description: An embedded video from most platforms, with the text transcription for accessibility, and no autoplay.
edit:
transcription:
label: Text transcript
placeholder: Enter text transcript
url:
label: Video url
placeholder: Enter video's url
......
......@@ -140,6 +140,9 @@ fr:
text:
label: Texte
placeholder: Entrer le texte
transcription:
label: Transcription textuelle du contenu
placeholder: Entrer ici la transcription
image:
input:
label: Image (.png, .jpg, .svg)
......@@ -204,10 +207,9 @@ fr:
embed:
description: Du code HTML brut, permettant d'intégrer des cartes ou divers composants en iframe.
edit:
code_label: Code du bloc d'intégration HTML
code_placeholder: Entrez ici le code
transcription_label: Transcription textuelle du contenu
transcription_placeholder: Entrez ici la transcription
code:
label: Code du bloc d'intégration HTML
placeholder: Entrez ici le code
files:
description: Une liste de fichiers téléchargeables, présentés avec leur poids.
edit:
......@@ -341,9 +343,6 @@ fr:
video:
description: Une vidéo intégrée dans la page depuis diverses plateformes, avec la transcription et sans lecture automatique.
edit:
transcription:
label: Transcription textuelle du contenu
placeholder: Entrer ici la transcription
url:
label: Url de la vidéo
placeholder: Entrer l'url de la vidéo
......
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