Commit 4daf68b5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Style page for project assign to team. Fix test for admin:teams

parent 62a9bb5a
%h3.page_title %h3.page_title
Team: #{@team.name} 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 %h6 Choose greatest user acces for your team in this projects:
%legend Projects (#{@team.projects.count}) .clearfix
= form_tag admin_team_projects_path(@team), id: "assign_projects", class: "bulk_import", method: :post do = label_tag :greatest_project_access, "Greatest Access"
%table#projects_list .input
%thead = select_tag :greatest_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
%tr
%th Project name .form-actions
%th Max access = submit_tag 'Add team to projects', class: "btn btn-create", id: :assign_projects_to_team
%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
...@@ -85,7 +85,7 @@ class AdminTeams < Spinach::FeatureSteps ...@@ -85,7 +85,7 @@ class AdminTeams < Spinach::FeatureSteps
end end
Then 'I should see empty projects table' do Then 'I should see empty projects table' do
page.has_no_css?("#projects_list").must_equal true page.should have_content "Projects (0)"
end end
When 'I select project "Shop" with max access "Reporter"' do When 'I select project "Shop" with max access "Reporter"' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment