noesya/osuny

View on GitHub
app/views/admin/communication/blocks/templates/locations/_show.html.erb

Summary

Maintainability
Test Coverage
<div class="<%= block_html_class(block) %>">
  <div class="container">
    <div class="block-content">
      <%= render 'admin/communication/blocks/partials/top', block: block %>
      <div class="locations locations--<%= block.template.layout %>">
        <% block.template.selected_locations.each do |location|
          location_l10n = location.localization_for(block.language)
          next if location_l10n.nil?
          path = location_l10n.current_permalink_url_in_website(@website)
          %>
          <article class="location" itemscope itemtype="https://schema.org/EducationalOrganization">
            <div class="location-content">
              <h<%= block.heading_rank_children %>  itemprop='headline' class='location-title'>
                <%= link_to_if path, location_l10n, path %>
              </h<%= block.heading_rank_children %>>
              <% if location_l10n.summary.present? %>
                <div class="location-description">
                  <p itemprop="description">
                    <%= location_l10n.summary %>
                  </p>
                </div>
              <% end %>
            </div>
            <div class="media">
              <% if location_l10n.featured_image.attached? %>
                <%= kamifusen_tag location_l10n.featured_image %>
              <% end %>
            </div>
          </article>
        <% end %>
      </div>
    </div>
  </div>
</div>