Commit b0a90fefe612bcef809e28c9937d9669c52cf197
1 parent
8cd4ed27
Exists in
master
and in
28 other branches
ActionItem6: added user documentation to the actions of enterprise managment
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@358 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
6 changed files
with
19 additions
and
5 deletions
Show diff stats
app/controllers/enterprise_controller.rb
... | ... | @@ -86,11 +86,11 @@ class EnterpriseController < ApplicationController |
86 | 86 | def activate |
87 | 87 | @enterprise = Enterprise.find(params[:id]) |
88 | 88 | if @enterprise.update_attribute('active', true) |
89 | - flash[:notice] = 'Enterprise successfuly activacted' | |
90 | - render :action => 'show' | |
89 | + flash[:notice] = _('Enterprise successfuly activacted') | |
91 | 90 | else |
92 | - redirect_to :action => 'show', :id => @enterprise | |
91 | + flash[:notice] = _('Failed to activate the enterprise') | |
93 | 92 | end |
93 | + redirect_to :action => 'index' | |
94 | 94 | end |
95 | 95 | |
96 | 96 | protected | ... | ... |
app/views/enterprise/_enterprise.rhtml
1 | 1 | <li> |
2 | 2 | <%= link_to enterprise.name, :action => 'show', :id => enterprise %> |
3 | 3 | <%= link_to _('Edit'), :action => 'edit', :id => enterprise %> |
4 | +<%= help _('Change the infomation about the enterprise') %> | |
4 | 5 | <%= link_to _('Delete'), :action => 'destroy', :id => enterprise %> |
6 | +<%= help _('Remove the enterprise from the system') %> | |
5 | 7 | <%= link_to _('Affiliate'), :action => 'affiliate', :id => enterprise unless @my_enterprises.include?(enterprise) %> |
8 | +<%= help _('Be a member of the enterprise') unless @my_enterprises.include?(enterprise) %> | |
9 | +<%= link_to _('Activate'), :action => 'activate', :id => enterprise if @my_pending_enterprises.include?(enterprise) %> | |
10 | +<%= help _('Activate the profile of an approved enterprise') if @my_pending_enterprises.include?(enterprise) %> | |
6 | 11 | </li> | ... | ... |
app/views/enterprise/_search_box.rhtml
app/views/enterprise/edit.rhtml
app/views/enterprise/list.rhtml
1 | 1 | <%= render :partial => 'search_box' %> |
2 | 2 | |
3 | -<p> <%= link_to _('Register new enterprise'), :action => 'register_form' %> </p> | |
3 | +<p> <%= link_to _('Register new enterprise'), :action => 'register_form' %> | |
4 | +<%= help _('Creates a new enterprise') %> | |
5 | +</p> | |
6 | + | |
4 | 7 | |
5 | 8 | <h2> <%= _('Listing my enterprises') %> </h2> |
6 | 9 | <ul> |
... | ... | @@ -14,7 +17,9 @@ |
14 | 17 | </ul> |
15 | 18 | <% end %> |
16 | 19 | |
20 | +<% unless @enterprises.blank? %> | |
17 | 21 | <h4> <%= _('Other Enterprises') %> </h4> |
18 | 22 | <ul> |
19 | 23 | <%= render :partial => 'enterprise', :collection => @enterprises %> |
20 | 24 | </ul> |
25 | +<% end %> | ... | ... |
app/views/enterprise/show.rhtml
... | ... | @@ -16,5 +16,8 @@ |
16 | 16 | <p> <%= _('Tags:') %> <%= @enterprise.tag_list %> </p> |
17 | 17 | |
18 | 18 | <%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %> |
19 | +<%= help _('Change the information about the enterprise') %> | |
19 | 20 | <%= link_to _('Delete enterprise'), :action => 'destroy', :id => @enterprise %> |
21 | +<%= help _('Remove the enterprise from the system') %> | |
20 | 22 | <%= link_to _('Affiliate'), :action => 'affiliate' unless @my_enterprises.include?(@enterprise) %> |
23 | +<%= help _('Be a member of the enterprise') %> | ... | ... |