rosa-build/app/views/projects/pull_requests/_activity.html.haml

24 lines
1.1 KiB
Plaintext

.hr
-commits_queue = []
-merge_activity(@comments, @commits).each do |item| #
-if item.is_a? Comment
=render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present?
-commits_queue.clear
=render 'projects/comments/comment', :comment => item, :data => {:project => @project, :commentable => @commentable}
-elsif item.is_a? Grit::Commit
-commits_queue << item
-elsif item.is_a? Array
=render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present?
-commits_queue.clear
-unless item[1].first.data[:actual]
-exp_id = "expand-comment#{item[1].first.id}"
.activity
=t '.show_outdated_diff'
%span.data-expander.collapsed{:id => exp_id} &nbsp;
.hidden{:id => "content-#{exp_id}"}
=render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil
-else
=render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil
=render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present?