Commit 44062abc91e662d938d2e8f1282334fbc2048187
1 parent
7664ae88
Exists in
master
and in
28 other branches
ActionItem111: fixed some interface issues
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@757 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
8 additions
and
6 deletions
Show diff stats
app/models/organization.rb
| 1 | 1 | # Represents any organization of the system and has an organization_info object to hold its info |
| 2 | -class Organization < Profile | |
| 2 | +class Organization < Profile | |
| 3 | 3 | has_one :organization_info |
| 4 | 4 | |
| 5 | 5 | belongs_to :region |
| 6 | 6 | |
| 7 | 7 | has_one :validation_info |
| 8 | 8 | |
| 9 | + after_create do |org| | |
| 10 | + OrganizationInfo.create!(:organization_id => org.id) | |
| 11 | + end | |
| 12 | + | |
| 9 | 13 | def validation_methodology |
| 10 | 14 | methodology = self.validation_info ? self.validation_info.validation_methodology : nil |
| 11 | 15 | methodology || ('<em>' + _('(not informed)') + '</em>') | ... | ... |
app/views/profile_editor/index.rhtml
| ... | ... | @@ -10,10 +10,8 @@ |
| 10 | 10 | |
| 11 | 11 | <% end %> |
| 12 | 12 | |
| 13 | +<!--- | |
| 13 | 14 | <p> <%= link_to _('Edit Visual Design'), :action => 'design_editor' %> </p> |
| 14 | 15 | |
| 15 | 16 | <p> <%= link_to _('Menage content'), :controller => 'cms' %> </p> |
| 16 | - | |
| 17 | -<% if @profile.class == Enterprise %> | |
| 18 | - <p> <%= link_to _('Edit enterprise info'), :controller => 'enterprise_editor'%> </p> | |
| 19 | -<% end %> | |
| 17 | +---> | ... | ... |
script/anhetegua
| ... | ... | @@ -61,7 +61,7 @@ RoleAssignment.create!(:accessor => root, :role => admin_role, :resource => nil) |
| 61 | 61 | RoleAssignment.create!(:accessor => root, :role => owner_role, :resource => noosfero) |
| 62 | 62 | |
| 63 | 63 | # Sample user and sample enterprise owned by him |
| 64 | -ze= User.create!(:login => 'ze', :email => 'ze@localhost.localdomain', :password => 'test', :password_confirmation => 'test') | |
| 64 | +ze= User.create!(:login => 'ze', :email => 'ze@localhost.localdomain', :password => 'test', :password_confirmation => 'test').person | |
| 65 | 65 | empa = Enterprise.create!(:name => 'Empreendimento A', :identifier => 'empreendimento_a') |
| 66 | 66 | RoleAssignment.create!(:accessor => ze, :role => owner_role, :resource => empa) |
| 67 | 67 | ... | ... |