OSDN Git Service

clean
[pettanr/pettanr.git] / app / views / panels / show.html.erb
index d8bfa24..5281f15 100644 (file)
@@ -1,6 +1,44 @@
-<h1><%= t '.title' -%></h1>
-<p id="notice"><%= notice %></p>
-<%= render 'standard', :panel => @panel, :author => @author %>
+<h1>
+  <%= link_to icon_tag('Panel'), panel_path(@item) %>
+  <%= link_to h(@item.caption), panel_path(@item) %>
+  <%= link_to icon_tag('Prof'), panel_path(@item, :format => :prof) %>
+</h1>
+<%= render 'standard', :panel => @item, :operators => @operators %>
 
-<%= link_to t('link.edit'), edit_panel_path(@panel) %>
-<%= link_to t('link.destroy'), panel_path(@panel), :method => :delete %>
+<% if @item.own? @operators %>
+  <h3><%= t('editor') -%></h3>
+  <p id="notice"><%= notice %></p>
+  
+  <p>
+    <b><%= t_m 'Panel.publish' -%>:</b>
+    <%= t_selected_item('panel_visible_items', @item.publish) %>
+  </p>
+  <p>
+    <%= link_to t('link.edit'), edit_panel_path(@item) %>
+    <%= link_to t('link.destroy'), panel_path(@item), :method => :delete %>
+  </p>
+  
+  <h2><%= t('scroll_panels.append.new_scrolls') -%></h2>
+  <table>
+    <% @new_scroll_items.each do |scroll| %>
+      <%= render 'scroll_panels/append_scroll', :panel => @item, :scroll => scroll, :operators => @operators %>
+    <% end %>
+  </table>
+  <h2><%= t('scroll_panels.append.fresh_scrolls') -%></h2>
+  <table>
+    <% @fresh_scroll_items.each do |scroll| %>
+      <%= render 'scroll_panels/append_scroll', :panel => @item, :scroll => scroll, :operators => @operators %>
+    <% end %>
+  </table>
+<% end %>
+
+<% if @operators.author %>
+  <h2><%= t('panels.show.copy') -%></h2>
+  <%= form_for(Panel.new, :html => {:jqform => 'pettanr-panel-form'}) do |f| %>
+
+    <%= hidden_field_tag "json", @item.post_attributes(:all).to_json %>
+    <div>
+      <%= submit_tag t('panels.show.inspire') -%>
+    </div>
+  <% end %>
+<% end %>