">
<%= f.the_sku %> |
<% if !f.trash? && (can? :update, f) %>
<%= link_to f.the_title, {action: :edit, id: f.id }, class: "" %>
<% else %>
<%= f.the_title %>
<% end %>
<%= "*" + " (is #{@post_type.the_title} #{f.parent.decorate.the_title})" if f.draft? && f.parent.present? %>
|
<%= link_to raw(f.the_status), {action: :index, s: f.status } %> |
<%= f.the_price %> |
<%= f.the_weight %> |
<%= raw f.the_stock_status %> |
<%= f.the_qty %> |
<%= f.author.fullname %> |
<% if @post_type.manage_categories? %>
<%= raw post_type_list_taxonomy(f.categories, "success") %> |
<% end %>
<% if @post_type.manage_tags? %>
<%= raw post_type_list_taxonomy(f.post_tags, "default") %> |
<% end %>
<% extra_column = {post: f, post_type: @post_type, content: "", from_body: true}; hooks_run("list_post_extra_columns", extra_column) %>
<%= raw extra_column[:content] %>
<% if f.published? %>
<% if f.slug.to_s.translations.present? %>
<% else %>
<% end %>
<% end %>
<% if f.trash? %>
<%= link_to raw(''), {action: :restore, post_id: f.id, s: params[:s] }, class: "btn btn-success btn-xs", title: "#{t('camaleon_cms.admin.button.restore')}" if can? :update, f %>
<%= link_to raw(''), { action: :destroy, id: f.id, s: params[:s] },
method: :delete, data: { confirm: t('camaleon_cms.admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('camaleon_cms.admin.button.delete')}" if can? :destroy, f %>
<% elsif f.draft? %>
<%= link_to raw(''), {action: :edit, id: f.id, recover_draft: 'true' }, class: "btn btn-success btn-xs", title: "#{t('camaleon_cms.admin.button.recover')}" if can? :update, f %>
<%= link_to raw(''), {action: :edit, id: f.id }, class: "btn btn-default btn-xs", title: "#{t('camaleon_cms.admin.button.edit')}" if can? :update, f %>
<%= link_to raw(''), { action: :trash, post_id: f.id, s: params[:s] },
data: { confirm: t('camaleon_cms.admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('camaleon_cms.admin.button.delete')}" if can? :destroy, f %>
<% else %>
<%= link_to raw(''), {action: :edit, id: f.id }, class: "btn btn-default btn-xs", title: "#{t('camaleon_cms.admin.button.edit')}" if can? :update, f %>
<%= link_to raw(''), { action: :trash, post_id: f.id, s: params[:s] },
data: { confirm: t('camaleon_cms.admin.message.delete') }, class: "btn btn-danger btn-xs", title: "#{t('camaleon_cms.admin.button.delete')}" if can? :destroy, f %>
<% end %>
|
<% end %>