Sha256: ce842fefdeb23a084a57eac172e0a05fbf5c546030584fcac7b5e802cedf85d6

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

- link_path = controller.url_for(action: :toggle_published, id: resource.to_param)
- if resource.published?
  = button_to(link_path, class: 'btn btn-sm btn-xs btn-danger btn-responsive', method: :post) do
    %i.fas.fa-eye-slash
    %span.glyphicon.glyphicon-eye-close
    %span.btn-text= t('.unpublish', default: t('acts_as_published.actions.unpublish'))
- else
  = button_to(link_path, class: 'btn btn-sm btn-xs btn-success btn-responsive', method: :post) do
    %i.fas.fa-eye
    %span.glyphicon.glyphicon-eye-open
    %span.btn-text= t('.publish', default: t('acts_as_published.actions.publish'))

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rao-component-0.0.12.pre app/views/rao/component/table/body_cells/_acts_as_published.html.haml
rao-component-0.0.11.pre app/views/rao/component/table/body_cells/_acts_as_published.html.haml