+ <%= 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, :id => 'panel-width' %>
+
+
+ <%= f.label :height %>
+ <%= f.number_field :height, :id => 'panel-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 %>
- <%= submit_tag t('panels.create_from_json') -%>
+
+
<%= 't reorder' -%>
+
+
+ <% @panel.panel_elements.each do |elm| %>
+
+ <% case elm.class.to_s %>
+ <% when 'PanelPicture' %>
+
+ <%= tag(:img, elm.tmb_opt_img_tag) %>
+ |
+ <% when 'SpeechBalloon' %>
+
+ <%= elm.id -%>
+ <%= elm.caption -%>
+ |
+ <% when 'GroundPicture' %>
+
+ <%= tag(:img, elm.tmb_opt_img_tag) -%>
+ |
+ <% 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 %>
-<% end -%>
+
+
<%= 'z reorder' -%>
+
+
+ <% @panel.zorderd_elements.each do |elm| %>
+
+ <% case elm.class.to_s %>
+ <% when 'PanelPicture' %>
+
+ <%= tag(:img, elm.tmb_opt_img_tag) %>
+ |
+ <% when 'SpeechBalloon' %>
+
+ <%= elm.id -%>
+ <%= elm.caption -%>
+ |
+ <% when 'GroundPicture' %>
+
+ <%= tag(:img, elm.tmb_opt_img_tag) -%>
+ |
+ <% 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 => 'z-reorder' %>
+ <% unless @panel.new_record? -%>
+ <%= content_tag :div, '', :id => "panel-id-zorderd", :oid => @panel.id -%>
+ <% end %>
+
+ <%= submit_tag t('panels.create.title') -%>
+
+ <% end %>
+
+