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

8
- if !@admin_project.has_post_receive_file? && @admin_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
      = @admin_project.name
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  %tr
    %td
      %b
        Code:
    %td
      = @admin_project.code
  %tr
    %td
      %b
        Path:
    %td
      = @admin_project.path
  %tr
    %td
      %b
44
        Owner:
45
    %td
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
46
      = @admin_project.owner_name || '(deleted)'
47 48 49 50 51
  %tr
    %td
      %b
        Post Receive File:
    %td
52
      = check_box_tag :post_receive_file, 1, @admin_project.has_post_receive_file?, disabled: true
53 54 55 56 57 58
%br
%h3
  Team
  %small
    (#{@admin_project.users_projects.count})
%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 68 69 70
  - @admin_project.users_projects.each do |tm|
    %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(@admin_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"