noesya/osuny

View on GitHub
app/views/admin/communication/websites/posts/show.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, @l10n %>

<div class="row">
  <div class="col-lg-7">
    <%= osuny_panel Communication::Website::Post::Localization.human_attribute_name(:title), small: true do %>
      <p class="lead"><%= @l10n.title %></p>
    <% end %>
    <% if @l10n.subtitle.present? %>
      <%= osuny_panel Communication::Website::Post::Localization.human_attribute_name(:subtitle), small: true do %>
        <p class="lead"><%= @l10n.subtitle %></p>
      <% end %>
    <% end %>
    <%= render 'admin/application/property/publication', about: @l10n %>
  </div>
  <div class="offset-lg-1 col-lg-4">
    <%= render 'admin/application/featured_image/show', about: @l10n, small: true %>
  </div>
</div>
<hr class="mb-5">
<%= render 'admin/application/a11y/widget', about: @l10n, horizontal: true %>
<hr class="mb-5">
<div class="row">
  <div class="col-lg-4">
    <%= render 'admin/communication/websites/posts/show/metadata' %>
  </div>
  <div class="col-lg-8">
    <%= render 'admin/application/summary/show', about: @l10n, small: true %>
    <%= render 'admin/application/meta_description/show', about: @l10n %>
  </div>
</div>
<%= render 'admin/communication/contents/editor', about: @l10n %>

<% content_for :action_bar_left do %>
  <%= destroy_link @post %>
  <%= duplicate_link @post %>
  <%= static_link static_admin_communication_website_post_path(@post) %>
<% end %>

<% content_for :action_bar_right do %>
  <% post_url = @l10n.current_permalink_url_in_website(@website) %>
  <%= link_to t('open'),
              post_url,
              target: :_blank,
              class: 'btn btn-light btn-xs' if post_url %>
  <%= preview_link %>
  <%= edit_link @post %>
  <%= publish_link @post %>
<% end %>