OSDN Git Service

work
[pettanr/pettanr.git] / app / views / scrolls / play.html.erb
1 <% @page_title = @scroll.title %>
2 <h1><%= t '.title' -%></h1>
3 <p id="notice"><%= notice %></p>
4 <%= render 'scroll_panels/scroll_header', :scroll => @scroll, :author => @author %>
5
6 <% if @scroll_panels.empty? -%>
7   <h2><%= t('scrolls.play.empty') %></h2>
8 <% else %>
9   <% @scroll_panels.each do |scroll_panel| %>
10     <% if scroll_panel.panel -%>
11       <%= render 'panels/body', :panel => scroll_panel.panel, :author => @author, :spot => nil %>
12     <% end %>
13     <%= render 'scroll_panels/footer', :scroll_panel => scroll_panel, :author => @author %>
14   <% end %>
15   <%= render 'scroll_panels/licensed_pictures', :licensed_pictures => ScrollPanel.licensed_pictures(@scroll_panels) %>
16
17   <% if @prev_offset -%>
18     <%= link_to h('<<prev'), play_scroll_path(@scroll, {:offset => @prev_offset, :count => @panel_count}) %>
19   <% end %>
20
21   <% if @next_offset -%>
22     <%= link_to h('next>>'), play_scroll_path(@scroll, {:offset => @next_offset, :count => @panel_count}) %>
23   <% end %>
24
25 <% end %>
26 <% if @scroll.own? @author -%>
27   <h3><%= t('scroll_panels.append.new_panels') -%></h3>
28   <table>
29     <% @new_panels.each do |panel| %>
30       <%= render 'scroll_panels/append_panel', :scroll => @scroll, :panel => panel, :author => @author %>
31     <% end %>
32   </table>
33 <% end %>