What have you found for these years?

2008-07-23

這是什麼東西,我可以全砍嗎?

其實我已經改掉一小部份了,但還是這樣一團:


<% if prev_photo=@photo.get_prev(params[:album_id]) %>
<% prev_photo1 = prev_photo %>
<% if prev_photo=prev_photo.get_prev(params[:album_id]) %>
<% if prev_photo.id != @photo.id %>
<%= link_to (show_photo(prev_photo, :square, :width => "75"), photo_path(prev_photo) + '.html', {:style => "padding: 0px 10px 0px 10px;" }) %>
<% end -%>
<% else %>
<% prev_photo=prev_photo1.get_last(params[:album_id]) %>
<% if prev_photo.id != @photo.id %>
<%= link_to (show_photo(prev_photo, :square, :width => "75"), photo_path(prev_photo) + '.html', {:style => "padding: 0px 10px 0px 10px;" }) %>
<% end -%>
<% end %>
<% if prev_photo.id != @photo.id %>
<%= link_to (show_photo(prev_photo1, :square, :width => "75", :alt => prev_photo1.title), photo_path(prev_photo1) + '.html', {:style => "padding: 0px 10px 0px 10px;" }) %>
<% end -%>
<% else %>
<% if prev_photo = @photo.get_last(params[:album_id]) %>
<% prev_photo1 = prev_photo %>
<% if prev_photo=prev_photo.get_prev(params[:album_id]) %>
<% if prev_photo.id != @photo.id %>
<%= link_to (show_photo(prev_photo, :square,:width=> "75",:alt => prev_photo.title), photo_path(prev_photo) + '.html', {:style => "padding: 0px 10px 0px 10px;" }) %>
<% end %>
<% end %>
<% if prev_photo.id != @photo.id %>
<%= link_to (show_photo(prev_photo1, :square,:width=> "75", :alt => prev_photo1.title), photo_path(prev_photo1) + '.html', {:style => "padding: 0px 10px 0px 10px;" }) %>
<% end -%>
<% end -%>
<% end -%>

2 retries:

Plumm said...

這個一看就感覺很亂,不太想看 :QQ

godfat 真常 said...

不過我要改寫的話,勢必得看懂 @@

Post a Comment

All texts are licensed under CC Attribution 3.0