OSDN Git Service

fix summary
[pettanr/pettanr.git] / app / assets / javascripts / views / licenses / summary.js.coffee
index 200eccd..c3b42f5 100644 (file)
@@ -1,10 +1,22 @@
-class Pettanr.Views.License.Summary extends Backbone.View\r
+class Pettanr.Views.License.Summary extends Pettanr.Views.Common.Summary\r
   \r
   initialize: (options) ->\r
     super(options)\r
+    @item = options.item\r
+    @load()\r
+  \r
+  load: () ->\r
+    @system_picture = @item.system_picture()\r
+    @system_picture.fetch({cache: true}).done =>\r
+      @img = new Tag.Img({\r
+        attr: {\r
+          src: @system_picture.r_url()\r
+        }\r
+      })\r
+      @trigger('ready')\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append('-')\r
+    this.$el.html(@img.render().el)\r
     this\r
   \r