Put back deleted code in items helper

This commit is contained in:
chris 2013-04-25 19:37:00 +08:00
parent 3714403f85
commit 3e0822336e
3 changed files with 14 additions and 5 deletions

View File

@ -41,4 +41,13 @@ module Admin::ItemsHelper
end
end
def get_item_module_infos(item)
if module_app = item.module_app
app = OrbitApp::Module::Registration.find_by_key(module_app.key)
[t(app.get_label_i18n), (app.get_icon_class rescue 'icons-daniel-bruce-2')]
else
[t(:no_app), 'icons-daniel-bruce-2']
end
end
end

View File

@ -1,5 +1,10 @@
module Admin::TagsHelper
def get_module_app_icon(module_app)
app = OrbitApp::Module::Registration.find_by_key(module_app.key)
app.get_icon_class rescue 'icons-daniel-bruce-2'
end
def show_names_slash(tag)
span_names = @site_valid_locales.inject([]) do |names, locale|
names << content_tag(:span, tag.name_translations[locale], class: "tag")

View File

@ -272,9 +272,4 @@ module ApplicationHelper
"http://#{request.host}:2#{site_number}00"
end
def get_module_app_icon(module_app)
app = OrbitApp::Module::Registration.find_by_key(module_app.key)
app.get_icon_class rescue 'icons-daniel-bruce-2'
end
end