OSDN Git Service

fix: fetch fail
[pettanr/pettanr.git] / app / assets / javascripts / view / show.js.coffee
index af08756..b23db10 100644 (file)
@@ -54,12 +54,29 @@ class Pettanr.View.Show extends Pettanr.View
       }, \r
     }\r
   \r
+  edit_only_footer_options: () ->\r
+    {\r
+      actions: {\r
+        edit: {\r
+          click: () =>\r
+            @trigger('http_get', @item.edit_url())\r
+        }, \r
+      }, \r
+    }\r
+  \r
   add_credits: (options = {icon: true}) ->\r
     @credits = new Pettanr.View.Credits(this, options)\r
     @listenTo(@credits, 'click:credit:icon', @click_credit_icon)\r
     this.$el.append(@credits.render().el)\r
+    @append_rb()\r
     @credits.push(@panel.licensed_pictures())\r
   \r
+  add_credit: (picture, options = {icon: true}) ->\r
+    credit = new Pettanr.View.Credit(picture, options)\r
+    this.$el.append(credit.render().el)\r
+    @listenTo(credit, 'click:icon', @click_credit_icon)\r
+    @append_rb()\r
+  \r
   click_authored_by: (author) ->\r
     @trigger('http_get', author.show_url())\r
   \r