OSDN Git Service

add: success inspire
[pettanr/pettanr.git] / app / assets / javascripts / views / show.js.coffee
index d1f16aa..372ea4c 100644 (file)
@@ -96,9 +96,6 @@ class Pettanr.Views.Show.LinkedEditButton extends Tag.A
       content: I18n.t('link.edit')\r
     })\r
   \r
-  url: () ->\r
-    @url\r
-  \r
 class Pettanr.Views.Show.LinkedDestroyButton extends Tag.A\r
   \r
   initialize: (options) ->\r
@@ -108,8 +105,18 @@ class Pettanr.Views.Show.LinkedDestroyButton extends Tag.A
       content: I18n.t('link.destroy')\r
     })\r
   \r
-  url: () ->\r
-    @destroy_url\r
+class Pettanr.Views.Show.LinkedInspireIcon extends Tag.A\r
+  \r
+  initialize: (options) ->\r
+    item = options.item\r
+    half = options.half\r
+    img = new Pettanr.Image.SymbolImg({\r
+      attr: {src: '/images/inspire.gif'}, half: half\r
+    })\r
+    super({\r
+      attr: {href: '/' + item.index_url() + '/inspire'}, \r
+      content: img.render().el\r
+    })\r
   \r
 class Pettanr.Views.Show.OwnerFooter extends Backbone.View\r
   tagName: 'div'\r