Sha256: 64bfad69c45a0287bf3cf4b2bbafb529d796bf23f2ba0fa205589d56c7b5796d

Contents?: true

Size: 869 Bytes

Versions: 22

Compression:

Stored size: 869 Bytes

Contents

- class_name = ""
- if botao[:campo].present?
  - class_name = presenter.classes_css(botao[:campo], item)
- if botao[:remote].present? and botao[:remote]
  - id_name = "#{item.class.name}_#{item.id}"
  - link = send("#{botao[:link]}_path", item)
  - if !botao[:success].present?
    - botao[:success] = "\'\'"
  - if !botao[:error].present?
    - botao[:error] = "\'\'"
  %a{href:"#", :class => "editar #{class_name}", onclick: "Carnival.remoteFunction('#{link}', #{botao[:success]}, #{botao[:error]}, '#{botao[:method]}')", :id => id_name, :data => {'carnival-show-overlay': true}}
    = botao[:nome]

- else
  - link = send("#{botao[:link]}_path", item)
  - if botao[:link] == "historico"
    - class_name = "popup"
    - link = send("#{botao[:link]}_path", "#{item.class.to_s.downcase}_#{item.id}")

  = link_to botao[:nome], link, :class => "editar #{class_name}"

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
carnival-0.3.2 app/views/carnival/shared/_extra_item.html.haml
carnival-0.3.1 app/views/carnival/shared/_extra_item.html.haml
carnival-0.3.0 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.8 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.7 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.6 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.5 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.4 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.3 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.10 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.2 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.1 app/views/carnival/shared/_extra_item.html.haml
carnival-0.2.0 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.9 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.8 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.7 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.6 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.5 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.3 app/views/carnival/shared/_extra_item.html.haml
carnival-0.1.2 app/views/carnival/shared/_extra_item.html.haml