forked from ebonical/tweetie_flickr
/
index.rhtml
33 lines (32 loc) · 1.25 KB
/
index.rhtml
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
<%- content_for :title do -%>Photos<%- end -%>
<div id="photos">
<h2>Recent Photos Tweeted through Flickr4Twitter</h2>
<%- unless @photos.blank? -%>
<div id="thumbs">
<ul class="thumbs noscript">
<%- for photo in @photos -%>
<li>
<%- if photo.flickr_image -%>
<%= link_to image_tag(photo.flickr_image.url('square'), :alt=>photo.short_url, :title=>photo.short_url), photo.flickr_image.url('medium'), :class=>'thumb' %>
<%- else -%>
<%= link_to image_tag('/images/missing_square.png', :alt=>'?', :title=>'Missing Photo'), '/images/missing.png', :class=>'thumb' %>
<%- end -%>
<div class="caption">
<%= link_to image_tag(photo.user.avatar_url('n'), :alt=>"#{photo.user.twitter_username}", :title=>"#{photo.user.twitter_username}", :class=>'avatar'), user_path(photo.user) %>
<%= photo.caption %>
</div>
</li>
<%- end -%>
</ul>
</div>
<div id="gallery">
<div id="controls"></div>
<div id="slideshow"></div>
<div id="loading"></div>
<div id="caption" class="span-10"></div>
</div>
<%- else -%>
<p>There are currently no photos to display.</p>
<%- end -%>
</div>
<%= will_paginate @photos %>