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