engine/app/helpers/admin/base_helper.rb
2010-04-25 02:33:38 +02:00

15 lines
411 B
Ruby

module Admin::BaseHelper
def admin_menu_item(name, url)
label = content_tag(:em) + escape_once(' ') + t("admin.shared.menu.#{name}")
content_tag(:li, link_to(label, url), :class => name.dasherize)
end
def admin_button_tag(text, url, options = {})
text = text.is_a?(Symbol) ? t(".#{text}") : text
link_to(url, options) do
content_tag(:span, text)
end
end
end