Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-21 12:08:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-21 12:08:04 +0300
commit7379b60d2c1bdb0368908ecf99e270264d0eecd4 (patch)
tree3552171d6de340892e48fb6da96835081bce8bc8 /app/helpers
parent8f306a7dc503ae0fed4acebc528f2bc2030dad83 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/todos_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 41f39c7e798..15c602757a5 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -37,11 +37,12 @@ module TodosHelper
end
def todo_target_title(todo)
- if todo.target
- "\"#{todo.target.title}\""
- else
- ""
- end
+ # Design To Dos' filenames are displayed in `#todo_target_link` (see `Design#to_reference`),
+ # so to avoid displaying duplicate filenames in the To Do list for designs,
+ # we return an empty string here.
+ return "" if todo.target.blank? || todo.for_design?
+
+ "\"#{todo.target.title}\""
end
def todo_parent_path(todo)