Skip to content
Snippets Groups Projects
Commit 68f0e814 authored by alexisben's avatar alexisben
Browse files

Cleanup static

parent 9d5c7d4d
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,14 @@ class Communication::Block::Partner < Communication::Block::Abstract
elements.each do |partner|
blob = find_blob partner, 'logo'
add_dependency blob unless blob.nil?
# TODO : add organization dependency
# id = partner['id']
# next if id.blank?
# organization = university.organizations.find id
# next if organization.nil?
# add_dependency organization
# add_dependency organization.active_storage_blobs
end
end
end
<% if block.data.has_key?('elements') %>
<% block.data['elements'].each do |partner|
id = partner['id']
if id != ''
unless id.nil?
unless id.empty?
organization = block.university.organizations.find id %>
unless id.blank?
organization = block.university.organizations.find id %>
- id: "<%= id %>"
name: >
<%= prepare_text_for_static organization.name %>
url: <%= prepare_text_for_static organization.url %>
<% if organization.logo.attached? %>
logo: "<%= organization.logo.blob.id %>"
<% end %>
<% end
end
else %>
<% else %>
- name: >
<%= prepare_text_for_static partner['name'] %>
url: >-
......
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