Commit 9bd978a47c13bba4e55a04f1990e8fc18b032450
1 parent
d3482d96
Exists in
master
and in
28 other branches
ActionItem376: showing number of members on manage groups
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1777 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
10 additions
and
10 deletions
Show diff stats
app/views/content_viewer/view_page.rhtml
| ... | ... | @@ -50,16 +50,6 @@ |
| 50 | 50 | |
| 51 | 51 | <%= @page.to_html %> |
| 52 | 52 | |
| 53 | -<!-- | |
| 54 | -<% unless @page.children.empty? %> | |
| 55 | - <hr/> | |
| 56 | - <ul> | |
| 57 | - <% @page.children.each do |item| %> | |
| 58 | - <li><%= link_to_document(item) %></li> | |
| 59 | - <% end %> | |
| 60 | -<% end %> | |
| 61 | ---> | |
| 62 | - | |
| 63 | 53 | <div id="article-cat"> |
| 64 | 54 | <h4><%= _('Categories') %></h4> |
| 65 | 55 | <ul> | ... | ... |
app/views/memberships/index.rhtml
| ... | ... | @@ -9,12 +9,14 @@ |
| 9 | 9 | <tr> |
| 10 | 10 | <th><%= _('Name') %></th> |
| 11 | 11 | <th><%= _('Type') %></th> |
| 12 | + <th><%= _('Members') %></th> | |
| 12 | 13 | <th><%= _('Actions') %></th> |
| 13 | 14 | </tr> |
| 14 | 15 | <% for membership in @memberships %> |
| 15 | 16 | <tr> |
| 16 | 17 | <td><%= link_to membership.name, membership.url %></td> |
| 17 | 18 | <td><%= _(membership.class.name) %></td> |
| 19 | + <td><%= _(membership.members.size.to_s) %></td> | |
| 18 | 20 | <td> |
| 19 | 21 | <%= link_to _('Manage'), membership.admin_url %> |
| 20 | 22 | </td> | ... | ... |
test/functional/memberships_controller_test.rb
| ... | ... | @@ -82,4 +82,12 @@ class MembershipsControllerTest < Test::Unit::TestCase |
| 82 | 82 | assert_sanitized assigns(:community).description |
| 83 | 83 | end |
| 84 | 84 | |
| 85 | + should 'show number of members on list' do | |
| 86 | + community = Community.create!(:name => 'my test community') | |
| 87 | + community.add_member(profile) | |
| 88 | + get :index, :profile => profile.identifier | |
| 89 | + assert_tag :tag => 'th', :content => 'Members' | |
| 90 | + assert_tag :tag => 'td', :content => '1' | |
| 91 | + end | |
| 92 | + | |
| 85 | 93 | end | ... | ... |