OSDN Git Service

fix js
authoryasushiito <yas@pen-chan.jp>
Wed, 3 Sep 2014 23:47:20 +0000 (08:47 +0900)
committeryasushiito <yas@pen-chan.jp>
Wed, 3 Sep 2014 23:47:20 +0000 (08:47 +0900)
26 files changed:
app/assets/javascripts/controllers/home.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/edit/account.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/edit/default.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/icon/default.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/face/image.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/face/picture.js.coffee
app/assets/javascripts/locmare/filer/header.js.coffee
app/assets/javascripts/locmare/profiler/association.js.coffee
app/assets/javascripts/manifest/controller/action/list.js.coffee
app/assets/javascripts/models/ground_picture.js.coffee
app/assets/javascripts/models/original_picture.js.coffee
app/assets/javascripts/models/panel_picture.js.coffee
app/assets/javascripts/models/picture.js.coffee
app/assets/javascripts/models/resource_picture.js.coffee
app/assets/javascripts/models/system_picture.js.coffee
app/assets/javascripts/pettanr.js.coffee
app/assets/javascripts/pettanr/picture.js.coffee
app/assets/javascripts/pettanr/tags.js.coffee
app/assets/javascripts/routes.js.coffee
app/assets/javascripts/work/controllers.js.coffee.erb
app/controllers/application_controller.rb
app/controllers/home_controller.rb
app/views/panels/_summary.html.erb
app/views/scroll_panels/_summary.html.erb
config/locales/pettanr.ja.yml
public/manifest.json

index 1fd859e..6695b38 100644 (file)
@@ -1,2 +1,83 @@
 class Pettanr.HomeController extends Pettanr.AppController\r
 \r
+  by_author: () ->\r
+    @filer_list()\r
+  \r
+  scrolls: () ->\r
+    @filer_list()\r
+  \r
+  scroll_panels: () ->\r
+    @filer_list()\r
+  \r
+  comics: () ->\r
+    @filer_list()\r
+  \r
+  stories: () ->\r
+    @filer_list()\r
+  \r
+  story_sheets: () ->\r
+    @filer_list()\r
+  \r
+  sheets: () ->\r
+    @filer_list()\r
+  \r
+  sheet_panels: () ->\r
+    @filer_list()\r
+  \r
+  panels: () ->\r
+    @filer_list()\r
+  \r
+  panel_pictures: () ->\r
+    @filer_list()\r
+  \r
+  speech_balloons: () ->\r
+    @filer_list()\r
+  \r
+  ground_pictures: () ->\r
+    @filer_list()\r
+  \r
+  ground_colors: () ->\r
+    @filer_list()\r
+  \r
+  resource_pictures: () ->\r
+    @filer_list()\r
+  \r
+  scrolls_count: () ->\r
+    @list_count()\r
+  \r
+  scroll_panels_count: () ->\r
+    @list_count()\r
+  \r
+  comics_count: () ->\r
+    @list_count()\r
+  \r
+  stories_count: () ->\r
+    @list_count()\r
+  \r
+  story_sheets_count: () ->\r
+    @list_count()\r
+  \r
+  sheets_count: () ->\r
+    @list_count()\r
+  \r
+  sheet_panels_count: () ->\r
+    @list_count()\r
+  \r
+  panels_count: () ->\r
+    @list_count()\r
+  \r
+  panel_pictures_count: () ->\r
+    @list_count()\r
+  \r
+  speech_balloons_count: () ->\r
+    @list_count()\r
+  \r
+  ground_pictures_count: () ->\r
+    @list_count()\r
+  \r
+  ground_colors_count: () ->\r
+    @list_count()\r
+  \r
+  resource_pictures_count: () ->\r
+    @list_count()\r
+  \r
index b2eb071..a4daba8 100644 (file)
@@ -2,7 +2,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.EditItemColum
   \r
   initialize: (options) ->\r
     super(options)\r
-    @edit_icon = new Pettanr.Picture.SymbolImg({\r
+    @edit_icon = new Pettanr.Image.SymbolImg({\r
       attr: {'src': @edit_img_file_name()}, \r
       half: true\r
     })\r
index 391c89f..2be01d8 100644 (file)
@@ -2,7 +2,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.EditItemColum
   \r
   initialize: (options) ->\r
     super(options)\r
-    @edit_icon = new Pettanr.Picture.SymbolImg({\r
+    @edit_icon = new Pettanr.Image.SymbolImg({\r
       attr: {'src': @edit_img_file_name()}, \r
       half: true\r
     })\r
@@ -12,7 +12,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.EditItemColum
       handler_name: url,\r
       content: @edit_icon.render().el\r
     })\r
-    @remove_icon = new Pettanr.Picture.SymbolImg({\r
+    @remove_icon = new Pettanr.Image.SymbolImg({\r
       attr: {'src': @remove_img_file_name()}, \r
       half: true\r
     })\r
index 4041046..2c2495e 100644 (file)
@@ -4,7 +4,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.IconItemColum
     super(options)\r
   \r
   render: () ->\r
-    icon = new Pettanr.Picture.SymbolImg({\r
+    icon = new Pettanr.Image.SymbolImg({\r
       class_name: 'face', \r
       attr: {\r
         src: @icon_file_name()\r
index 1ed0ba4..12c5e01 100644 (file)
@@ -3,7 +3,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.SymbolItemCol
   initialize: (options) ->\r
     super(options)\r
     attr =\r
-    @picture = new Pettanr.Picture.SymbolImg({\r
+    @picture = new Pettanr.Image.SymbolImg({\r
       attr: {\r
         src: @url()\r
       }\r
index 77161e9..10802e1 100644 (file)
@@ -9,7 +9,7 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.SymbolItemCol
         _this.render()\r
       )\r
     else\r
-      @picture = new Pettanr.Picture.SymbolImg({\r
+      @picture = new Pettanr.Image.SymbolImg({\r
         attr: {\r
           src: '/images/error.png'\r
         }\r
index 2895abe..44f19a8 100644 (file)
@@ -6,7 +6,7 @@ class Locmare.FilerModule.Header extends Backbone.View
   \r
   render: () ->\r
     this.$el.html('')\r
-    icon = new Pettanr.Picture.Icon({item: @model(), half: true})\r
+    icon = new Pettanr.Image.Icon({item: @model(), half: true})\r
     caption = Pettanr.AppHelper.t_m(@model().singular())\r
     url = Pettanr.url(@model().table_name(), 'index', {})\r
     linked_icon = new Pettanr.Tag.A({\r
index ddf147b..501af17 100644 (file)
@@ -14,10 +14,18 @@ class Locmare.ProfilerModule.Association extends Backbone.View
   \r
   render: () ->\r
     _this = this\r
+    caption = new Pettanr.Tag.Div({class_name: 'caption', content: 'associations'})\r
+    this.$el.append(caption.render().el)\r
+    caption = new Pettanr.Tag.Div({class_name: 'caption', content: 'belongs_to'})\r
+    this.$el.append(caption.render().el)\r
     _.each @belongs_to, (f) ->\r
       _this.$el.append(f.render().el)\r
+    caption = new Pettanr.Tag.Div({class_name: 'caption', content: 'has_many'})\r
+    this.$el.append(caption.render().el)\r
     _.each @has_many, (f) ->\r
       _this.$el.append(f.render().el)\r
+    caption = new Pettanr.Tag.Div({class_name: 'caption', content: 'has_one'})\r
+    this.$el.append(caption.render().el)\r
     _.each @has_one, (f) ->\r
       _this.$el.append(f.render().el)\r
     this\r
index bd5aa45..0620b37 100644 (file)
@@ -3,15 +3,17 @@ class Manifest.ControllerModule.ActionModule.ActionList extends Manifest.Control
   set_default: () ->\r
     super()\r
     @args.list_name ||= @name\r
-    @args.counter_name = if @name == 'index'\r
-      'count'\r
-    else\r
-      'count_'\r
-    \r
+  \r
   init: () ->\r
     super()\r
     @list_name = @args.list_name\r
-    @counter_name = @args.counter_name\r
+    @counter_name = if not @args.counter_name\r
+      if @name == 'index'\r
+        'count'\r
+      else\r
+        'count_'\r
+    else\r
+      @args.counter_name\r
   \r
   counter_url: (params) ->\r
     @encode_url(@counter_name, params)\r
index 6817bb3..3a313a1 100644 (file)
@@ -37,7 +37,7 @@ class Pettanr.GroundPicture extends Peta.Element
     r\r
   \r
   tmb_opt_img_tag: (picture) ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: picture.r_url(), \r
         alt: @get('caption')\r
index 5132b7f..fe84000 100644 (file)
@@ -28,7 +28,7 @@ class Pettanr.OriginalPicture extends Peta.Content
     {src: @r_url(), width: @get('width'), height: @get('height')}\r
   \r
   tmb_opt_img_tag: () ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: @r_url()\r
       },\r
index 3545bd2..23f9d45 100644 (file)
@@ -58,7 +58,7 @@ class Pettanr.PanelPicture extends Peta.Element
     })\r
   \r
   tmb_opt_img_tag: (picture) ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: picture.r_url(), \r
         alt: @get('caption')\r
index 393cedd..4d89c7d 100644 (file)
@@ -30,7 +30,7 @@ class Pettanr.Picture extends Peta.Content
     {src: @r_url(), width: @get('width'), height: @get('height')}\r
   \r
   tmb_opt_img_tag: () ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: @r_url()\r
       },\r
index efb2e17..b636dfb 100644 (file)
@@ -31,7 +31,7 @@ class Pettanr.ResourcePicture extends Peta.Content
     '/resource_pictures/' + @filename() + opt\r
   \r
   tmb_opt_img_tag: () ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: @r_url()\r
       },\r
index 340b564..bd5daa6 100644 (file)
@@ -24,7 +24,7 @@ class Pettanr.SystemPicture extends Peta.SystemResource
     {src: @r_url(), width: @get('width'), height: @get('height')}\r
   \r
   tmb_opt_img_tag: () ->\r
-    new Pettanr.Picture.SymbolPicture({\r
+    new Pettanr.Image.SymbolPicture({\r
       attr: {\r
         src: @r_url()\r
       },\r
index c08ab74..e644594 100644 (file)
@@ -107,7 +107,7 @@ class Pettanr
     set_model: () ->\r
       @my_controller = Manifest.manifest().controllers[@params['controller']]\r
       @my_action = @my_controller.actions[@params['action']]\r
-      @my_model = Manifest.manifest().models[@my_controller.item_name]\r
+      @my_model = Manifest.manifest().models[@my_action.item_name]\r
       @my_model_class = @my_model.classify()\r
       \r
     set_list: () ->\r
index 439767a..39667d1 100644 (file)
@@ -1,6 +1,6 @@
-class Pettanr.Picture\r
+class Pettanr.Image\r
 \r
-class Pettanr.Picture.Icon extends Pettanr.Tag.Img\r
+class Pettanr.Image.Icon extends Pettanr.Tag.Img\r
   \r
   # attr: {any_attr: 'hoge', ...}\r
   # class_name: 'El-Class'\r
@@ -32,7 +32,7 @@ class Pettanr.Picture.Icon extends Pettanr.Tag.Img
     }\r
     super(opt)\r
   \r
-class Pettanr.Picture.SymbolPicture extends Pettanr.Tag.Img\r
+class Pettanr.Image.SymbolPicture extends Pettanr.Tag.Img\r
   # show picture as symbol size\r
   \r
   # attr: {src: '/2.png', alt: 'title', ...}\r
@@ -58,7 +58,7 @@ class Pettanr.Picture.SymbolPicture extends Pettanr.Tag.Img
     }\r
     super(opt)\r
   \r
-class Pettanr.Picture.SymbolImg extends Pettanr.Tag.Img\r
+class Pettanr.Image.SymbolImg extends Pettanr.Tag.Img\r
   # show image file as symbol size\r
   \r
   # attr: {src: '/2.png', alt: 'title', ...}\r
index e7297f8..75c6ded 100644 (file)
@@ -16,15 +16,14 @@ class Pettanr.Tag.Img extends Backbone.View
 \r
 class Pettanr.Tag.A extends Backbone.View\r
   tagName: 'a'\r
-  events: {\r
-    'click': 'click'\r
-  }\r
   \r
   initialize: (options) ->\r
     @attr = options.attr\r
     @handler_name = options.handler_name\r
     @content = options.content\r
     @class_name = options.class_name\r
+    @events = {click: 'click'} if @handler_name\r
+    @delegateEvents()\r
   \r
   render: () ->\r
     this.$el.attr(@attr)\r
@@ -33,7 +32,7 @@ class Pettanr.Tag.A extends Backbone.View
     this\r
   \r
   click: () ->\r
-    window.router.navigate(@handler_name, true) if @handler_name\r
+    window.router.navigate(@handler_name, true)\r
     return false\r
   \r
 class Pettanr.Tag.Div extends Backbone.View\r
index 12b333d..1b45072 100644 (file)
@@ -1,23 +1,5 @@
 class Pettanr.Router extends Backbone.Router\r
   \r
-  _index: () ->\r
-    list_result = new Pettanr.Scroll.Collection({})\r
-    new Pettanr.FilerRender('scroll', list_result, 'default', window.operators)\r
-  \r
-  show_html_format: (format) -> \r
-  \r
-  count: () ->\r
-  \r
-  new: () ->\r
-  \r
-  edit: () ->\r
-  \r
-  create: () ->\r
-  \r
-  update: () ->\r
-  \r
-  destroy: () ->\r
-    \r
   parse_query_string: (query_string) ->\r
     params = {}\r
     if query_string\r
@@ -72,7 +54,10 @@ class Pettanr.Router extends Backbone.Router
         params['action'] = 'show'\r
         params['id'] = id\r
       else\r
-        params['action'] = 'index'\r
+        if id\r
+          params['action'] = id\r
+        else\r
+          params['action'] = 'index'\r
       this.fire(params)\r
     this.route('', 'home')\r
     this.route(':controller/:id/:action?*query_string', 'c_i_a')\r
index 45da9b9..cb68550 100644 (file)
           item_name: 'scroll',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'scrolls_count',\r
         },\r
       },\r
       scroll_panels: {\r
           item_name: 'scroll_panel',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'scroll_panels_count',\r
         },\r
       },\r
       comics: {\r
           item_name: 'comic',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'comics_count',\r
         },\r
       },\r
       stories: {\r
           item_name: 'story',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'stories_count',\r
         },\r
       },\r
       story_sheets: {\r
           item_name: 'story_sheet',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'story_sheets_count',\r
         },\r
       },\r
       sheets: {\r
           item_name: 'sheet',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'sheets_count',\r
         },\r
       },\r
       sheet_panels: {\r
           item_name: 'sheet_panel',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'sheet_panels_count',\r
         },\r
       },\r
       panels: {\r
           item_name: 'panel',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'panels_count',\r
         },\r
       },\r
       panel_pictures: {\r
           item_name: 'panel_picture',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'panel_pictures_count',\r
         },\r
       },\r
       speech_balloons: {\r
           item_name: 'speech_balloon',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'speech_balloons_count',\r
         },\r
       },\r
       speeches: {\r
           item_name: 'speech',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'speeches_count',\r
         },\r
       },\r
       balloons: {\r
           item_name: 'balloon',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'balloons_count',\r
         },\r
       },\r
       ground_pictures: {\r
           item_name: 'ground_picture',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'ground_pictures_count',\r
         },\r
       },\r
       ground_colors: {\r
           item_name: 'ground_color',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'ground_colors_count',\r
         },\r
       },\r
       original_pictures: {\r
           item_name: 'original_picture',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'count',\r
         },\r
       },\r
       resource_pictures: {\r
           item_name: 'resource_picture',\r
           list_name: 'private',\r
           param_id: 'none',\r
+          counter_name: 'resource_pictures_count',\r
+        },\r
+      },\r
+      scrolls_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'scroll',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      scroll_panels_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'scroll_panel',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      comics_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'comic',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      stories_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'story',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      story_sheets_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'story_sheet',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      sheets_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'sheet',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      sheet_panels_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'sheet_panel',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      panels_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'panel',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      panel_pictures_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'panel_picture',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      speech_balloons_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'speech_balloon',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      speeches_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'speech',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      balloons_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'balloon',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      ground_pictures_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'ground_picture',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      ground_colors_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'ground_color',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      original_pictures_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'original_picture',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
+        },\r
+      },\r
+      resource_pictures_count: {\r
+        type: 'count',\r
+        args: {\r
+          item_name: 'resource_picture',\r
+          list_name: 'private',\r
+          param_id: 'none',\r
         },\r
       },\r
     },\r
index 0c38d66..0d4ea69 100644 (file)
@@ -106,7 +106,7 @@ class ApplicationController < ActionController::Base
   def set_model
     @my_controller = Manifest.manifest.controllers[params[:controller].to_s]
     @my_action = @my_controller.actions[params[:action].to_s]
-    @my_model = Manifest.manifest.models[@my_controller.item_name]
+    @my_model = Manifest.manifest.models[@my_action.item_name]
     @my_model_class = @my_model.classify
   end
   
index bff64a0..e914d9a 100644 (file)
@@ -1,10 +1,12 @@
 class HomeController < ApplicationController
   before_filter :authenticate_user, :only => [
     :index, :show, :profile, :configure, :create_token, :delete_token, 
-    :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :resource_pictures, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
+    :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :resource_pictures, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors,
+    :scrolls_count, :scroll_panels_count, :comics_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :ground_pictures_count, :ground_colors_count
   ]
   before_filter :authenticate_author, :only => [
-    :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
+    :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors,
+    :scrolls_count, :scroll_panels_count, :comics_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :ground_pictures_count, :ground_colors_count
   ]
   before_filter :authenticate_artist, :only => [:resource_pictures]
   
@@ -107,4 +109,56 @@ class HomeController < ApplicationController
     filer_list
   end
   
+  def scrolls_count
+    list_count
+  end
+  
+  def scroll_panels_count
+    list_count
+  end
+  
+  def comics_count
+    list_count
+  end
+  
+  def stories_count
+    list_count
+  end
+  
+  def story_sheets_count
+    list_count
+  end
+  
+  def sheets_count
+    list_count
+  end
+  
+  def sheet_panels_count
+    list_count
+  end
+  
+  def panels_count
+    list_count
+  end
+  
+  def panel_pictures_count
+    list_count
+  end
+  
+  def speech_balloons_count
+    list_count
+  end
+  
+  def ground_pictures_count
+    list_count
+  end
+  
+  def ground_colors_count
+    list_count
+  end
+  
+  def resource_pictures_count
+    list_count
+  end
+  
 end
index bab55d7..dec67b3 100644 (file)
@@ -1,5 +1,5 @@
 <div>
-  <%= t_selected_item('panel_visible_items', item.publish) %>
+  <%= t_selected_item('panel_publish_items', item.publish) %>
 </div>
 <div>
   <%= link_to h(truncate(item.author.name, :length => 12)), author_path(item.author) %>
index 7347a12..7324281 100644 (file)
@@ -5,5 +5,5 @@
   <% end %>
 </div>
 <div>
-  <%= link_to h(truncate(item.author.name, :length => 12)), author_path(item.author) %>
+  <%= link_to h(truncate(item.scroll.author.name, :length => 12)), author_path(item.scroll.author) %>
 </div>
index 01dff37..8cf5f5b 100644 (file)
@@ -83,6 +83,7 @@ ja:
         remember_me: 次回から自動でログイン
         authentication_token: 認証トークン
       folder:
+        name: フォルダ名
         controller_name: コントローラ名
         action_name: アクション名
         category_id: 種別
index df95c3d..975a365 100644 (file)
           "args": {\r
             "item_name": "scroll",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "scrolls_count"\r
           }\r
         },\r
         "scroll_panels": {\r
           "args": {\r
             "item_name": "scroll_panel",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "scroll_panels_count"\r
           }\r
         },\r
         "comics": {\r
           "args": {\r
             "item_name": "comic",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "comics_count"\r
           }\r
         },\r
         "stories": {\r
           "args": {\r
             "item_name": "story",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "stories_count"\r
           }\r
         },\r
         "story_sheets": {\r
           "args": {\r
             "item_name": "story_sheet",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "story_sheets_count"\r
           }\r
         },\r
         "sheets": {\r
           "args": {\r
             "item_name": "sheet",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "sheets_count"\r
           }\r
         },\r
         "sheet_panels": {\r
           "args": {\r
             "item_name": "sheet_panel",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "sheet_panels_count"\r
           }\r
         },\r
         "panels": {\r
           "args": {\r
             "item_name": "panel",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "panels_count"\r
           }\r
         },\r
         "panel_pictures": {\r
           "args": {\r
             "item_name": "panel_picture",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "panel_pictures_count"\r
           }\r
         },\r
         "speech_balloons": {\r
           "args": {\r
             "item_name": "speech_balloon",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "speech_balloons_count"\r
           }\r
         },\r
         "speeches": {\r
           "args": {\r
             "item_name": "speech",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "speeches_count"\r
           }\r
         },\r
         "balloons": {\r
           "args": {\r
             "item_name": "balloon",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "balloons_count"\r
           }\r
         },\r
         "ground_pictures": {\r
           "args": {\r
             "item_name": "ground_picture",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "ground_pictures_count"\r
           }\r
         },\r
         "ground_colors": {\r
           "args": {\r
             "item_name": "ground_color",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "ground_colors_count"\r
           }\r
         },\r
         "original_pictures": {\r
           "args": {\r
             "item_name": "original_picture",\r
             "list_name": "private",\r
-            "param_id": "none"\r
+            "param_id": "none",\r
+            "counter_name": "count"\r
           }\r
         },\r
         "resource_pictures": {\r
           "args": {\r
             "item_name": "resource_picture",\r
             "list_name": "private",\r
+            "param_id": "none",\r
+            "counter_name": "resource_pictures_count"\r
+          }\r
+        },\r
+        "scrolls_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "scroll",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "scroll_panels_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "scroll_panel",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "comics_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "comic",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "stories_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "story",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "story_sheets_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "story_sheet",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "sheets_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "sheet",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "sheet_panels_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "sheet_panel",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "panels_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "panel",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "panel_pictures_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "panel_picture",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "speech_balloons_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "speech_balloon",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "speeches_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "speech",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "balloons_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "balloon",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "ground_pictures_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "ground_picture",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "ground_colors_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "ground_color",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "original_pictures_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "original_picture",\r
+            "list_name": "private",\r
+            "param_id": "none"\r
+          }\r
+        },\r
+        "resource_pictures_count": {\r
+          "type": "count",\r
+          "args": {\r
+            "item_name": "resource_picture",\r
+            "list_name": "private",\r
             "param_id": "none"\r
           }\r
         }\r