diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 25cec3b..7c41acb 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -24,4 +24,7 @@ class ProfileController < ApplicationController @friends= profile.friends end + def members + @members = profile.members + end end diff --git a/app/views/profile/index.rhtml b/app/views/profile/index.rhtml index a06ccbc..c144a43 100644 --- a/app/views/profile/index.rhtml +++ b/app/views/profile/index.rhtml @@ -14,6 +14,9 @@
  • <%= link_to_function _('Friends'), 'alert(%s)' % _('This function is not available yet.').inspect %>
  • <%= link_to _('Communities'), :action => 'communities' %>
  • <%= link_to _('Enterprises'), :action => 'enterprises' %>
  • + <% if profile.kind_of? Organization %> +
  • <%= link_to _('Members'), :action => 'members' %>
  • + <% end %>
  • <%= _('Tags:') %> diff --git a/app/views/profile/members.rhtml b/app/views/profile/members.rhtml new file mode 100644 index 0000000..9ae23a6 --- /dev/null +++ b/app/views/profile/members.rhtml @@ -0,0 +1,11 @@ +

    <%= _("%s' members") % profile.name %>

    + + + +<% button_bar do %> + <%= button(:back, _('Go back'), :controller => 'profile') %> +<% end %> diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index ac6d24b..18253d2 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -23,10 +23,27 @@ class ProfileControllerTest < Test::Unit::TestCase assert_kind_of Array, assigns(:friends) end - should 'list communities' + should 'list communities' do + get :communities - should 'list environments' + assert_response :success + assert_template 'communities' + assert_kind_of Array, assigns(:communities) + end + + should 'list enterprises' do + get :enterprises + + assert_response :success + assert_template 'enterprises' + assert_kind_of Array, assigns(:enterprises) + end - should 'list members (for organizations)' + should 'list members (for organizations)' do + get :members + assert_response :success + assert_template 'members' + assert_kind_of Array, assigns(:members) + end end -- libgit2 0.21.2