diff options
author | skv <skv-headless@yandex.ru> | 2014-08-02 19:12:01 +0400 |
---|---|---|
committer | skv <skv-headless@yandex.ru> | 2014-08-14 15:48:14 +0400 |
commit | 4e4080016604e2c7ca9a5e75d6dd37d34b99cb09 (patch) | |
tree | 1a443fc6b7a16828c8a4b92d1724c2f72a4024f4 /app/helpers | |
parent | fdd8e4507527badd875a40a0ab8a3ed47a03c764 (diff) |
diff unfold
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/commits_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 9a8b3928bf4..f61aa259154 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -232,4 +232,16 @@ module CommitsHelper def diff_file_mode_changed?(diff) diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode end + + def unfold_bottom_class(bottom) + (bottom) ? 'js-unfold-bottom' : '' + end + + def view_file_btn(commit_sha, diff, project) + link_to project_blob_path(project, tree_join(commit_sha, diff.new_path)), + class: 'btn btn-small view-file js-view-file' do + raw('View file @') + content_tag(:span, commit_sha[0..6], + class: 'commit-short-id') + end + end end |