show.html.haml 3.62 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 8 9
%hr
.row
  .span6
    .ui-box
10
      .title
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
          %li
            %span.light last commit:
            %strong
59
              = last_commit(@project)
60 61 62 63 64
        - else
          %li
            %span.light repository:
            %strong.cred
              does not exist
65

66 67 68
        %li
          %span.light access:
          %strong
69 70 71 72
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

73 74 75 76 77 78 79 80 81 82 83 84 85 86
    .ui-box
      .title
        Transfer project
      .ui-box-body
        = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
          .control-group
            = f.label :namespace_id, "Namespace"
            .controls
              = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'

          .control-group
            .controls
              = f.submit 'Transfer', class: 'btn btn-primary'

87
  .span6
88 89
    - if @group
      .ui-box
90
        .title
91 92
          %strong #{@group.name}
          group members (#{@group.users_groups.count})
93 94 95 96 97 98 99
          .pull-right
            = link_to admin_group_path(@group), class: 'btn btn-small' do
              %i.icon-edit
        %ul.well-list
          - @group.users_groups.order('group_access DESC').each do |member|
            = render 'users_groups/users_group', member: member, show_controls: false

100
    .ui-box
101
      .title
102
        Project members
103 104
        %small
          (#{@project.users.count})
105 106 107 108
        .pull-right
          = link_to project_team_index_path(@project), class: "btn btn-tiny" do
            %i.icon-edit
            Manage Access
109
      %ul.well-list.team_members
110 111
        - @project.users_projects.each do |users_project|
          - user = users_project.user
112
          %li.users_project
113
            %strong
114 115
              = link_to user.name, admin_user_path(user)
            .pull-right
116 117 118 119
              - if users_project.owner?
                %span.light Owner
              - else
                %span.light= users_project.human_access
120
                = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, remote: true, class: "btn btn-small btn-remove" do
121
                  %i.icon-remove