diff --git a/app/controllers/my_profile/membership_editor_controller.rb b/app/controllers/my_profile/membership_editor_controller.rb
deleted file mode 100644
index 985fed2..0000000
--- a/app/controllers/my_profile/membership_editor_controller.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-class MembershipEditorController < MyProfileController
-
- before_filter :login_required
-
- def target
- environment
- end
-
- protect 'edit_profile', :profile, :only => [:index, :new_enterprise, :create_enterprise ]
-
- def index
- @memberships = current_user.person.enterprise_memberships
- end
-
- def new_enterprise
- @enterprise = Enterprise.new()
- @validation_entities = Organization.find(:all)
- end
-
- def create_enterprise
- @enterprise = Enterprise.new(params[:enterprise])
- @enterprise.organization_info = OrganizationInfo.new(params[:organization])
- if @enterprise.save
- @enterprise.affiliate(current_user.person, Role.find(:all, :conditions => {:name => ['owner', 'member', 'moderator']}))
- flash[:notice] = _('The enterprise was successfully created, the validation entity will cotact you as soon as your enterprise is approved')
- redirect_to :action => 'index'
- else
- flash[:notice] = _('Enterprise was not created')
- @validation_entities = Organization.find(:all)
- render :action => 'register_form'
- end
- end
-
- # Search enterprises by name or tags
- def search
- @tagged_enterprises = Enterprise.search(params[:query])
- end
-
-end
diff --git a/app/views/membership_editor/_enterprise.rhtml b/app/views/membership_editor/_enterprise.rhtml
deleted file mode 100644
index 1c32c0d..0000000
--- a/app/views/membership_editor/_enterprise.rhtml
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= link_to enterprise.name, '/' + enterprise.identifier %>
-
diff --git a/app/views/membership_editor/_form.rhtml b/app/views/membership_editor/_form.rhtml
deleted file mode 100644
index cb9a43a..0000000
--- a/app/views/membership_editor/_form.rhtml
+++ /dev/null
@@ -1,32 +0,0 @@
-
<%= _('Name') %>
-<%= text_field 'enterprise', 'name', 'size' => 20 %>
-
-<%= _('Address') %>
-<%= text_field 'enterprise', 'address', 'size' => 50 %>
-
-<%= _('Contact Phone') %>
-<%= text_field 'enterprise', 'contact_phone', 'size' => 20 %>
-
-<%= _('Contact Person') %>
-<%= text_field 'organization_info', 'contact_person', 'size' => 20 %>
-
-<%= _('Acronym') %>
-<%= text_field 'organization_info', 'acronym', 'size' => 20 %>
-
-<%= _('Foundation Year') %>
-<%= text_field 'organization_info', 'foundation_year', 'size' => 20 %>
-
-<%= _('Legal Form') %>
-<%= text_field 'organization_info', 'legal_form', 'size' => 20 %>
-
-<%= _('Economic Activity') %>
-<%= text_field 'organization_info', 'economic_activity', 'size' => 20 %>
-
-<%= _('Management Information') %>
-<%= text_editor 'organization_info', 'management_information' %>
-
-<%= _('Validation Entity') %>
-<%= select 'validation_entity', 'id', @validation_entities.map{|v| [v.name, v.id]}, :include_blank => true %>
-
-<%= _('Tags') %>
-<%= text_field 'enterprise', 'tag_list', 'size' => 20 %>
diff --git a/app/views/membership_editor/index.rhtml b/app/views/membership_editor/index.rhtml
deleted file mode 100644
index 63c4f4c..0000000
--- a/app/views/membership_editor/index.rhtml
+++ /dev/null
@@ -1,16 +0,0 @@
-<%= _('Listing memberships')%>
-
-<% form_tag 'membership_editor/search' do %>
- <%= _('Search') %> <%= text_field_tag 'query' %>
-<% end %>
-
-
-<% @memberships.each do |m|%>
-
- <%= link_to_homepage m.name, m.identifier %>
- <%= link_to_myprofile _('Manage') , {:controller => 'profile_editor'}, m.identifier %>
-
-<% end %>
-
-
-<%= link_to _('Request registration of a new enterprise'), :controller => 'enterprise_registration' %>
diff --git a/app/views/membership_editor/new_enterprise.rhtml b/app/views/membership_editor/new_enterprise.rhtml
deleted file mode 100644
index f09a505..0000000
--- a/app/views/membership_editor/new_enterprise.rhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<%= error_messages_for 'enterprise' %>
-
-<%= _('Register enterprise') %>
-
- <%= _('How to proceed') %>
- <%= _('Fill the form and hit the Register button then the enterprise will be submitted for evaluation at the validation entitiy of your choice (within your state), when the enterprise is aproved you will be able to activate its profile') %>
-
-<% form_tag :action => 'create_enterprise' do %>
- <%= _('Identifier') %>
- <%= text_field 'enterprise', 'identifier', 'size' => 20 %>
- <%= render :partial => 'form' %>
-<%= submit_tag _('Register') %>
-<%= link_to _('Cancel'), :action => 'index' %>
-<% end %>
diff --git a/app/views/membership_editor/search.rhtml b/app/views/membership_editor/search.rhtml
deleted file mode 100644
index 0387a8e..0000000
--- a/app/views/membership_editor/search.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
- <%= @tagged_enterprises.size.to_s + _(' enterprises found') %>
-
-<%= render :partial => 'enterprise', :collection => @tagged_enterprises %>
diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml
index bcade11..a6a83f9 100644
--- a/app/views/profile_editor/index.rhtml
+++ b/app/views/profile_editor/index.rhtml
@@ -15,9 +15,9 @@
<%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %>
- <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') %>
+ <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') if profile.organization? %>
- <%= file_manager_button(_('Needed Products'), 'icons-app/consumed_product.png', :controller => 'consumed_products') %>
+ <%= file_manager_button(_('Consumed Products'), 'icons-app/consumed_product.png', :controller => 'consumed_products') %>
<%= file_manager_button(_('Manage Products'), 'icons-app/products.png', :controller => 'manage_products') if profile.enterprise? %>
@@ -29,11 +29,7 @@
<% file_manager do %>
<% @profile.enterprise_memberships.each do |em| %>
- <% if em.image %>
- <%= file_manager_button(em.name, em.image.public_filename(:minor), :profile => em.identifier, :controller => 'profile_editor' ) %>
- <% else %>
- <%= link_to_myprofile(em.name, {}, em.identifier) %>
- <% end %>
+ <%= file_manager_button(em.name, em.image ? em.image.public_filename(:minor) : 'icons-app/organization.png', :profile => em.identifier, :controller => 'profile_editor' ) %>
<% end %>
<%= file_manager_button(_('Register a new Enterprise'), 'icons-app/enterprise-registration.png', :controller => 'enterprise_registration') %>
diff --git a/public/images/icons-app/README b/public/images/icons-app/README
index fb75ace..178e567 100644
--- a/public/images/icons-app/README
+++ b/public/images/icons-app/README
@@ -23,6 +23,7 @@ password.png dlg-neu
abiword_48.png dlg-neu
gnome-other.png Nuovo
user_icon.png dlg-neu
+temp-home.png Nuovo
Icons rasterization
===================
diff --git a/public/images/icons-app/organization.png b/public/images/icons-app/organization.png
new file mode 120000
index 0000000..4bd7dff
--- /dev/null
+++ b/public/images/icons-app/organization.png
@@ -0,0 +1 @@
+temp-home.png
\ No newline at end of file
diff --git a/public/images/icons-app/temp-home.png b/public/images/icons-app/temp-home.png
new file mode 100644
index 0000000..c96f0cd
Binary files /dev/null and b/public/images/icons-app/temp-home.png differ
diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css
index 51b8a1c..0fd27fe 100644
--- a/public/stylesheets/common.css
+++ b/public/stylesheets/common.css
@@ -121,9 +121,10 @@ div.file-manager-button a {
border: 1px solid #e0e0e0;
display: block;
padding: 3px;
- height: 80px;
+ height: 90px;
overflow: hidden;
background: white;
+ font-size: 90%;
}
div.file-manager
diff --git a/test/functional/membership_editor_controller_test.rb b/test/functional/membership_editor_controller_test.rb
deleted file mode 100644
index bb8df48..0000000
--- a/test/functional/membership_editor_controller_test.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require 'membership_editor_controller'
-
-# Re-raise errors caught by the controller.
-class MembershipEditorController; def rescue_action(e) raise e end; end
-
-class MembershipEditorControllerTest < Test::Unit::TestCase
- def setup
- @controller = MembershipEditorController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- login_as('ze')
- end
- all_fixtures
-
- should 'list the memberships of the person' do
- get :index, :profile => 'ze'
- assert assigns(:memberships)
- assert_kind_of Array, assigns(:memberships)
- end
-
- should 'prompt for new enterprise data' do
- get :new_enterprise, :profile => 'ze'
- assert assigns(:validation_entities)
- assert_kind_of Array, assigns(:validation_entities)
- end
-
- should 'create a new enterprise' do
- post :create_enterprise, :profile => 'ze', :enterprise => {:name => 'New Ent', :identifier => 'new_net'}
- assert assigns(:enterprise)
- assert_kind_of Enterprise, assigns(:enterprise)
- end
-end
--
libgit2 0.21.2