summaryrefslogtreecommitdiff
path: root/app/views/admin/projects/show.html.haml
blob: 89b9afa84c1cf3a2380588ced663c510d2453a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
- unless notice.nil?
  %p#notice= notice


%h2= @admin_project.name

%table.round-borders
  %tr
    %td
      %b
        Name:
    %td
      = @admin_project.name    
  %tr
    %td
      %b
        Code:
    %td
      = @admin_project.code
  %tr
    %td
      %b
        Path:
    %td
      = @admin_project.path
  %tr
    %td
      %b
        Description:
    %td
      = @admin_project.description
  %tr
    %td{:colspan => 2}
      = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "lbutton"
      = link_to 'Back', admin_projects_path, :class => "right lbutton"


.span-14

  %h2 Team

  %table.round-borders
    %thead
      %tr
        %th Name
        %th Added
        %th Web
        %th Git
        %th Admin
        %th

    - @admin_project.users_projects.each do |tm|
      %tr
        %td= link_to tm.user_name, admin_team_member_path(tm)
        %td= time_ago_in_words(tm.updated_at) + " ago"
        %td= check_box_tag "read",   1, @admin_project.readers.include?(tm.user), :disabled => :disabled
        %td= check_box_tag "commit", 1, @admin_project.writers.include?(tm.user), :disabled => :disabled
        %td.span-2= check_box_tag "admin",  1, @admin_project.admins.include?(tm.user), :disabled => :disabled
        %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete

  = link_to 'New Team Member', new_admin_team_member_path(:team_member => {:project_id => @admin_project.id}),  :class => "lbutton"