OSDN Git Service

work
[pettanr/pettanr.git] / app / views / scrolls / show.html.erb
index 48b0d62..4c55304 100644 (file)
@@ -1,35 +1,43 @@
-<% @page_title = t('.title') + ':' + @scroll.title %>
+<% @page_title = t('.title') + ':' + @item.title %>
 <h1><%= t('.title') %></h1>
 <p id="notice"><%= notice %></p>
 
 <p>
   <b><%= t_m 'Scroll.title' -%>:</b>
-  <%= link_to h(@scroll.title), :controller => 'scroll_panels', :action => :scroll, :id => @scroll.id %>
+  <%= link_to h(@item.title), play_scroll_path(@item) %>
 </p>
 
 <p>
   <b><%= t_m 'Scroll.description' -%>:</b>
-  <%= h(@scroll.description) %>
+  <%= h(@item.description) %>
 </p>
 
 <p>
   <b><%= t_m 'Scroll.visible' -%>:</b>
-  <%= t_selected_item('scroll_visible_items', @scroll.visible) %>
+  <%= t_selected_item('scroll_visible_items', @item.visible) %>
 </p>
 
 <p>
   <b><%= t_m 'Scroll.author_id' -%>:</b>
-  <%= link_to h(@scroll.author.name), author_path(@scroll.author) %>
+  <%= link_to h(@item.author.name), author_path(@item.author) %>
 </p>
 
 <p>
   <b><%= t_m 'Scroll.created_at' -%>:</b>
-  <%= l @scroll.created_at %>
+  <%= l @item.created_at %>
 </p>
 
 <p>
   <b><%= t_m 'Scroll.updated_at' -%>:</b>
-  <%= l @scroll.updated_at %>
+  <%= l @item.updated_at %>
 </p>
 
-<%= link_to t('link.edit'), edit_scroll_path(@scroll) %>
+<% if @item.own? @operators -%>
+  <%= link_to t('link.edit'), edit_scroll_path(@item) %>
+  <h3><%= t('scroll_panels.append.new_panels') -%></h3>
+  <table>
+    <% @new_panel_items.each do |panel| %>
+      <%= render 'scroll_panels/append_panel', :panel => panel, :scroll => @item, :operators => @operators %>
+    <% end %>
+  </table>
+<% end %>