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,11 +86,11 @@ class EnterpriseController < ApplicationController | ||
86 | def activate | 86 | def activate |
87 | @enterprise = Enterprise.find(params[:id]) | 87 | @enterprise = Enterprise.find(params[:id]) |
88 | if @enterprise.update_attribute('active', true) | 88 | if @enterprise.update_attribute('active', true) |
89 | - flash[:notice] = 'Enterprise successfuly activacted' | ||
90 | - render :action => 'show' | 89 | + flash[:notice] = _('Enterprise successfuly activacted') |
91 | else | 90 | else |
92 | - redirect_to :action => 'show', :id => @enterprise | 91 | + flash[:notice] = _('Failed to activate the enterprise') |
93 | end | 92 | end |
93 | + redirect_to :action => 'index' | ||
94 | end | 94 | end |
95 | 95 | ||
96 | protected | 96 | protected |
app/views/enterprise/_enterprise.rhtml
1 | <li> | 1 | <li> |
2 | <%= link_to enterprise.name, :action => 'show', :id => enterprise %> | 2 | <%= link_to enterprise.name, :action => 'show', :id => enterprise %> |
3 | <%= link_to _('Edit'), :action => 'edit', :id => enterprise %> | 3 | <%= link_to _('Edit'), :action => 'edit', :id => enterprise %> |
4 | +<%= help _('Change the infomation about the enterprise') %> | ||
4 | <%= link_to _('Delete'), :action => 'destroy', :id => enterprise %> | 5 | <%= link_to _('Delete'), :action => 'destroy', :id => enterprise %> |
6 | +<%= help _('Remove the enterprise from the system') %> | ||
5 | <%= link_to _('Affiliate'), :action => 'affiliate', :id => enterprise unless @my_enterprises.include?(enterprise) %> | 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 | </li> | 11 | </li> |
app/views/enterprise/_search_box.rhtml
@@ -2,5 +2,6 @@ | @@ -2,5 +2,6 @@ | ||
2 | <% form_tag :action => 'search' do %> | 2 | <% form_tag :action => 'search' do %> |
3 | <%= text_field_tag 'query' %> | 3 | <%= text_field_tag 'query' %> |
4 | <%= submit_tag _('Search') %> | 4 | <%= submit_tag _('Search') %> |
5 | + <%= help _('Search enteprises by tag or name') %> | ||
5 | <% end %> | 6 | <% end %> |
6 | </div> | 7 | </div> |
app/views/enterprise/edit.rhtml
@@ -4,6 +4,6 @@ | @@ -4,6 +4,6 @@ | ||
4 | 4 | ||
5 | <% form_tag :action => 'update', :id => @enterprise do %> | 5 | <% form_tag :action => 'update', :id => @enterprise do %> |
6 | <%= render :partial => 'form' %> | 6 | <%= render :partial => 'form' %> |
7 | -<p><%= submit_tag _('Register') %> | 7 | +<p><%= submit_tag _('Update') %> |
8 | <%= link_to _('Cancel'), :action => 'index' %></p> | 8 | <%= link_to _('Cancel'), :action => 'index' %></p> |
9 | <% end %> | 9 | <% end %> |
app/views/enterprise/list.rhtml
1 | <%= render :partial => 'search_box' %> | 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 | <h2> <%= _('Listing my enterprises') %> </h2> | 8 | <h2> <%= _('Listing my enterprises') %> </h2> |
6 | <ul> | 9 | <ul> |
@@ -14,7 +17,9 @@ | @@ -14,7 +17,9 @@ | ||
14 | </ul> | 17 | </ul> |
15 | <% end %> | 18 | <% end %> |
16 | 19 | ||
20 | +<% unless @enterprises.blank? %> | ||
17 | <h4> <%= _('Other Enterprises') %> </h4> | 21 | <h4> <%= _('Other Enterprises') %> </h4> |
18 | <ul> | 22 | <ul> |
19 | <%= render :partial => 'enterprise', :collection => @enterprises %> | 23 | <%= render :partial => 'enterprise', :collection => @enterprises %> |
20 | </ul> | 24 | </ul> |
25 | +<% end %> |
app/views/enterprise/show.rhtml
@@ -16,5 +16,8 @@ | @@ -16,5 +16,8 @@ | ||
16 | <p> <%= _('Tags:') %> <%= @enterprise.tag_list %> </p> | 16 | <p> <%= _('Tags:') %> <%= @enterprise.tag_list %> </p> |
17 | 17 | ||
18 | <%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %> | 18 | <%= link_to _('Edit enterprise'), :action => 'edit', :id => @enterprise %> |
19 | +<%= help _('Change the information about the enterprise') %> | ||
19 | <%= link_to _('Delete enterprise'), :action => 'destroy', :id => @enterprise %> | 20 | <%= link_to _('Delete enterprise'), :action => 'destroy', :id => @enterprise %> |
21 | +<%= help _('Remove the enterprise from the system') %> | ||
20 | <%= link_to _('Affiliate'), :action => 'affiliate' unless @my_enterprises.include?(@enterprise) %> | 22 | <%= link_to _('Affiliate'), :action => 'affiliate' unless @my_enterprises.include?(@enterprise) %> |
23 | +<%= help _('Be a member of the enterprise') %> |