diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-27 13:01:09 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-03 19:03:49 +0300 |
commit | 85582b0537c50304f30b71a0de61954b1f6c508a (patch) | |
tree | 448aa3b98d881b65ff828c130215231d37eb1a94 /app/helpers | |
parent | 57aa5d631466e5e2431e54fa450c61b4f1a3ee90 (diff) |
Moved changed files into a dropdown
This makes navigating through diff files quickly. Currently we just
toggle a list, which could be pretty big. This moves it into a dropdown
to make it much easier.
Also includes a filter bar to quickly search for certain
files/extensions.
Closes #29778
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) |