OSDN Git Service

t#31097:pp with link
authoryasushiito <yas@pen-chan.jp>
Wed, 17 Apr 2013 09:45:12 +0000 (18:45 +0900)
committeryasushiito <yas@pen-chan.jp>
Wed, 17 Apr 2013 09:45:12 +0000 (18:45 +0900)
app/views/panels/_body.html.erb
spec/cli/u/panels/create.json

index 1950604..bc598d6 100644 (file)
@@ -2,7 +2,7 @@
   <% panel.panel_elements.each do |elm| %>
     <% case elm.class.to_s %>
     <% when 'PanelPicture' %>
-      <%= tag(:img, elm.opt_img_tag) %>
+      <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag), elm.link) %>
     <% when 'SpeechBalloon' %>
       <% balloon = elm.balloons.first %>
       <div id="vballoon<%= elm.id -%>" class="pettanr-comic-balloon" style="width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; top:<%= balloon.y -%>px; left:<%= balloon.x -%>px; z-index:<%= elm.z -%>; ">
index 3cd2188..be70a1e 100644 (file)
@@ -16,6 +16,7 @@
         "t": 0,\r
         "width": 100,\r
         "height": 103,\r
+        "link": "http://localhost:3000/墨子",\r
         "caption": "penjiro doing"\r
       }\r
     },\r
@@ -53,5 +54,5 @@
       }\r
     }\r
   },\r
-  "auth_token": "3fhobSVvDxjUSUPSKy5y"\r
+  "auth_token": "p8aoPBYwmNh356q59CFK"\r
 }
\ No newline at end of file