Commit e0f46608ea3b5aba14d1d92e39921639dcd8fc29

Authored by AurelioAHeckert
1 parent 720d5c2a

ActionItem489: location in profile info block

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2115 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/views/blocks/profile_info.rhtml
1   -<h2><%= block.owner.name %></h2>
  1 +<div class="vcard">
  2 +
  3 +<h2 class="<%= profile.class == Person ? 'fn' : 'org' %>"><%= block.owner.name %></h2>
2 4  
3 5 <div class="profile-info-picture">
4 6 <div class="profile-info-picture-inner1">
... ... @@ -13,7 +15,7 @@
13 15  
14 16 <ul class="profile-info-data">
15 17 <li><%= _('Since %{year}/%{month}') % { :year => block.owner.created_at.year, :month => block.owner.created_at.month } %></li>
16   - <li><%= link_to _('Homepage'), block.owner.url %></li>
  18 + <li><%= link_to _('Homepage'), block.owner.url, :class => 'url' %></li>
17 19 <li><%= link_to _('View profile'), block.owner.public_profile_url %></li>
18 20 <li><%= link_to(_('Products/Services'), :controller => 'catalog', :profile => block.owner.identifier) if block.owner.enterprise? %></li>
19 21 <% if !user.nil? and user.has_permission?('edit_profile', profile) %>
... ... @@ -21,7 +23,17 @@
21 23 <% end %>
22 24 </ul>
23 25  
  26 +<div class="adr">
  27 +<%=
  28 + [ [ profile.city, 'locality' ],
  29 + [ profile.state, 'region' ],
  30 + [ profile.country, 'country-name' ]
  31 + ].map{ |s,c| s =~ /^\s*$/ ? nil : content_tag( 'span', s, :class => c ) }.compact.join ' - '
  32 +%>
  33 +</div>
  34 +
24 35 <div class="profile-info-options">
25 36 <%= render :file => 'blocks/profile_info_actions/' + block.owner.class.name.underscore %>
26 37 </div>
27 38  
  39 +</div><!-- end class="vcard" -->
... ...
public/stylesheets/blocks/profile-info-block.css
... ... @@ -80,6 +80,16 @@
80 80 top: 20px;
81 81 }
82 82  
  83 +.profile-info-block .adr {
  84 + padding-top: 5px;
  85 + font-size: 11px;
  86 + clear: both;
  87 + text-align: center;
  88 +}
  89 +.profile-info-block .adr span {
  90 + white-space: nowrap;
  91 +}
  92 +
83 93 .profile-info-options {
84 94 clear: both;
85 95 }
... ...