forked from tenderlove/rubycommitters.org
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41dadb9
commit 8f97631
Showing
10 changed files
with
120 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
module AccountsHelper | ||
def link_to_service name, service | ||
case service.name | ||
when 'twitter' | ||
link_to name, 'http://twitter.com/' + service.key | ||
when 'friendfeed' | ||
link_to name, 'http://friendfeed.com/' + service.key | ||
when 'mixi' | ||
link_to name, 'http://mixi.jp/show_friend.pl?id=' + service.key | ||
when 'github' | ||
link_to name, 'http://github.com/' + service.key | ||
when 'facebook' | ||
if service.key =~ /^\sd+$/ | ||
link_to name, 'http://www.facebook.com/profile.php?id=' + service.key | ||
else | ||
link_to name, 'http://www.facebook.com/' + service.key | ||
end | ||
when 'iddy' | ||
link_to name, 'http://iddy.jp/profile/' + service.key | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,79 @@ | ||
<li> | ||
Account: <%= account.username %> | ||
Names: | ||
<ul> | ||
<% account.names.each do |name| %> | ||
<li><%= name %></li> | ||
<% end %> | ||
</ul> | ||
Nicknames: | ||
<ul> | ||
<% account.nicks.each do |name| %> | ||
<li><%= name %></li> | ||
<% end %> | ||
</ul> | ||
<table> | ||
<tr> | ||
<td>Account:</td> | ||
<td><%= account.username %></td> | ||
</tr> | ||
|
||
<% if account.names.length > 0 %> | ||
<tr> | ||
<td>Names:</td> | ||
<td> | ||
<ul> | ||
<%= render :partial => 'name', :collection => account.names %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<% if account.nicks.length > 0 %> | ||
<tr> | ||
<td>Nicknames:</td> | ||
<td> | ||
<ul> | ||
<%= render :partial => 'name', :collection => account.nicks %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<% if account.sites.length > 0 %> | ||
<tr> | ||
<td>Sites:</td> | ||
<td> | ||
<ul> | ||
<%= render :partial => 'site', :collection => account.sites %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<% if account.services.length > 0 %> | ||
<tr> | ||
<td>Services:</td> | ||
<td> | ||
<ul> | ||
<%= render :partial => 'service', :collection => account.services %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<% if account.portraits.length > 0 %> | ||
<tr> | ||
<td>Portraits:</td> | ||
<td> | ||
<ul> | ||
<%= render :partial => 'portrait', :collection => account.portraits %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
|
||
<!-- FIXME: unsure how to link to ISBN. :-( --> | ||
<!-- | ||
<% if account.books.length > 0 %> | ||
<tr> | ||
<td>Books:</td> | ||
<td> | ||
<ul> | ||
<% account.books.each do |book| %> | ||
<li><%= book.key %></li> | ||
<% end %> | ||
</ul> | ||
</td> | ||
</tr> | ||
<% end %> | ||
--> | ||
</table> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<li><%= name.value %></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class='image-wrapper'> | ||
<%= image_tag portrait.url %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<li> | ||
<%= link_to_service service.name, service %> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<li><%= link_to site.title, site.url %></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
require 'open-uri' | ||
|
||
desc "import the list of ruby committers" | ||
task :import => 'db:migrate' do | ||
Account.import open('http://svn.coderepos.org/share/lang/ruby/ruby-committers/ruby-committers.yml') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.image-wrapper { | ||
height: 100px; | ||
} | ||
|
||
.image-wrapper img { | ||
height: 100%; | ||
} |