link_helper.rb revision 72a8946d9abef0ca7875ccfb891e3c9d7a60f1d6
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_oid_path id: repository, oid: oid, action: :files, path: path
end
end
end