Commit 0fc7cb994ae48456132eb768774368cca7966e49
1 parent
9a696e6e
Exists in
master
and in
29 other branches
ActionItem428: add skel to administrator enable / disable enterprises
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1992 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
44 additions
and
1 deletions
Show diff stats
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +<h1><%= _("%s's enterprises") % environment.name %></h1> | ||
2 | + | ||
3 | +<table> | ||
4 | +<% for enterprise in @enterprises %> | ||
5 | + <tr> | ||
6 | + <td> <%= image_tag(profile_icon(enterprise)) %> </td> | ||
7 | + <td> | ||
8 | + <%= _('Name: %s') % link_to(enterprise.name, enterprise.url) %> <br/> | ||
9 | + <%#= _('Description: %s') % enterprise.description + '<br/>' if enterprise.kind_of?(Community) %> | ||
10 | + <%= _('Created at: %s') % show_date(enterprise.created_at) %> <br/> | ||
11 | + <%= _('Actions: %s') % link_to(_('Manage'), enterprise.admin_url) %> <br/> | ||
12 | + | ||
13 | + </td> | ||
14 | + </tr> | ||
15 | +<% end %> | ||
16 | +</table> | ||
17 | + | ||
18 | +<% button_bar do %> | ||
19 | + <%#= button :add, _('Register a new Enterprise'), :controller => 'enterprise_registration' %> | ||
20 | + <%#= button :add, _('Create a new community'), :action => 'new_community' %> | ||
21 | + <%#= button :back, _('Go back'), :controller => 'profile_editor' %> | ||
22 | +<% end %> |
test/functional/admin_panel_controller_test.rb
@@ -69,8 +69,12 @@ class AdminPanelControllerTest < Test::Unit::TestCase | @@ -69,8 +69,12 @@ class AdminPanelControllerTest < Test::Unit::TestCase | ||
69 | should 'sanitize description with white_list' do | 69 | should 'sanitize description with white_list' do |
70 | post :site_info, :environment => { :description => "This <strong>is</strong> <scrypt>alert('alow')</script>my new environment" } | 70 | post :site_info, :environment => { :description => "This <strong>is</strong> <scrypt>alert('alow')</script>my new environment" } |
71 | assert_redirected_to :action => 'index' | 71 | assert_redirected_to :action => 'index' |
72 | - #assert_sanitized Environment.default.description | ||
73 | assert_equal "This <strong>is</strong> alert('alow')my new environment", Environment.default.description | 72 | assert_equal "This <strong>is</strong> alert('alow')my new environment", Environment.default.description |
74 | end | 73 | end |
75 | 74 | ||
75 | + should 'link to manage enterprises' do | ||
76 | + get :index | ||
77 | + assert_tag :tag => 'a', :attributes => { :href => '/admin/enterprises' } | ||
78 | + end | ||
79 | + | ||
76 | end | 80 | end |