diff --git a/app/views/admin/communication/websites/authors/show.html.erb b/app/views/admin/communication/websites/authors/show.html.erb index acbdfd209ea086819e7fa99e6c5d306c30055eb1..5f3b06837e120e951f992ee2bb8b9fcd8d7f71dd 100644 --- a/app/views/admin/communication/websites/authors/show.html.erb +++ b/app/views/admin/communication/websites/authors/show.html.erb @@ -3,19 +3,12 @@ <%= render 'admin/communication/websites/sidebar' do %> <%= render 'admin/university/people/main_infos', person: @author %> - <% if @posts.total_count > 0 %> - <div class="card"> - <div class="card-header"> - <h5><%= "#{Communication::Website::Post.model_name.human(count: 2)} (#{@posts.total_count})" %></h5> - </div> + <% if @posts.any? %> + <%= osuny_panel Communication::Website::Post.model_name.human(count: 2), + subtitle: "#{@posts.total_count} #{Communication::Website::Post.model_name.human(count: @posts.total_count).downcase}" do %> <%= render 'admin/communication/websites/posts/list', posts: @posts, hide_author: true %> - <% if @posts.total_pages > 1 %> - <div class="card-footer"> - <%= paginate @posts, theme: 'bootstrap-5' %> - </div> - <% end %> - </div> - + <%= paginate @posts, theme: 'bootstrap-5' if @posts.total_pages > 1 %> + <% end %> <% end %> <% end %>