[refs #579] small activity refactoring

This commit is contained in:
Alexander Machehin 2012-10-15 22:37:31 +06:00
parent fb1288e382
commit ef37180825
2 changed files with 10 additions and 14 deletions

View File

@ -10,6 +10,6 @@
-elsif item.is_a? Array -elsif item.is_a? Array
=render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present? =render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present?
-commits_queue.clear -commits_queue.clear
=render 'projects/pull_requests/discussion_comments', :item => item, :project => @project, :commentable => @issue, :add_id => nil =render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil
=render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present? =render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present?

View File

@ -1,14 +1,10 @@
-if item[0].blank? -comment = item[1].first
-item[1].each do |comment| .file
= render 'projects/comments/comment', :comment => comment, :data => {:project => @project, :commentable => @issue} .top
-else .l=comment.data[:view_path]
-comment = item[1].first .r=link_to t("layout.pull_requests.view_full_changes"),
.file "#{project_commentable_path(@project, @commentable)}##{comment_anchor(comment)}",
.top :class => 'link_to_full_changes'
.l=comment.data[:view_path] .clear
.r=link_to t("layout.pull_requests.view_full_changes"), .diff_data=render_diff(comment.inline_diff(@repo), 0, item[1], comment.data[:path])
"#{project_commentable_path(@project, @commentable)}##{comment_anchor(comment)}",
:class => 'link_to_full_changes'
.clear
.diff_data=render_diff(comment.inline_diff(@repo), 0, item[1], comment.data[:path])