link_helper.rb revision 4a8fdfd396cd98229b3b669db3fffa3e46bdb6b9
if block_given?
else
end
else
if block_given?
else
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
def fancy_repository_files_path(repository, path=nil, oid=nil)
if oid.nil? || repository.is_head?(oid)
repository_files_path id: repository, path: path
else
repository_files_by_oid id: repository, oid: oid, path: path
end
end
end