diff --git a/app/controllers/admin/enterprises_controller.rb b/app/controllers/admin/enterprises_controller.rb
new file mode 100644
index 0000000..d4599fb
--- /dev/null
+++ b/app/controllers/admin/enterprises_controller.rb
@@ -0,0 +1,7 @@
+class EnterprisesController < AdminController
+
+ def index
+ @enterprises = Enterprise.find(:all)
+ end
+
+end
diff --git a/app/helpers/enterprises_helper.rb b/app/helpers/enterprises_helper.rb
new file mode 100644
index 0000000..10321ba
--- /dev/null
+++ b/app/helpers/enterprises_helper.rb
@@ -0,0 +1,2 @@
+module EnterprisesHelper
+end
diff --git a/app/views/enterprises/index.rhtml b/app/views/enterprises/index.rhtml
new file mode 100644
index 0000000..3dfe0f7
--- /dev/null
+++ b/app/views/enterprises/index.rhtml
@@ -0,0 +1,22 @@
+
<%= _("%s's enterprises") % environment.name %>
+
+
+<% for enterprise in @enterprises %>
+
+ <%= image_tag(profile_icon(enterprise)) %> |
+
+ <%= _('Name: %s') % link_to(enterprise.name, enterprise.url) %>
+ <%#= _('Description: %s') % enterprise.description + ' ' if enterprise.kind_of?(Community) %>
+ <%= _('Created at: %s') % show_date(enterprise.created_at) %>
+ <%= _('Actions: %s') % link_to(_('Manage'), enterprise.admin_url) %>
+
+ |
+
+<% end %>
+
+
+<% button_bar do %>
+ <%#= button :add, _('Register a new Enterprise'), :controller => 'enterprise_registration' %>
+ <%#= button :add, _('Create a new community'), :action => 'new_community' %>
+ <%#= button :back, _('Go back'), :controller => 'profile_editor' %>
+<% end %>
diff --git a/test/functional/admin_panel_controller_test.rb b/test/functional/admin_panel_controller_test.rb
index 50bba72..a20c55a 100644
--- a/test/functional/admin_panel_controller_test.rb
+++ b/test/functional/admin_panel_controller_test.rb
@@ -69,8 +69,12 @@ class AdminPanelControllerTest < Test::Unit::TestCase
should 'sanitize description with white_list' do
post :site_info, :environment => { :description => "This is alert('alow')my new environment" }
assert_redirected_to :action => 'index'
- #assert_sanitized Environment.default.description
assert_equal "This is alert('alow')my new environment", Environment.default.description
end
+ should 'link to manage enterprises' do
+ get :index
+ assert_tag :tag => 'a', :attributes => { :href => '/admin/enterprises' }
+ end
+
end
diff --git a/test/functional/enterprises_controller_test.rb b/test/functional/enterprises_controller_test.rb
new file mode 100644
index 0000000..9d9cea2
--- /dev/null
+++ b/test/functional/enterprises_controller_test.rb
@@ -0,0 +1,8 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class EnterprisesControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
--
libgit2 0.21.2