Permalink
Browse files

Merge branch 'master' of https://github.com/tenderlove/rubycommitters…

….org

Conflicts:
	app/helpers/accounts_helper.rb
	app/views/accounts/_account.html.erb
  • Loading branch information...
2 parents b6c3659 + 5b4c07e commit d36298589c0ef62117b0245b330fe52047b6aa60 @kossnocorp kossnocorp committed Jan 5, 2011
Showing with 80 additions and 6 deletions.
  1. +1 −1 app/helpers/accounts_helper.rb
  2. +79 −5 app/views/accounts/_account.html.erb
@@ -10,7 +10,7 @@ def link_to_service name, service
when 'github'
'http://github.com/' + service.key
when 'facebook'
- if service.key =~ /^\sd+$/
+ if service.key =~ /^\s*\d+$/
'http://www.facebook.com/profile.php?id=' + service.key
else
'http://www.facebook.com/' + service.key
@@ -2,7 +2,7 @@
<div class="commiter-wrapper">
<ul class="portraits">
- <% if account.portraits.length > 0 %>
+ <% unless account.portraits.empty? %>
<%= render :partial => 'portrait', :collection => account.portraits %>
<% else %>
<li><div class="image-wrapper"><%= image_tag 'no_portrait.png' %></div></li>
@@ -13,21 +13,21 @@
<h2><%= account.username %></h2>
- <% if account.names.length > 0 %>
+ <% unless account.names.empty? %>
<h3>
Other accouts: <%= account.names.map(&:value).join(', ') %>
</h3>
<% end %>
<div class="commiter-data-extra">
- <% if account.nicks.length > 0 %>
+ <% unless account.nicks.empty? %>
<dl class="nicknames">
<dt>Nicknames:</dt>
<dd><%= account.nicks.map(&:value).join(', ') %></dd>
</dl>
<% end %>
- <% if account.sites.length > 0 %>
+ <% unless account.sites.empty? %>
<dl class="sites">
<dt>Sites:</dt>
<dd>
@@ -38,7 +38,7 @@
</dl>
<% end %>
- <% if account.services.length > 0 %>
+ <% unless account.services.empty? %>
<dl class="services">
<dt>Services:</dt>
<dd>
@@ -69,3 +69,77 @@
</div>
</div>
</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.