Remove project transfer page since we already have multiple owners for group
This commit is contained in:
parent
02cf9aa687
commit
3cb663f5c9
2 changed files with 1 additions and 22 deletions
|
@ -73,15 +73,7 @@ class GroupsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
group_params = params[:group].dup
|
if @group.update_attributes(params[:group])
|
||||||
owner_id = group_params.delete(:owner_id)
|
|
||||||
|
|
||||||
if owner_id
|
|
||||||
@group.owner = User.find(owner_id)
|
|
||||||
@group.save
|
|
||||||
end
|
|
||||||
|
|
||||||
if @group.update_attributes(group_params)
|
|
||||||
redirect_to @group, notice: 'Group was successfully updated.'
|
redirect_to @group, notice: 'Group was successfully updated.'
|
||||||
else
|
else
|
||||||
render action: "edit"
|
render action: "edit"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
= link_to '#tab-projects', 'data-toggle' => 'tab' do
|
= link_to '#tab-projects', 'data-toggle' => 'tab' do
|
||||||
%i.icon-folder-close
|
%i.icon-folder-close
|
||||||
Projects
|
Projects
|
||||||
%li
|
|
||||||
= link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab'
|
|
||||||
%li
|
%li
|
||||||
= link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
|
= link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
|
||||||
|
|
||||||
|
@ -65,17 +63,6 @@
|
||||||
- if @group.projects.blank?
|
- if @group.projects.blank?
|
||||||
%p.nothing_here_message This group has no projects yet
|
%p.nothing_here_message This group has no projects yet
|
||||||
|
|
||||||
.tab-pane#tab-transfer
|
|
||||||
.ui-box.ui-box-danger
|
|
||||||
.title Transfer group
|
|
||||||
.ui-box-body
|
|
||||||
%p
|
|
||||||
Transferring group will cause loss of admin control over group and all child projects
|
|
||||||
= form_for @group do |f|
|
|
||||||
= users_select_tag(:'group[owner_id]')
|
|
||||||
%hr
|
|
||||||
= f.submit 'Transfer group', class: "btn btn-small btn-remove"
|
|
||||||
|
|
||||||
.tab-pane#tab-remove
|
.tab-pane#tab-remove
|
||||||
.ui-box.ui-box-danger
|
.ui-box.ui-box-danger
|
||||||
.title Remove group
|
.title Remove group
|
||||||
|
|
Loading…
Reference in a new issue