|
Revision 14183, 0.7 kB
(checked in by sho, 6 months ago)
|
|
platform/tdiary/plugin/rubykaigi2008.rb: add rubykaigi2008 plugin.
|
| Line | |
|---|
| 1 | # |
|---|
| 2 | # rubykaigi2008.rb: make badge of RubyKaigi2008. |
|---|
| 3 | # |
|---|
| 4 | # usage: <%= rubykaigi2008 'role' %> |
|---|
| 5 | # role: attendee (default), speaker, sponsor, staff |
|---|
| 6 | # |
|---|
| 7 | # Copyright (C) TADA Tadashi <sho@spc.gr.jp> |
|---|
| 8 | # Distributed under GPL. |
|---|
| 9 | # |
|---|
| 10 | |
|---|
| 11 | def rubykaigi2008( role = 'attendee' ) |
|---|
| 12 | img = case role |
|---|
| 13 | when 'speaker' |
|---|
| 14 | 1 |
|---|
| 15 | when 'sponsor' |
|---|
| 16 | 2 |
|---|
| 17 | when 'staff' |
|---|
| 18 | 3 |
|---|
| 19 | else |
|---|
| 20 | role = 'attendee' |
|---|
| 21 | 0 |
|---|
| 22 | end |
|---|
| 23 | %Q|<div style="text-align: center; margin-top: 0.5em; margin-bottom: 0.5em;"><a href="http://jp.rubyist.net/RubyKaigi2008/"><img src="http://rubykaigi.tdiary.net/images/20080617_#{img}.png" width="160" height="79" alt="RubyKaigi2008#{h role.capitalize}" style="border-width: 0px;"></a></div>| |
|---|
| 24 | end |
|---|