mailr/app/views/common/_button.html.haml

20 lines
333 B
Plaintext
Executable File

- size ||= "btn-small"
- type ||= "btn-primary"
- icon ||= ""
- onclick ||= 'empty'
- def isOnclick(value)
- if value != 'empty'
- {:onclick => "#{value}"}
- else
- {}
%button{isOnclick(onclick),:class=>"btn #{size} #{type}",
:type=>"submit",
:name=>"#{name}"}
- if !icon.empty?
%i{:class=>"#{icon}"}
= caption