noesya/osuny

View on GitHub
app/views/admin/communication/extranets/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 %></p>
    <% end %>
  </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/extranets/posts/show/metadata' %>
  </div>
  <div class="col-lg-8">
    <%= render 'admin/application/summary/show', about: @l10n, small: true %>
  </div>
</div>
<%= render 'admin/communication/contents/editor', about: @l10n %>

<% content_for :action_bar_left do %>
  <%= destroy_link @post %>
<% end %>

<% content_for :action_bar_right do %>
  <%= link_to t('open'),
              posts_post_url(date: @l10n.published_at.strftime('%Y-%m-%d'), slug: @l10n.slug, host: @post.extranet.url, extranet_id: nil),
              target: :_blank,
              class: 'btn btn-light btn-xs' if @l10n.published %>
  <%= preview_link %>
  <%= edit_link @post %>
<% end %>