link_helper.rb revision 4755669b9d408e3240e1f005349399973923c095
hash = {}
else
if hash[sym]
else
end
end
end
end
return hash
end
else
end
else
end
end
return ['data-type', "Private#{resource.class.to_s}"] if resource.is_a?(Repository) && resource.is_private
data_type = 'data-ontologyclass'
distributed_type = ->(distributed_ontology) do
"distributed_homogeneous_ontology"
else
"distributed_heterogeneous_ontology"
end
end
else
"single_in_#{distributed_type[resource.parent]}"
else
'single_ontology'
end
end
end
end
end
text << content_tag(:span, counter==1 ? subject : subject.pluralize)
link_to text, url
end
def format_links(*args, &block)
options = args.extract_options!
args = %w(xml json) if args.empty?
args.flatten!
options[:url] ||= {}
links = ''
links << capture(&block) << ' ' if block_given?
links << args.collect{ |f|
content_tag :li, link_to(f.to_s.upcase, params.merge(options[:url]).merge(:format => f), :title => "Get this page as #{f.upcase}")
}.join("")
content_tag('ul', links.html_safe, :class => 'formats')
end
end