%= form_for(@panel) do |f| %>
<%= render 'system/error_explanation', :obj => @panel %>
<%= f.label :caption %>
<%= f.text_field :caption %>
<%= f.label :width %>
<%= f.number_field :width %>
<%= f.label :height %>
<%= f.number_field :height %>
<%= f.label :border %>
<%= f.number_field :border %>
<%= f.label :publish %>
<%= f.collection_select :publish, t_select_items(MagicNumber['panel_visible_items']), :last, :first, :html => {:selected => @panel.publish} %>
<%= f.submit %>
<% end %>
<%= t 'panels.create_from_json' -%>
<%= form_for(@panel) do |f| %>
<%= render 'system/error_explanation', :obj => @panel %>
<%= text_field_tag "json" %>
<%= submit_tag t('panels.create_from_json') -%>
<% end %>
<%= 't reorder' -%>
<% @panel.panel_elements.each do |elm| %>
<% case elm.class.to_s %>
<% when 'PanelPicture' %>
<%= link_to(tag(:img, elm.tmb_opt_img_tag), elm) %>
|
<% when 'SpeechBalloon' %>
<%= elm.id -%>
<%= elm.caption -%>
|
<% when 'GroundPicture' %>
<%= link_to(tag(:img, elm.tmb_opt_img_tag), elm.picture) -%>
|
<% when 'GroundColor' %>
; background-color: #<%= format("%06x", elm.code) -%>;">
<%= format("%06x", elm.code ^ 0xffffff) %>
|
<% end %>
<%= h(truncate(elm.caption, :length => 12)) %>
|
<% end %>
<%= form_for(@panel) do |f| %>
<%= hidden_field_tag "json", nil, :id => 't-reorder' %>
<% unless @panel.new_record? -%>
<%= content_tag :div, '', :id => "panel-id-elm", :oid => @panel.id -%>
<% end %>
<%= submit_tag t('panels.create.title') -%>
<% end %>