forked from tenderlove/rubycommitters.org
/
_account.html.erb
49 lines (49 loc) · 1.47 KB
/
_account.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="member">
<dl>
<dt><%= account.username %></dt>
<% unless account.names.empty? %>
<dd>
<strong>Names: </strong>
<%= account.names.map(&:value).join(" • ").html_safe %>
</dd>
<% end %>
<% unless account.nicks.empty? %>
<dd>
<strong>Nickname: </strong>
<%= account.nicks.map(&:value).join(" • ").html_safe %>
</dd>
<% end %>
<% unless account.sites.empty? %>
<dd>
<strong>Sites: </strong>
<%= account.sites.map do |site| %>
<% link_to site.title, site.url %>
<% end.join(' • ').html_safe %>
</dd>
<% end %>
<% unless account.books.empty? %>
<dd>
<strong>Books: </strong>
<%= account.books.map do |book| %>
<% link_to book.key, 'http://www.amazon.' + (book.isbn.match(/^4/) ? "co.jp":"com") + '/dp/' + book.isbn %>
<% end.join(" • ").html_safe %>
</dd>
<% end %>
<% unless account.services.empty? %>
<dd class="services">
<%= account.services.map do |service| %>
<% link_to_service service.name, service %>
<% end.join(' ').html_safe %>
</dd>
<% end %>
</dl>
<% if account.portraits.empty? %>
<%= image_tag "default.jpg" %>
<% else %>
<div <%= "class='slideshow'" if account.portraits.count > 1 %> >
<% account.portraits.each do |portrait| %>
<%= image_tag portrait.url %>
<% end %>
</div>
<% end %>
</div>