From: yasushiito Date: Sat, 30 Aug 2014 07:07:05 +0000 (+0900) Subject: fix filer X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=commitdiff_plain;h=9529441f04dd2c502077a051b866eac838e5849e fix filer --- 9529441f04dd2c502077a051b866eac838e5849e diff --cc app/assets/javascripts/controllers/folders.js.coffee index 394af8a0,394af8a0..6492faec --- a/app/assets/javascripts/controllers/folders.js.coffee +++ b/app/assets/javascripts/controllers/folders.js.coffee @@@ -4,32 -4,32 +4,39 @@@ class Pettanr.FoldersController extend @filer_list() root: () -> ++ @set_model() ++ @item = new Pettanr.Folder.Root() ++ _this = this ++ @item.fetch({}).done () -> ++ _this.children_html() show_html_format: (format) -> ++ children_html: () -> ++ collection = new Pettanr.Folder.Children({id: @item.get('id')}) ++ f = new Locmare.Filer({ ++ item_name: 'folder', ++ collection: collection, ++ pager: null, ++ operators: window.operators ++ }) ++ $("#pettanr").html(f.render().el) ++ show: () -> console.log(@params) id = @params['id'] -- item = new Pettanr.FolderWatch({id: id}) ++ @item = new Pettanr.FolderWatch({id: id}) _this = this -- item.fetch({}).done () -> -- if item.is_remote() -- c = item.get('controller_name') -- a = if Pettanr.is_blank(item.get('action_name')) ++ @item.fetch({}).done () -> ++ if _this.item.is_remote() ++ c = _this.item.get('controller_name') ++ a = if Pettanr.is_blank(_this.item.get('action_name')) 'index' else -- item.get('action_name') ++ _this.item.get('action_name') window.router['c_i'](c, a, '') # call action event in router for redirect else -- list_result = new Pettanr.Folder.Children({id: item.id}) -- f = new Locmare.Filer({ -- item_name: 'folder', -- items: [], -- list_result: list_result, -- pager_type: 'default', -- operators: window.operators -- }) -- $("#pettanr").html(f.render().el) ++ _this.children_html() count: () -> diff --cc app/assets/javascripts/locmare/filer/body/file_body.js.coffee index 26bb9e32,26bb9e32..75083166 --- a/app/assets/javascripts/locmare/filer/body/file_body.js.coffee +++ b/app/assets/javascripts/locmare/filer/body/file_body.js.coffee @@@ -5,7 -5,7 +5,7 @@@ class Locmare.FilerModule.BodyModule.Fi @body = options.body @collection = [] _this = this -- c = @filer().list_result ++ c = @filer().collection c.fetch().done -> _this.filer().items = c.models _this.collection = _.map c.models, (item) -> diff --cc app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default/face/method.js.coffee index 76b023ec,76b023ec..030d5969 --- a/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default/face/method.js.coffee +++ b/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default/face/method.js.coffee @@@ -4,7 -4,7 +4,11 @@@ class Locmare.FilerModule.BodyModule.Fi super(options) render: () -> -- this.$el.html(@face()) ++ if Pettanr.is_a_string(@face()) ++ this.$el.html(@face()) ++ else ++ this.$el.html(@face().render().el) ++ this @template_file_name: () -> diff --cc app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/face/picture.js.coffee index 11f6397b,11f6397b..127a581a --- a/app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/face/picture.js.coffee +++ b/app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/face/picture.js.coffee @@@ -3,10 -3,10 +3,11 @@@ class Locmare.FilerModule.BodyModule.Fi initialize: (options) -> super(options) _this = this -- if i = @item[@method_name()]() -- i.fetch().done -> -- _this.picture = new Pettanr.AppHelperImg({src: i.r_url(), size: _this.icon_size()}) ++ if @item[@method_name()] ++ @item[@method_name()]((pic) -> ++ _this.picture = pic _this.render() ++ ) else @picture = new Pettanr.AppHelperImg({src: '/images/error.png', size: @icon_size()}) _this.render() diff --cc app/assets/javascripts/main.js.coffee index 603e6dc5,38d2c0ba..13522978 --- a/app/assets/javascripts/main.js.coffee +++ b/app/assets/javascripts/main.js.coffee @@@ -22,11 -22,10 +22,11 @@@ $ - artist.fetch({}) window.operators = new Pettanr.Operator([author, artist]) - list_result = new Pettanr.Folder.Root({}) - new Pettanr.FilerRender('folder', list_result, 'default', window.operators) + #list_result = new Pettanr.Folder.Root({}) + #new Pettanr.FilerRender('folder', list_result, 'default', window.operators) window.router = new Pettanr.Router() Backbone.history.start({pushState: true}) - window.router.navigate('folders/root', true) ++ window.router.navigate('', true) test_router: () -> window.router.navigate('folders/98', true) diff --cc app/assets/javascripts/manifest/controller/action/base.js.coffee index 1ef6a23c,1ef6a23c..a2dfa151 --- a/app/assets/javascripts/manifest/controller/action/base.js.coffee +++ b/app/assets/javascripts/manifest/controller/action/base.js.coffee @@@ -3,9 -3,9 +3,41 @@@ class Manifest.ControllerModule.ActionM set_default: () -> super() @args.item_name ||= @parent.item_name # not parent.name. follow singularized name ++ @args.param_id ||= 'prefix' init: () -> super() @item_name = @args.item_name ++ @param_id = @args.param_id ++ ++ encode_query: (params) -> ++ q = [] ++ q.push('page=' + Pettanr.to_s(params['page'])) if params['page'] ++ q.push('page_size=' + Pettanr.to_s(params['page_size'])) if params['page_size'] ++ if q.length > 0 ++ '?' + q.join('&') ++ else ++ '' ++ ++ encode_url: (action_name, params) -> ++ c = @parent.name ++ a = if action_name != 'index' ++ '/' + action_name ++ else ++ '' ++ i = if params['id'] ++ '/' + Pettanr.to_s(params['id']) ++ else ++ '' ++ q = @encode_query(params) ++ switch @param_id ++ when 'prefix' ++ c + i + a + q ++ when 'suffix' ++ c + a + i + q ++ else ++ c + a + q ++ ++ url: (params) -> ++ @encode_url(@name, params) -- diff --cc app/assets/javascripts/manifest/controller/action/list.js.coffee index 802f5166,802f5166..bd5aa453 --- a/app/assets/javascripts/manifest/controller/action/list.js.coffee +++ b/app/assets/javascripts/manifest/controller/action/list.js.coffee @@@ -3,8 -3,8 +3,17 @@@ class Manifest.ControllerModule.ActionM set_default: () -> super() @args.list_name ||= @name ++ @args.counter_name = if @name == 'index' ++ 'count' ++ else ++ 'count_' init: () -> super() @list_name = @args.list_name ++ @counter_name = @args.counter_name ++ ++ counter_url: (params) -> ++ @encode_url(@counter_name, params) ++ diff --cc app/assets/javascripts/manifest/manifest.js.coffee index d0826de9,d0826de9..77c1abaa --- a/app/assets/javascripts/manifest/manifest.js.coffee +++ b/app/assets/javascripts/manifest/manifest.js.coffee @@@ -9,6 -9,6 +9,11 @@@ class Manifes @items = ManifestBase.load_type_name_args(this, @global_json, 'items', Manifest.ItemFactory) @controllers = Manifest.Controller.load(this, @global_json, 'controllers', Manifest.Controller) @models = Manifest.Model.load(this, @global_json, 'models', Manifest.Model) ++ @inflectors = {} ++ _this = this ++ _.each @models, (model_manifest, item_name) -> ++ if model_manifest.table_name ++ _this.inflectors[model_manifest.table_name] = item_name true @item_name_to_model: (item_name) -> diff --cc app/assets/javascripts/manifest/model.js.coffee index 65e839ac,65e839ac..bbbcc6a9 --- a/app/assets/javascripts/manifest/model.js.coffee +++ b/app/assets/javascripts/manifest/model.js.coffee @@@ -21,6 -21,6 +21,7 @@@ class Manifest.Model extends ManifestBa init: () -> super ++ @table_name = @json.table_name @attributes = ManifestBase.load_name_values this, @json, 'attributes', Manifest.ModelModule.Attribute @associations = ManifestBase.load_value this, @json, 'associations', Manifest.ModelModule.Association @list = ManifestBase.load_value this, @json, 'list', Manifest.ModelModule.List @@@ -32,7 -32,7 +33,7 @@@ Manifest.item_name_to_model @name table_name: () -> -- @classify.table_name ++ @table_name valid_encode_columns: () -> r = [] diff --cc app/assets/javascripts/models/balloon.js.coffee index 8d6c55bf,8d6c55bf..1c699347 --- a/app/assets/javascripts/models/balloon.js.coffee +++ b/app/assets/javascripts/models/balloon.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.Balloon extends Peta.Element ++ url: '/balloons/' ++ @singular: () -> 'Balloon' @@@ -14,11 -14,11 +16,20 @@@ r: 0 } ++ speech_balloon: () -> ++ new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')}) ++ url: () -> '/system_pictures/' + @system_picture().filename() -- symbol_option: () -> -- @speech_balloon().speech_balloon_template().symbol_option() ++ symbol_option: (cb) -> ++ sb = @speech_balloon() ++ sb.fetch().done -> ++ sbt = sb.speech_balloon_template() ++ sbt.fetch().done -> ++ sp = sbt.system_picture() ++ sp.fetch().done -> ++ cb(sp.tmb_opt_img_tag()) style: () -> { diff --cc app/assets/javascripts/models/comic.js.coffee index c760c135,c760c135..469774c2 --- a/app/assets/javascripts/models/comic.js.coffee +++ b/app/assets/javascripts/models/comic.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.Comic extends Peta.Binder ++ url: '/comics/' ++ @singular: () -> 'Comic' diff --cc app/assets/javascripts/models/folder.js.coffee index db39a4b6,db39a4b6..554856e7 --- a/app/assets/javascripts/models/folder.js.coffee +++ b/app/assets/javascripts/models/folder.js.coffee @@@ -42,9 -42,9 +42,9 @@@ class Pettanr.FolderWatch extends Petta class Pettanr.Folder.Collection extends Backbone.Collection model: Pettanr.Folder url: 'folders' --class Pettanr.Folder.Root extends Backbone.Collection ++class Pettanr.Folder.Root extends Pettanr.Folder model: Pettanr.Folder -- url: '/folders/root' ++ url: '/folders/root?ref=1' class Pettanr.Folder.Children extends Backbone.Collection model: Pettanr.Folder initialize: (options) -> diff --cc app/assets/javascripts/models/ground_picture.js.coffee index 1a18c151,1a18c151..2f112d43 --- a/app/assets/javascripts/models/ground_picture.js.coffee +++ b/app/assets/javascripts/models/ground_picture.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.GroundPicture extends Peta.Element ++ url: '/ground_pictures/' ++ @singular: () -> 'GroundPicture' @@@ -16,7 -16,7 +18,7 @@@ ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'] picture: () -> -- @get('picture') ++ new Pettanr.Picture({id: @get('picture_id')}) has_picture: () -> true @@@ -34,12 -34,12 +36,15 @@@ @merge_opacity(r, opacity) if spot and spot != this r -- tmb_opt_img_tag: () -> -- wh = Pettanr.Imager.thumbnail_size(@picture().get('width'), @picture().get('height')) -- {src: @picture().r_url(), width: wh[0], height: wh[1], alt: @get('caption')} ++ tmb_opt_img_tag: (picture) -> ++ wh = Pettanr.Imager.thumbnail_size(picture().get('width'), picture().get('height')) ++ new Pettanr.AppHelperImg({src: picture.r_url(), size: Math.abs(wh[0]), alt: @get('caption')}) -- symbol_option: () -> -- @tmb_opt_img_tag() ++ symbol_option: (cb) -> ++ i = @picture() ++ _this = this ++ i.fetch().done -> ++ cb(_this.tmb_opt_img_tag(i)) repeat_text: () -> Pettanr.GroundPicture.repeat_texts()[@get('repeat')] diff --cc app/assets/javascripts/models/license.js.coffee index 2e18e585,2e18e585..62bfd0ce --- a/app/assets/javascripts/models/license.js.coffee +++ b/app/assets/javascripts/models/license.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.License extends Peta.SystemResource ++ url: '/licenses/' ++ @singular: () -> 'License' @@@ -11,11 -11,11 +13,17 @@@ license_group: () -> r = new Pettanr.LicenseGroup({id: @get('license_group_id')}) -- r.fetch({}).done () -> -- r ++ ++ system_picture: () -> ++ new Pettanr.SystemPicture({id: @get('system_picture_id')}) ++ ++ symbol_option: (cb) -> ++ i = @system_picture() ++ i.fetch().done -> ++ cb(i.tmb_opt_img_tag()) caption_with_group: () -> -- @license_group().get('caption') + '/' + @get('caption') ++ new Pettanr.License.Caption({license: this, license_group: @license_group()}) initialize: () -> if @id @@@ -24,3 -24,3 +32,16 @@@ class Pettanr.License.Collection extends Backbone.Collection model: Pettanr.License url: '/licenses' ++ ++class Pettanr.License.Caption extends Backbone.View ++ tagName: 'span' ++ initialize: (options) -> ++ @license = options.license ++ @license_group = options.license_group ++ ++ render: () -> ++ _this = this ++ @license_group.fetch().done -> ++ _this.$el.html(_this.license_group.get('caption') + '/' + _this.license.get('caption')) ++ this ++ diff --cc app/assets/javascripts/models/license_group.js.coffee index f0d70f9c,f0d70f9c..5c22091f --- a/app/assets/javascripts/models/license_group.js.coffee +++ b/app/assets/javascripts/models/license_group.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.LicenseGroup extends Peta.Template ++ url: '/license_groups/' ++ @singular: () -> 'LicenseGroup' diff --cc app/assets/javascripts/models/original_picture.js.coffee index bd78f92a,bd78f92a..fe1ffa92 --- a/app/assets/javascripts/models/original_picture.js.coffee +++ b/app/assets/javascripts/models/original_picture.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.OriginalPicture extends Peta.Content ++ url: '/original_pictures/' ++ @singular: () -> 'OriginalPicture' @@@ -29,8 -29,8 +31,10 @@@ wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height')) {src: @r_url(), width: wh[0], height: wh[1]} -- symbol_option: () -> -- @tmb_opt_img_tag() ++ symbol_option: (cb) -> ++ _this = this ++ this.fetch().done -> ++ cb(_this.tmb_opt_img_tag()) revision: () -> head = @history()[0] diff --cc app/assets/javascripts/models/panel_picture.js.coffee index 794797c8,794797c8..f8f9be3f --- a/app/assets/javascripts/models/panel_picture.js.coffee +++ b/app/assets/javascripts/models/panel_picture.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.PanelPicture extends Peta.Element ++ url: '/panel_pictures/' ++ @singular: () -> 'PanelPicture' @@@ -9,6 -9,6 +11,9 @@@ id: null } ++ picture: () -> ++ new Pettanr.Picture({id: @get('picture_id')}) ++ @has_picture: () -> true @@@ -52,12 -52,12 +57,15 @@@ style: "#{o}" }) -- tmb_opt_img_tag: () -> ++ tmb_opt_img_tag: (picture) -> wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height')) -- {src: @r_url(), width: Math.abs(wh[0]), height: Math.abs(wh[1]), alt: @get('caption')} ++ new Pettanr.AppHelperImg({src: picture.r_url(), size: Math.abs(wh[0]), alt: @get('caption')}) -- symbol_option: () -> -- @picture().symbol_option() ++ symbol_option: (cb) -> ++ i = @picture() ++ _this = this ++ i.fetch().done -> ++ cb(_this.tmb_opt_img_tag(i)) initialize: () -> if @id diff --cc app/assets/javascripts/models/picture.js.coffee index ed592ff3,ed592ff3..2af7542c --- a/app/assets/javascripts/models/picture.js.coffee +++ b/app/assets/javascripts/models/picture.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.Picture extends Peta.Content ++ url: '/pictures/' ++ @singular: () -> 'Picture' @@@ -44,7 -44,7 +46,7 @@@ lgn + '[' + ln + ']' symbol_option: () -> -- @tmb_opt_img_tag() ++ this is_enable: () -> if @head().resource_picture() diff --cc app/assets/javascripts/models/resource_picture.js.coffee index fafa3dcb,2d5b454e..fb2cb026 --- a/app/assets/javascripts/models/resource_picture.js.coffee +++ b/app/assets/javascripts/models/resource_picture.js.coffee @@@ -42,8 -40,8 +42,10 @@@ class Pettanr.ResourcePicture extends P ln = Pettanr.to_s(@license().get('caption')) lgn + '[' + ln + ']' -- symbol_option: () -> -- @tmb_opt_img_tag() ++ symbol_option: (cb) -> ++ _this = this ++ this.fetch().done -> ++ cb(_this.tmb_opt_img_tag()) initialize: () -> if @id diff --cc app/assets/javascripts/models/speech.js.coffee index 7c158fd9,7c158fd9..92b8bd45 --- a/app/assets/javascripts/models/speech.js.coffee +++ b/app/assets/javascripts/models/speech.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.Speech extends Peta.Element ++ url: '/speeches/' ++ @singular: () -> 'Speech' @@@ -13,11 -13,11 +15,20 @@@ height: 100 } ++ speech_balloon: () -> ++ new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')}) ++ @text_align_texts: () -> ['left', 'left', 'right', 'center'] -- symbol_option: () -> -- @speech_balloon().speech_balloon_template().symbol_option() ++ symbol_option: (cb) -> ++ sb = @speech_balloon() ++ sb.fetch().done -> ++ sbt = sb.speech_balloon_template() ++ sbt.fetch().done -> ++ sp = sbt.system_picture() ++ sp.fetch().done -> ++ cb(sp.tmb_opt_img_tag()) outer_style: () -> { diff --cc app/assets/javascripts/models/speech_balloon.js.coffee index e1dc8ce2,e1dc8ce2..55841eff --- a/app/assets/javascripts/models/speech_balloon.js.coffee +++ b/app/assets/javascripts/models/speech_balloon.js.coffee @@@ -1,4 -1,4 +1,6 @@@ class Pettanr.SpeechBalloon extends Peta.Element ++ url: '/speech_balloons/' ++ @singular: () -> 'SpeechBalloon' @@@ -11,11 -11,11 +13,21 @@@ t: null } ++ speech_balloon_template: () -> ++ new Pettanr.SpeechBalloonTemplate({id: @get('speech_balloon_template_id')}) ++ @has_picture: () -> false -- @symbol_option: () -> -- @speech_balloon_template.symbol_option ++ symbol_option: (cb) -> ++ sbt = @speech_balloon_template() ++ sbt.fetch().done -> ++ sp = sbt.system_picture() ++ sp.fetch().done -> ++ cb(sp.tmb_opt_img_tag()) ++ ++ plain_scenario: () -> ++ @get('caption') initialize: () -> if @id diff --cc app/assets/javascripts/models/speech_balloon_template.js.coffee index 55dafaf3,55dafaf3..d85de454 --- a/app/assets/javascripts/models/speech_balloon_template.js.coffee +++ b/app/assets/javascripts/models/speech_balloon_template.js.coffee @@@ -14,8 -14,8 +14,10 @@@ class Pettanr.SpeechBalloonTemplate ext system_picture: () -> new Pettanr.SystemPicture({id: @get('system_picture_id')}) -- symbol_option: () -> -- @system_picture() ++ symbol_option: (cb) -> ++ i = @system_picture() ++ i.fetch().done -> ++ cb(i.tmb_opt_img_tag()) initialize: () -> if @id diff --cc app/assets/javascripts/models/system_picture.js.coffee index 82e60c8e,82e60c8e..1ddecedf --- a/app/assets/javascripts/models/system_picture.js.coffee +++ b/app/assets/javascripts/models/system_picture.js.coffee @@@ -25,10 -25,10 +25,12 @@@ class Pettanr.SystemPicture extends Pet tmb_opt_img_tag: () -> wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height')) -- {src: @r_url(), width: wh[0], height: wh[1]} ++ new Pettanr.AppHelperImg({src: @r_url(), size: wh[0]}) -- symbol_option: () -> -- @tmb_opt_img_tag() ++ symbol_option: (cb) -> ++ _this = this ++ this.fetch().done -> ++ cb(_this.tmb_opt_img_tag()) initialize: () -> if @id diff --cc app/assets/javascripts/models/writing_format.js.coffee index f5fb137c,f5fb137c..ca7cd7b4 --- a/app/assets/javascripts/models/writing_format.js.coffee +++ b/app/assets/javascripts/models/writing_format.js.coffee @@@ -9,6 -9,6 +9,14 @@@ class Pettanr.WritingFormat extends Pet id: null } ++ system_picture: () -> ++ new Pettanr.SystemPicture({id: @get('system_picture_id')}) ++ ++ symbol_option: (cb) -> ++ i = @system_picture() ++ i.fetch().done -> ++ cb(i.tmb_opt_img_tag()) ++ initialize: () -> if @id @url = @url + @id diff --cc app/assets/javascripts/pettanr.js.coffee index c5ed2df3,e2bdc23d..1de7dd24 --- a/app/assets/javascripts/pettanr.js.coffee +++ b/app/assets/javascripts/pettanr.js.coffee @@@ -113,31 -108,56 +113,30 @@@ class Pettan initialize: (attr, options) -> @url = options['url'] + count: () -> + @get('count') + - class Pettanr.Url - - @decode: (params) -> - - @encode: (params) -> - - class Pettanr.Pager ++ class Pettanr.Pager extends Backbone.View + - initialize: (@counter) -> - @counter.fetch().done -> - - @current_page = @list_result.page - @per_page = @list_result.page_size - @total_page = (@total / @per_page) + 1 ++ initialize: (options) -> ++ @action = options['action'] ++ @params = options['params'] ++ @current_page = @params['page'] ++ @per_page = @params['page_size'] + @window_size = 3 - - @by_params: (params) -> - - @page = params['page'] - @page_size = params['page_size'] - @counter = new Pettanr.CounterModel({}, {url: '/' + params['controller'] + i + 'count_' + a}) - new Pettanr.Pager() ++ @counter = new Pettanr.CounterModel({}, {url: '/' + @action.counter_url(@params)}) ++ _this = this ++ @counter.fetch().done -> ++ _this.total_page = (@total / _this.per_page) + 1 + class Pettanr.FilerCollection extends Backbone.Collection initialize: (models, options) -> - params = options['params'] - i = if params['id'] - params['id'] + '/' - else - '' - a = if params['action'] != 'index' - params['action'] - else - '' - - @page = params['page'] - @page_size = params['page_size'] - q = [] - q.push('page=' + Pettanr.to_s(@page)) if @page - q.push('page_size=' + Pettanr.to_s(@page_size)) if @page_size - qry = if q.length > 0 - '?' + q.join('&') - else - '' - @url = '/' + params['controller'] + '/' + i + a + qry - @total = new Pettanr.CounterModel({}, {url: '/' + params['controller'] + '/' + i + 'count_' + a}) @model = options['model'] - params = options['params'] - @counter = options['counter'] ++ @action = options['action'] ++ @params = options['params'] + - i = if params['id'] - params['id'] + '/' - else - '' - a = if params['action'] != 'index' - params['action'] - else - '' - q = [] - q.push('page=' + Pettanr.to_s(@page)) if @page - q.push('page_size=' + Pettanr.to_s(@page_size)) if @page_size - qry = if q.length > 0 - '?' + q.join('&') - else - '' - @url = '/' + params['controller'] + i + a + qry - @pager = new Pettanr.Pager(@counter) ++ @url = '/' + @action.url(@params) class Pettanr.AppController constructor: () -> @@@ -153,16 -173,16 +152,16 @@@ @set_model() @my_list_model = Manifest.manifest().models[@my_action.item_name] @my_list_model_class = @my_list_model.classify() - @list = new Pettanr.FilerCollection({}, {model: @my_list_model_class, params: @params}) - @counter = new Pettanr.CounterModel({}, {url: @my_action.url(i)}) - @list = new Pettanr.FilerCollection({}, {model: @my_list_model_class, counter: @counter, params: @params}) ++ @pager = new Pettanr.Pager({action: @my_action, params: @params}) ++ @list = new Pettanr.FilerCollection({}, {model: @my_list_model_class, action: @my_action, params: @params}) filer_list: () -> @set_list() f = new Locmare.Filer({ el: "#pettanr", item_name: @my_list_model_class.item_name(), - items: [], - list_result: @list, - pager_type: 'default', - list: @list, - pager: @list.pager, ++ collection: @list, ++ pager: @pager, operators: window.operators }) diff --cc app/assets/javascripts/routes.js.coffee index b0c9db16,b0c9db16..12b333df --- a/app/assets/javascripts/routes.js.coffee +++ b/app/assets/javascripts/routes.js.coffee @@@ -74,11 -74,11 +74,18 @@@ class Pettanr.Router extends Backbone.R else params['action'] = 'index' this.fire(params) ++ this.route('', 'home') this.route(':controller/:id/:action?*query_string', 'c_i_a') this.route(':controller/:id/:action', 'c_i_a') this.route(':controller/:id?*query_string', 'c_i') this.route(':controller/:id', 'c_i') ++ home: () -> ++ params = {} ++ params['controller'] = 'folders' ++ params['action'] = 'root' ++ @fire(params) ++ hoge: () -> names = _.map Manifest.manifest().controllers, (controller_manifest, controller_name) -> c = Pettanr[Pettanr.camelize(controller_name) + 'Controller'] diff --cc app/assets/javascripts/work/controllers.js.coffee.erb index cbc03ff4,cbc03ff4..45da9b95 --- a/app/assets/javascripts/work/controllers.js.coffee.erb +++ b/app/assets/javascripts/work/controllers.js.coffee.erb @@@ -10,6 -10,6 +10,7 @@@ type: 'list', args: { list_name: 'public', ++ param_id: 'none', }, }, show: { @@@ -42,13 -42,13 +43,20 @@@ type: 'list', args: { list_name: 'public', ++ param_id: 'none', }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, play: { type: 'list', @@@ -96,17 -96,17 +104,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_scroll: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -150,14 -150,14 +167,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_story: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, play: { type: 'list', @@@ -205,14 -205,14 +228,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_comic: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_story: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -253,17 -253,17 +282,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_comic: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_sheet: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, play: { type: 'list', @@@ -314,17 -314,17 +352,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_story: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_sheet: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -368,17 -368,17 +415,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_story: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, play: { type: 'list', @@@ -429,17 -429,17 +485,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_sheet: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -483,20 -483,20 +548,32 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_scroll: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_sheet: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_speech_balloon_template: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -543,14 -543,14 +620,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -582,17 -582,17 +665,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_speech_balloon_template: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -627,11 -627,11 +719,14 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -660,11 -660,11 +755,14 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -693,14 -693,14 +791,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -732,14 -732,14 +836,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_author: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -771,6 -771,6 +881,7 @@@ type: 'list', args: { list_name: 'private', ++ param_id: 'none', }, }, show: { @@@ -809,11 -809,11 +920,14 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_artist: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -836,17 -836,17 +950,26 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_license_group: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_license: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_artist: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -875,11 -875,11 +998,14 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_panel: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -917,11 -917,11 +1043,14 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_system_picture: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -959,7 -959,7 +1088,7 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, show: { @@@ -995,14 -995,14 +1124,20 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, by_license_group: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, by_system_picture: { type: 'list', ++ args: { ++ param_id: 'suffix', ++ }, }, show: { type: 'show', @@@ -1043,7 -1043,7 +1178,7 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, show: { @@@ -1079,7 -1079,7 +1214,7 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, show: { @@@ -1115,7 -1115,7 +1250,7 @@@ type: 'list', args: { list_name: 'public', -- ++ param_id: 'none', }, }, show: { @@@ -1136,7 -1136,7 +1271,7 @@@ args: { item_name: 'scroll', list_name: 'private', -- ++ param_id: 'none', }, }, scroll_panels: { @@@ -1144,7 -1144,7 +1279,7 @@@ args: { item_name: 'scroll_panel', list_name: 'private', -- ++ param_id: 'none', }, }, comics: { @@@ -1152,7 -1152,7 +1287,7 @@@ args: { item_name: 'comic', list_name: 'private', -- ++ param_id: 'none', }, }, stories: { @@@ -1160,7 -1160,7 +1295,7 @@@ args: { item_name: 'story', list_name: 'private', -- ++ param_id: 'none', }, }, story_sheets: { @@@ -1168,7 -1168,7 +1303,7 @@@ args: { item_name: 'story_sheet', list_name: 'private', -- ++ param_id: 'none', }, }, sheets: { @@@ -1176,7 -1176,7 +1311,7 @@@ args: { item_name: 'sheet', list_name: 'private', -- ++ param_id: 'none', }, }, sheet_panels: { @@@ -1184,7 -1184,7 +1319,7 @@@ args: { item_name: 'sheet_panel', list_name: 'private', -- ++ param_id: 'none', }, }, panels: { @@@ -1192,7 -1192,7 +1327,7 @@@ args: { item_name: 'panel', list_name: 'private', -- ++ param_id: 'none', }, }, panel_pictures: { @@@ -1200,7 -1200,7 +1335,7 @@@ args: { item_name: 'panel_picture', list_name: 'private', -- ++ param_id: 'none', }, }, speech_balloons: { @@@ -1208,7 -1208,7 +1343,7 @@@ args: { item_name: 'speech_balloon', list_name: 'private', -- ++ param_id: 'none', }, }, speeches: { @@@ -1216,7 -1216,7 +1351,7 @@@ args: { item_name: 'speech', list_name: 'private', -- ++ param_id: 'none', }, }, balloons: { @@@ -1224,7 -1224,7 +1359,7 @@@ args: { item_name: 'balloon', list_name: 'private', -- ++ param_id: 'none', }, }, ground_pictures: { @@@ -1232,7 -1232,7 +1367,7 @@@ args: { item_name: 'ground_picture', list_name: 'private', -- ++ param_id: 'none', }, }, ground_colors: { @@@ -1240,7 -1240,7 +1375,7 @@@ args: { item_name: 'ground_color', list_name: 'private', -- ++ param_id: 'none', }, }, original_pictures: { @@@ -1248,7 -1248,7 +1383,7 @@@ args: { item_name: 'original_picture', list_name: 'private', -- ++ param_id: 'none', }, }, resource_pictures: { @@@ -1256,7 -1256,7 +1391,7 @@@ args: { item_name: 'resource_picture', list_name: 'private', -- ++ param_id: 'none', }, }, }, diff --cc app/assets/javascripts/work/models.js.coffee.erb index ad431b0e,ad431b0e..03a4112f --- a/app/assets/javascripts/work/models.js.coffee.erb +++ b/app/assets/javascripts/work/models.js.coffee.erb @@@ -1,6 -1,6 +1,7 @@@ #マニフェスト @models = { folder: { ++ table_name: 'folders', associations: { belongs_to: { }, @@@ -65,6 -65,6 +66,7 @@@ }, }, scroll: { ++ table_name: 'scrolls', associations: { belongs_to: { author: { @@@ -113,6 -113,6 +115,7 @@@ }, }, scroll_panel: { ++ table_name: 'scroll_panels', associations: { belongs_to: { panel: { @@@ -149,6 -149,6 +152,7 @@@ }, }, comic: { ++ table_name: 'comics', associations: { belongs_to: { author: { @@@ -197,6 -197,6 +201,7 @@@ }, }, comic_story: { ++ table_name: 'comic_stories', associations: { belongs_to: { comic: { @@@ -233,6 -233,6 +238,7 @@@ }, }, story: { ++ table_name: 'stories', associations: { belongs_to: { author: { @@@ -293,6 -293,6 +299,7 @@@ }, }, story_sheet: { ++ table_name: 'story_sheets', associations: { belongs_to: { story: { @@@ -327,6 -327,6 +334,7 @@@ }, }, sheet: { ++ table_name: 'sheets', associations: { belongs_to: { author: { @@@ -388,6 -388,6 +396,7 @@@ }, }, sheet_panel: { ++ table_name: 'sheet_panels', associations: { belongs_to: { sheet: { @@@ -450,6 -450,6 +459,7 @@@ }, }, panel: { ++ table_name: 'panels', associations: { belongs_to: { author: { @@@ -529,6 -529,6 +539,7 @@@ }, }, panel_picture: { ++ table_name: 'panel_pictures', associations: { belongs_to: { panel: { @@@ -609,6 -609,6 +620,7 @@@ }, }, speech_balloon: { ++ table_name: 'speech_balloons', associations: { belongs_to: { panel: { @@@ -674,6 -674,6 +686,7 @@@ }, }, balloon: { ++ table_name: 'balloons', associations: { belongs_to: { speech_balloon: { @@@ -758,6 -758,6 +771,7 @@@ }, }, speech: { ++ table_name: 'speeches', associations: { belongs_to: { speech_balloon: { @@@ -895,6 -895,6 +909,7 @@@ }, }, ground_picture: { ++ table_name: 'ground_pictures', associations: { belongs_to: { panel: { @@@ -969,6 -969,6 +984,7 @@@ }, }, ground_color: { ++ table_name: 'ground_colors', associations: { belongs_to: { panel: { @@@ -1042,6 -1042,6 +1058,7 @@@ }, }, original_picture: { ++ table_name: 'original_pictures', associations: { belongs_to: { artist: { @@@ -1110,6 -1110,6 +1127,7 @@@ }, }, picture: { ++ table_name: 'pictures', associations: { belongs_to: { license: { @@@ -1217,6 -1217,6 +1235,7 @@@ } }, resource_picture: { ++ table_name: 'resource_pictures', associations: { belongs_to: { original_picture: { @@@ -1335,6 -1335,6 +1354,7 @@@ }, }, original_picture_license_group: { ++ table_name: 'original_picture_license_groups', associations: { belongs_to: { original_picture: { @@@ -1368,6 -1368,6 +1388,7 @@@ }, }, original_picture_license: { ++ table_name: 'original_picture_licenses', associations: { belongs_to: { original_picture: { @@@ -1428,6 -1428,6 +1449,7 @@@ }, }, speech_balloon_template: { ++ table_name: 'speech_balloon_templates', associations: { belongs_to: { system_picture: { @@@ -1486,6 -1486,6 +1508,7 @@@ }, }, writing_format: { ++ table_name: 'writing_formats', associations: { belongs_to: { system_picture: { @@@ -1533,6 -1533,6 +1556,7 @@@ }, }, license_group: { ++ table_name: 'license_groups', associations: { belongs_to: { }, @@@ -1573,6 -1573,6 +1597,7 @@@ }, }, license: { ++ table_name: 'licenses', associations: { belongs_to: { license_group: { @@@ -1638,6 -1638,6 +1663,7 @@@ }, }, author: { ++ table_name: 'authors', associations: { belongs_to: { }, @@@ -1673,6 -1673,6 +1699,7 @@@ }, }, artist: { ++ table_name: 'artists', associations: { belongs_to: { }, @@@ -1700,6 -1700,6 +1727,7 @@@ }, }, system_picture: { ++ table_name: 'system_pictures', associations: { belongs_to: { }, diff --cc app/controllers/folders_controller.rb index e57b03b2,e57b03b2..cbf5918b --- a/app/controllers/folders_controller.rb +++ b/app/controllers/folders_controller.rb @@@ -13,9 -13,9 +13,15 @@@ class FoldersController < ApplicationCo def root set_model @item = Folder.root -- respond_to do |format| -- children_html_format format -- children_json_format format ++ if params[:ref] ++ respond_to do |format| ++ show_json_format format ++ end ++ else ++ respond_to do |format| ++ children_html_format format ++ children_json_format format ++ end end end diff --cc public/manifest.json index 7626f7aa,7626f7aa..df95c3dc --- a/public/manifest.json +++ b/public/manifest.json @@@ -215,7 -215,7 +215,8 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "show": { @@@ -247,14 -247,14 +248,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "play": { "type": "list", @@@ -301,17 -301,17 +309,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_scroll": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -354,14 -354,14 +372,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_story": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "play": { "type": "list", @@@ -408,14 -408,14 +433,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_comic": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_story": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -455,17 -455,17 +487,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_comic": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_sheet": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "play": { "type": "list", @@@ -515,17 -515,17 +557,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_story": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_sheet": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -568,17 -568,17 +620,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_story": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "play": { "type": "list", @@@ -628,17 -628,17 +690,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_sheet": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -681,20 -681,20 +753,33 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_scroll": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_sheet": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_speech_balloon_template": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -740,14 -740,14 +825,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -778,17 -778,17 +870,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_speech_balloon_template": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -822,11 -822,11 +924,15 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -854,11 -854,11 +960,15 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -886,14 -886,14 +996,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -924,14 -924,14 +1041,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_author": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -962,7 -962,7 +1086,8 @@@ "index": { "type": "list", "args": { -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "show": { @@@ -1000,11 -1000,11 +1125,15 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_artist": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -1026,17 -1026,17 +1155,27 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_license_group": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_license": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_artist": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -1064,11 -1064,11 +1203,15 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_panel": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -1105,11 -1105,11 +1248,15 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_system_picture": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -1146,7 -1146,7 +1293,8 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "show": { @@@ -1181,14 -1181,14 +1329,21 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "by_license_group": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "by_system_picture": { -- "type": "list" ++ "type": "list", ++ "args": { ++ "param_id": "suffix" ++ } }, "show": { "type": "show" @@@ -1228,7 -1228,7 +1383,8 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "show": { @@@ -1263,7 -1263,7 +1419,8 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "show": { @@@ -1298,7 -1298,7 +1455,8 @@@ "index": { "type": "list", "args": { -- "list_name": "public" ++ "list_name": "public", ++ "param_id": "none" } }, "show": { @@@ -1318,112 -1318,112 +1476,128 @@@ "type": "list", "args": { "item_name": "scroll", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "scroll_panels": { "type": "list", "args": { "item_name": "scroll_panel", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "comics": { "type": "list", "args": { "item_name": "comic", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "stories": { "type": "list", "args": { "item_name": "story", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "story_sheets": { "type": "list", "args": { "item_name": "story_sheet", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "sheets": { "type": "list", "args": { "item_name": "sheet", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "sheet_panels": { "type": "list", "args": { "item_name": "sheet_panel", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "panels": { "type": "list", "args": { "item_name": "panel", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "panel_pictures": { "type": "list", "args": { "item_name": "panel_picture", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "speech_balloons": { "type": "list", "args": { "item_name": "speech_balloon", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "speeches": { "type": "list", "args": { "item_name": "speech", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "balloons": { "type": "list", "args": { "item_name": "balloon", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "ground_pictures": { "type": "list", "args": { "item_name": "ground_picture", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "ground_colors": { "type": "list", "args": { "item_name": "ground_color", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "original_pictures": { "type": "list", "args": { "item_name": "original_picture", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } }, "resource_pictures": { "type": "list", "args": { "item_name": "resource_picture", -- "list_name": "private" ++ "list_name": "private", ++ "param_id": "none" } } } @@@ -1431,6 -1431,6 +1605,7 @@@ }, "models": { "folder": { ++ "table_name": "folders", "associations": { "belongs_to": {}, "has_many": {} @@@ -1491,6 -1491,6 +1666,7 @@@ } }, "scroll": { ++ "table_name": "scrolls", "associations": { "belongs_to": { "author": {} @@@ -1536,6 -1536,6 +1712,7 @@@ } }, "scroll_panel": { ++ "table_name": "scroll_panels", "associations": { "belongs_to": { "panel": {}, @@@ -1569,6 -1569,6 +1746,7 @@@ } }, "comic": { ++ "table_name": "comics", "associations": { "belongs_to": { "author": {} @@@ -1614,6 -1614,6 +1792,7 @@@ } }, "comic_story": { ++ "table_name": "comic_stories", "associations": { "belongs_to": { "comic": {}, @@@ -1647,6 -1647,6 +1826,7 @@@ } }, "story": { ++ "table_name": "stories", "associations": { "belongs_to": { "author": {} @@@ -1702,6 -1702,6 +1882,7 @@@ } }, "story_sheet": { ++ "table_name": "story_sheets", "associations": { "belongs_to": { "story": {}, @@@ -1733,6 -1733,6 +1914,7 @@@ } }, "sheet": { ++ "table_name": "sheets", "associations": { "belongs_to": { "author": {} @@@ -1790,6 -1790,6 +1972,7 @@@ } }, "sheet_panel": { ++ "table_name": "sheet_panels", "associations": { "belongs_to": { "sheet": {}, @@@ -1849,6 -1849,6 +2032,7 @@@ } }, "panel": { ++ "table_name": "panels", "associations": { "belongs_to": { "author": {} @@@ -1920,6 -1920,6 +2104,7 @@@ } }, "panel_picture": { ++ "table_name": "panel_pictures", "associations": { "belongs_to": { "panel": {} @@@ -1997,6 -1997,6 +2182,7 @@@ } }, "speech_balloon": { ++ "table_name": "speech_balloons", "associations": { "belongs_to": { "panel": {}, @@@ -2055,6 -2055,6 +2241,7 @@@ } }, "balloon": { ++ "table_name": "balloons", "associations": { "belongs_to": { "speech_balloon": {}, @@@ -2134,6 -2134,6 +2321,7 @@@ } }, "speech": { ++ "table_name": "speeches", "associations": { "belongs_to": { "speech_balloon": {}, @@@ -2269,6 -2269,6 +2457,7 @@@ } }, "ground_picture": { ++ "table_name": "ground_pictures", "associations": { "belongs_to": { "panel": {} @@@ -2343,6 -2343,6 +2532,7 @@@ } }, "ground_color": { ++ "table_name": "ground_colors", "associations": { "belongs_to": { "panel": {} @@@ -2419,6 -2419,6 +2609,7 @@@ } }, "original_picture": { ++ "table_name": "original_pictures", "associations": { "belongs_to": { "artist": {} @@@ -2483,6 -2483,6 +2674,7 @@@ } }, "picture": { ++ "table_name": "pictures", "associations": { "belongs_to": { "license": {}, @@@ -2582,6 -2582,6 +2774,7 @@@ } }, "resource_picture": { ++ "table_name": "resource_pictures", "associations": { "belongs_to": { "original_picture": {}, @@@ -2690,6 -2690,6 +2883,7 @@@ } }, "original_picture_license_group": { ++ "table_name": "original_picture_license_groups", "associations": { "belongs_to": { "original_picture": {}, @@@ -2719,6 -2719,6 +2913,7 @@@ } }, "original_picture_license": { ++ "table_name": "original_picture_licenses", "associations": { "belongs_to": { "original_picture": {}, @@@ -2773,6 -2773,6 +2968,7 @@@ } }, "speech_balloon_template": { ++ "table_name": "speech_balloon_templates", "associations": { "belongs_to": { "system_picture": {} @@@ -2828,6 -2828,6 +3024,7 @@@ } }, "writing_format": { ++ "table_name": "writing_formats", "associations": { "belongs_to": { "system_picture": {} @@@ -2872,6 -2872,6 +3069,7 @@@ } }, "license_group": { ++ "table_name": "license_groups", "associations": { "belongs_to": {}, "has_many": { @@@ -2908,6 -2908,6 +3106,7 @@@ } }, "license": { ++ "table_name": "licenses", "associations": { "belongs_to": { "license_group": {}, @@@ -2967,6 -2967,6 +3166,7 @@@ } }, "author": { ++ "table_name": "authors", "associations": { "belongs_to": {}, "has_many": { @@@ -2995,6 -2995,6 +3195,7 @@@ } }, "artist": { ++ "table_name": "artists", "associations": { "belongs_to": {}, "has_many": { @@@ -3019,6 -3019,6 +3220,7 @@@ } }, "system_picture": { ++ "table_name": "system_pictures", "associations": { "belongs_to": {}, "has_many": {