_aside.html.haml 2.8 KB
Newer Older
1
.clearfix
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
  - unless @project.empty_repo?
    .well
      %h4 Contribute
      %ul.nav.nav-pills
        - if @repository.changelog
          %li.hidden-xs
            = link_to changelog_url(@project) do
              Changelog
        - if @repository.contribution_guide
          %li.hidden-xs
            = link_to contribution_guide_url(@project) do
              Contribution guide
        - if @repository.license
          %li
            = link_to license_url(@project) do
              License
      %hr
      = link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm' do
        %i.fa.fa-fw.fa-exclamation-circle
        New issue

    .well
      %h4 Repository
      %ul.nav.nav-pills
        %li= link_to pluralize(number_with_delimiter(@repository.commit_count), 'commit'), namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref)
        %li= link_to pluralize(number_with_delimiter(@repository.branch_names.count), 'branch'), namespace_project_branches_path(@project.namespace, @project)
        %li= link_to pluralize(number_with_delimiter(@repository.tag_names.count), 'tag'), namespace_project_tags_path(@project.namespace, @project)
      %hr
      = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm' 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'

37 38 39
  .append-bottom-20
    = render "shared/clone_panel"

40 41 42 43 44 45 46 47 48 49 50 51 52 53
  - if @project.archived?
    .alert.alert-warning
      %h4
        %i.fa.fa-exclamation-triangle
        Archived project!
      %p Repository is read-only

  - if @project.forked_from_project
    .well
      %i.fa.fa-code-fork.project-fork-icon
      Forked from:
      %br
      = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)

54 55
  -#- unless @project.empty_repo?
    -#- if version = @repository.version
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
      - detail_url = changelog_url(@project) || version_url(@project)
      = link_to detail_url, class: 'btn btn-block' do
        %i.fa.fa-file-text-o
        Version:
        %span.count
          = @repository.blob_by_oid(version.id).data


.prepend-top-10
  - @project.ci_services.each do |ci_service|
    - if ci_service.active? && ci_service.respond_to?(:builds_path)
      %hr
      - 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
        %span.light CI provided by
        = link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'