diff --git a/app/views/admin/communication/blocks/components/image/_static.html.erb b/app/views/admin/communication/blocks/components/image/_static.html.erb index f30be80c68bf3aad76c6b514c109115d84b8dc8b..48a859ef74d7bcd1c2f087893a4b97f2d4cb6e0d 100644 --- a/app/views/admin/communication/blocks/components/image/_static.html.erb +++ b/app/views/admin/communication/blocks/components/image/_static.html.erb @@ -1,13 +1,16 @@ <% image = @block.template.public_send(property) +blob = image['blob'] if image&.has_key? 'blob' +alt = @block.template.public_send "#{property}_alt" +credit = @block.template.public_send "#{property}_credit" indentation = ' ' %> -<% if image.blob %> +<% if blob %> <%= indentation %>image: -<%= indentation %> id: "<%= image.blob.id %>" -<%= indentation %> file: "<%= image.blob.id %>" +<%= indentation %> id: "<%= blob.id %>" +<%= indentation %> file: "<%= blob.id %>" <%= indentation %> alt: >- -<%= indentation %> <%= prepare_text_for_static image.alt %> +<%= indentation %> <%= prepare_text_for_static alt %> <%= indentation %> credit: >- -<%= indentation %> <%= prepare_text_for_static image.credit %> +<%= indentation %> <%= prepare_text_for_static credit %> <% end %> diff --git a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb index 42b00c9043083011bdc0209bc0674a17d137a130..baf754588c410d0c7e8552c7ec7c37825a432e6e 100644 --- a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb +++ b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb @@ -1,6 +1,6 @@ <% -indentation = ' ' value = @block.template.public_send property +indentation = ' ' %> <%= indentation %><%= property %>: >- <%= indentation %> <%= prepare_html_for_static value, @university %>