Sha256: f1c361a8764cc9ad7c15605de3494baa25836871c50195fc83ecb44282c78385

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 KB

Contents

.redditor__handle

.redditor__control
  - if content_block.new_record?
    = link_to "", 
      "javascript:void(0);", 
      class: "redditor__delete",
      onclick: "if (confirm('#{t "redditor.remove?"}')) $(this).closest('dd').remove();"
    
    = link_to "", 
      [redditor, :admin, p.object, content_block], 
      class: "redditor__update",
      data: {:disable_with => t("redditor.saving")}

  - else
    - if content_block.class == Redditor::SliderBlock
      = link_to "",
        [redditor, :change_view, :admin, p.object, content_block],
        class: 'redditor__change',
        title: t("redditor.change_view")

    = link_to "", 
      [redditor, :admin, p.object, content_block], 
      class: "redditor__delete",
      :method => :delete, 
      remote: true, 
      data: {confirm: "Вы, действительно, хотите удалить контент-блок?", disable_with: t("redditor.deleting")}
    
    = link_to "", 
      [redditor, :admin, p.object, content_block], 
      class: "redditor__update", 
      data: {disable_with: t("redditor.saving")}


= p.fields_for real_name(content_block).pluralize.to_sym, content_block, :include_id => false do |f|
  = redditor_form f do
    = f.hidden_field :position, class: 'redditor__position'
    = render "redditor/admin/#{real_name(content_block)}", {f: f}
    - unless content_block.new_record?
      = f.hidden_field :id
    = f.hidden_field :object_id, value: f.object.object_id || f.index

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
redditor-0.1.22 app/views/redditor/admin/_content_block.haml
redditor-0.1.20 app/views/redditor/admin/_content_block.haml
redditor-0.1.17 app/views/redditor/admin/_content_block.haml
redditor-0.1.16 app/views/redditor/admin/_content_block.haml
redditor-0.1.15 app/views/redditor/admin/_content_block.haml
redditor-0.1.14 app/views/redditor/admin/_content_block.haml
redditor-0.1.12 app/views/redditor/admin/_content_block.haml