ICONS = {
'Warning' => 'warning-sign',
}
return oops_request.responses.global if oops_request
false
end
end
end
"icon-#{icon}"
end
responses = response_scope.select('element_type, count(*) AS count').group(:element_type).order(:element_type)
out = ''
# support unknown element_types
if count == 0
out << content_tag(:i, '', class: 'empty')
else
icon = ICONS[type] || 'question-sign'
out << content_tag(:i, '', class: oops_icon(type))
end
end
out.html_safe
end
def oops_request
current_version.try(:request)
end
def show_oops?
@ontology.oops_supported? && !current_version.try(:request)
end
end