OSDN Git Service

t#30328:create op import ...and pull
[pettanr/pettanr.git] / app / views / stories / comic.html.erb
1 <% @page_title = @comic.title %>
2 <h1><%= t '.title' -%></h1>
3 <p id="notice"><%= notice %></p>
4 <%= render 'comic_header', :comic => @comic, :author => @author %>
5
6 <% if @stories.empty? -%>
7   <h2><%= t('stories.comic.empty') %></h2>
8 <% else %>
9   <% @stories.each do |story| %>
10     <% if story.panel -%>
11       <%= render 'panels/body', :panel => story.panel, :author => @author %>
12     <% end %>
13     <%= render 'footer', :story => story, :author => @author %>
14   <% end %>
15   <%= render 'licensed_pictures', :licensed_pictures => Story.licensed_pictures(@stories) %>
16 <% end %>
17 <% if @comic.own? @author -%>
18   <h3><%= t('stories.new.title') %></h3>
19   <% @story = Story.new ; @story.comic_id = @comic.id ; @story.t = Story.new_t @comic.id -%>
20   <%= form_for(@story) do |f| %>
21
22     <div class="field">
23       <%= f.hidden_field :comic_id %>
24     </div>
25     <div class="field">
26       <%= f.label :t %><br />
27       <%= f.number_field :t %>
28     </div>
29     <div class="field">
30       <%= f.label :panel_id %><br />
31       <%= f.number_field :panel_id %>
32     </div>
33
34     <div class="actions">
35       <%= f.submit %>
36     </div>
37   <% end %>
38 <% end %>