OSDN Git Service

crush router and render
[pettanr/pettanr.git] / app / views / pictures / show.html.erb
1 <h1><%= t('.title') %></h1>
2 <div>
3   <% if @picture.original_picture %>
4     <% if @picture.enable? %>
5       <% if @picture.head? %>
6         <p>
7           <%= t 'pictures.show.announce.head' -%>
8           <%= link_to tag(:img, @picture.tmb_opt_img_tag), resource_picture_path(@picture.resource_picture) %>
9         </p>
10       <% else %>
11         <p>
12           <%= t 'pictures.show.announce.tail' -%>
13           <%= link_to tag(:img, @picture.head.tmb_opt_img_tag), resource_picture_path(@picture.head.resource_picture) %>
14         </p>
15       <% end %>
16     <% else %>
17       <p>
18         <%= t 'pictures.show.announce.disable' -%>
19       </p>
20     <% end %>
21     <% if @picture.own? @operators %>
22       <p>
23         <%= t 'pictures.show.announce.owner' -%>
24         <%= link_to tag(:img, @picture.original_picture.tmb_opt_img_tag), original_picture_path(@picture.original_picture) %>
25       </p>
26     <% end %>
27   <% else %>
28     <p>
29       <%= t 'pictures.show.announce.destroyed' -%>
30     </p>
31   <% end %>
32 </div>
33
34 <% if @picture.showable? @operators %>
35   <%= render 'head', :picture => @picture %>
36 <% else %>
37   <%= render 'tail', :picture => @picture %>
38 <% end %>