OSDN Git Service

fix model
[pettanr/pettanr.git] / app / views / panels / _body.html.erb
index bdfa554..f7bc737 100644 (file)
@@ -1,4 +1,4 @@
-<%= content_tag :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;" do %>
+<%= content_tag :div, panel.tag_attributes(nil, {:panel_id => panel.id, :class => "pettanr-comic-panel", :style => raw(panel.style.to_style)}) do %>
   <% if panel.visible? operators -%>
     <% panel.panel_elements.each do |element| %>
       <%= render element.path_name + '/element', :element => element, :root => panel, :spot => spot %>
@@ -7,4 +7,3 @@
     <h2><%= t('panels.hidden') %></h2>
   <% end %>
 <% end %>
-<% panel.rendered %>