Commit d6348188fcd3b694de19f9ebaf53b0bd4f2f6ad2
1 parent
2d8a24ac
Exists in
master
and in
28 other branches
ActionItem85: exclude the exclude button
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@802 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
5 additions
and
4 deletions
Show diff stats
app/controllers/profile_admin/enterprise_editor_controller.rb
... | ... | @@ -30,9 +30,10 @@ class EnterpriseEditorController < ProfileAdminController |
30 | 30 | |
31 | 31 | # Elimitates the enterprise of the system |
32 | 32 | def destroy |
33 | - if @enterprise.destroy | |
33 | + raise "bli" | |
34 | + if @enterprise.destroy! | |
34 | 35 | flash[:notice] = _('Enterprise sucessfully erased from the system') |
35 | - redirect_to :profile => current_user.login | |
36 | + redirect_to :controller => 'profile_editor', :action => 'index', :profile => current_user.login | |
36 | 37 | else |
37 | 38 | redirect_to :action => 'index' |
38 | 39 | end |
... | ... | @@ -51,7 +52,7 @@ class EnterpriseEditorController < ProfileAdminController |
51 | 52 | protected |
52 | 53 | |
53 | 54 | def check_enterprise |
54 | - redirect_to '/' unless @profile.is_a?(Enterprise) | |
55 | + redirect_to :controller => 'profile_editor', :profile => current_user.login unless @profile.is_a?(Enterprise) | |
55 | 56 | @enterprise = @profile |
56 | 57 | end |
57 | 58 | end | ... | ... |
app/helpers/application_helper.rb
... | ... | @@ -191,7 +191,7 @@ module ApplicationHelper |
191 | 191 | [(link_to_myprofile _('Edit visual design'), {:controller => 'profile_editor', :action => 'design_editor'}, profile.identifier), 'edit_profile_design', profile], |
192 | 192 | [(link_to_myprofile _('Edit informations'), {:controller => 'profile_editor'}, profile.identifier), 'edit_profile', profile], |
193 | 193 | [(link_to_myprofile _('Manage content'), {:controller => 'cms'}, profile.identifier), 'post_content', profile], |
194 | - [(link_to_myprofile _('Exclude'), {:controller => 'enterprise_editor', :action => 'destroy'}, profile.identifier), 'edit_profile', profile], | |
194 | +# [(link_to_myprofile _('Exclude'), {:controller => 'enterprise_editor', :action => 'destroy'}, profile.identifier), 'edit_profile', profile], | |
195 | 195 | ] |
196 | 196 | end |
197 | 197 | ... | ... |