+<% panel.panel_elements.each do |elm| %>
+ <% case elm.class.to_s %>
+ <% when 'SpeechBalloon' %>
+ <% elm.boost %>
+ <% 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| %>
- <% case elm.class.to_s %>
- <% when 'PanelPicture' %>
- <div id="<%= elm.tag_id(:div) -%>" panel_id="<%= elm.tag_panel_id -%>" element_id="<%= elm.tag_element_id -%>" element_type="<%= elm.tag_element_type -%>" class="pettanr-panel-picture-wrapper" style="<%= elm.opt_div_style() -%>">
- <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %>
- </div>
- <% when 'SpeechBalloon' %>
- <div id="<%= elm.tag_id -%>" class="pettanr-comic-balloon" style="width:<%= elm.balloon.width -%>px; height:<%= elm.balloon.height -%>px; top:<%= elm.balloon.y -%>px; left:<%= elm.balloon.x -%>px; z-index:<%= elm.z -%>; ">
- <img id="balloon<%= elm.id -%>" class="pettanr-balloon" src="<%= elm.balloon.system_picture.url -%>" alt="<%= elm.caption -%>">
- <p style="top:<%= elm.speech.y -%>%; left:<%= elm.speech.x -%>%;width:<%= elm.speech.width -%>%; height:<%= elm.speech.height -%>%;">
- <span><%= h elm.speech.content -%></span>
- </p>
- </div>
- <% when 'GroundPicture' %>
- <div id="<%= elm.tag_id -%>" class="pettanr-comic-ground-picture" style="<%= elm.opt_div_style(full_url(elm.picture.url), spot) -%>">
-
- </div>
- <% when 'GroundColor' %>
- <div id="<%= elm.tag_id -%>" class="pettanr-comic-ground-color" style="<%= elm.opt_div_style(spot) -%>">
-
- </div>
+ <% 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>