OSDN Git Service

fix play leaf
[pettanr/pettanr.git] / app / views / stories / show.html.erb
index 28f5e3a..b96749e 100644 (file)
@@ -1,40 +1,38 @@
-<h1><%= t('.title') %></h1>
-<p id="notice"><%= notice %></p>
+<h1>
+  <%= link_to icon_tag('Story'), story_path(@item) %>
+  <%= link_to h(@item.title), play_story_path(@item) %>
+  <%= link_to icon_tag('Prof'), story_path(@item, :format => :prof) %>
+</h1>
 
 <div>
-  <%= link_to @item.title, story_path(@item) %>
-  <%= link_to_if @item, h(@item.title), play_story_path(@item) %>
-</div>
-
-<p>
   <b><%= t_m 'Story.description' -%>:</b>
   <%= h(@item.description) %>
-</p>
-
-<p>
-  <b><%= t_m 'Story.visible' -%>:</b>
-  <%= t_selected_item('story_visible_items', @item.visible) %>
-</p>
-
-<p>
-  <b><%= t_m 'Story.created_at' -%>:</b>
-  <%= l @item.created_at %>
-</p>
-
-<p>
-  <b><%= t_m 'Story.updated_at' -%>:</b>
-  <%= l @item.updated_at %>
-</p>
-<% @item.story_sheets.each do |story_sheet| %>
-  <% if story_sheet.sheet and story_sheet.sheet.visible?(@operators) -%>
-    <div>
-      <%= link_to sheet_icon(:object => story_sheet.sheet, :size => 25), sheet_path(story_sheet.sheet) %>
-      <%= link_to h(truncate(story_sheet.sheet.caption, :length => 40)), play_sheet_path(story_sheet.sheet) %>
-      (<%= story_sheet.sheet.sheet_panels.size -%>)
-    </div>
-  <% end %>
-<% end %>
+</div>
+
+<div>
+  <p>
+    <b><%= t_m 'Story.created_at' -%>:</b>
+    <%= l @item.created_at %>
+  </p>
+
+  <p>
+    <b><%= t_m 'Story.updated_at' -%>:</b>
+    <%= l @item.updated_at %>
+  </p>
+
+  <p>
+    <b>pages:</b>
+    <%= @play_count %>
+  </p>
+</div>
+
 <% if @item.own? @operators -%>
+  <p id="notice"><%= notice %></p>
+  <p>
+    <b><%= t_m 'Story.visible' -%>:</b>
+    <%= t_selected_item('story_visible_items', @item.visible) %>
+  </p>
+
   <%= link_to t('link.edit'), edit_story_path(@item) %>
   <%= link_to t('link.destroy'), story_path(@item), :method => :delete %>
 
     <% end %>
   </table>
 
-  <h3><%= t('story_sheets.append.new_sheets') -%></h3>
-  <table>
-    <% @new_sheet_items.each do |sheet| %>
-      <%= render 'story_sheets/append_sheet', :story => @item, :sheet => sheet, :operators => @operators %>
-    <% end %>
-  </table>
 <% end %>