Commit 3cb663f5c9359d809ecc82cc29a62d7658a48fbe
1 parent
02cf9aa6
Exists in
master
and in
4 other branches
Remove project transfer page since we already have multiple owners for group
Showing
2 changed files
with
1 additions
and
22 deletions
Show diff stats
app/controllers/groups_controller.rb
| ... | ... | @@ -73,15 +73,7 @@ class GroupsController < ApplicationController |
| 73 | 73 | end |
| 74 | 74 | |
| 75 | 75 | def update |
| 76 | - group_params = params[:group].dup | |
| 77 | - owner_id = group_params.delete(:owner_id) | |
| 78 | - | |
| 79 | - if owner_id | |
| 80 | - @group.owner = User.find(owner_id) | |
| 81 | - @group.save | |
| 82 | - end | |
| 83 | - | |
| 84 | - if @group.update_attributes(group_params) | |
| 76 | + if @group.update_attributes(params[:group]) | |
| 85 | 77 | redirect_to @group, notice: 'Group was successfully updated.' |
| 86 | 78 | else |
| 87 | 79 | render action: "edit" | ... | ... |
app/views/groups/edit.html.haml
| ... | ... | @@ -10,8 +10,6 @@ |
| 10 | 10 | %i.icon-folder-close |
| 11 | 11 | Projects |
| 12 | 12 | %li |
| 13 | - = link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab' | |
| 14 | - %li | |
| 15 | 13 | = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab' |
| 16 | 14 | |
| 17 | 15 | .span10 |
| ... | ... | @@ -65,17 +63,6 @@ |
| 65 | 63 | - if @group.projects.blank? |
| 66 | 64 | %p.nothing_here_message This group has no projects yet |
| 67 | 65 | |
| 68 | - .tab-pane#tab-transfer | |
| 69 | - .ui-box.ui-box-danger | |
| 70 | - .title Transfer group | |
| 71 | - .ui-box-body | |
| 72 | - %p | |
| 73 | - Transferring group will cause loss of admin control over group and all child projects | |
| 74 | - = form_for @group do |f| | |
| 75 | - = users_select_tag(:'group[owner_id]') | |
| 76 | - %hr | |
| 77 | - = f.submit 'Transfer group', class: "btn btn-small btn-remove" | |
| 78 | - | |
| 79 | 66 | .tab-pane#tab-remove |
| 80 | 67 | .ui-box.ui-box-danger |
| 81 | 68 | .title Remove group | ... | ... |