diff --git a/app/views/admin/communication/websites/posts/index.html.erb b/app/views/admin/communication/websites/posts/index.html.erb index 5b8d75f41251ed44984063b1f07166460bf618ba..a007077e007ae5d9bbb0c663268d99c426b474d9 100644 --- a/app/views/admin/communication/websites/posts/index.html.erb +++ b/app/views/admin/communication/websites/posts/index.html.erb @@ -6,7 +6,12 @@ <% end %> <%= render 'admin/communication/websites/sidebar' do %> - <% action = create_link Communication::Website::Post %> + <% + action = create_link Communication::Website::Post + action += link_to t('communication.website.posts.new_curation'), + new_admin_communication_website_post_curation_path(website_id: @website.id), + class: button_classes('ms-2 btn-light') if can?(:create, Communication::Website::Post) + %> <%= osuny_panel Communication::Website::Post.model_name.human(count: 2), action: action do %> <%= render 'filters', current_path: admin_communication_website_posts_path, filters: @filters %> <div data-batch-selectable class="mb-5"> @@ -33,9 +38,6 @@ </div> <% end %> </div> - <%= link_to t('communication.website.posts.new_curation'), - new_admin_communication_website_post_curation_path(website_id: @website.id), - class: button_classes('btn-light') if can?(:create, Communication::Website::Post) %> <% end %> <% if can?(:create, Communication::Website::Category) || (@root_categories.any? && can?(:edit, @root_categories.first)) %> <% action = create_link Communication::Website::Category %> diff --git a/app/views/admin/communication/websites/show/_posts.html.erb b/app/views/admin/communication/websites/show/_posts.html.erb index 6a58f65738b84b34f86beb9b9b45bde7993cb46e..e46152ab639c358ff2ea7317af1673bdb8ad33ab 100644 --- a/app/views/admin/communication/websites/show/_posts.html.erb +++ b/app/views/admin/communication/websites/show/_posts.html.erb @@ -1,11 +1,11 @@ <% action = '' -action += link_to t('communication.website.posts.new_curation'), - new_admin_communication_website_post_curation_path(website_id: @website.id), - class: button_classes if can?(:create, Communication::Website::Post) action += link_to t('create'), new_admin_communication_website_post_path(website_id: @website), - class: button_classes('ms-1') if can?(:create, Communication::Website::Post) + class: button_classes if can?(:create, Communication::Website::Post) +action += link_to t('communication.website.posts.new_curation'), + new_admin_communication_website_post_curation_path(website_id: @website.id), + class: button_classes('ms-2 btn-light') if can?(:create, Communication::Website::Post) subtitle = link_to t('communication.website.see_all', number: @all_posts.size), admin_communication_website_posts_path(website_id: @website) %> <%= osuny_panel t('communication.website.last_posts'),