diff --git a/app/views/admin/communication/blocks/_preview.html.erb b/app/views/admin/communication/blocks/_preview.html.erb index a716dae7f1ddb8dc5cbb6d75f9da972595d7c4a6..49e415f91dcd0642602e0a2fc322e4d18d7c0dd2 100644 --- a/app/views/admin/communication/blocks/_preview.html.erb +++ b/app/views/admin/communication/blocks/_preview.html.erb @@ -1,13 +1,4 @@ <% about.blocks.published.ordered.each do |block| %> - <section class="block-<%= block.template_kind %>"> - <div class="container"> - <div class="block-content"> - <div class="top"> - <h2><%= block.title %></h2> - </div> - <% @block = block %> - <%= render "admin/communication/blocks/templates/#{@block.template_kind}/preview" %> - </div> - </div> - </section> + <% @block = block %> + <%= render "admin/communication/blocks/templates/#{@block.template_kind}/preview" %> <% end %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/components/image/_preview.html.erb b/app/views/admin/communication/blocks/components/image/_preview.html.erb index e2c044efd3d0b709759d1e219c03e140f92b008b..b6b9532baeb829af5314bf474d58e3b9d7231ead 100644 --- a/app/views/admin/communication/blocks/components/image/_preview.html.erb +++ b/app/views/admin/communication/blocks/components/image/_preview.html.erb @@ -3,14 +3,9 @@ blob = component.blob return unless blob %> -<section class="block-image"> - <div class="container"> - <div class="block-content"> - <%= kamifusen_tag blob, width: 600, class: 'img-fluid mb-1' %> - <figcaption> - <%= component.template.credit if component.template.try(:credit).present? %> - </figcaption> - </figure> - </div> - </div> -</section> +<figure> + <%= kamifusen_tag blob, width: 600, class: 'img-fluid mb-1', alt: component.template.alt %> + <figcaption> + <%= sanitize component.template.credit if component.template.try(:credit).present? %> + </figcaption> +</figure> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/call_to_action/_preview.html.erb b/app/views/admin/communication/blocks/templates/call_to_action/_preview.html.erb index f53fb430bc5d7283500e45fb17343a67d2478a63..6a03d093e686c5cb7e1b48d9f15ae8a4b2be2960 100644 --- a/app/views/admin/communication/blocks/templates/call_to_action/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/call_to_action/_preview.html.erb @@ -1,22 +1,48 @@ +<% +$class = "block block-call_to_action" +unless @block.title.empty? + $class += " block-with-title" +end -<%= block_component_preview :image %><br> -<%= block_component_preview :alt %> +$image_class = "call_to_action--with" + (@block.template.image.empty? ? "out" : "") + "-image" -<div> - <% if @block.template.elements%> - <div {{ if gt (len .buttons) 1 }}role="group"{{ end -}}> - <% @block.template.elements.each do |element| %> - <% if element.title %> - <a href="<%= block_component_preview :url, template: element %>" - <% if element.target_blank %> - title="{{ i18n 'commons.link.blank_aria' (dict 'Title' $title) }}" - target="_blank" - <% else %> - title="<%= block_component_preview :title, template: element %>" - <% end %> - ><%= block_component_preview :title, template: element %></a> +%> + +<section class="block block-call_to_action"> + <div class="container"> + <div class="block-content"> + <div class="call_to_action <%= $image_class %>"> + <div> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% if @block.template.text %> + <div class="description"> + <%= block_component_preview :text %> + </div> + <% end %> + <% if @block.template.elements %> + <div class="actions" <% if @block.template.elements.count > 1 %>role="group"<% end %>> + <% @block.template.elements.each do |element| %> + <% if element.title %> + <a href="<%= block_component_preview :url, template: element %>" + <% if element.target_blank %> + title="<%= block_component_preview :title, template: element %>" + target="_blank" + <% else %> + title="<%= block_component_preview :title, template: element %>" + <% end %> + ><%= block_component_preview :title, template: element %></a> + <% end %> + <% end %> + </div> + <% end %> + </div> + <% component = @block.template.public_send "image_component" %> + <% if component.blob %> + <%= kamifusen_tag component.blob, width: 600, class: 'img-fluid mb-1', alt: @block.template.alt %> <% end %> - <% end %> + </div> </div> - <% end %> -</div> \ No newline at end of file + </div> +</section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/chapter/_preview.html.erb b/app/views/admin/communication/blocks/templates/chapter/_preview.html.erb index a7476fa18f180dcb1166cab63d949cbf5d0edb63..f36ccec40db610e045ce3c58cde75630969ced50 100644 --- a/app/views/admin/communication/blocks/templates/chapter/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/chapter/_preview.html.erb @@ -1,14 +1,41 @@ -<div class="chapter"> - <div> - <%= block_component_preview :text %> +<% +$class = "block block-chapter" + +unless @block.title.empty? + $class += " block-with-title" +end + +if @block.template.image[:id] #TODO comment vérifier proprement la présence de l'image? + $class += " block-chapter--with-image" +end + +$class += " block-chapter--" + @block.template.layout + +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <div class="chapter"> + <div class="text"> + <% unless @block.title.empty? %> + <div class="top"> + <h2><%= @block.title %></h2> + </div> + <% end %> + <% unless @block.template.text.empty? %> + <div class="rich-text"> + <%= block_component_preview :text %> + </div> + <% end %> + <% unless @block.template.notes.empty? %> + <div class="notes"> + <%= block_component_preview :notes %> + </div> + <% end %> + </div> + <%= block_component_preview :image %> + </div> + </div> </div> - <div class="notes"> - <%= block_component_preview :notes %> - </div> -</div> -<figure> - <%= block_component_preview :image %> - <figcaption> - <%= block_component_preview :credit %> - </figcaption> -</figure> +</section> diff --git a/app/views/admin/communication/blocks/templates/contact/_preview.html.erb b/app/views/admin/communication/blocks/templates/contact/_preview.html.erb index 5bd5fe34344bc90912b83fe2d2347fa26b9fc65b..3ffb5a299fdd15e417451447d297829e6ac3f65e 100644 --- a/app/views/admin/communication/blocks/templates/contact/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_preview.html.erb @@ -1,21 +1,65 @@ -<%= block_component_preview :description %> -<p> - <%= block_component_preview :name %><br> - <% if @block.template.address.present? %> - <%= @block.template.address %><br> - <% end %> - <%= block_component_preview :zipcode %> - <%= block_component_preview :city %> - <%= block_component_preview :country %> -</p> -<div class="table-responsive"> - <table class="<%= table_classes %>"> - <% @block.template.elements.each do |element| %> - <tr> - <td><%= block_component_preview :title, template: element %></td> - <td><%= block_component_preview :time_slot_morning, template: element %></td> - <td><%= block_component_preview :time_slot_afternoon, template: element %></td> - </tr> - <% end %> - </table> -</div> +<% +$class = "block block-contact" +unless @block.title.empty? + $class += " block-with-title" +end +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> + </div> + <% end %> + + <div class="informations"> + <address itemscope itemtype="https://schema.org/Organization"> + <% unless @block.template.name.empty? %> + <p><%= block_component_preview :name %></p> + <% end %> + <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> + <span itemprop="streetAddress"> + <%= block_component_preview :address %> + </span> + <span itemprop="addressLocality"> + <%= block_component_preview :city %> + </span> + <span itemprop="postalCode"> + <%= block_component_preview :zipcode %> + </span> + <span itemprop="addressCountry"> + <%= block_component_preview :country %> + </span> + </div> + + <p> + <% @block.template.phone_numbers.each do |phone_number| %> + <a itemprop="telephone" href="tel:<%= phone_number %>%>"><%= phone_number %></a><br> + <% end %> + <% @block.template.emails.each do |email| %> + <a itemprop="email" href="mailto:<%= email %>%>"><%= email %></a><br> + <% end %> + </p> + </address> + <ul> + <% @block.template.elements.each do |element| %> + <li> + <span><%= block_component_preview :title, template: element %></span> + <span><time datetime="<%= block_component_preview :time_slot_morning, template: element %>"><%= block_component_preview :time_slot_morning, template: element %></time></span> + <span><time datetime="<%= block_component_preview :time_slot_afternoon, template: element %>"><%= block_component_preview :time_slot_afternoon, template: element %></time></span> + </li> + <% end %> + </ul> + </div> + </div> + </div> +</section> diff --git a/app/views/admin/communication/blocks/templates/datatable/_preview.html.erb b/app/views/admin/communication/blocks/templates/datatable/_preview.html.erb index 0f2d97f82a195167cea611bbb8fc389a2fff70ce..4f28c5ab2a22c59949a857416b8188b71a36e63e 100644 --- a/app/views/admin/communication/blocks/templates/datatable/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/datatable/_preview.html.erb @@ -1,21 +1,43 @@ -<div class="description"> - <%= block_component_preview :description %> -</div> - -<div class="table-responsive"> - <caption><%= block_component_preview :caption %></caption> - <table class="<%= table_classes %>"> - <thead> - <tr> - <%= block_component_preview :columns %> - </tr> - </thead> - <tbody> - <% @block.template.elements.each do |row| %> - <tr> - <%= block_component_preview :cells, template: row %> - </tr> +<% +$class = "block block-datatable" +unless @block.title.empty? + $class += " block-with-title" +end +%> +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> + </div> <% end %> - </tbody> - </table> -</div> + <div class="table-responsive"> + <table> + <% unless @block.template.caption.empty? %> + <caption><%= block_component_preview :caption %></caption> + <% end %> + <thead> + <tr> + <%= block_component_preview :columns %> + </tr> + </thead> + <tbody> + <% @block.template.elements.each do |row| %> + <tr> + <%= block_component_preview :cells, template: row %> + </tr> + <% end %> + </tbody> + </table> + </div> + </div> + </div> +</section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/definitions/_preview.html.erb b/app/views/admin/communication/blocks/templates/definitions/_preview.html.erb index 1b04433fc3c26e946ed2cb0b91c9731efe1e1059..62af80feb66c094adcb5a493413aac9935b8b4e0 100644 --- a/app/views/admin/communication/blocks/templates/definitions/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/definitions/_preview.html.erb @@ -1,14 +1,34 @@ -<div class="description"> - <%= block_component_preview :description %> -</div> -<div class="definitions"> - <% @block.template.elements.each do |element| %> - <details itemscope itemtype="https://schema.org/DefinedTerm"> - <summary itemprop="name"> - <b> - <%= block_component_preview :title, template: element %> - </b></summary> - <p itemprop="description"><%= block_component_preview :description, template: element %></p> - </details> - <% end %> -</div> \ No newline at end of file +<% + $class = "block block-definitions" + unless @block.title.empty? + $class += " block-with-title" + end +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> + </div> + <% end %> + <div class="definitions"> + <% @block.template.elements.each do |element| %> + <details itemscope itemtype="https://schema.org/DefinedTerm"> + <summary itemprop="name"> + <%= block_component_preview :title, template: element %> + </summary> + <p itemprop="description"><%= block_component_preview :description, template: element %></p> + </details> + <% end %> + </div> + </div> +</section> diff --git a/app/views/admin/communication/blocks/templates/embed/_preview.html.erb b/app/views/admin/communication/blocks/templates/embed/_preview.html.erb index 8f5b62501e684fb14ede001b955420f2c989325d..2e2464610e92f12ad1ac0e0af7f5aff8b2d85780 100644 --- a/app/views/admin/communication/blocks/templates/embed/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/embed/_preview.html.erb @@ -1,2 +1,32 @@ -<%= block_component_preview :code %> -<%= block_component_preview :transcription %> +<% + $class = "block block-embed" + if @block.title + $class += " block-with-title" + end +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% if @block.title %> + <div class="top"> + <h2><%= @block.title %></h2> + </div> + <% end %> + + <%= block_component_preview :code %> + + <div class="transcription"> + <details> + <summary>Transcription</summary> + <p> + <%= block_component_preview :transcription %> + </p> + </details> + </div> + </div> + </div> +</section> + + + diff --git a/app/views/admin/communication/blocks/templates/files/_preview.html.erb b/app/views/admin/communication/blocks/templates/files/_preview.html.erb index d4335a6f54e742415bb3061c68575d21900b9f86..d216be4a0be9c25f95ec5f8ca10b73b89fb0b318 100644 --- a/app/views/admin/communication/blocks/templates/files/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/files/_preview.html.erb @@ -1,13 +1,41 @@ -<div class="description"> - <%= block_component_preview :description %> -</div> -<ul> - <% @block.template.elements.each do |element| %> - <% next unless element.blob %> - <li> - <a href="<%= element.blob.url %>" download="{{ partial 'PrepareHTML' $file.name }}" target="_blank" title="{{ i18n 'commons.link.blank_aria' (dict 'Title' $title_with_size) }}"> - <span><%= element.title %><br><span>(<%= element.blob.filename %>)</span></span> - </a> - </li> - <% end %> -</ul> \ No newline at end of file +<% +$class = "block block-files" +unless @block.title.empty? + $class += " block-with-title" +end +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> + </div> + <% end %> + + <ul class="files"> + <% @block.template.elements.each do |element| %> + <% next unless element.blob %> + <li> + <figure> + <a href="<%= element.blob.url %>" target="_blank" title="<%= element.title %>"><%= element.title %></a> + <figcaption> + <abbr title="">TODO : EXTENSION</abbr> + - <abbr title="">TODO : TAILLE FICHIER</abbr> + </figcaption> + </figure> + </a> + </li> + <% end %> + </ul> + </div> + </div> +</section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/gallery/_preview.html.erb b/app/views/admin/communication/blocks/templates/gallery/_preview.html.erb index f7aab6b5f265606e02e76603557bd77b18c4715f..9b2901cf2f8b23ba5938d548365a98dbc23edd6b 100644 --- a/app/views/admin/communication/blocks/templates/gallery/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/gallery/_preview.html.erb @@ -1,23 +1,50 @@ -<%= block_component_preview :description %> -<%= block_component_preview :layout %> -<div class="row"> - <% @block.template.elements.each do |element| %> - <% next unless element.blob %> - <div class="col-6"> - <article class="card"> - <%= block_component_preview :image, template: element %> - <div class="card-body"> - <div class="small"> - <p class="mb-0"> - <%= block_component_preview :alt, template: element %> - </p> - <%= block_component_preview :credit, template: element %> +<% +$class = "block block-gallery" +unless @block.title.empty? + $class += " block-with-title" +end + +$class += " block-gallery--" + @block.template.layout +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <div class="top"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> </div> - <p class="mb-0"> - <%= block_component_preview :text, template: element %> - </p> + <% end %> + </div> + <% if @block.template.layout === "carousel" %> + <% if !@block.template.elements.one? %> + <div class="splide" role="group" data-splide='{"arrows":true,"pagination":false,"autoWidth":true,"autoplay":false}'> + <div class="splide__track"> + <div class="splide__list"> + <% end %> + <% @block.template.elements.each do |element| %> + <%= block_component_preview :image, template: element %> + <% end %> + <% if !@block.template.elements.one? %> + </div> + </div> + </div> + <% end %> + <% else %> + <div class="gallery" role="group"> + <% @block.template.elements.each do |element| %> + <%= block_component_preview :image, template: element %> + <% end %> </div> - </article> + <% end %> </div> - <% end %> -</div> + </div> + </section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/image/_preview.html.erb b/app/views/admin/communication/blocks/templates/image/_preview.html.erb index 80358078e074074590ae47772c43739763f528c6..7974851a3ce20c28fc0e4f552f61b220052bfd44 100644 --- a/app/views/admin/communication/blocks/templates/image/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/image/_preview.html.erb @@ -1,8 +1,21 @@ -<figure> - <%= block_component_preview :image %> - <figcaption> - <p><%= block_component_preview :alt %></p> - <p><%= block_component_preview :text %></p> - <p><small><%= block_component_preview :credit %></small></p> - </figcaption> -</figure> \ No newline at end of file +<% +$class = "block block-image" + +unless @block.title.empty? + $class += " block-with-title" +end +%> +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? %> + <div class="top"> + <h2><%= @block.title %></h2> + </div> + <% end %> + <% if @block.template.image %> + <%= block_component_preview :image %> + <% end %> + </div> + </div> +</section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/key_figures/_preview.html.erb b/app/views/admin/communication/blocks/templates/key_figures/_preview.html.erb index 85893fa61e9b00d7ead114e89a1b9e6814b4dc07..6dab913578249b03576ca3dbe438c444d700d5c5 100644 --- a/app/views/admin/communication/blocks/templates/key_figures/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/key_figures/_preview.html.erb @@ -1,15 +1,34 @@ -<div class="top"> - <div class="description"> - <%= block_component_preview :description %> +<% +$class = "block block-key_figures" +unless @block.title.empty? + $class += " block-with-title" +end +%> +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? && @block.template.description.empty? %> + <div class="top"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <% unless @block.template.description.empty? %> + <div class="description"> + <p><%= block_component_preview :description %></p> + </div> + <% end %> + </div> + <% end %> + <ul class="<%= @block.template.elements.count.even? ? "even-items" : "odd-items" %>"> + <% @block.template.elements.each do |element| %> + <li> + <dl> + <dt><strong><%= block_component_preview :number, template: element %></strong><%= block_component_preview :unit, template: element %></dt> + <dd><%= block_component_preview :description, template: element %></dd> + </dl> + </li> + <% end %> + </ul> + </div> </div> -</div> -<ul> - <% @block.template.elements.each do |element| %> - <li> - <dl> - <dt><strong><%= block_component_preview :number, template: element %></strong><%= block_component_preview :unit, template: element %></dt> - <dd><%= block_component_preview :description, template: element %></dd> - </dl> - </li> - <% end %> -</ul> +</section> diff --git a/app/views/admin/communication/blocks/templates/organization_chart/_preview.html.erb b/app/views/admin/communication/blocks/templates/organization_chart/_preview.html.erb index 9c8fc151c0aaee30c7ea849e8e353f3ef68ed37d..54ee97c8f71c681e952276e524813a864cfd5129 100644 --- a/app/views/admin/communication/blocks/templates/organization_chart/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/organization_chart/_preview.html.erb @@ -11,23 +11,20 @@ %> <div> <article class="person" itemscope itemtype="https://schema.org/Person"> - <div> - <p class="name" itemprop="name"> + <div class="description"> + <h3 class="name" itemprop="name"> <% if @block.template.with_link %> <%= link_to person, [:admin, person] %> <% else %> <%= element.person %> <% end %> - </p> + </h3> <p itemprop="jobTitle"><%= element.role %></p> </div> <% if @block.template.with_photo %> <div class="avatar" itemprop="image"> <% if person.best_picture.attached? %> - <div style="max-width: 80px" class="float-end"> - <%= kamifusen_tag person.best_picture, - class: 'img-fluid rounded-circle' %> - </div> + <%= kamifusen_tag person.best_picture, class: 'img-fluid rounded-circle' %> <% end %> </div> <% end %> diff --git a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb index e6f7fbbc386e74e620e3f6d622a8e4e49d71682b..4f49735e43270a02a91cb66e0da9c775ef0f626e 100644 --- a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb @@ -1,20 +1,49 @@ <% if @block.data %> - <% if @block.template.page %> + +<% if @block.template.page %> <%= @block.template.page.slug %> <% end %> - <div class="pages"> - <% @block.template.selected_pages.each do |element| %> - <div> - <%= element %> - <% if @block.template.show_image && element.featured_image.attached? %> - <%= kamifusen_tag element.featured_image, - class: 'img-fluid mb-3' %> - <% end %> - <% if @block.template.show_description %> - <p><%= element.summary %></p> - <% end %> - </div> - <% end %> - </div> + <% if @block.template.show_main_description %> + <p></p> + <% end %> + + <% if @block.template.layout === "list" %> + + <ul> + <% @block.template.elements.each do |element| %> + <li> + <%= element %> + </li> + <% end %> + </ul> + + <% elsif @block.template.layout === "cards" %> + + <div class="cards"> + <% @block.template.elements.each do |element| %> + <article class="card"> + <%= element %> + <% if @block.template.show_description %> + <p><%#= element.summary %></p> + <% end %> + </article> + <% end %> + </div> + + <% else %> + + <div class="grid"> + <% @block.template.elements.each do |element| %> + <article> + <%= element %> + <% if @block.template.show_description %> + <p><%#= element.summary %></p> + <% end %> + </article> + <% end %> + </div> + + <% end %> + <% end %> diff --git a/app/views/admin/communication/blocks/templates/partners/_preview.html.erb b/app/views/admin/communication/blocks/templates/partners/_preview.html.erb index 7aa1a91ba82a254aa518c676833095be17c70a3e..6a226b15dd2672707d4e5ee35a4c08ff7b40619d 100644 --- a/app/views/admin/communication/blocks/templates/partners/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/partners/_preview.html.erb @@ -1,24 +1,24 @@ +<div class="top"> + <div class="description"> + <%= block_component_preview :description %> + </div> +</div> + <div class="organizations"> <% @block.template.elements.each do |element| %> - <div> - <article class="organization"> - <div> - <p class="title"> - <% if element.best_url %> - <a href="<%= element.best_url %>" target="_blank"> - <% end %> - <%= element.best_name %> - <% if element.best_url%> - </a> - <% end %> - </p> - </div> - <div class="media"> - <%= kamifusen_tag element.best_logo, - width: 600, - class: 'img-fluid mb-2' unless element.best_logo.nil? %> - </div> - </article> - </div> + <article class="organization"> + <h3> + <% if element.best_url %> + <a href="<%= element.best_url %>" target="_blank"> + <% end %> + <%= element.best_name %> + <% if element.best_url%> + </a> + <% end %> + </h3> + <div class="media"> + <%= kamifusen_tag element.best_logo, width: 600%> + </div> + </article> <% end %> </div> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/programs/_preview.html.erb b/app/views/admin/communication/blocks/templates/programs/_preview.html.erb index b32f9129ea5306c0e355fe95013179fec1cf1fc3..7b067c7450bf12bfa07765f21a6ef83f642e0295 100644 --- a/app/views/admin/communication/blocks/templates/programs/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/programs/_preview.html.erb @@ -1,5 +1,7 @@ -<hr> -<% @block.template.selected_programs.each do |program| %> - <p><%= program %></p> - <hr> -<% end %> \ No newline at end of file +<ol class="programs"> + <% @block.template.selected_programs.each do |program| %> + <li> + <%= program %></p> + </li> + <% end %> +</ol> diff --git a/app/views/admin/communication/blocks/templates/testimonials/_preview.html.erb b/app/views/admin/communication/blocks/templates/testimonials/_preview.html.erb index ffa1ba471740424c046b23b48ea081b41bba90eb..f9704ebdb3151ff10f143f861ebfb215a83ca1ea 100644 --- a/app/views/admin/communication/blocks/templates/testimonials/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/testimonials/_preview.html.erb @@ -1,39 +1,66 @@ -<div class="testimonials"> - <% if !@block.template.elements.one? %> - <div class="splide" data-splide='{"arrows":false,"autoplay":true,"pauseOnHover":false,"pauseOnFocus":false,"type":"loop","autoHeight":true}'> - <div class="splide__slider"> - <div class="splide__track"> - <div class="splide__list"> - <% end %> - <% @block.template.elements.each do |element| %> - <figure <% if !@block.template.elements.one? %> class="splide__slide" <% end %>> - <blockquote {{- if $is_long }} class="is-long" {{- end }}> - <p><%= block_component_preview :text, template: element %></p> - </blockquote> - <figcaption> - <% if element.photo %> - <div class="avatar"> - <div style="max-width: 80px;" class="me-3"> - <%= block_component_preview :photo, template: element %> - </div> - </div> - <% end %> - <span> - <b><%= block_component_preview :author, template: element %></b><br> - <%= block_component_preview :job, template: element %> - </span> - </figcaption> - </figure> - <% end %> +<% + $class = "block block-testimonials" + unless @block.title.empty? + $class += " block-with-title" + end + if !@block.template.elements.one? + $class += " with-carousel" + end +%> + +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <div class="testimonials"> <% if !@block.template.elements.one? %> - </div> - </div> - </div> + <div class="splide" + data-splide='{ + "arrows":false, + "autoplay":true, + "pauseOnHover":false, + "pauseOnFocus":true, + "type":"loop", + "autoHeight":true, + "interval":8000 + }' + > + <div class="splide__slider"> + <div class="splide__track"> + <div class="splide__list"> + <% end %> - <div class="splide__autoplay is-active"> - <button class="splide__play"></button> - <button class="splide__pause"></button> + <% @block.template.elements.each do |element| %> + <figure <% if !@block.template.elements.one? %> class="splide__slide" <% end %>> + <blockquote> + <p><%= block_component_preview :text, template: element %></p> + </blockquote> + <figcaption> + <% if element.photo %> + <div class="avatar"> + <%#= block_component_preview :photo, template: element %> + </div> + <% end %> + <% if element.author %> + <span class="signature"><%= block_component_preview :author, template: element %></span> + <% end %> + <% if element.job %> + <span class="meta"><%= block_component_preview :job, template: element %></span> + <% end %> + </figcaption> + </figure> + <% end %> + <% if !@block.template.elements.one? %> + </div> + </div> + </div> + + <div class="splide__autoplay is-active"> + <button class="splide__play"></button> + <button class="splide__pause"></button> + </div> + </div> + <% end %> + </div> </div> </div> - <% end %> -</div> \ No newline at end of file +</section> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/templates/timeline/_preview.html.erb b/app/views/admin/communication/blocks/templates/timeline/_preview.html.erb index 9a5a570f8773f9e09a9b1a2555287fd012b27ec8..81a435c18ab10f934ce1072ec88938664a85b96a 100644 --- a/app/views/admin/communication/blocks/templates/timeline/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/timeline/_preview.html.erb @@ -1,9 +1,53 @@ -<%= block_component_preview :layout %> -<div class="events"> -<% @block.template.elements.each do |element| %> - <div class="event"> - <%= block_component_preview :title, template: element %> - <%= block_component_preview :text, template: element %> +<% + $class = "block block-timeline" + unless @block.title.empty? + $class += " block-with-title" + end + $class += " block-timeline--" + @block.template.layout +%> + +<section class="<%= $class %>"> + <div class="container"> + <% if @block.template.layout == "vertical" %> + <div class="block-content"> + <% unless @block.title.empty? %> + <div class="top"> + <h2><%= @block.title %></h2> + </div> + <% end %> + <div class="events"> + <% @block.template.elements.each do |element| %> + <article class="event"> + <h3 class="event-title"> + <%= block_component_preview :title, template: element %> + <h3> + <p><%= block_component_preview :text, template: element %></p> + </article> + <% end %> + </div> + </div> + <% else %> + <div class="timeline"> + <% unless @block.title.empty? %> + <h2><%= @block.title %></h2> + <% end %> + <div class="events"> + <ol> + <% @block.template.elements.each do |element| %> + <li class="event"> + <p class="title"><%= block_component_preview :title, template: element %><p> + <div class="line"></div> + <p class="description"><%= block_component_preview :text, template: element %></p> + </li> + <% end %> + </ol> + <% if !@block.template.elements.one? %> + <div class="timeline-arrows"> + <button class="previous" disabled></button> + <button class="next"></button> + </div> + <% end %> + </div> + <% end %> </div> -<% end %> -</div> \ No newline at end of file +</section> diff --git a/app/views/admin/communication/blocks/templates/video/_preview.html.erb b/app/views/admin/communication/blocks/templates/video/_preview.html.erb index 90d7d4e4a358338828c1d314c1d7ec0ef5a85357..97321d70e108f4fa94386bbaed94bda33eb14702 100644 --- a/app/views/admin/communication/blocks/templates/video/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/video/_preview.html.erb @@ -1,11 +1,38 @@ -<% if @block.template.video_title %> - <div class="top"> - <h2><%= block_component_preview :video_title %></h2> +<% +$class = "block block-video" +unless @block.title.empty? + $class += " block-with-title" +end +%> +<section class="<%= $class %>"> + <div class="container"> + <div class="block-content"> + <% unless @block.title.empty? %> + <div class="top"> + <h2><%= @block.title %></h2> + </div> + <% end %> + <% if @block.template.url %> + <div class="video"> + <%# TODO: identification du provider de la vidéo %> + <iframe + src="<%= block_component_preview :url %>" + title="<%= block_component_preview :video_title %>" + loading="lazy" + ></iframe> + </div> + <% end %> + <% if @block.template.video_title %> + <p><%= block_component_preview :video_title %></p> + <% end %> + <% if @block.template.transcription %> + <div class="transcription"> + <details> + <summary><%= t 'accessibility.transcription' %></summary> + <p><%= block_component_preview :transcription %></p> + </details> + </div> + <% end %> + </div> </div> -<% end %> -<% if @block.template.url %> - <div class="video"> - <%= block_component_preview :url %> - </div> -<% end %> -<%= block_component_preview :transcription %> +</section> \ No newline at end of file diff --git a/app/views/admin/layouts/preview.html.erb b/app/views/admin/layouts/preview.html.erb index 9ea808b0f0b22e884cb045d444caeb54a4516ef0..a75239683c70872f68070b3db699cacd49ef0ee0 100644 --- a/app/views/admin/layouts/preview.html.erb +++ b/app/views/admin/layouts/preview.html.erb @@ -10,7 +10,7 @@ <%= stylesheet_link_tag 'admin/pure', media: 'all' %> <% end %> </head> - <body> + <body class="full-width"> <header class="hero"> <%= yield :image %> <div class="container"> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 0945ce50de6c304c4c3c6c08db51353d0b49d340..e7a987e929340029a56257e1df5447c04ca339c1 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -1,4 +1,6 @@ en: + accessibility: + transcription: Transcription activemodel: models: communication: Communication diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index f857467f7f329382ef2b9dcc37c66e78cb8e3559..46a4d7bf847b04e02243819970e7c532932f74be 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -1,4 +1,6 @@ fr: + accessibility: + transcription: Transcription activemodel: models: communication: Communication diff --git a/db/schema.rb b/db/schema.rb index 16edb2ff493c8c49a1285d238ff36fde0fd3d623..09f523c210fd8e21609d5c0ac2aa79ef42ac003e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -16,7 +16,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do enable_extension "plpgsql" enable_extension "unaccent" - create_table "action_text_rich_texts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "action_text_rich_texts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.text "body" t.string "record_type", null: false @@ -26,7 +26,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true end - create_table "active_storage_attachments", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.uuid "record_id", null: false @@ -36,7 +36,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end - create_table "active_storage_blobs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" @@ -50,13 +50,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_active_storage_blobs_on_university_id" end - create_table "active_storage_variant_records", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end - create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.integer "number" t.text "name" t.text "description" @@ -64,7 +64,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.datetime "updated_at", null: false end - create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "criterion_id", null: false t.integer "number" t.text "name" @@ -78,7 +78,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["criterion_id"], name: "index_administration_qualiopi_indicators_on_criterion_id" end - create_table "communication_blocks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_blocks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "about_type" t.uuid "about_id" @@ -155,7 +155,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_communication_extranets_on_university_id" end - create_table "communication_website_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "name" @@ -213,7 +213,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_git_files_on_website_id" end - create_table "communication_website_imported_authors", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "author_id" @@ -229,7 +229,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "idx_communication_website_imported_auth_on_website" end - create_table "communication_website_imported_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "category_id" @@ -247,7 +247,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "idx_communication_website_imported_cat_on_website" end - create_table "communication_website_imported_media", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_media", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "identifier" t.jsonb "data" t.text "file_url" @@ -262,7 +262,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_imported_media_on_website_id" end - create_table "communication_website_imported_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "page_id" @@ -286,7 +286,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_imported_pages_on_website_id" end - create_table "communication_website_imported_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "post_id" @@ -311,7 +311,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_imported_posts_on_website_id" end - create_table "communication_website_imported_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.integer "status", default: 0 @@ -321,7 +321,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_imported_websites_on_website_id" end - create_table "communication_website_menu_items", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menu_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "menu_id", null: false @@ -341,7 +341,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_menu_items_on_website_id" end - create_table "communication_website_menus", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menus", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -357,7 +357,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_communication_website_menus_on_university_id" end - create_table "communication_website_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -372,10 +372,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.text "github_path" t.string "featured_image_alt" t.text "text" - t.text "summary" t.string "breadcrumb_title" t.text "header_text" t.integer "kind" + t.text "summary" t.string "bodyclass" t.uuid "language_id", null: false t.text "featured_image_credit" @@ -403,7 +403,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["website_id"], name: "index_communication_website_permalinks_on_website_id" end - create_table "communication_website_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -429,7 +429,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_communication_website_posts_on_university_id" end - create_table "communication_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "url" @@ -481,7 +481,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["priority", "run_at"], name: "delayed_jobs_priority" end - create_table "education_academic_years", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "education_academic_years", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.integer "year" t.datetime "created_at", null: false @@ -496,7 +496,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_person_id", "education_academic_year_id"], name: "index_person_academic_year" end - create_table "education_cohorts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "education_cohorts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "program_id", null: false t.uuid "academic_year_id", null: false @@ -517,7 +517,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_person_id", "education_cohort_id"], name: "index_person_cohort" end - create_table "education_diplomas", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "education_diplomas", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "short_name" t.integer "level", default: 0 @@ -531,7 +531,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_education_diplomas_on_university_id" end - create_table "education_programs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "education_programs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.integer "capacity" @@ -591,7 +591,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["education_program_id", "user_id"], name: "index_education_programs_users_on_program_id_and_user_id" end - create_table "education_schools", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "education_schools", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -606,7 +606,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_education_schools_on_university_id" end - create_table "imports", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.integer "number_of_lines" t.jsonb "processing_errors" t.integer "kind" @@ -619,7 +619,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["user_id"], name: "index_imports_on_user_id" end - create_table "languages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "languages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "iso_code" t.datetime "created_at", null: false @@ -686,7 +686,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_research_journal_paper_kinds_on_university_id" end - create_table "research_journal_papers", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_papers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.datetime "published_at", precision: nil t.uuid "university_id", null: false @@ -719,7 +719,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["researcher_id"], name: "index_research_journal_papers_researchers_on_researcher_id" end - create_table "research_journal_volumes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_volumes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_journal_id", null: false t.string "title" @@ -739,7 +739,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_research_journal_volumes_on_university_id" end - create_table "research_journals", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journals", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "title" t.text "meta_description" @@ -750,7 +750,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_research_journals_on_university_id" end - create_table "research_laboratories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -794,7 +794,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_research_theses_on_university_id" end - create_table "universities", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "universities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "identifier" t.string "address" @@ -821,7 +821,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["default_language_id"], name: "index_universities_on_default_language_id" end - create_table "university_organizations", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "long_name" @@ -852,7 +852,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_university_organizations_on_university_id" end - create_table "university_people", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_people", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "user_id" t.string "last_name" @@ -893,7 +893,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["user_id"], name: "index_university_people_on_user_id" end - create_table "university_person_experiences", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_experiences", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.uuid "organization_id", null: false @@ -907,7 +907,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_university_person_experiences_on_university_id" end - create_table "university_person_involvements", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_involvements", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.integer "kind" @@ -922,7 +922,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_university_person_involvements_on_university_id" end - create_table "university_roles", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "university_roles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "target_type" t.uuid "target_id" @@ -934,7 +934,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101244) do t.index ["university_id"], name: "index_university_roles_on_university_id" end - create_table "users", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| + create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "first_name" t.string "last_name"