Sha256: 08d0dd9b1bdc397b7ed3b0442a74a3902ec342b0c6973989d2b4f5fda09af2ec

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

- hidden = "display:none"

.row.controls
  .col-md-9
    = link_to t('the_comments.edit'), "#", class: "edit btn btn-success"
    = link_to t('the_comments.cancel'), "#", class: "btn btn-warning edit", style: "display:none"

    - to_hide = comment.published? ? hidden : nil
    - opts    = { remote: true, style: to_hide, method: :post }
    = link_to [:to_published, comment], opts.merge(class: "btn btn-primary to_published") do
      = t('the_comments.to_published')
    
    - to_hide = comment.draft? ? hidden : nil
    - opts    = { remote: true, style: to_hide, method: :post }
    = link_to [:to_draft, comment], opts.merge(class: "btn btn-warning to_draft") do
      = t('the_comments.to_draft')

    - to_hide = comment.deleted? ? hidden : nil
    - opts    = { remote: true, style: to_hide, method: :delete, data: { confirm: t('the_comments.delete_confirm') } }
    = link_to [:to_deleted, comment], opts.merge(class: "btn btn-danger to_deleted") do
      = t('the_comments.to_deleted')

    - opts = { remote: true, method: :post}
    = link_to [:to_spam, comment], opts.merge(class: "btn btn-danger to_spam") do
      = t('the_comments.to_spam')
  .col-md-3.text-right
    = link_to t('the_comments.additional_info'), "#", class: "additional_info btn btn-info"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
the_comments-2.2.2 app/views/the_comments/slim/_manage_controls.html.slim
the_comments-2.2.1 app/views/the_comments/slim/_manage_controls.html.slim
the_comments-2.2.0 app/views/the_comments/slim/_manage_controls.html.slim