BigW Consortium Gitlab

show.html.haml 4.64 KB
Newer Older
1
- page_title @project.name_with_namespace, "Projects"
2
%h3.page-title
3
  Project: #{@project.name_with_namespace}
4
  = link_to edit_project_path(@project), class: "btn pull-right" do
5
    %i.fa.fa-pencil-square-o
6
    Edit
7 8
%hr
.row
9
  .col-md-6
10
    .panel.panel-default
11
      .panel-heading
12 13 14 15
        Project info:
      %ul.well-list
        %li
          %span.light Name:
16
          %strong
17
            = link_to @project.name, project_path(@project)
18 19 20 21 22 23 24 25 26 27 28
        %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
29
              = link_to @project.owner_name, [:admin, @project.owner]
30 31
            - else
              (deleted)
gitlabhq committed
32

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

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

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

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

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

72 73 74 75 76
        - if @project.archived?
          %li
            %span.light archived:
            %strong repository is read-only

77 78 79
        %li
          %span.light access:
          %strong
80 81 82 83
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

84
    .panel.panel-default
85
      .panel-heading
86
        Transfer project
87
      .panel-body
Vinnie Okada committed
88
        = form_for @project, url: transfer_admin_namespace_project_path(@project.namespace, @project), method: :put, html: { class: 'form-horizontal' } do |f|
89
          .form-group
Vinnie Okada committed
90
            = f.label :new_namespace_id, "Namespace", class: 'control-label'
91
            .col-sm-10
Vinnie Okada committed
92
              = namespace_select_tag :new_namespace_id, selected: params[:namespace_id], class: 'input-large'
93

94
          .form-group
95
            .col-sm-2
96
            .col-sm-10
97 98
              = f.submit 'Transfer', class: 'btn btn-primary'

99
  .col-md-6
100
    - if @group
101
      .panel.panel-default
102
        .panel-heading
103
          %strong #{@group.name}
104
          group members (#{@group.group_members.count})
105
          .pull-right
106
            = link_to admin_group_path(@group), class: 'btn btn-xs' do
107
              %i.fa.fa-pencil-square-o
108
        %ul.well-list
109
          - @group_members.each do |member|
110
            = render 'groups/group_members/group_member', member: member, show_controls: false
111 112
        .panel-footer
          = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
113

114
    .panel.panel-default
115
      .panel-heading
116
        Project members
117 118
        %small
          (#{@project.users.count})
119
        .pull-right
120
          = link_to namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-xs" do
121
            %i.fa.fa-pencil-square-o
122
            Manage Access
123
      %ul.well-list.project_members
124 125
        - @project_members.each do |project_member|
          - user = project_member.user
126
          %li.project_member
127
            .list-item-name
128 129 130 131 132 133 134
              - if user
                %strong
                  = link_to user.name, admin_user_path(user)
              - else
                %strong
                  = project_member.invite_email
                (invited)
135
            .pull-right
136
              - if project_member.owner?
137 138
                %span.light Owner
              - else
139
                %span.light= project_member.human_access
140
                = link_to namespace_project_project_member_path(@project.namespace, @project, project_member), data: { confirm: remove_from_project_team_message(@project, project_member)}, method: :delete, remote: true, class: "btn btn-sm btn-remove" do
141
                  %i.fa.fa-times
142 143
      .panel-footer
        = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'