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

button

parent 9fe3415b
No related branches found
No related tags found
No related merge requests found
......@@ -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 %>
......
<%
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'),
......
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