diff --git a/app/controllers/enterprise_controller.rb b/app/controllers/enterprise_controller.rb index c6f7c72..1f17be2 100644 --- a/app/controllers/enterprise_controller.rb +++ b/app/controllers/enterprise_controller.rb @@ -86,11 +86,11 @@ class EnterpriseController < ApplicationController def activate @enterprise = Enterprise.find(params[:id]) if @enterprise.update_attribute('active', true) - flash[:notice] = 'Enterprise successfuly activacted' - render :action => 'show' + flash[:notice] = _('Enterprise successfuly activacted') else - redirect_to :action => 'show', :id => @enterprise + flash[:notice] = _('Failed to activate the enterprise') end + redirect_to :action => 'index' end protected diff --git a/app/views/enterprise/_enterprise.rhtml b/app/views/enterprise/_enterprise.rhtml index 9172dc5..346106b 100644 --- a/app/views/enterprise/_enterprise.rhtml +++ b/app/views/enterprise/_enterprise.rhtml @@ -1,6 +1,11 @@
<%= submit_tag _('Register') %> +
<%= submit_tag _('Update') %> <%= link_to _('Cancel'), :action => 'index' %>
<% end %> diff --git a/app/views/enterprise/list.rhtml b/app/views/enterprise/list.rhtml index d6e468e..27d9e2a 100644 --- a/app/views/enterprise/list.rhtml +++ b/app/views/enterprise/list.rhtml @@ -1,6 +1,9 @@ <%= render :partial => 'search_box' %> -<%= link_to _('Register new enterprise'), :action => 'register_form' %>
+<%= link_to _('Register new enterprise'), :action => 'register_form' %> +<%= help _('Creates a new enterprise') %> +
+<%= _('Tags:') %> <%= @enterprise.tag_list %>
<%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %> +<%= help _('Change the information about the enterprise') %> <%= link_to _('Delete enterprise'), :action => 'destroy', :id => @enterprise %> +<%= help _('Remove the enterprise from the system') %> <%= link_to _('Affiliate'), :action => 'affiliate' unless @my_enterprises.include?(@enterprise) %> +<%= help _('Be a member of the enterprise') %> -- libgit2 0.21.2