OSDN Git Service

t30350#:fix destroy
[pettanr/pettanr.git] / app / views / stories / show.html.erb
index 0122e4a..fa0c3a0 100644 (file)
@@ -1,18 +1,41 @@
-  <%= render 'panels/standard', :panel => @story.panel %>
-  <% if @story.author.id == @author.id -%>
-    <span>
-    t:<%= @story.t %>
-    </span>
-<%= button_to 'Destroy', @story, confirm: 'Are you sure?', method: :delete %>
-    <%= render 'editform' %>
-    <%= link_to 'open js', edit_story_path(@story), :remote => true %>
-      <div id="story-update-<%= @story.id -%>">
-        t
-      </div>
-  <% end -%>
-<% if @story.comic.own? @author -%>
-  <%= link_to 'add panel', new_story_path, :remote => true %>
-    <div id="story-create">
-      t
-    </div>
+<h1><%= t('.title') %></h1>
+<p id="notice"><%= notice %></p>
+
+<p>
+  <b><%= t_m 'Story.comic_id' -%>:</b>
+  <%= link_to comic_icon(:object => @story.comic), comic_path(@story.comic) %>
+  <%= link_to h(@story.comic.title), :controller => 'stories', :action => :comic, :id => @story.comic.id %>
+</p>
+
+<p>
+  <b><%= t_m 'Story.panel_id' -%>:</b>
+  <%= link_to panel_icon(:object => @story.panel), panel_path(@story.panel) %>
+</p>
+
+<p>
+  <b><%= t_m 'Story.t' -%>:</b>
+  <%= @story.t %>
+</p>
+
+<p>
+  <b><%= t_m 'Story.author_id' -%>:</b>
+  <%= link_to author_icon(:object => @story.author), author_path(@story.author) %>
+  <%= link_to h(@story.author.name), author_path(@story.author) %>
+</p>
+
+<p>
+  <b><%= t_m 'Story.created_at' -%>:</b>
+  <%= l @story.created_at %>
+</p>
+
+<p>
+  <b><%= t_m 'Story.updated_at' -%>:</b>
+  <%= l @story.updated_at %>
+</p>
+<% if @story.own? @author -%>
+  <%= link_to t('link.edit'), edit_story_path(@story) %>
+  <%= link_to t('link.destroy'), story_path(@story), :method => :delete %>
 <% end %>
+
+<hr>
+<%= render 'panels/standard', :panel => @story.panel, :author => @author %>