_aside.html.haml 3.78 KB
Newer Older
1
.clearfix
2 3
  - unless @project.empty_repo?
    .well
4 5 6
      %h4.visibility-level-label
        = visibility_level_icon(@project.visibility_level)
        = "#{visibility_level_label(@project.visibility_level).capitalize} project"
7

Douwe Maan's avatar
Douwe Maan committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
      - if @repository.changelog || @repository.license || @repository.contribution_guide
        %ul.nav.nav-pills
          - if @repository.changelog
            %li.hidden-xs
              = link_to changelog_url(@project) do
                = icon("list-alt fw")
                Changelog
          - if @repository.license
            %li
              = link_to license_url(@project) do
                = icon("check-circle-o fw")
                License
          - if @repository.contribution_guide
            %li
              = link_to contribution_guide_url(@project) do
                = icon("info-circle fw")
                Contribution guide
25

26
      .actions
Douwe Maan's avatar
Douwe Maan committed
27 28 29 30
        - if can? current_user, :write_issue, @project
          = link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm append-right-10' do
            = icon("exclamation-circle fw")
            New Issue
31

32 33
        - if can? current_user, :write_merge_request, @project
          = link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-sm", title: "New Merge Request" do
Douwe Maan's avatar
Douwe Maan committed
34
            = icon("plus fw")
35
            New Merge Request
36

37 38 39 40 41 42 43 44
  - if forked_from_project = @project.forked_from_project
    .well
      %h4
        = icon("code-fork fw")
        Forked from
        .pull-right
          = link_to forked_from_project.namespace.try(:name), project_path(forked_from_project)

Douwe Maan's avatar
Douwe Maan committed
45 46
  - if version = @repository.version
    .well
47
      %h4
Douwe Maan's avatar
Douwe Maan committed
48 49 50 51 52
        = icon("clock-o fw")
        Version
        .pull-right
          = link_to version_url(@project) do
            = @repository.blob_by_oid(version.id).data
53

Douwe Maan's avatar
Douwe Maan committed
54 55 56 57 58 59 60 61 62 63 64 65
  - @project.ci_services.each do |ci_service|
    - if ci_service.active? && ci_service.respond_to?(:builds_path)
      .well
        %h4
          = icon("check fw")
          = ci_service.title
          .pull-right
            - if ci_service.respond_to?(:status_img_path)
              = link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do
                = image_tag ci_service.status_img_path, alt: "build status"
            - else
              = link_to 'view builds', ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
66

Douwe Maan's avatar
Douwe Maan committed
67
  - unless @project.empty_repo?
68 69
    .well
      %h4
Douwe Maan's avatar
Douwe Maan committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
        = icon("archive fw")
        Repository

      %ul.nav.nav-pills
        %li
          = link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do
            = icon("history fw")
            = pluralize(number_with_delimiter(@repository.commit_count), 'commit')
        %li
          = link_to namespace_project_branches_path(@project.namespace, @project) do
            = icon("code-fork fw")
            = pluralize(number_with_delimiter(@repository.branch_names.count), 'branch')
        %li
          = link_to namespace_project_tags_path(@project.namespace, @project) do
            = icon("tags fw")
            = pluralize(number_with_delimiter(@repository.tag_names.count), 'tag')

87
      .actions
Douwe Maan's avatar
Douwe Maan committed
88 89 90 91 92 93 94
        = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm append-right-10' do
          %i.fa.fa-exchange
          Compare code

        - if can?(current_user, :download_code, @project)
          = render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'

95 96
    = render "shared/clone_panel"

Douwe Maan's avatar
Douwe Maan committed
97 98 99 100 101 102
  - if @project.archived?
    .alert.alert-warning
      %h4
        = icon("exclamation-triangle fw")
        Archived project!
      %p Repository is read-only