2011-11-18 20:10:07 +01:00
|
|
|
- unless notice.nil?
|
|
|
|
%p#notice= notice
|
2011-10-08 23:36:38 +02:00
|
|
|
|
2011-11-18 21:54:56 +01:00
|
|
|
|
|
|
|
%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}
|
2011-11-21 08:26:10 +01:00
|
|
|
= link_to 'Edit', edit_admin_project_path(@admin_project), :class => "grey-button"
|
2011-11-18 21:54:56 +01:00
|
|
|
|
2011-10-08 23:36:38 +02:00
|
|
|
|
|
|
|
.span-14
|
|
|
|
|
2011-10-26 15:46:25 +02:00
|
|
|
%h2 Team
|
2011-10-08 23:36:38 +02:00
|
|
|
|
2012-01-21 18:03:47 +01:00
|
|
|
= form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do
|
|
|
|
%table
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Users
|
|
|
|
%th Project Access:
|
|
|
|
%th Repo Access:
|
|
|
|
|
|
|
|
%tr
|
|
|
|
%td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), :multiple => true
|
|
|
|
%td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select"
|
|
|
|
%td= select_tag :repo_access, options_for_select(Repository.access_options), :class => "repo-access-select"
|
|
|
|
|
|
|
|
%tr
|
|
|
|
%td{ :colspan => 3 }
|
|
|
|
= submit_tag 'Add', :class => "positive-button"
|
|
|
|
|
2011-10-08 23:36:38 +02:00
|
|
|
%table.round-borders
|
2011-11-18 21:54:56 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Name
|
|
|
|
%th Added
|
2011-12-07 09:04:57 +01:00
|
|
|
%th Project Access
|
|
|
|
%th Repository Access
|
2011-11-18 21:54:56 +01:00
|
|
|
%th
|
2011-10-08 23:36:38 +02:00
|
|
|
|
|
|
|
- @admin_project.users_projects.each do |tm|
|
|
|
|
%tr
|
2011-12-07 09:04:57 +01:00
|
|
|
%td
|
|
|
|
= link_to tm.user_name, admin_team_member_path(tm)
|
2011-10-08 23:36:38 +02:00
|
|
|
%td= time_ago_in_words(tm.updated_at) + " ago"
|
2012-01-21 18:03:47 +01:00
|
|
|
%td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "project-access-select", :disabled => :disabled
|
|
|
|
%td= select_tag :tm_repo_access, options_for_select(Repository.access_options, tm.repo_access), :class => "repo-access-select", :disabled => :disabled
|
2011-10-08 23:36:38 +02:00
|
|
|
%td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
|
|
|
|
|
2012-01-21 18:03:47 +01:00
|
|
|
:css
|
|
|
|
form select {
|
|
|
|
width:150px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#user_ids {
|
|
|
|
width:300px;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
$('select#user_ids').chosen();
|
|
|
|
$('select#repo_access').chosen();
|
|
|
|
$('select#project_access').chosen();
|
|
|
|
|