diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-04 10:52:36 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-04 10:52:36 +0300 |
commit | fe5086c28f4ff979184c3dc9945a599ce7ecf8b2 (patch) | |
tree | 22bddb571f66c1b0ccd83b94b1751cca9a693cc4 /app/helpers | |
parent | 0ef8fd0d91b07b26cb291b488d66c54c3d6478da (diff) | |
parent | ae96e6a3a6944d743eea2eb6334d6f48d6f12320 (diff) |
Merge branch 'diff-changed-files-dropdown' into 'master'
Moved changed files into a dropdown
Closes #29778
See merge request !13128
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/diff_helper.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb index 91ddd73fac1..087f7f88fb5 100644 --- a/app/helpers/diff_helper.rb +++ b/app/helpers/diff_helper.rb @@ -148,6 +148,24 @@ module DiffHelper options end + def diff_file_changed_icon(diff_file) + if diff_file.deleted_file? || diff_file.renamed_file? + "minus" + elsif diff_file.new_file? + "plus" + else + "adjust" + end + end + + def diff_file_changed_icon_color(diff_file) + if diff_file.deleted_file? + "cred" + elsif diff_file.new_file? + "cgreen" + end + end + private def diff_btn(title, name, selected) |