Commit f63cd42bab1afe48c795cf28e4d73ecfe156b6c0
1 parent
5baac669
Exists in
master
and in
4 other branches
Better control placement on project page
Showing
2 changed files
with
31 additions
and
34 deletions
Show diff stats
app/views/projects/_clone_panel.html.haml
| @@ -17,9 +17,28 @@ | @@ -17,9 +17,28 @@ | ||
| 17 | - if can? current_user, :download_code, @project | 17 | - if can? current_user, :download_code, @project |
| 18 | = link_to archive_project_repository_path(@project), class: "btn grouped" do | 18 | = link_to archive_project_repository_path(@project), class: "btn grouped" do |
| 19 | %i.icon-download-alt | 19 | %i.icon-download-alt |
| 20 | - Download | ||
| 21 | - | ||
| 22 | - = link_to tags_project_repository_path(@project), class: "btn grouped only-wide", title: 'Git Tags' do | ||
| 23 | - %i.icon-tags | ||
| 24 | - Tags | 20 | + %span.only-wide Download |
| 25 | 21 | ||
| 22 | + .dropdown.pull-right | ||
| 23 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
| 24 | + %i.icon-plus-sign-alt | ||
| 25 | + %span.only-wide New | ||
| 26 | + %b.caret | ||
| 27 | + %ul.dropdown-menu | ||
| 28 | + - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
| 29 | + %li | ||
| 30 | + = link_to url_for_new_issue, title: "New Issue" do | ||
| 31 | + Issue | ||
| 32 | + - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
| 33 | + %li | ||
| 34 | + = link_to new_project_merge_request_path(@project), title: "New Merge Request" do | ||
| 35 | + Merge Request | ||
| 36 | + - if @project.snippets_enabled && can?(current_user, :write_snippet, @project) | ||
| 37 | + %li | ||
| 38 | + = link_to new_project_snippet_path(@project), title: "New Snippet" do | ||
| 39 | + Snippet | ||
| 40 | + - if can?(current_user, :admin_team_member, @project) | ||
| 41 | + %li.divider | ||
| 42 | + %li | ||
| 43 | + = link_to new_project_team_member_path(@project), title: "New Team member" do | ||
| 44 | + Team member |
app/views/projects/show.html.haml
| @@ -7,29 +7,6 @@ | @@ -7,29 +7,6 @@ | ||
| 7 | .loading.hide | 7 | .loading.hide |
| 8 | .span3 | 8 | .span3 |
| 9 | .light-well | 9 | .light-well |
| 10 | - .dropdown.pull-right | ||
| 11 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
| 12 | - %i.icon-plus-sign-alt | ||
| 13 | - %b.caret | ||
| 14 | - %ul.dropdown-menu | ||
| 15 | - - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
| 16 | - %li | ||
| 17 | - = link_to url_for_new_issue, title: "New Issue" do | ||
| 18 | - Issue | ||
| 19 | - - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
| 20 | - %li | ||
| 21 | - = link_to new_project_merge_request_path(@project), title: "New Merge Request" do | ||
| 22 | - Merge Request | ||
| 23 | - - if @project.snippets_enabled && can?(current_user, :write_snippet, @project) | ||
| 24 | - %li | ||
| 25 | - = link_to new_project_snippet_path(@project), title: "New Snippet" do | ||
| 26 | - Snippet | ||
| 27 | - - if can?(current_user, :admin_team_member, @project) | ||
| 28 | - %li.divider | ||
| 29 | - %li | ||
| 30 | - = link_to new_project_team_member_path(@project), title: "New Team member" do | ||
| 31 | - Team member | ||
| 32 | - | ||
| 33 | %h3.page_title | 10 | %h3.page_title |
| 34 | = @project.name | 11 | = @project.name |
| 35 | - if @project.description.present? | 12 | - if @project.description.present? |
| @@ -55,15 +32,16 @@ | @@ -55,15 +32,16 @@ | ||
| 55 | Forked from: | 32 | Forked from: |
| 56 | = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) | 33 | = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) |
| 57 | 34 | ||
| 58 | - - if @project.gitlab_ci? | ||
| 59 | - %hr | ||
| 60 | - = link_to @project.gitlab_ci_service.builds_path do | ||
| 61 | - = image_tag @project.gitlab_ci_service.status_img_path, alt: "build status" | ||
| 62 | - | ||
| 63 | %hr | 35 | %hr |
| 64 | %p | 36 | %p |
| 65 | - = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project) | 37 | + = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref) |
| 66 | %p | 38 | %p |
| 67 | = link_to pluralize(@repository.branch_names.count, 'branch'), project_repository_path(@project) | 39 | = link_to pluralize(@repository.branch_names.count, 'branch'), project_repository_path(@project) |
| 68 | %p | 40 | %p |
| 69 | = link_to pluralize(@repository.tag_names.count, 'tag'), tags_project_repository_path(@project) | 41 | = link_to pluralize(@repository.tag_names.count, 'tag'), tags_project_repository_path(@project) |
| 42 | + | ||
| 43 | + - if @project.gitlab_ci? | ||
| 44 | + %hr | ||
| 45 | + = link_to @project.gitlab_ci_service.builds_path do | ||
| 46 | + = image_tag @project.gitlab_ci_service.status_img_path, alt: "build status" | ||
| 47 | + |