Commit be7ad56cbb3473ca59e898af20e5c5884c1db65b
1 parent
4f106fcd
Exists in
master
and in
28 other branches
ActionItem167: and action item 168 are now working
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1476 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
5 changed files
with
35 additions
and
1 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -12,4 +12,12 @@ class ProfileController < ApplicationController |
12 | 12 | @tagged = profile.find_tagged_with(@tag) |
13 | 13 | end |
14 | 14 | |
15 | + def communities | |
16 | + @communities = profile.communities | |
17 | + end | |
18 | + | |
19 | + def enterprises | |
20 | + @enterprises = profile.enterprises | |
21 | + end | |
22 | + | |
15 | 23 | end | ... | ... |
app/models/person.rb
... | ... | @@ -28,10 +28,14 @@ class Person < Profile |
28 | 28 | memberships(:type => Enterprise.name) |
29 | 29 | end |
30 | 30 | |
31 | + alias :enterprises :enterprise_memberships | |
32 | + | |
31 | 33 | def community_memberships |
32 | 34 | memberships(:type => Community.name) |
33 | 35 | end |
34 | 36 | |
37 | + alias :communities :community_memberships | |
38 | + | |
35 | 39 | |
36 | 40 | def info |
37 | 41 | person_info | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +<h1><%= _("%s's communities") % profile.name %></h1> | |
2 | + | |
3 | +<ul class='profile-list'> | |
4 | +<% @communities.each do |community| %> | |
5 | + <li><%= profile_image_link(community)%></li> | |
6 | +<% end %> | |
7 | +</ul> | |
8 | + | |
9 | +<% button_bar do %> | |
10 | + <%= button(:back, _('Go back'), :controller => 'profile') %> | |
11 | +<% end %> | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +<h1><%= _("%s's enterprises") % profile.name %></h1> | |
2 | + | |
3 | +<ul class='profile-list'> | |
4 | +<% @enterprises.each do |enterprise| %> | |
5 | + <li><%= profile_image_link(enterprise)%></li> | |
6 | +<% end %> | |
7 | +</ul> | |
8 | + | |
9 | +<% button_bar do %> | |
10 | + <%= button(:back, _('Go back'), :controller => 'profile') %> | |
11 | +<% end %> | ... | ... |