show.html.haml 3.1 KB
Newer Older
1
= render "home_panel"
2

3
.row
4
  %section.col-md-9
5
    = render "events/event_last_push", event: @last_push
6
    = render 'shared/event_filter'
7
    .content_list
8
    = spinner
9
  %aside.col-md-3.project-side.hidden-sm.hidden-xs
10
    .clearfix
11
      - if @project.archived?
12
13
        .alert.alert-warning
          %h4
14
15
16
17
            %i.icon-warning-sign
            Archived project!
          %p Repository is read-only

18
19
      - if @project.forked_from_project
        .alert.alert-success
20
          %i.icon-code-fork.project-fork-icon
21
          Forked from:
22
          %br
23
          = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
24
25
26
27
28
29

      .star-buttons
        %span.star.js-toggler-container{class: @show_star ? 'on' : ''}
          - if current_user
            = link_to_toggle_star('Star this project.', false, true)
            = link_to_toggle_star('Unstar this project.', true, true)
30
          - else
31
            = link_to_toggle_star('You must sign in to star a project.', false, false)
32

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
      - unless @project.empty_repo?
        .fork-buttons
          - 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
                %span.count
                  = @project.forks_count
            - else
              = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
                %i.icon-code-fork
                Fork repository
                %span.count
                  = @project.forks_count
      - unless @project.empty_repo?
49
        - if can? current_user, :download_code, @project
50
51
52
53
          = render 'projects/repositories/download_archive', btn_class: 'btn-block btn-group-justified', split_button: true

        = link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
          Compare code
54
55
56
57
58
59

        - if @repository.readme
          - readme = @repository.readme
          = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)), class: 'btn btn-block' do
            = readme.name

60
61
62
63
        - if @repository.version
          - version = @repository.version
          = link_to project_blob_path(@project, tree_join(@repository.root_ref, version.name)), class: 'btn btn-block' do
            Version:
64
65
            %span.count
              = @repository.blob_by_oid(version.id).data
66

67
    .prepend-top-10
68
      %p
69
        %span.light Created on
70
71
72
73
        #{@project.created_at.stamp('Aug 22, 2013')}
      %p
        %span.light Owned by
        - if @project.group
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
74
          #{link_to @project.group.name, @project.group} group
75
76
        - else
          #{link_to @project.owner_name, @project.owner}
77

78
79
80
81
82

      - 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"