diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 15:50:25 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-11 15:50:25 +0300 |
commit | 4daf68b57f92bf697a375ebfa4bc2ebc2e3e0312 (patch) | |
tree | 0ff6a1dd8816712f708d0db33df8865d8ae791d2 | |
parent | 62a9bb5af70f95bdf1f4d5d2daa22bc0d07b84d3 (diff) | |
download | gitlab-ce-4daf68b57f92bf697a375ebfa4bc2ebc2e3e0312.tar.gz |
Style page for project assign to team. Fix test for admin:teams
-rw-r--r-- | app/views/admin/teams/projects/new.html.haml | 35 | ||||
-rw-r--r-- | features/steps/admin/admin_teams.rb | 2 |
2 files changed, 16 insertions, 21 deletions
diff --git a/app/views/admin/teams/projects/new.html.haml b/app/views/admin/teams/projects/new.html.haml index b60dad35214..dcb3dbbc433 100644 --- a/app/views/admin/teams/projects/new.html.haml +++ b/app/views/admin/teams/projects/new.html.haml @@ -1,23 +1,18 @@ %h3.page_title Team: #{@team.name} +%hr += form_tag admin_team_projects_path(@team), id: "assign_projects", class: "bulk_import", method: :post do + %h6 Choose Projects you want to assign: + .clearfix + = label_tag :project_ids, "Projects" + .input + = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' -%fieldset - %legend Projects (#{@team.projects.count}) - = form_tag admin_team_projects_path(@team), id: "assign_projects", class: "bulk_import", method: :post do - %table#projects_list - %thead - %tr - %th Project name - %th Max access - %th - - @team.projects.each do |project| - %tr.project - %td - = link_to project.name_with_namespace, [:admin, project] - %td - %span= @team.human_max_project_access(project) - %td - %tr - %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' - %td= select_tag :greatest_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" } - %td= submit_tag 'Add', class: "btn btn-primary", id: :assign_projects_to_team + %h6 Choose greatest user acces for your team in this projects: + .clearfix + = label_tag :greatest_project_access, "Greatest Access" + .input + = select_tag :greatest_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" } + + .form-actions + = submit_tag 'Add team to projects', class: "btn btn-create", id: :assign_projects_to_team diff --git a/features/steps/admin/admin_teams.rb b/features/steps/admin/admin_teams.rb index 65c7e485f48..066fc3fa603 100644 --- a/features/steps/admin/admin_teams.rb +++ b/features/steps/admin/admin_teams.rb @@ -85,7 +85,7 @@ class AdminTeams < Spinach::FeatureSteps end Then 'I should see empty projects table' do - page.has_no_css?("#projects_list").must_equal true + page.should have_content "Projects (0)" end When 'I select project "Shop" with max access "Reporter"' do |