From 34823b36b35ae4987177419170550bb14ceb578b Mon Sep 17 00:00:00 2001 From: yasushiito Date: Thu, 25 Jul 2013 11:31:50 +0900 Subject: [PATCH] t#31746:fix inspire --- app/views/panels/_body.html.erb | 42 +++++++++++++++++++++-------------------- app/views/panels/_form.html.erb | 2 ++ 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/app/views/panels/_body.html.erb b/app/views/panels/_body.html.erb index afed7be3..58f15036 100644 --- a/app/views/panels/_body.html.erb +++ b/app/views/panels/_body.html.erb @@ -17,27 +17,29 @@ <% end %> <% end %>
- <% panel.panel_elements.each do |elm| %> - <% case elm.class.to_s %> - <% when 'PanelPicture' %> -
- <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %> -
- <% when 'SpeechBalloon' %> -
- <%= elm.caption -%> -

- <%= sanitize(h(elm.speech.content).gsub(/\n/, '
'), :tags => %w(a p br)) -%>
-

-
- <% when 'GroundPicture' %> -
+ <% unless panel.new_record? %> + <% panel.panel_elements.each do |elm| %> + <% case elm.class.to_s %> + <% when 'PanelPicture' %> +
+ <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %> +
+ <% when 'SpeechBalloon' %> +
+ <%= elm.caption -%> +

+ <%= sanitize(h(elm.speech.content).gsub(/\n/, '
'), :tags => %w(a p br)) -%>
+

+
+ <% when 'GroundPicture' %> +
+ +
+ <% when 'GroundColor' %> +
-
- <% when 'GroundColor' %> -
- -
+
+ <% end %> <% end %> <% end %>
diff --git a/app/views/panels/_form.html.erb b/app/views/panels/_form.html.erb index 12e848fe..d29c0cd9 100644 --- a/app/views/panels/_form.html.erb +++ b/app/views/panels/_form.html.erb @@ -36,6 +36,7 @@ <% end %> +<% unless panel.new_record? %>
    @@ -123,6 +124,7 @@
+<% end %>