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

7
- if @repository && @repository.has_commits?
8
  - if !@repository.has_post_receive_file?
9 10 11 12 13 14
    %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
15
  - elsif !@repository.valid_post_receive_file?
16 17 18 19 20 21 22 23 24
    %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
      - if @project.owner
        = link_to @project.owner_name, admin_user_path(@project.owner)
54 55
      - else
        (deleted)
56 57 58
  %tr
    %td
      %b
59
        Created by:
60
    %td
61
      = @project.creator.try(:name) || '(deleted)'
62 63 64 65 66 67
  %tr
    %td
      %b
        Created at:
    %td
      = @project.created_at.stamp("March 1, 1999")
68 69 70 71 72 73 74 75 76 77 78 79
    %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
80 81 82 83 84 85 86
  - if @project.public
    %tr.bgred
      %td
        %b
          Public Read-Only Code access:
      %td
        = check_box_tag 'public', nil, @project.public
87

88 89 90 91 92 93
- if @repository
  %table.zebra-striped
    %thead
      %tr
        %th Repository
        %th
94
    %tr
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
      %td
        %b
          FS Path:
      %td
        %code= @repository.path_to_repo
    %tr
      %td
        %b
          Last commit at:
      %td
        = last_commit(@project)
    %tr
      %td
        %b
          Post Receive File:
      %td
        = check_box_tag :post_receive_file, 1, @repository.has_post_receive_file?, disabled: true
112

113
%br
114
%h5
115 116
  Team
  %small
117
    (#{@project.users.count})
118
%br
119
%table.zebra-striped.team_members
120 121 122 123 124 125
  %thead
    %tr
      %th Name
      %th Project Access
      %th Repository Access
      %th
126

127
  - @project.users.each do |tm|
128 129
    %tr
      %td
130 131
        = link_to tm.name, admin_user_path(tm)
      %td= @project.project_access_human(tm)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
132
      %td= link_to 'Edit Access', edit_admin_project_member_path(@project, tm), class: "btn btn-small"
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
133
      %td= link_to 'Remove from team', admin_project_member_path(@project, tm), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove small"
gitlabhq's avatar
gitlabhq committed
134

135
%br
136
%h5 Add new team member
137
%br
138
= form_tag team_update_admin_project_path(@project), class: "bulk_import", method: :put  do
randx's avatar
randx committed
139
  %table.zebra-striped
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
140 141
    %thead
      %tr
142 143
        %th Users
        %th Project Access:
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
144

145
    %tr
146 147
      %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"}
148

149
    %tr
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
150
      %td= submit_tag 'Add', class: "btn btn-primary"
151
      %td
152
        Read more about project permissions
153
        %strong= link_to "here", help_permissions_path, class: "vlink"