From 94171f7665b378c9082c4403d22003593f505586 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Fri, 17 Dec 2021 12:38:46 +0100 Subject: [PATCH] pin in posts --- app/views/admin/communication/website/posts/_list.html.erb | 2 ++ app/views/admin/communication/website/posts/show.html.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/admin/communication/website/posts/_list.html.erb b/app/views/admin/communication/website/posts/_list.html.erb index 1fdddb507..61f78aa6c 100644 --- a/app/views/admin/communication/website/posts/_list.html.erb +++ b/app/views/admin/communication/website/posts/_list.html.erb @@ -13,6 +13,7 @@ <% unless hide_category %> <th><%= Communication::Website::Post.human_attribute_name('categories') %></th> <% end %> + <th><%= Communication::Website::Post.human_attribute_name('pinned') %></th> <th colspan="2"><%= Communication::Website::Post.human_attribute_name('published_at') %></th> </tr> </thead> @@ -36,6 +37,7 @@ </ul> </td> <% end %> + <td><small><%= t post.pinned %></small></td> <td><small><%= l post.published_at, format: :date_with_explicit_month if post.published_at %></small></td> <td class="text-end"> <div class="btn-group" role="group"> diff --git a/app/views/admin/communication/website/posts/show.html.erb b/app/views/admin/communication/website/posts/show.html.erb index 717be3494..f8d9c7788 100644 --- a/app/views/admin/communication/website/posts/show.html.erb +++ b/app/views/admin/communication/website/posts/show.html.erb @@ -34,6 +34,8 @@ <%= 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"> -- GitLab