show.html.haml 4.11 KB
Newer Older
1
%h3.page-title
2
  Project: #{@project.name_with_namespace}
3
  = link_to edit_project_path(@project), class: "btn pull-right" do
4
5
    %i.icon-edit
    Edit
6
7
%hr
.row
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8
  .col-md-6
9
    .panel.panel-default
10
      .panel-heading
11
12
13
14
        Project info:
      %ul.well-list
        %li
          %span.light Name:
15
16
          %strong
            = link_to @project.name, project_path(@project)
17
18
19
20
21
22
23
24
25
26
27
        %li
          %span.light Namespace:
          %strong
            - if @project.namespace
              = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner]
            - else
              Global
        %li
          %span.light Owned by:
          %strong
            - if @project.owner
28
              = link_to @project.owner_name, [:admin, @project.owner]
29
30
            - else
              (deleted)
gitlabhq's avatar
gitlabhq committed
31

32
33
34
35
        %li
          %span.light Created by:
          %strong
            = @project.creator.try(:name) || '(deleted)'
36

37
        %li
38
          %span.light Created on:
39
40
          %strong
            = @project.created_at.stamp("March 1, 1999")
41

42
43
44
45
46
47
48
49
        %li
          %span.light http:
          %strong
            = link_to @project.http_url_to_repo
        %li
          %span.light ssh:
          %strong
            = link_to @project.ssh_url_to_repo
50
51
52
53
54
        - if @project.repository.exists?
          %li
            %span.light fs:
            %strong
              = @repository.path_to_repo
55

56
57
58
59
60
          %li
            %span.light Size
            %strong
              = repository_size(@project)

61
62
63
          %li
            %span.light last commit:
            %strong
64
              = last_commit(@project)
65
66
67
68
69
        - else
          %li
            %span.light repository:
            %strong.cred
              does not exist
70

71
72
73
        %li
          %span.light access:
          %strong
74
75
76
77
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

78
    .panel.panel-default
79
      .panel-heading
80
        Transfer project
81
      .panel-body
82
        = form_for @project, url: transfer_admin_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
83
          .form-group
84
            = f.label :namespace_id, "Namespace", class: 'control-label'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
85
            .col-sm-10
86
87
              = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
88
          .form-group
89
            .col-sm-2
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
90
            .col-sm-10
91
92
              = f.submit 'Transfer', class: 'btn btn-primary'

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
93
  .col-md-6
94
    - if @group
95
      .panel.panel-default
96
        .panel-heading
97
          %strong #{@group.name}
98
          group members (#{@group.group_members.count})
99
100
101
102
          .pull-right
            = link_to admin_group_path(@group), class: 'btn btn-small' do
              %i.icon-edit
        %ul.well-list
103
          - @group_members.each do |member|
104
            = render 'group_members/users_group', member: member, show_controls: false
105
106
        .panel-footer
          = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
107

108
    .panel.panel-default
109
      .panel-heading
110
        Project members
111
112
        %small
          (#{@project.users.count})
113
114
115
116
        .pull-right
          = link_to project_team_index_path(@project), class: "btn btn-tiny" do
            %i.icon-edit
            Manage Access
117
      %ul.well-list.team_members
118
        - @project_members.each do |users_project|
119
          - user = users_project.user
120
          %li.project_member
121
122
123
            .list-item-name
              %strong
                = link_to user.name, admin_user_path(user)
124
            .pull-right
125
126
127
128
              - if users_project.owner?
                %span.light Owner
              - else
                %span.light= users_project.human_access
129
                = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do
130
                  %i.icon-remove
131
132
      .panel-footer
        = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'