noesya/osuny

View on GitHub
app/views/admin/administration/locations/static.html.erb

Summary

Maintainability
Test Coverage
<%
location = @l10n.about
language = @l10n.language
%>---
<%= render 'admin/application/static/core', about: @l10n %>
<%= render 'admin/application/static/breadcrumbs', about: @l10n %>
<%= render 'admin/application/static/design',
            about: location,
            l10n: @l10n,
            full_width: true,
            toc_offcanvas: true %>
<%= render 'admin/application/l10n/static', about: @l10n %>
<%= render 'admin/application/featured_image/static', about: @l10n %>
<%= render 'admin/application/summary/static', about: @l10n %>
contact_details:
<%= render 'admin/application/static/postal_address', about: location, l10n: @l10n, language: language %>
<%= render 'admin/application/static/contact_detail', variable: :address, data: location.address, kind: ContactDetails::Base %>
<%= render 'admin/application/static/contact_detail', variable: :address_name, data: @l10n.address_name, kind: ContactDetails::Base %>
<%= render 'admin/application/static/contact_detail', variable: :address_additional, data: @l10n.address_additional, kind: ContactDetails::Base %>
<%= render 'admin/application/static/contact_detail', variable: :zipcode, data: location.zipcode, kind: ContactDetails::Base %>
<%= render 'admin/application/static/contact_detail', variable: :city, data: location.city, kind: ContactDetails::Base %>
<%= render 'admin/application/static/contact_detail', variable: :country, data: location.country, kind: ContactDetails::Country %>
<%= render 'admin/application/static/contact_detail', variable: :website, data: @l10n.url, kind: ContactDetails::Website %>
<%= render 'admin/application/static/contact_detail', variable: :phone, data: location.phone, kind: ContactDetails::Phone %>
  geolocation:
    latitude: <%= location.latitude %>
    longitude: <%= location.longitude %>
programs:
<%
location.programs.each do |program|
  program_l10n = program.best_localization_for(language)
  %>
  - <%= program_l10n.current_permalink_in_website(@website)&.path %>
<% end %>
diplomas:
<%
location.diplomas.ordered.each do |diploma|
  diploma_l10n = diploma.best_localization_for(language)
  programs = location.education_programs.where(diploma: diploma).root.ordered
  next if programs.empty?
%>
  - name: >-
      <%= diploma_l10n.to_s %>
    path: <%= diploma_l10n.slug %>
    programs:
<%= render 'admin/education/programs/static_list',
            diploma: diploma,
            programs: programs,
            all_programs: location.programs,
            language: language,
            depth: 6 %>
<% end %>
<%= render 'admin/communication/contents/static', about: @l10n %>
---