Fix orbit backend helper get_quick_link issue

This commit is contained in:
Spen 2014-02-07 14:00:45 +08:00 committed by Manson Wang
parent bf8c62a863
commit f53d0e9c7f
1 changed files with 11 additions and 1 deletions

View File

@ -320,10 +320,20 @@ module OrbitBackendHelper
if show_reject_reason(object) if show_reject_reason(object)
content_tag :li, link_to(t(quick[:translation] || :rejected_reason) + ' ' + truncate(object.not_checked_reason, :length => 10), '#', rel: "tooltip", 'data-original-title' => (wrap_string_with(object.not_checked_reason, :line_width => 24)), class: "reject_info #{quick[:class]}") content_tag :li, link_to(t(quick[:translation] || :rejected_reason) + ' ' + truncate(object.not_checked_reason, :length => 10), '#', rel: "tooltip", 'data-original-title' => (wrap_string_with(object.not_checked_reason, :line_width => 24)), class: "reject_info #{quick[:class]}")
end end
else
if quick[:define_link]
if quick[:condition_option]
if eval("#{quick[:condition_option]}")
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:define_link]}"), class: quick[:class])
end
else
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:define_link]}"), class: quick[:class])
end
else else
content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:link]}('#{object.id}')"), class: quick[:class]) content_tag :li, link_to(t(quick[:translation]), eval("#{quick[:link]}('#{object.id}')"), class: quick[:class])
end end
end end
end
def get_sorted_objects(objects, field) def get_sorted_objects(objects, field)
if field if field