Commit 5ef3b384291252e4d2394186ec27685b9376eabe
1 parent
3b7998e1
Exists in
master
and in
4 other branches
MR commits suppressed if too many. few icons
Showing
4 changed files
with
29 additions
and
5 deletions
Show diff stats
app/assets/javascripts/merge_requests.js
app/views/merge_requests/_commits.html.haml
1 | 1 | - unless @commits.empty? |
2 | 2 | .ui-box |
3 | - %h5 Commits | |
3 | + %h5 Commits (#{@commits.count}) | |
4 | 4 | .merge-request-commits |
5 | - %ul.unstyled | |
6 | - - @commits.each do |commit| | |
7 | - = render "commits/commit", :commit => commit | |
5 | + - if @commits.count > 8 | |
6 | + %ul.first_mr_commits.unstyled | |
7 | + - @commits.first(8).each do |commit| | |
8 | + = render "commits/commit", :commit => commit | |
9 | + %li.bottom | |
10 | + 8 of #{@commits.count} commits displayed. | |
11 | + %strong | |
12 | + = link_to_function "Click here to show all", "MergeRequest.showAllCommits()" | |
13 | + %ul.all_mr_commits.hide.unstyled | |
14 | + - @commits.each do |commit| | |
15 | + = render "commits/commit", :commit => commit | |
16 | + | |
17 | + - else | |
18 | + %ul.unstyled | |
19 | + - @commits.each do |commit| | |
20 | + = render "commits/commit", :commit => commit | |
8 | 21 | |
9 | 22 | - else |
10 | 23 | %h5 | ... | ... |
app/views/projects/_project_head.html.haml
1 | 1 | %ul.nav.nav-tabs |
2 | 2 | %li{ :class => "#{'active' if current_page?(project_path(@project)) }" } |
3 | 3 | = link_to project_path(@project), :class => "activities-tab tab" do |
4 | + %i.icon-home | |
4 | 5 | Show |
5 | 6 | %li{ :class => " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" } |
6 | 7 | = link_to team_project_path(@project), :class => "team-tab tab" do |
8 | + %i.icon-user | |
7 | 9 | Team |
8 | 10 | %li{ :class => "#{'active' if current_page?(files_project_path(@project)) }" } |
9 | 11 | = link_to files_project_path(@project), :class => "files-tab tab " do |
... | ... | @@ -23,5 +25,6 @@ |
23 | 25 | Hooks |
24 | 26 | %li.right{ :class => "#{'active' if current_page?(edit_project_path(@project)) }" } |
25 | 27 | = link_to edit_project_path(@project), :class => "stat-tab tab " do |
28 | + %i.icon-edit | |
26 | 29 | Edit |
27 | 30 | ... | ... |
app/views/projects/show.html.haml
... | ... | @@ -14,7 +14,9 @@ |
14 | 14 | .span4.right |
15 | 15 | .right |
16 | 16 | - if can? current_user, :download_code, @project |
17 | - = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded" | |
17 | + = link_to archive_project_repository_path(@project), :class => "btn small padded" do | |
18 | + %i.icon-download-alt | |
19 | + Download | |
18 | 20 | - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) |
19 | 21 | = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do |
20 | 22 | Merge Request | ... | ... |