lib/sugar/actionview.rb in sugar-0.0.29 vs lib/sugar/actionview.rb in sugar-0.0.31

- old
+ new

@@ -94,13 +94,14 @@ "<form method=\"#{form_method}\" action=\"#{escape_once url}\" class=\"button-to action\"><div class=\"b_input b_input-imagebutton\">" + method_tag + tag("input", html_options) + request_token_tag + "</div></form>" end def link_to_edit(something) + text = t('.edit', :default => [:'krasivotokak.sugar.edit', 'Edit']) link_to(image_tag('icons/edit.png', - :alt => t('.edit'), - :title => t('.edit')), + :alt => text, + :title => text), edit_polymorphic_path(something), :class => 'ajax edit action') end def button_to_delete(something, title = nil) @@ -170,9 +171,14 @@ end def translatable(text, key = nil) key ||= ".#{text.gsub(/[\s\.,-]+/, '_').downcase}" translate(key, :default => text) + end + + def body_class + controller_name = controller.controller_name + {:class => "m_#{controller_name} m_#{controller_name}-#{controller.action_name}"} end end end