<% translated_page = page.translated_page_for(@language.downcase) %> <%= link_to page.title, polymorphic_path([spotlight, current_exhibit, page]) %>

<%= l(page.updated_at, format: :long) %>

<% if page.published? %> <% end %> <% if translated_page %> <%= link_to(translated_page.title, polymorphic_path([spotlight, current_exhibit, translated_page], locale: @language), data: { 'translation-present': 'true'}) %>

<%= l(translated_page.updated_at, format: :long) %> <% if page.updated_after? translated_page %> <% end %>

<% else %> <%= t('spotlight.exhibits.translations.pages.no_translated_page') %> <%= link_to(t('spotlight.exhibits.translations.pages.new'), polymorphic_path([:clone, current_exhibit, page], language: @language)) %> <% end %> <%= f.fields_for :pages, translated_page do |p| %> <%= p.hidden_field :id %> <%= p.label :published, class: 'sr-only' %> <%= p.check_box_without_bootstrap :published, disabled: p.object.home_page? %> <% end if translated_page %> <% if translated_page %> <%= link_to(t('spotlight.exhibits.translations.pages.edit'), polymorphic_path([:edit, current_exhibit, translated_page], locale: @language)) %> · <%= link_to(t('spotlight.exhibits.translations.pages.recreate'), polymorphic_path([:clone, current_exhibit, page], language: @language), data: { confirm: t('spotlight.exhibits.translations.pages.recreate_are_you_sure') }) %> <% if page.feature_page? || page.about_page? %> · <%= link_to(t('spotlight.exhibits.translations.pages.destroy'), polymorphic_path([current_exhibit, translated_page], locale: @language), method: :delete, data: { confirm: t('spotlight.exhibits.translations.pages.destroy_are_you_sure') }) %> <% end %> <% end %>