##// END OF EJS Templates
backed out r6350 (#9252, #4796)...
Toshi MARUYAMA -
r7126:504cc4af1199
parent child
Show More
@@ -106,7 +106,7 module ApplicationHelper
106 text = options.delete(:text) || format_revision(revision)
106 text = options.delete(:text) || format_revision(revision)
107 rev = revision.respond_to?(:identifier) ? revision.identifier : revision
107 rev = revision.respond_to?(:identifier) ? revision.identifier : revision
108
108
109 link_to(h(text), {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
109 link_to(text, {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
110 :title => l(:label_revision_id, format_revision(revision)))
110 :title => l(:label_revision_id, format_revision(revision)))
111 end
111 end
112
112
@@ -428,7 +428,7 module ApplicationHelper
428 def html_title(*args)
428 def html_title(*args)
429 if args.empty?
429 if args.empty?
430 title = []
430 title = []
431 title << h(@project.name) if @project
431 title << @project.name if @project
432 title += @html_title if @html_title
432 title += @html_title if @html_title
433 title << Setting.app_title
433 title << Setting.app_title
434 title.select {|t| !t.blank? }.join(' - ')
434 title.select {|t| !t.blank? }.join(' - ')
@@ -579,7 +579,7 module ApplicationHelper
579 wiki_page_id = page.present? ? Wiki.titleize(page) : nil
579 wiki_page_id = page.present? ? Wiki.titleize(page) : nil
580 url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor)
580 url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor)
581 end
581 end
582 link_to(h(title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
582 link_to((title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
583 else
583 else
584 # project or wiki doesn't exist
584 # project or wiki doesn't exist
585 all.html_safe
585 all.html_safe
@@ -633,7 +633,7 module ApplicationHelper
633 if prefix.nil? && sep == 'r'
633 if prefix.nil? && sep == 'r'
634 # project.changesets.visible raises an SQL error because of a double join on repositories
634 # project.changesets.visible raises an SQL error because of a double join on repositories
635 if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier))
635 if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier))
636 link = link_to(h("#{project_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
636 link = link_to("#{project_prefix}r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
637 :class => 'changeset',
637 :class => 'changeset',
638 :title => truncate_single_line(changeset.comments, :length => 100))
638 :title => truncate_single_line(changeset.comments, :length => 100))
639 end
639 end
@@ -683,7 +683,7 module ApplicationHelper
683 if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"]))
683 if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"]))
684 link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier},
684 link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier},
685 :class => 'changeset',
685 :class => 'changeset',
686 :title => truncate_single_line(h(changeset.comments), :length => 100)
686 :title => truncate_single_line(changeset.comments, :length => 100)
687 end
687 end
688 when 'source', 'export'
688 when 'source', 'export'
689 if project && project.repository && User.current.allowed_to?(:browse_repository, project)
689 if project && project.repository && User.current.allowed_to?(:browse_repository, project)
@@ -849,7 +849,7 module ApplicationHelper
849 options[:class] << ' disabled'
849 options[:class] << ' disabled'
850 url = '#'
850 url = '#'
851 end
851 end
852 link_to h(name), url, options
852 link_to name, url, options
853 end
853 end
854
854
855 def calendar_for(field_id)
855 def calendar_for(field_id)
General Comments 0
You need to be logged in to leave comments. Login now