Skip to content
Snippets Groups Projects
Commit 6638bf4f authored by Arnaud Levy's avatar Arnaud Levy
Browse files

clean

parent 53a669bb
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ module WithUnsplash
extend ActiveSupport::Concern
def add_unsplash_image(id)
return if id.blank?
photo = Unsplash::Photo.find id
url = photo['links']['download']
filename = "#{photo['id']}.jpg"
......
......@@ -28,20 +28,26 @@
<h2 class="card-title mb-0 h5"><%= t('metadata') %></h2>
</div>
<div class="card-body">
<div class="row">
<div class="col-6">
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('published') %></h3>
<p>
<%= t @post.published %><% if @post.published & @post.published_at %>,
<%= l @post.published_at.to_date, format: :long if @post.published_at %>
<% end %>
</p>
</div>
<div class="col-6">
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('pinned') %></h3>
<p><%= t @post.pinned %></p>
</div>
</div>
<% if @post.author %>
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('author') %></h3>
<p><%= link_to_if can?(:read, @post.author), @post.author, admin_communication_website_author_path(@post.author) %></p>
<% end %>
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('slug') %></h3>
<p><%= @post.slug %></p>
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('published') %></h3>
<p>
<%= t @post.published %><% if @post.published & @post.published_at %>,
<%= l @post.published_at, format: :long if @post.published_at %>
<% end %>
</p>
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('pinned') %></h3>
<p><%= t @post.pinned %></p>
<% if @post.categories.any? %>
<h3 class="h5"><%= Communication::Website::Post.human_attribute_name('categories') %></h3>
<ul class="list-unstyled mb-0">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment