summaryrefslogtreecommitdiff
path: root/app/views/projects/show.html.haml
blob: 1f4b5839175cd2d0ff54b4eadb63eeeff610bafd (plain)
1
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.project-home-panel
  .row
    .span5
      %h4.project-home-title
        = @project.name_with_namespace
        - if @project.public
          %span.public-label Public
        - else
          %span.public-label Private

    .span7
      .project-home-dropdown
        = render "dropdown"
      .form-horizontal
        = render "shared/clone_panel"

  .project-home-extra.clearfix
    .project-home-desc
      - if @project.description.present?
        = @project.description
      - if can?(current_user, :admin_project, @project)
        –
        %strong= link_to 'Edit', edit_project_path

    .project-home-links
      = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
      = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
      = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
      %span.light.prepend-left-20= repository_size

.row
  .span9
    = render "events/event_last_push", event: @last_push
    = render 'shared/event_filter'
    .content_list
    .loading.hide
  .span3.project-side
    .clearfix
      - if @project.forked_from_project
        .alert.alert-success
          %i.icon-code-fork.project-fork-icon
          Forked from:
          %br
          = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
      - unless @project.empty_repo?
        - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
          - if current_user.already_forked?(@project)
            = link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do
              %i.icon-compass
              Go to fork
          - else
            = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
              %i.icon-code-fork
              Fork repository

        - if can? current_user, :download_code, @project
          = link_to archive_project_repository_path(@project), class: "btn btn-block" do
            %i.icon-download-alt
            %span Download
          = link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
            Compare code
    .prepend-top-10
      %p
        %span.light Created on
        #{@project.created_at.stamp('Aug 22, 2013')}
      %p
        %span.light Owned by
        - if @project.group
          #{link_to @project.group.name, @project.group} Group
        - else
          #{link_to @project.owner_name, @project.owner}


      - if @project.gitlab_ci?
        %hr
        = link_to @project.gitlab_ci_service.builds_path do
          = image_tag @project.gitlab_ci_service.status_img_path, alt: "build status"