OSDN Git Service

t#32046:
[pettanr/pettanr.git] / app / views / stories / comic.html.erb
diff --git a/app/views/stories/comic.html.erb b/app/views/stories/comic.html.erb
new file mode 100644 (file)
index 0000000..631f6f0
--- /dev/null
@@ -0,0 +1,33 @@
+<% @page_title = @comic.title %>
+<h1><%= t '.title' -%></h1>
+<p id="notice"><%= notice %></p>
+<%= render 'comic_header', :comic => @comic, :author => @author %>
+
+<% if @stories.empty? -%>
+  <h2><%= t('stories.comic.empty') %></h2>
+<% else %>
+  <% @stories.each do |story| %>
+    <% if story.panel -%>
+      <%= render 'panels/body', :panel => story.panel, :author => @author, :spot => nil %>
+    <% end %>
+    <%= render 'footer', :story => story, :author => @author %>
+  <% end %>
+  <%= render 'licensed_pictures', :licensed_pictures => Story.licensed_pictures(@stories) %>
+
+  <% if @prev_offset -%>
+    <%= link_to h('<<prev'), comic_story_path(@comic, {:offset => @prev_offset, :count => @panel_count}) %>
+  <% end %>
+
+  <% if @next_offset -%>
+    <%= link_to h('next>>'), comic_story_path(@comic, {:offset => @next_offset, :count => @panel_count}) %>
+  <% end %>
+
+<% end %>
+<% if @comic.own? @author -%>
+  <h3><%= t('stories.comic.new_panels') -%></h3>
+  <table>
+    <% @new_panels.each do |panel| %>
+      <%= render 'append_panel', :comic => @comic, :panel => panel, :author => @author %>
+    <% end %>
+  </table>
+<% end %>