Sha256: dc5c1661cd03b17837545fe074201007f24c1263b38c2385bdb5c9e12ab564c3
Contents?: true
Size: 1.41 KB
Versions: 6
Compression:
Stored size: 1.41 KB
Contents
.handle - if content_block.new_record? .control-data = link_to "✘", "javascript:void(0);", onclick: "if (confirm('#{t "redditor.remove?"}')) $(this).closest('dd').remove();", class: "delete-data" = link_to "✔", [redditor, :admin, p.object, content_block], method: "post", class: "update-data", remote: true, data: {:disable_with => "✔ #{t "redditor.saving"}"} - else .control-data = link_to "✘", [redditor, :admin, p.object, content_block], :method => :delete, remote: true, data: {confirm: "Вы, действительно, хотите удалить контент-блок?", disable_with: "✘ #{t "redditor.deleting"}"}, class: "delete-data" = link_to "✔", [redditor, :admin, p.object, content_block], method: "put", class: "update-data", remote: true, data: {disable_with: "✔ #{t "redditor.saving"}"} = p.fields_for content_block.class.name.underscore.sub('redditor/', '').pluralize.to_sym, content_block do |f| %div.form-name{data: {"object-name" => f.object.temp_id.present? ? f.object_name.sub!(/\[\d*\]/, "[#{f.object.temp_id}]") : f.object_name}, id: "#{content_block.class.name.underscore.sub(/\Aredditor\//, '')}_#{content_block.id.nil? ? f.object.temp_id : content_block.id}"} = f.text_field :position, class: 'js-position', hidden: true = render :partial => "redditor/admin/pages/#{content_block.class.name.underscore.sub('redditor/', '')}", locals: {f: f} = f.hidden_field :temp_id
Version data entries
6 entries across 6 versions & 1 rubygems