Add user to team he creates

This commit is contained in:
Dmitriy Zaporozhets 2013-02-18 14:35:38 +02:00
parent 020078663e
commit 01a7250ba5
4 changed files with 22 additions and 6 deletions

View file

@ -17,13 +17,14 @@
= f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium project-access-select span2"
.left.span2
%span
= check_box_tag :group_admin, true, @team.admin?(user)
Admin access
- if @team.admin?(user)
%i.icon-check
Admin access
.pull-right
- if current_user == user
%span.btn.disabled This is you!
- if @team.owner == user
%span.btn.disabled.btn-success Owner
%span.btn.disabled Owner
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin

View file

@ -17,3 +17,17 @@
%li All created teams are public (users can view who enter into team and which project are assigned for this team)
%li People within a team see only projects they have access to
%li You will be able to assign existing projects for team
%hr
- if current_user.can_create_group?
.clearfix
.input.light
Need a group for several dependent projects?
= link_to new_group_path, class: "btn btn-tiny" do
Create a group
- if current_user.can_create_project?
.clearfix
.input.light
Want to create a project?
= link_to new_project_path, class: "btn btn-tiny" do
Create a project