gitlabhq/app/views/merge_requests/_commits.html.haml
Robb Kidd 5b1ede6280 Handle MR "show all commits" link with a doc-ready event handler.
Replaces link_to_function use which was deprecated in Rails v3.2.4.
https://github.com/rails/rails/commit/9dc57fe9c

Still absent is a graceful degrade for no-JS.
2012-06-18 18:36:25 -04:00

29 lines
827 B
Plaintext

- if @commits.present?
.ui-box
%h5 Commits (#{@commits.count})
.merge-request-commits
- if @commits.count > 8
%ul.first_mr_commits.unstyled
- @commits.first(8).each do |commit|
= render "commits/commit", :commit => commit
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
%a.show_all Click here to show all
%ul.all_mr_commits.hide.unstyled
- @commits.each do |commit|
= render "commits/commit", :commit => commit
- else
%ul.unstyled
- @commits.each do |commit|
= render "commits/commit", :commit => commit
- else
%h5
Nothing to merge from
%span.label #{@merge_request.source_branch}
to
%span.label #{@merge_request.target_branch}
%br