Commit 95e7135cd223d4d91ed04abda1ae00c7e12aec13

Authored by JoenioCosta
1 parent 17cff055

ActionItem265: added profile name and link


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1965 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/search_helper.rb
@@ -40,20 +40,13 @@ module SearchHelper @@ -40,20 +40,13 @@ module SearchHelper
40 end 40 end
41 41
42 def display_profile_info(profile) 42 def display_profile_info(profile)
43 - profile = Enterprise.find :first  
44 - table_rows = ''  
45 - profile.summary.each do |item|  
46 - name = item[0]  
47 - value = item[1]  
48 - if value.is_a?(Proc)  
49 - value = self.instance_eval(value)  
50 - end  
51 - table_rows << content_tag('tr', content_tag('td', _(name)) + content_tag('td', value))  
52 - end 43 + profile_info = ''
  44 + profile_info << content_tag('strong', profile.name) + '<br/>'
  45 + profile_info << link_to(url_for(profile.url), profile.url) + '<br/>'
53 content_tag( 'table', 46 content_tag( 'table',
54 content_tag( 'tr', 47 content_tag( 'tr',
55 content_tag('td', content_tag('div', profile_image(profile, :thumb), :class => 'profile-info-picture')) + 48 content_tag('td', content_tag('div', profile_image(profile, :thumb), :class => 'profile-info-picture')) +
56 - content_tag('td', content_tag('table', table_rows)) 49 + content_tag('td', profile_info)
57 ), 50 ),
58 :class => 'profile-info' 51 :class => 'profile-info'
59 ) 52 )
public/stylesheets/controller_search.css
@@ -164,3 +164,6 @@ @@ -164,3 +164,6 @@
164 padding: 70px 10px 0px 0px; 164 padding: 70px 10px 0px 0px;
165 } 165 }
166 166
  167 +.profile-info {
  168 + text-align: left;
  169 +}