diff options
-rw-r--r-- | app/views/teams/members/_show.html.haml | 37 | ||||
-rw-r--r-- | app/views/teams/members/new.html.haml | 48 |
2 files changed, 41 insertions, 44 deletions
diff --git a/app/views/teams/members/_show.html.haml b/app/views/teams/members/_show.html.haml index 1a323043d09..dc32acb4693 100644 --- a/app/views/teams/members/_show.html.haml +++ b/app/views/teams/members/_show.html.haml @@ -2,7 +2,7 @@ - allow_admin = can? current_user, :manage_user_team, @team %li{id: dom_id(member), class: "team_member_row user_#{user.id}"} .row - .span5 + .span4 = link_to user_path(user.username), title: user.name, class: "dark" do = image_tag gravatar_icon(user.email, 40), class: "avatar s32" = link_to user_path(user.username), title: user.name, class: "dark" do @@ -10,21 +10,22 @@ %br %small.cgray= user.username - .span4 + .span7.pull-right - if allow_admin - = form_for(member, as: :team_member, url: team_member_path(@team, user)) do |f| - = f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium trigger-submit" - %br - = label_tag do - = f.check_box :group_admin, class: 'trigger-submit' - %span Admin access - .pull-right - - if current_user == user - %span.btn.disabled This is you! - - if @team.owner == user - %span.btn.disabled Owner - - elsif user.blocked? - %span.btn.disabled.blocked Blocked - - elsif allow_admin - = link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove", title: "Remove from team" do - %i.icon-minus.icon-white + .pull-left + = form_for(member, as: :team_member, url: team_member_path(@team, user)) do |f| + = label_tag do + = f.check_box :group_admin, class: 'trigger-submit' + %span Admin access + + = f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium trigger-submit" + .pull-right + - if current_user == user + %span.btn.disabled This is you! + - if @team.owner == user + %span.btn.disabled Owner + - elsif user.blocked? + %span.btn.disabled.blocked Blocked + - elsif allow_admin + = link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove", title: "Remove from team" do + %i.icon-minus.icon-white diff --git a/app/views/teams/members/new.html.haml b/app/views/teams/members/new.html.haml index 9b9b3cef59b..99530ebb7f0 100644 --- a/app/views/teams/members/new.html.haml +++ b/app/views/teams/members/new.html.haml @@ -1,29 +1,25 @@ %h3.page_title Team: #{@team.name} -%fieldset - %legend Members (#{@team.members.count}) - = form_tag team_members_path(@team), id: "team_members", class: "bulk_import", method: :post do - %table#members_list - %thead - %tr - %th User name - %th Default project access - %th Team access - %th - - @team.members.each do |member| - %tr.member - %td - = member.name - %small= "(#{member.username})" - %td= @team.human_default_projects_access(member) - %td= @team.admin?(member) ? "Admin" : "Member" - %td - %tr - %td - = users_select_tag(:user_ids, multiple: true) - %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" } - %td - %span= check_box_tag :group_admin - %span Admin? - %td= submit_tag 'Add User', class: "btn btn-create", id: :add_members_to_team +%hr + += form_tag team_members_path(@team), id: "team_members", class: "bulk_import", method: :post do + %h6 1. Choose people you want in the team + .clearfix + = label_tag :user_ids, "People" + .input + = users_select_tag(:user_ids, multiple: true) + + %h6 2. Set access level for them + .clearfix + = label_tag :project_access, "Project Access" + .input= select_tag :default_project_access, options_for_select(Project.access_options), class: "project-access-select chosen" + + .clearfix + = label_tag :group_admin do + %span Team Admin? + .input= check_box_tag :group_admin + + .actions + = submit_tag 'Add users', class: "btn btn-create", id: :add_members_to_team + = link_to "Cancel", team_members_path(@team), class: "btn btn-cancel" |