summaryrefslogtreecommitdiff
path: root/app/helpers/diff_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-25 14:32:49 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-25 14:32:49 +0200
commit5140a4cd139e43a3c7a1d23fdd61bfc0d9aff6a6 (patch)
treedab02a483aca595717f294001d133963a0806310 /app/helpers/diff_helper.rb
parentfe104386b16a73cbac1588aa5cce8319c6355ee9 (diff)
downloadgitlab-ce-5140a4cd139e43a3c7a1d23fdd61bfc0d9aff6a6.tar.gz
Set of UI changes mostly for issue and merge request
* return edit/close buttons to old position (right of title) * make 'Issue #1' header smaller * move mr commits to separate tab * change inline/side diff switcher to buttons from tabs * make issue sidebar start with dicsussion block Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r--app/helpers/diff_helper.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index cb50d89cba8..a15af0be01a 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -117,4 +117,22 @@ module DiffHelper
[comments_left, comments_right]
end
+
+ def inline_diff_btn
+ params_copy = params.dup
+ params_copy[:view] = 'inline'
+
+ link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] != 'parallel' ? 'btn active' : 'btn') do
+ 'Inline'
+ end
+ end
+
+ def parallel_diff_btn
+ params_copy = params.dup
+ params_copy[:view] = 'parallel'
+
+ link_to url_for(params_copy), id: "commit-diff-viewtype", class: (params[:view] == 'parallel' ? 'btn active' : 'btn') do
+ 'Side-by-side'
+ end
+ end
end