BigW Consortium Gitlab

Commit 2010ae11 by Dmitriy Zaporozhets

Merge branch 'merge-request-commits-view' into 'master'

Merge request commits view Changes the commits view of a merge request to use the same layout as used in the project commits view. As noticed from #923. This also changes the commits icon on the tab to be fa-history, the same as used in the sidebar Screenshots [Before](https://gitlab.com/uploads/stephanvl/gitlab-ce/8785737424/Screenshot_from_2014-12-29_20_39_25.png) - [After](https://gitlab.com/uploads/stephanvl/gitlab-ce/a3bf2a790f/Screenshot_from_2014-12-29_20_40_23.png) See merge request !271
parents 0991d19c b97b8549
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
%span.badge= @merge_request.mr_and_commit_notes.count %span.badge= @merge_request.mr_and_commit_notes.count
%li.commits-tab{data: {action: 'commits'}} %li.commits-tab{data: {action: 'commits'}}
= link_to project_merge_request_path(@project, @merge_request), title: 'Commits' do = link_to project_merge_request_path(@project, @merge_request), title: 'Commits' do
%i.fa.fa-database %i.fa.fa-history
Commits Commits
%span.badge= @commits.size %span.badge= @commits.size
%li.diffs-tab{data: {action: 'diffs'}} %li.diffs-tab{data: {action: 'diffs'}}
......
- if @commits.present? = render "projects/commits/commits"
.panel.panel-default \ No newline at end of file
.panel-heading
%i.fa.fa-list
Commits (#{@commits.count})
.commits.mr-commits
- if @commits.count > 8
%ul.first-commits.well-list
- @commits.first(8).each do |commit|
= render "projects/commits/commit", commit: commit, project: @merge_request.source_project
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
%a.show-all-commits Click here to show all
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.all-commits.hide.well-list
- @commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE).each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project
%li
other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
- else
%ul.all-commits.hide.well-list
- @commits.each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project
- else
%ul.well-list
- @commits.each do |commit|
= render "projects/commits/commit", commit: commit, project: @merge_request.source_project
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment