Navigation Menu

Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
….org

Conflicts:
	app/helpers/accounts_helper.rb
	app/views/accounts/_account.html.erb
  • Loading branch information
kossnocorp committed Jan 5, 2011
2 parents b6c3659 + 5b4c07e commit d362985
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/helpers/accounts_helper.rb
Expand Up @@ -10,7 +10,7 @@ def link_to_service name, service
when 'github' when 'github'
'http://github.com/' + service.key 'http://github.com/' + service.key
when 'facebook' when 'facebook'
if service.key =~ /^\sd+$/ if service.key =~ /^\s*\d+$/
'http://www.facebook.com/profile.php?id=' + service.key 'http://www.facebook.com/profile.php?id=' + service.key
else else
'http://www.facebook.com/' + service.key 'http://www.facebook.com/' + service.key
Expand Down
84 changes: 79 additions & 5 deletions app/views/accounts/_account.html.erb
Expand Up @@ -2,7 +2,7 @@
<div class="commiter-wrapper"> <div class="commiter-wrapper">


<ul class="portraits"> <ul class="portraits">
<% if account.portraits.length > 0 %> <% unless account.portraits.empty? %>
<%= render :partial => 'portrait', :collection => account.portraits %> <%= render :partial => 'portrait', :collection => account.portraits %>
<% else %> <% else %>
<li><div class="image-wrapper"><%= image_tag 'no_portrait.png' %></div></li> <li><div class="image-wrapper"><%= image_tag 'no_portrait.png' %></div></li>
Expand All @@ -13,21 +13,21 @@


<h2><%= account.username %></h2> <h2><%= account.username %></h2>


<% if account.names.length > 0 %> <% unless account.names.empty? %>
<h3> <h3>
Other accouts: <%= account.names.map(&:value).join(', ') %> Other accouts: <%= account.names.map(&:value).join(', ') %>
</h3> </h3>
<% end %> <% end %>


<div class="commiter-data-extra"> <div class="commiter-data-extra">
<% if account.nicks.length > 0 %> <% unless account.nicks.empty? %>
<dl class="nicknames"> <dl class="nicknames">
<dt>Nicknames:</dt> <dt>Nicknames:</dt>
<dd><%= account.nicks.map(&:value).join(', ') %></dd> <dd><%= account.nicks.map(&:value).join(', ') %></dd>
</dl> </dl>
<% end %> <% end %>
<% if account.sites.length > 0 %> <% unless account.sites.empty? %>
<dl class="sites"> <dl class="sites">
<dt>Sites:</dt> <dt>Sites:</dt>
<dd> <dd>
Expand All @@ -38,7 +38,7 @@
</dl> </dl>
<% end %> <% end %>
<% if account.services.length > 0 %> <% unless account.services.empty? %>
<dl class="services"> <dl class="services">
<dt>Services:</dt> <dt>Services:</dt>
<dd> <dd>
Expand Down Expand Up @@ -69,3 +69,77 @@
</div> </div>
</div> </div>
</td> </td>
=======
<% unless account.names.empty? %>
<tr>
<td>Names:</td>
<td>
<ul>
<%= render :partial => 'name', :collection => account.names %>
</ul>
</td>
</tr>
<% end %>
<% unless account.nicks.empty? %>
<tr>
<td>Nicknames:</td>
<td>
<ul>
<%= render :partial => 'name', :collection => account.nicks %>
</ul>
</td>
</tr>
<% end %>
<% unless account.sites.empty? %>
<tr>
<td>Sites:</td>
<td>
<ul>
<%= render :partial => 'site', :collection => account.sites %>
</ul>
</td>
</tr>
<% end %>
<% unless account.services.empty? %>
<tr>
<td>Services:</td>
<td>
<ul>
<%= render :partial => 'service', :collection => account.services %>
</ul>
</td>
</tr>
<% end %>
<% unless account.portraits.empty? %>
<tr>
<td>Portraits:</td>
<td>
<ul>
<%= render :partial => 'portrait', :collection => account.portraits %>
</ul>
</td>
</tr>
<% end %>

<!-- FIXME: unsure how to link to ISBN. :-( -->
<!--
<% unless account.books.empty? %>
<tr>
<td>Books:</td>
<td>
<ul>
<% account.books.each do |book| %>
<li><%= book.key %></li>
<% end %>
</ul>
</td>
</tr>
<% end %>
-->
</table>
</li>
>>>>>>> 5b4c07e7ea2b46748a9d590a14745a761e25fb6b

0 comments on commit d362985

Please sign in to comment.