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

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
- if @project.has_commits?
  - if !@project.has_post_receive_file?
    %br
    .alert.alert-error
      %span
        %strong Project has commits but missing post-receive file.
        %br
        If you exported project manually - make a link of post-receive hook file from gitolite to project repository
  - elsif !@project.valid_post_receive_file?
    %br
    .alert.alert-error
      %span
        %strong Project has invalid post-receive file.
        %br
        1. Make sure your gitolite instace has latest post-receive file.
        %br
        2. Make a link of post-receive hook file from gitolite to project repository

25

26
%br
randx's avatar
randx committed
27 28 29 30 31
%table.zebra-striped
  %thead
    %tr
      %th Project
      %th
32 33 34 35 36
  %tr
    %td
      %b
        Name:
    %td
37
      = @project.name
38 39 40 41 42 43 44 45 46
  %tr
    %td
      %b
        Namespace:
    %td
      - if @project.namespace
        = @project.namespace.human_name
      - else
        Global
47 48 49
  %tr
    %td
      %b
50
        Owned by:
51
    %td
52 53 54 55
      - if @project.chief
        = link_to @project.chief.name, admin_user_path(@project.chief)
      - else
        (deleted)
56 57 58
  %tr
    %td
      %b
59
        Created by:
60
    %td
61
      = @project.owner_name || '(deleted)'
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
  %tr
    %td
      %b
        Created at:
    %td
      = @project.created_at.stamp("March 1, 1999")

%table.zebra-striped
  %thead
    %tr
      %th Repository
      %th
  %tr
    %td
      %b
        FS Path:
    %td
      %code= @project.path_to_repo
  %tr
    %td
      %b
        Smart HTTP:
    %td
      = link_to @project.http_url_to_repo
  %tr
    %td
      %b
        SSH:
    %td
      = link_to @project.ssh_url_to_repo
  %tr
    %td
      %b
        Last commit at:
    %td
      = last_commit(@project)
98 99 100 101 102
  %tr
    %td
      %b
        Post Receive File:
    %td
103
      = check_box_tag :post_receive_file, 1, @project.has_post_receive_file?, disabled: true
104

105
%br
106
%h5
107 108
  Team
  %small
109
    (#{@project.users_projects.count})
110
%br
randx's avatar
randx committed
111
%table.zebra-striped
112 113 114 115 116 117
  %thead
    %tr
      %th Name
      %th Project Access
      %th Repository Access
      %th
118

119
  - @project.users_projects.each do |tm|
120 121 122
    %tr
      %td
        = link_to tm.user_name, admin_user_path(tm.user)
123
      %td= tm.project_access_human
124 125
      %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
126

127
%br
128
%h5 Add new team member
129
%br
130
= form_tag team_update_admin_project_path(@project), class: "bulk_import", method: :put  do
randx's avatar
randx committed
131
  %table.zebra-striped
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
132 133
    %thead
      %tr
134 135
        %th Users
        %th Project Access:
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
136

137
    %tr
138 139
      %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"}
140

141
    %tr
142
      %td= submit_tag 'Add', class: "btn primary"
143
      %td
144
        Read more about project permissions
145
        %strong= link_to "here", help_permissions_path, class: "vlink"