Commit 5894ed70f9d739bed4bbcce5346e43a194b1794c
1 parent
e3b80089
Exists in
master
and in
29 other branches
ActionItem6: controller changed form enterprises to enterprise (singular form)
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@167 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
21 additions
and
68 deletions
Show diff stats
... | ... | @@ -0,0 +1,21 @@ |
1 | +# Manage enterprises by providing an interface to register, activate and manage them | |
2 | +class EnterprisesController < ApplicationController | |
3 | + | |
4 | + def register_form | |
5 | + @vitual_communities = VirtualCommunity.find(:all) | |
6 | + end | |
7 | + | |
8 | + def create | |
9 | + @enterprise = Enterprise.new(params[:enterprise]) | |
10 | + if @enterprise.save | |
11 | + redirect_to :action => 'choose_validation_entity_or_net' | |
12 | + else | |
13 | + render :action => 'register_form' | |
14 | + end | |
15 | + end | |
16 | + | |
17 | + def choose_validation_entity_or_net | |
18 | +# @options = Entity_or_Net.find(:all)) | |
19 | + @options = ['a', 'b', 'c'] | |
20 | + end | |
21 | +end | ... | ... |
app/controllers/enterprises_controller.rb
... | ... | @@ -1,21 +0,0 @@ |
1 | -# Manage enterprises by providing an interface to register, activate and manage them | |
2 | -class EnterprisesController < ApplicationController | |
3 | - | |
4 | - def register_form | |
5 | - @vitual_communities = VirtualCommunity.find(:all) | |
6 | - end | |
7 | - | |
8 | - def create | |
9 | - @enterprise = Enterprise.new(params[:enterprise]) | |
10 | - if @enterprise.save | |
11 | - redirect_to :action => 'choose_validation_entity_or_net' | |
12 | - else | |
13 | - render :action => 'register_form' | |
14 | - end | |
15 | - end | |
16 | - | |
17 | - def choose_validation_entity_or_net | |
18 | -# @options = Entity_or_Net.find(:all)) | |
19 | - @options = ['a', 'b', 'c'] | |
20 | - end | |
21 | -end |
app/views/enterprises/choose_validation_entity_or_net.rhtml
app/views/enterprises/register.rhtml
app/views/enterprises/register_form.rhtml
... | ... | @@ -1,37 +0,0 @@ |
1 | -<%= error_messages_for 'enterprise' %> | |
2 | - | |
3 | -<h2><%= _('Register enterprise') %></h2> | |
4 | - | |
5 | -<% form_tag :action => 'create' do %> | |
6 | -<p><label for="name"><%= _('Name') %></label><br/> | |
7 | -<%= text_field 'enterprise', 'name', 'size' => 20 %></p> | |
8 | - | |
9 | -<!-- <p><label for='virtual_community_id'>< %= _('Virtual Community') %></label><br/> | |
10 | -< %= select 'enterprise', 'virtual_community_id', @vitual_communities.collect { |v| [v.name, v.id] } %> --> | |
11 | - | |
12 | -<p><label for="address"><%= _('Address') %></label><br/> | |
13 | -<%= text_field 'enterprise', 'address', 'size' => 50 %></p> | |
14 | - | |
15 | -<p><label for="contact_phone"><%= _('Contact Phone') %></label><br/> | |
16 | -<%= text_field 'enterprise', 'contact_phone', 'size' => 20 %></p> | |
17 | - | |
18 | -<p><label for="contact_person"><%= _('Contact Person') %></label><br/> | |
19 | -<%= text_field 'enterprise', 'contact_person', 'size' => 20 %></p> | |
20 | - | |
21 | -<p><label for="acronym"><%= _('Acronym') %></label><br/> | |
22 | -<%= text_field 'enterprise', 'acronym', 'size' => 20 %></p> | |
23 | - | |
24 | -<p><label for="foundation_year"><%= _('Foundation Year') %></label><br/> | |
25 | -<%= text_field 'enterprise', 'foundation_year', 'size' => 20 %></p> | |
26 | - | |
27 | -<p><label for="legal_form"><%= _('Legal Form') %></label><br/> | |
28 | -<%= text_field 'enterprise', 'legal_form', 'size' => 20 %></p> | |
29 | - | |
30 | -<p><label for="economic_activity"><%= _('Economic Activity') %></label><br/> | |
31 | -<%= text_field 'enterprise', 'economic_activity', 'size' => 20 %></p> | |
32 | - | |
33 | -<p><label for="management_information"><%= _('Management Information') %></label><br/> | |
34 | -<%= text_area 'enterprise', 'management_information', 'cols' => 40, 'rows' => 20 %></p> | |
35 | - | |
36 | -<p><%= submit_tag 'Send' %></p> | |
37 | -<% end %> |