% if result.blank? and @result.present? then result = @result end %> <% asset = result.asset %> <% is_image = result.asset.is_image? %> <% comments = result.comments %> <% timestamp = asset.created_at %> <% name = result.name %> <% icon_class = is_image ? "glyphicon-picture" : "glyphicon-file" %>