diff options
author | Robert Speicher <robert@gitlab.com> | 2016-03-15 16:23:15 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-03-15 16:23:15 +0000 |
commit | 09494ff413b342884f8df9d8385a71b6ec820688 (patch) | |
tree | a9fd85eec28552d90de67e680c1ef4855441fd90 /app/helpers | |
parent | b5a47c0a38691322be4fd90b0eed12e669436295 (diff) | |
parent | dc3c9f5a7f50858269901439605e518d2d1c2e04 (diff) | |
download | gitlab-ce-09494ff413b342884f8df9d8385a71b6ec820688.tar.gz |
Merge branch 'todos-title-attr' into 'master'
Set link title for todos. Closes #14042
See merge request !3161
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/events_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/todos_helper.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index e5fcaab9551..37a888d9c60 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -3,7 +3,7 @@ module EventsHelper author = event.author if author - link_to author.name, user_path(author.username) + link_to author.name, user_path(author.username), title: h(author.name) else event.author_name end @@ -159,7 +159,7 @@ module EventsHelper link_to( namespace_project_commit_path(event.project.namespace, event.project, event.note_commit_id, - anchor: dom_id(event.target)), + anchor: dom_id(event.target), title: h(event.target_title)), class: "commit_short_id" ) do "#{event.note_target_type} #{event.note_short_commit_id}" @@ -167,7 +167,7 @@ module EventsHelper elsif event.note_project_snippet? link_to(namespace_project_snippet_path(event.project.namespace, event.project, - event.note_target)) do + event.note_target), title: h(event.project.name)) do "#{event.note_target_type} #{truncate event.note_target.to_reference}" end else diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index c8061fcdc59..b5acb80b720 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -8,7 +8,7 @@ module ProjectsHelper end def link_to_project(project) - link_to [project.namespace.becomes(Namespace), project] do + link_to [project.namespace.becomes(Namespace), project], title: h(project.name) do title = content_tag(:span, project.name, class: 'project-name') if project.namespace diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 4b745a5b969..07ddc691d85 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -16,7 +16,7 @@ module TodosHelper def todo_target_link(todo) target = todo.target_type.titleize.downcase - link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo) + link_to "#{target} #{todo.target.to_reference}", todo_target_path(todo), { title: h(todo.target.title) } end def todo_target_path(todo) |