@@ -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(text, {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev}, |
|
109 | link_to(h(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 | |||
@@ -422,7 +422,7 module ApplicationHelper | |||||
422 | def html_title(*args) |
|
422 | def html_title(*args) | |
423 | if args.empty? |
|
423 | if args.empty? | |
424 | title = [] |
|
424 | title = [] | |
425 | title << @project.name if @project |
|
425 | title << h(@project.name) if @project | |
426 | title += @html_title if @html_title |
|
426 | title += @html_title if @html_title | |
427 | title << Setting.app_title |
|
427 | title << Setting.app_title | |
428 | title.select {|t| !t.blank? }.join(' - ') |
|
428 | title.select {|t| !t.blank? }.join(' - ') | |
@@ -573,7 +573,7 module ApplicationHelper | |||||
573 | wiki_page_id = page.present? ? Wiki.titleize(page) : nil |
|
573 | wiki_page_id = page.present? ? Wiki.titleize(page) : nil | |
574 | url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor) |
|
574 | url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor) | |
575 | end |
|
575 | end | |
576 | link_to((title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) |
|
576 | link_to(h(title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) | |
577 | else |
|
577 | else | |
578 | # project or wiki doesn't exist |
|
578 | # project or wiki doesn't exist | |
579 | all |
|
579 | all | |
@@ -627,7 +627,7 module ApplicationHelper | |||||
627 | if prefix.nil? && sep == 'r' |
|
627 | if prefix.nil? && sep == 'r' | |
628 | # project.changesets.visible raises an SQL error because of a double join on repositories |
|
628 | # project.changesets.visible raises an SQL error because of a double join on repositories | |
629 | if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier)) |
|
629 | if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier)) | |
630 | link = link_to("#{project_prefix}r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, |
|
630 | link = link_to(h("#{project_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision}, | |
631 | :class => 'changeset', |
|
631 | :class => 'changeset', | |
632 | :title => truncate_single_line(changeset.comments, :length => 100)) |
|
632 | :title => truncate_single_line(changeset.comments, :length => 100)) | |
633 | end |
|
633 | end | |
@@ -677,7 +677,7 module ApplicationHelper | |||||
677 | if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"])) |
|
677 | if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"])) | |
678 | link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier}, |
|
678 | link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier}, | |
679 | :class => 'changeset', |
|
679 | :class => 'changeset', | |
680 | :title => truncate_single_line(changeset.comments, :length => 100) |
|
680 | :title => truncate_single_line(h(changeset.comments), :length => 100) | |
681 | end |
|
681 | end | |
682 | when 'source', 'export' |
|
682 | when 'source', 'export' | |
683 | if project && project.repository && User.current.allowed_to?(:browse_repository, project) |
|
683 | if project && project.repository && User.current.allowed_to?(:browse_repository, project) | |
@@ -843,7 +843,7 module ApplicationHelper | |||||
843 | options[:class] << ' disabled' |
|
843 | options[:class] << ' disabled' | |
844 | url = '#' |
|
844 | url = '#' | |
845 | end |
|
845 | end | |
846 | link_to name, url, options |
|
846 | link_to h(name), url, options | |
847 | end |
|
847 | end | |
848 |
|
848 | |||
849 | def calendar_for(field_id) |
|
849 | def calendar_for(field_id) |
General Comments 0
You need to be logged in to leave comments.
Login now