engine/app/helpers/admin/base_helper.rb

15 lines
411 B
Ruby
Raw Normal View History

2010-04-24 00:32:36 +00:00
module Admin::BaseHelper
2010-04-25 00:33:38 +00:00
2010-04-24 00:32:36 +00:00
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
2010-04-25 00:33:38 +00:00
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
2010-04-24 00:32:36 +00:00
end