show.html.haml 2.18 KB
Newer Older
1
= render 'admin/shared/projects_head'
2
%h3.page_title
3
4
  Project: #{@project.name}
  = link_to edit_admin_project_path(@project), class: "btn right" do
5
6
    %i.icon-edit
    Edit
gitlabhq's avatar
gitlabhq committed
7

8
- if !@project.has_post_receive_file? && @project.has_commits?
9
10
11
12
13
14
15
16
  %br
  .alert.alert-error
    %span
      %strong Important!
      Project has commits but missing post-receive file.
      %br
      If you exported project manually - copy post-receive hook to bare repository

17
%br
randx's avatar
randx committed
18
19
20
21
22
%table.zebra-striped
  %thead
    %tr
      %th Project
      %th
23
24
25
26
27
  %tr
    %td
      %b
        Name:
    %td
28
      = @project.name
29
30
31
32
33
  %tr
    %td
      %b
        Code:
    %td
34
      = @project.code
35
36
37
38
39
  %tr
    %td
      %b
        Path:
    %td
40
      %code= @project.path_to_repo
41
42
43
  %tr
    %td
      %b
randx's avatar
randx committed
44
        Owner:
45
    %td
46
      = @project.owner_name || '(deleted)'
47
48
49
50
51
  %tr
    %td
      %b
        Post Receive File:
    %td
52
      = check_box_tag :post_receive_file, 1, @project.has_post_receive_file?, disabled: true
53
54
55
56
%br
%h3
  Team
  %small
57
    (#{@project.users_projects.count})
58
%br
randx's avatar
randx committed
59
%table.zebra-striped
60
61
62
63
64
65
  %thead
    %tr
      %th Name
      %th Project Access
      %th Repository Access
      %th
66

67
  - @project.users_projects.each do |tm|
68
69
70
    %tr
      %td
        = link_to tm.user_name, admin_user_path(tm.user)
71
      %td= tm.project_access_human
72
73
      %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
      %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn danger small"
gitlabhq's avatar
gitlabhq committed
74

75
76
77
%br
%h3 Add new team member
%br
78
= form_tag team_update_admin_project_path(@project), class: "bulk_import", method: :put  do
randx's avatar
randx committed
79
  %table.zebra-striped
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
80
81
    %thead
      %tr
82
83
        %th Users
        %th Project Access:
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
84

85
    %tr
86
87
      %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
      %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
88

89
    %tr
90
      %td= submit_tag 'Add', class: "btn primary"
91
      %td
92
        Read more about project permissions
93
        %strong= link_to "here", help_permissions_path, class: "vlink"