OSDN Git Service

t#32046:add sheet
[pettanr/pettanr.git] / app / views / panels / _body.html.erb
index 29103e0..1002028 100644 (file)
@@ -5,7 +5,11 @@
   <% end %>
 <% end %>
 <div id="<%= panel.tag_id -%>" panel_id="<%= panel.tag_panel_id -%>" class="pettanr-comic-panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;border-style: solid;border-width: <%= panel.border %>px;border-color:black; background-color:white;">
-  <% panel.panel_elements.each do |elm| %>
-    <%= render elm.class.to_s.tableize + '/element', :elm => elm, :spot => spot %>
+  <% if panel.visible? author -%>
+    <% panel.panel_elements.each do |elm| %>
+      <%= render elm.class.to_s.tableize + '/element', :elm => elm, :spot => spot %>
+    <% end %>
+  <% else %>
+    <h2><%= t('panels.hidden') %></h2>
   <% end %>
 </div>