//= require ./locmare/filer/body/file_body/file_item/edit/account
//= require ./locmare/filer/body/file_body/file_item/edit/template
//= require ./locmare/filer/pager
+//= require ./locmare/profiler
+//= require ./locmare/profiler/header
+//= require ./locmare/profiler/column
+//= require ./locmare/profiler/column/base
+//= require ./locmare/profiler/column/default
+//= require ./locmare/profiler/column/date
+//= require ./locmare/profiler/column/source
+//= require ./locmare/profiler/column/extend
+//= require ./locmare/profiler/column/extend/extend_column
+//= require ./locmare/profiler/column/json
+//= require ./locmare/profiler/association
+//= require ./locmare/profiler/association/belongs_to
+//= require ./locmare/profiler/association/has_many
+//= require ./locmare/profiler/association/has_one
//= require ./peta/peta
//= require ./peta/item
//= require ./peta/owner
@filer_list()\r
\r
root: () ->\r
+ @set_model()\r
+ @item = new Pettanr.Folder.Root()\r
+ _this = this\r
+ @item.fetch({}).done () ->\r
+ _this.children_html()\r
\r
show_html_format: (format) -> \r
\r
+ children_html: () -> \r
+ collection = new Pettanr.Folder.Children({id: @item.get('id')})\r
+ f = new Locmare.Filer({\r
+ item_name: 'folder', \r
+ collection: collection, \r
+ pager: null, \r
+ operators: window.operators\r
+ })\r
+ $("#pettanr").html(f.render().el)\r
+ \r
show: () ->\r
console.log(@params)\r
id = @params['id']\r
- item = new Pettanr.FolderWatch({id: id})\r
+ @item = new Pettanr.FolderWatch({id: id})\r
_this = this\r
- item.fetch({}).done () ->\r
- if item.is_remote()\r
- c = item.get('controller_name')\r
- a = if Pettanr.is_blank(item.get('action_name'))\r
+ @item.fetch({}).done () ->\r
+ if _this.item.is_remote()\r
+ c = _this.item.get('controller_name')\r
+ a = if Pettanr.is_blank(_this.item.get('action_name'))\r
'index'\r
else\r
- item.get('action_name')\r
+ _this.item.get('action_name')\r
window.router['c_i'](c, a, '') # call action event in router for redirect\r
else\r
- list_result = new Pettanr.Folder.Children({id: item.id})\r
- f = new Locmare.Filer({\r
- item_name: 'folder', \r
- items: [], \r
- list_result: list_result, \r
- pager_type: 'default', \r
- operators: window.operators\r
- })\r
- $("#pettanr").html(f.render().el)\r
+ _this.children_html()\r
\r
count: () ->\r
\r
n = @name.split '.'\r
if n.length > 1\r
@table_name = n[0]\r
- @model_name = @table_name.singularize\r
+ @item_name = Manifest.manifest().controllers[@table_name].item_name\r
+ @model_name = @item_name\r
@list_name = n[1]\r
else\r
- ManifestBase::alert_undefined_message 'list', this.module_message\r
-\r
- list: () ->\r
- Locmare::ListGroup.list @model_name, @list_name\r
+ ManifestBase.alert_undefined_message 'list', this.module_message\r
+ \r
+ list_options: (id) ->\r
+ params = {controller: @table_name, action: @list_name, id: id, page: 1, page_size: 3}\r
+ {model: @model(), params: params}\r
\r
model: () ->\r
Manifest.item_name_to_model @model_name\r
@model_name = n[0]\r
@list_name = n[1]\r
else\r
- ManifestBase::alert_undefined_message 'list', self.module_message\r
+ ManifestBase.alert_undefined_message 'list', @module_message\r
\r
- list: () ->\r
- Locmare::ListGroup.list @model_name, @list_name\r
+ list_options: (id) ->\r
+ params = {controller: @model().table_name(), action: @list_name, id: id, page: 1, page_size: 3}\r
+ {model: @model(), params: params}\r
\r
model: () ->\r
Manifest.item_name_to_model @model_name\r
@body = options.body\r
@collection = []\r
_this = this\r
- c = @filer().list_result\r
+ c = @filer().collection\r
c.fetch().done ->\r
_this.filer().items = c.models\r
_this.collection = _.map c.models, (item) ->\r
super(options)\r
\r
render: () ->\r
- this.$el.html(@face())\r
+ if Pettanr.is_a_string(@face())\r
+ this.$el.html(@face())\r
+ else\r
+ this.$el.html(@face().render().el)\r
+ \r
this\r
\r
@template_file_name: () ->\r
class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.IconItemColumnModule.Base extends Backbone.View\r
tagName: 'div'\r
+ events: {\r
+ 'click .face': 'show'\r
+ }\r
\r
initialize: (options) ->\r
@file_item = options.file_item\r
this.$el.html(template(args))\r
this\r
\r
+ show: () ->\r
+ item = new Pettanr.Artist({id: 1})\r
+ item.fetch().done ->\r
+ profiler = new Locmare.Profiler({item_name: item.item_name(), item: item, operators: window.operators})\r
+ \r
filer: () ->\r
@file_item.filer()\r
\r
initialize: (options) ->\r
super(options)\r
_this = this\r
- if i = @item[@method_name()]()\r
- i.fetch().done ->\r
- _this.picture = new Pettanr.AppHelperImg({src: i.r_url(), size: _this.icon_size()})\r
+ if @item[@method_name()]\r
+ @item[@method_name()]((pic) ->\r
+ _this.picture = pic\r
_this.render()\r
+ )\r
else\r
@picture = new Pettanr.AppHelperImg({src: '/images/error.png', size: @icon_size()})\r
_this.render()\r
--- /dev/null
+class Locmare.Profiler extends Backbone.View\r
+ tagName: 'div'\r
+ initialize: (options) ->\r
+ @item_name = options.item_name\r
+ @item = options.item\r
+ # feasible show parsed extend data\r
+ @item.boosts 'post'\r
+ @operators = options.operators\r
+ \r
+ @profiler_manifest = LocalManifest.manifest().profilers[@item_name]\r
+ @template_dir = 'templates-profiler-'\r
+ @header = new Locmare.ProfilerModule.Header({profiler: this})\r
+ @columns = new Locmare.ProfilerModule.Column({profiler: this})\r
+ @associations = new Locmare.ProfilerModule.Association({'profiler': this, association_manifest: @profiler_manifest.associations})\r
+ @render()\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ this.$el.append(@header.render().el)\r
+ this.$el.append(@columns.render().el)\r
+ this.$el.append(@associations.render().el)\r
+ $("#pettanr").html(this.el)\r
+ this\r
+ \r
+ peta: () ->\r
+ Manifest.manifest().items[@item_name]\r
+ \r
+ model: () ->\r
+ Manifest.item_name_to_model @item_name\r
+ \r
+ image_dir: () ->\r
+ '/images/'\r
+ \r
+class Locmare.ProfilerModule\r
+\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.Association extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @profiler = options.profiler\r
+ @association_manifest = options.association_manifest\r
+ @belongs_to = _.map @association_manifest.belongs_to, (belongs_to_manifest) =>\r
+ new Locmare.ProfilerModule.AssociationModule.BelongsTo({association: this, belongs_to_manifest: belongs_to_manifest})\r
+ @has_many = _.map @association_manifest.has_many, (list_manifest) =>\r
+ new Locmare.ProfilerModule.AssociationModule.HasMany({association: this, has_many_manifest: list_manifest})\r
+ @has_one = _.map @association_manifest.has_one, (list_manifest) =>\r
+ new Locmare.ProfilerModule.AssociationModule.HasOne({association: this, has_one_manifest: list_manifestt})\r
+ @render\r
+ \r
+ render: () ->\r
+ _this = this\r
+ _.each @belongs_to, (f) ->\r
+ #_this.$el.append(f.render().el)\r
+ _.each @has_many, (f) ->\r
+ #_this.$el.append(f.render().el)\r
+ _.each @has_one, (f) ->\r
+ #_this.$el.append(f.render().el)\r
+ this\r
+ \r
+ item: () ->\r
+ @profiler.item\r
+ \r
+ model_manifest: () ->\r
+ Manifest.manifest().models[@profiler.item_name]\r
+ \r
+class Locmare.ProfilerModule.AssociationModule\r
+\r
--- /dev/null
+class Locmare.ProfilerModule.AssociationModule.BelongsTo extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @association = options.association\r
+ @belongs_to_manifest = options.belongs_to_manifest\r
+ @filer = null\r
+ m = new @parent_model({id: @parent_id()})\r
+ _this = this\r
+ m.fetch().done ->\r
+ _this.filer = new Locmare.Filer(@parent_model.item_name, r, null, @profiler().operators)\r
+ _this.render()\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ if @filer\r
+ this.$el.html(@filer.render().el)\r
+ this\r
+ \r
+ item: () ->\r
+ @profiler.item\r
+ \r
+ parent_model: () ->\r
+ @belongs_to_manifest.model()\r
+ \r
+ parent_id: () ->\r
+ @item().get(@model_belongs_to_manifest().id_column)\r
+ \r
+ model_manifest: () ->\r
+ Manifest.manifest().models[@profiler.item_name]\r
+ \r
+ model_belongs_to_manifest: () ->\r
+ @model_manifest().associations.belongs_to[@belongs_to_manifest.model_name]\r
+ \r
+ profiler: () ->\r
+ @association.profiler()\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.AssociationModule.HasMany extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @association = options.association\r
+ @has_many_manifest = options.has_many_manifest\r
+ @filer = null\r
+ m = new Pettanr.FilerCollection({}, @has_many_manifest.list_options(@item().get('id')))\r
+ _this = this\r
+ m.fetch().done ->\r
+ items = m.models\r
+ #_this.filer = new Locmare.Filer(_this.has_many_model().item_name, items, @pager, _this.profiler().operators)\r
+ _this.render()\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ if @filer\r
+ this.$el.html(@filer.render().el)\r
+ this\r
+ \r
+ item: () ->\r
+ @profiler().item\r
+ \r
+ has_many_model: () ->\r
+ @has_many_manifest.model()\r
+ \r
+ profiler: () ->\r
+ @association.profiler\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.AssociationModule.HasOne extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @association = options.association\r
+ @has_one_manifest = options.has_one_manifest\r
+ @filer = null\r
+ m = new @parent_model(@parent_id())\r
+ m = new Pettanr.FilerCollection({}, @has_one_manifest.list_options(@item().get('id')))\r
+ _this = this\r
+ m.fetch().done ->\r
+ items = m.models\r
+ _this.filer = new Locmare.Filer(_this.has_one_model().item_name, items, null, _this.profiler().operators)\r
+ _this.render()\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ if @filer\r
+ this.$el.html(@filer.render().el)\r
+ this\r
+ \r
+ item: () ->\r
+ @profiler().item\r
+ \r
+ has_one_model: () ->\r
+ @has_one_manifest.model()\r
+ \r
+ profiler: () ->\r
+ @association.profiler\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.Column extends Backbone.View\r
+ tagName: 'div'\r
+ className: 'columns'\r
+ \r
+ initialize: (options) ->\r
+ @profiler = options.profiler\r
+ @profiler_manifest = @profiler.profiler_manifest\r
+ @columns = {}\r
+ _this = this\r
+ _.each @profiler_manifest.columns, (column, name) ->\r
+ _this.columns[name] = _this.factory(_this.profiler, column)\r
+ \r
+ render: () ->\r
+ _this = this\r
+ this.$el.html('')\r
+ _.each @sorted_columns(), (column) ->\r
+ _this.$el.append(column.render().el)\r
+ this\r
+ \r
+ types: () ->\r
+ {\r
+ default: Locmare.ProfilerModule.ColumnModule.Default, \r
+ date: Locmare.ProfilerModule.ColumnModule.Date, \r
+ source: Locmare.ProfilerModule.ColumnModule.Source, \r
+ extend: Locmare.ProfilerModule.ColumnModule.Extend, \r
+ json: Locmare.ProfilerModule.ColumnModule.Json\r
+ }\r
+ \r
+ factory: (profiler, my_manifest) ->\r
+ type = my_manifest.type\r
+ console.log("undefined type for local view filers > #{profiler.item_name} > edit\n") if not type\r
+ my_class = @types()[type]\r
+ console.log("undefined class for local view filers > #{profiler.item_name} > edit > #{type}\n") if not my_class\r
+ new my_class({profiler: profiler, column_manifest: my_manifest})\r
+ \r
+ sorted_columns: () ->\r
+ _.map @profiler_manifest.column_names, (column_name) =>\r
+ _this.columns[column_name]\r
+ \r
+class Locmare.ProfilerModule.ColumnModule\r
+\r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Base extends Backbone.View\r
+ tagName: 'div'\r
+ className: 'column'\r
+ \r
+ initialize: (options) ->\r
+ @profiler = options.profiler\r
+ @column_manifest = options.column_manifest\r
+ @column_name = @column_manifest.name\r
+ c = @label_class()\r
+ @label = new c({column: this})\r
+ c = @value_class()\r
+ @value = new c({column: this})\r
+ c = @note_class()\r
+ @note = new c({column: this})\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ this.$el.append(@label.render().el)\r
+ this.$el.append(@value.render().el)\r
+ this.$el.append(@note.render().el) if @note.is_visible()\r
+ this\r
+ \r
+ item: () ->\r
+ @profiler.item\r
+ \r
+ label_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.Label\r
+ \r
+ value_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.Value\r
+ \r
+ note_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.NoteNone\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.Label extends Backbone.View\r
+ tagName: 'span'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ \r
+ render: () ->\r
+ this.$el.html(@label())\r
+ this\r
+ \r
+ label: () ->\r
+ Pettanr.AppHelper.t_a(@column.item().item_name(), @column.column_name)\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.Value extends Backbone.View\r
+ tagName: 'span'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ \r
+ render: () ->\r
+ this.$el.html(@value())\r
+ this\r
+ \r
+ value: () ->\r
+ @column.item().get(@column.column_name)\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.DateValue extends Backbone.View\r
+ tagName: 'span'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ \r
+ render: () ->\r
+ this.$el.html(@value())\r
+ this\r
+ \r
+ value: () ->\r
+ l(@column.value())\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.JsonValue extends Backbone.View\r
+ tagName: 'pre'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ \r
+ render: () ->\r
+ this.$el.html(@value())\r
+ this\r
+ \r
+ value: () ->\r
+ JSON.pretty_generate(JSON.parse(@column.value()))\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.ExtendValue extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ @columns = {}\r
+ _this = this\r
+ _.each @extend_settings().column_names, (extend_column_name) ->\r
+ extend_column_manifest = _this.extend_settings().columns[extend_column_name] || {}\r
+ _this.columns[extend_column_name] = new Locmare.ProfilerModule.ColumnModule.ExtendModule.ExtendColumn({column: _this, extend_column_name: extend_column_name, extend_column_manifest: extend_column_manifest})\r
+ \r
+ render: () ->\r
+ _this = this\r
+ this.$el.html('')\r
+ _.each @sorted_columns(), (extend_column) ->\r
+ _this.$el.append(extend_column.render().el)\r
+ this\r
+ \r
+ \r
+ extend_columns: () ->\r
+ _.map @extend_settings().column_names, (column_name) ->\r
+ @columns[column_name]\r
+ \r
+ extend_settings: () ->\r
+ @template_model_profiler().extend_settings[self.booster.model_name]\r
+ \r
+ template_model_profiler: () ->\r
+ LocalManifest.manifest.profilers[@template_model().item_name]\r
+ \r
+ template_model: () ->\r
+ @booster().template_model\r
+ \r
+ extend_item: () ->\r
+ @booster.extend_item\r
+ \r
+ booster: () ->\r
+ @column.item().boosters[@column_manifest.boost_name]\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.NoteNone\r
+ \r
+ is_visible:() ->\r
+ false\r
+ \r
+class Locmare.ProfilerModule.ColumnModule.Note extends Backbone.View\r
+ tagName: 'span'\r
+ \r
+ initialize: (options) ->\r
+ @column = options.column\r
+ \r
+ render: () ->\r
+ this.$el.html(@note())\r
+ this\r
+ \r
+ note: () ->\r
+ Pettanr.AppHelper.t_selected_item(@select_item_name, @column.value())\r
+ \r
+ is_visible:() ->\r
+ true\r
+ \r
+ select_item_name: () ->\r
+ @model_attribute_source_manifest().select_item_name\r
+ \r
+ model_manifest: () ->\r
+ Manifest.manifest().models[@column.profiler().item_name]\r
+ \r
+ model_attribute_manifest: () ->\r
+ @model_manifest().attributes[@column.column_name]\r
+ \r
+ model_attribute_source_manifest: () ->\r
+ @model_attribute_manifest().source\r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Date extends Locmare.ProfilerModule.ColumnModule.Base\r
+ \r
+ value_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.DateValue\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Default extends Locmare.ProfilerModule.ColumnModule.Base\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Extend extends Locmare.ProfilerModule.ColumnModule.Base\r
+ \r
+ value_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.ExtendValue\r
+\r
+class Locmare.ProfilerModule.ColumnModule.ExtendModule\r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.ExtendModule.ExtendColumn extends Backbone.View\r
+ initialize: (options) ->\r
+ @column = options.column # extend_column\r
+ @extend_column_name = options.extend_column_name\r
+ @extend_column_manifest = options.extend_column_manifest\r
+ \r
+ label: () ->\r
+ Pettanr.AppHelper.t_a(@extend_item().singular(), @extend_column_name)\r
+ \r
+ value: () ->\r
+ @extend_item.get(@extend_column_name)\r
+ \r
+ extend_item: () ->\r
+ @column.extend_item()\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Json extends Locmare.ProfilerModule.ColumnModule.Base\r
+ \r
+ value_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.JsonValue\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.ColumnModule.Source extends Locmare.ProfilerModule.ColumnModule.Base\r
+ \r
+ note_class: () ->\r
+ Locmare.ProfilerModule.ColumnModule.Note\r
+ \r
--- /dev/null
+class Locmare.ProfilerModule.Header extends Backbone.View\r
+ tagName: 'div'\r
+ \r
+ initialize: (options) ->\r
+ @profiler = options.profiler\r
+ \r
+ render: () ->\r
+ #this.$el.append(@filer().render().el)\r
+ this\r
+ \r
+ filer: () ->\r
+ new Locmare.Filer(@profiler.item_name, [@profiler.item], null, @profiler.operators)\r
+ \r
artist.fetch({})\r
window.operators = new Pettanr.Operator([author, artist])\r
\r
- list_result = new Pettanr.Folder.Root({})\r
- new Pettanr.FilerRender('folder', list_result, 'default', window.operators)\r
+ #list_result = new Pettanr.Folder.Root({})\r
+ #new Pettanr.FilerRender('folder', list_result, 'default', window.operators)\r
window.router = new Pettanr.Router()\r
Backbone.history.start({pushState: true})\r
+ window.router.navigate('', true)\r
\r
test_router: () ->\r
window.router.navigate('folders/98', true)\r
set_default: () ->\r
super()\r
@args.item_name ||= @parent.item_name # not parent.name. follow singularized name\r
+ @args.param_id ||= 'prefix'\r
\r
init: () ->\r
super()\r
@item_name = @args.item_name\r
+ @param_id = @args.param_id\r
+ \r
+ encode_query: (params) ->\r
+ q = []\r
+ q.push('page=' + Pettanr.to_s(params['page'])) if params['page']\r
+ q.push('page_size=' + Pettanr.to_s(params['page_size'])) if params['page_size']\r
+ if q.length > 0\r
+ '?' + q.join('&')\r
+ else\r
+ ''\r
+ \r
+ encode_url: (action_name, params) ->\r
+ c = @parent.name\r
+ a = if action_name != 'index'\r
+ '/' + action_name\r
+ else\r
+ ''\r
+ i = if params['id']\r
+ '/' + Pettanr.to_s(params['id'])\r
+ else\r
+ ''\r
+ q = @encode_query(params)\r
+ switch @param_id\r
+ when 'prefix'\r
+ c + i + a + q\r
+ when 'suffix'\r
+ c + a + i + q\r
+ else\r
+ c + a + q\r
+ \r
+ url: (params) ->\r
+ @encode_url(@name, params)\r
\r
-\r
set_default: () ->\r
super()\r
@args.list_name ||= @name\r
+ @args.counter_name = if @name == 'index'\r
+ 'count'\r
+ else\r
+ 'count_'\r
\r
init: () ->\r
super()\r
@list_name = @args.list_name\r
+ @counter_name = @args.counter_name\r
+ \r
+ counter_url: (params) ->\r
+ @encode_url(@counter_name, params)\r
+ \r
\r
@items = ManifestBase.load_type_name_args(this, @global_json, 'items', Manifest.ItemFactory)\r
@controllers = Manifest.Controller.load(this, @global_json, 'controllers', Manifest.Controller)\r
@models = Manifest.Model.load(this, @global_json, 'models', Manifest.Model)\r
+ @inflectors = {}\r
+ _this = this\r
+ _.each @models, (model_manifest, item_name) ->\r
+ if model_manifest.table_name\r
+ _this.inflectors[model_manifest.table_name] = item_name\r
true\r
\r
@item_name_to_model: (item_name) ->\r
\r
init: () ->\r
super\r
+ @table_name = @json.table_name\r
@attributes = ManifestBase.load_name_values this, @json, 'attributes', Manifest.ModelModule.Attribute\r
@associations = ManifestBase.load_value this, @json, 'associations', Manifest.ModelModule.Association\r
@list = ManifestBase.load_value this, @json, 'list', Manifest.ModelModule.List\r
Manifest.item_name_to_model @name\r
\r
table_name: () ->\r
- @classify.table_name\r
+ @table_name\r
\r
valid_encode_columns: () ->\r
r = []\r
class Pettanr.Balloon extends Peta.Element\r
+ url: '/balloons/'\r
+ \r
@singular: () ->\r
'Balloon'\r
\r
r: 0\r
} \r
\r
+ speech_balloon: () ->\r
+ new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')})\r
+ \r
url: () ->\r
'/system_pictures/' + @system_picture().filename()\r
\r
- symbol_option: () ->\r
- @speech_balloon().speech_balloon_template().symbol_option()\r
+ symbol_option: (cb) ->\r
+ sb = @speech_balloon()\r
+ sb.fetch().done ->\r
+ sbt = sb.speech_balloon_template()\r
+ sbt.fetch().done ->\r
+ sp = sbt.system_picture()\r
+ sp.fetch().done ->\r
+ cb(sp.tmb_opt_img_tag())\r
\r
style: () ->\r
{\r
class Pettanr.Comic extends Peta.Binder\r
+ url: '/comics/'\r
+ \r
@singular: () ->\r
'Comic'\r
\r
class Pettanr.Folder.Collection extends Backbone.Collection\r
model: Pettanr.Folder\r
url: 'folders'\r
-class Pettanr.Folder.Root extends Backbone.Collection\r
+class Pettanr.Folder.Root extends Pettanr.Folder\r
model: Pettanr.Folder\r
- url: '/folders/root'\r
+ url: '/folders/root?ref=1'\r
class Pettanr.Folder.Children extends Backbone.Collection\r
model: Pettanr.Folder\r
initialize: (options) ->\r
class Pettanr.GroundPicture extends Peta.Element\r
+ url: '/ground_pictures/'\r
+ \r
@singular: () ->\r
'GroundPicture'\r
\r
['repeat', 'repeat-x', 'repeat-y', 'no-repeat']\r
\r
picture: () ->\r
- @get('picture')\r
+ new Pettanr.Picture({id: @get('picture_id')})\r
\r
has_picture: () ->\r
true\r
@merge_opacity(r, opacity) if spot and spot != this\r
r\r
\r
- tmb_opt_img_tag: () ->\r
- wh = Pettanr.Imager.thumbnail_size(@picture().get('width'), @picture().get('height'))\r
- {src: @picture().r_url(), width: wh[0], height: wh[1], alt: @get('caption')}\r
+ tmb_opt_img_tag: (picture) ->\r
+ wh = Pettanr.Imager.thumbnail_size(picture().get('width'), picture().get('height'))\r
+ new Pettanr.AppHelperImg({src: picture.r_url(), size: Math.abs(wh[0]), alt: @get('caption')})\r
\r
- symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ symbol_option: (cb) ->\r
+ i = @picture()\r
+ _this = this\r
+ i.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag(i))\r
\r
repeat_text: () ->\r
Pettanr.GroundPicture.repeat_texts()[@get('repeat')]\r
class Pettanr.License extends Peta.SystemResource\r
+ url: '/licenses/'\r
+ \r
@singular: () ->\r
'License'\r
\r
\r
license_group: () ->\r
r = new Pettanr.LicenseGroup({id: @get('license_group_id')})\r
- r.fetch({}).done () ->\r
- r\r
+ \r
+ system_picture: () ->\r
+ new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
+ \r
+ symbol_option: (cb) ->\r
+ i = @system_picture()\r
+ i.fetch().done ->\r
+ cb(i.tmb_opt_img_tag())\r
\r
caption_with_group: () ->\r
- @license_group().get('caption') + '/' + @get('caption')\r
+ new Pettanr.License.Caption({license: this, license_group: @license_group()})\r
\r
initialize: () ->\r
if @id\r
class Pettanr.License.Collection extends Backbone.Collection\r
model: Pettanr.License\r
url: '/licenses'\r
+\r
+class Pettanr.License.Caption extends Backbone.View\r
+ tagName: 'span'\r
+ initialize: (options) ->\r
+ @license = options.license\r
+ @license_group = options.license_group\r
+ \r
+ render: () ->\r
+ _this = this\r
+ @license_group.fetch().done ->\r
+ _this.$el.html(_this.license_group.get('caption') + '/' + _this.license.get('caption'))\r
+ this\r
+ \r
class Pettanr.LicenseGroup extends Peta.Template\r
+ url: '/license_groups/'\r
+ \r
@singular: () ->\r
'LicenseGroup'\r
\r
class Pettanr.OriginalPicture extends Peta.Content\r
+ url: '/original_pictures/'\r
+ \r
@singular: () ->\r
'OriginalPicture'\r
\r
wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
{src: @r_url(), width: wh[0], height: wh[1]}\r
\r
- symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ symbol_option: (cb) ->\r
+ _this = this\r
+ this.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag())\r
\r
revision: () ->\r
head = @history()[0]\r
class Pettanr.PanelPicture extends Peta.Element\r
+ url: '/panel_pictures/'\r
+ \r
@singular: () ->\r
'PanelPicture'\r
\r
id: null\r
} \r
\r
+ picture: () ->\r
+ new Pettanr.Picture({id: @get('picture_id')})\r
+ \r
@has_picture: () ->\r
true\r
\r
style: "#{o}"\r
})\r
\r
- tmb_opt_img_tag: () ->\r
+ tmb_opt_img_tag: (picture) ->\r
wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
- {src: @r_url(), width: Math.abs(wh[0]), height: Math.abs(wh[1]), alt: @get('caption')}\r
+ new Pettanr.AppHelperImg({src: picture.r_url(), size: Math.abs(wh[0]), alt: @get('caption')})\r
\r
- symbol_option: () ->\r
- @picture().symbol_option()\r
+ symbol_option: (cb) ->\r
+ i = @picture()\r
+ _this = this\r
+ i.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag(i))\r
\r
initialize: () ->\r
if @id\r
class Pettanr.Picture extends Peta.Content\r
+ url: '/pictures/'\r
+ \r
@singular: () ->\r
'Picture'\r
\r
lgn + '[' + ln + ']'\r
\r
symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ this\r
\r
is_enable: () ->\r
if @head().resource_picture()\r
class Pettanr.ResourcePicture extends Peta.Content\r
+ url: '/resource_pictures/'\r
+ \r
@singular: () ->\r
'ResourcePicture'\r
\r
ln = Pettanr.to_s(@license().get('caption'))\r
lgn + '[' + ln + ']'\r
\r
- symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ symbol_option: (cb) ->\r
+ _this = this\r
+ this.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag())\r
\r
initialize: () ->\r
if @id\r
\r
class Pettanr.ResourcePicture.Collection extends Backbone.Collection\r
model: Pettanr.ResourcePicture\r
- url: '/resource_pictures'\r
+ url: '/resource_pictures/'\r
class Pettanr.Scroll extends Peta.Binder\r
- url: ''\r
+ url: '/scrolls/'\r
\r
@singular: () ->\r
'Scroll'\r
class Pettanr.Speech extends Peta.Element\r
+ url: '/speeches/'\r
+ \r
@singular: () ->\r
'Speech'\r
\r
height: 100\r
} \r
\r
+ speech_balloon: () ->\r
+ new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')})\r
+ \r
@text_align_texts: () -> \r
['left', 'left', 'right', 'center']\r
\r
- symbol_option: () ->\r
- @speech_balloon().speech_balloon_template().symbol_option()\r
+ symbol_option: (cb) ->\r
+ sb = @speech_balloon()\r
+ sb.fetch().done ->\r
+ sbt = sb.speech_balloon_template()\r
+ sbt.fetch().done ->\r
+ sp = sbt.system_picture()\r
+ sp.fetch().done ->\r
+ cb(sp.tmb_opt_img_tag())\r
\r
outer_style: () ->\r
{\r
class Pettanr.SpeechBalloon extends Peta.Element\r
+ url: '/speech_balloons/'\r
+ \r
@singular: () ->\r
'SpeechBalloon'\r
\r
t: null\r
} \r
\r
+ speech_balloon_template: () ->\r
+ new Pettanr.SpeechBalloonTemplate({id: @get('speech_balloon_template_id')})\r
+ \r
@has_picture: () ->\r
false\r
\r
- @symbol_option: () ->\r
- @speech_balloon_template.symbol_option\r
+ symbol_option: (cb) ->\r
+ sbt = @speech_balloon_template()\r
+ sbt.fetch().done ->\r
+ sp = sbt.system_picture()\r
+ sp.fetch().done ->\r
+ cb(sp.tmb_opt_img_tag())\r
+ \r
+ plain_scenario: () ->\r
+ @get('caption')\r
\r
initialize: () ->\r
if @id\r
system_picture: () ->\r
new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
\r
- symbol_option: () ->\r
- @system_picture()\r
+ symbol_option: (cb) ->\r
+ i = @system_picture()\r
+ i.fetch().done ->\r
+ cb(i.tmb_opt_img_tag())\r
\r
initialize: () ->\r
if @id\r
\r
tmb_opt_img_tag: () ->\r
wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
- {src: @r_url(), width: wh[0], height: wh[1]}\r
+ new Pettanr.AppHelperImg({src: @r_url(), size: wh[0]})\r
\r
- symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ symbol_option: (cb) ->\r
+ _this = this\r
+ this.fetch().done ->\r
+ cb(_this.tmb_opt_img_tag())\r
\r
initialize: () ->\r
if @id\r
id: null\r
} \r
\r
+ system_picture: () ->\r
+ new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
+ \r
+ symbol_option: (cb) ->\r
+ i = @system_picture()\r
+ i.fetch().done ->\r
+ cb(i.tmb_opt_img_tag())\r
+ \r
initialize: () ->\r
if @id\r
@url = @url + @id\r
\r
#InstanceMethods\r
\r
+ singular: () ->\r
+ Pettanr[@constructor.name].singular()\r
+ \r
+ plural: () ->\r
+ Pettanr[@constructor.name].plural()\r
+ \r
item_name: () ->\r
@my_class().item_name()\r
\r
class Pettanr\r
+ # Foo.class -> Pettanr[@constructor.name]\r
+\r
@is_blank: (str) ->\r
!str?.trim()\r
\r
if l.length == 1\r
I18n.t('activerecord.models.' + Pettanr[label].item_name())\r
else\r
- I18n.t('activerecord.models.attribtes.' + Pettanr[l.first].item_name() + '.' + l.last)\r
+ Pettanr.AppHelper.t_a(Pettanr[l.first].item_name(), l.last)\r
\r
+ @t_a: (item_name, attr_name) ->\r
+ I18n.t('activerecord.attributes.' + item_name + '.' + attr_name)\r
+ \r
@t_select_items: (items) ->\r
_.map items, (i) ->\r
[t(i[0]), i[1]]\r
count: () ->\r
@get('count')\r
\r
- class Pettanr.Url\r
+ class Pettanr.Pager extends Backbone.View\r
\r
- @decode: (params) ->\r
- \r
- @encode: (params) ->\r
- \r
- class Pettanr.Pager\r
- \r
- initialize: (@counter) ->\r
- @counter.fetch().done ->\r
- \r
- @current_page = @list_result.page\r
- @per_page = @list_result.page_size\r
- @total_page = (@total / @per_page) + 1\r
+ initialize: (options) ->\r
+ @action = options['action']\r
+ @params = options['params']\r
+ @current_page = @params['page']\r
+ @per_page = @params['page_size']\r
@window_size = 3\r
- \r
- @by_params: (params) ->\r
- \r
- @page = params['page']\r
- @page_size = params['page_size']\r
- @counter = new Pettanr.CounterModel({}, {url: '/' + params['controller'] + i + 'count_' + a})\r
- new Pettanr.Pager()\r
+ @counter = new Pettanr.CounterModel({}, {url: '/' + @action.counter_url(@params)})\r
+ _this = this\r
+ @counter.fetch().done ->\r
+ _this.total_page = (@total / _this.per_page) + 1\r
\r
class Pettanr.FilerCollection extends Backbone.Collection\r
\r
initialize: (models, options) ->\r
@model = options['model']\r
- params = options['params']\r
- @counter = options['counter']\r
+ @action = options['action']\r
+ @params = options['params']\r
\r
- i = if params['id']\r
- params['id'] + '/'\r
- else\r
- ''\r
- a = if params['action'] != 'index'\r
- params['action']\r
- else\r
- ''\r
- q = []\r
- q.push('page=' + Pettanr.to_s(@page)) if @page\r
- q.push('page_size=' + Pettanr.to_s(@page_size)) if @page_size\r
- qry = if q.length > 0\r
- '?' + q.join('&')\r
- else\r
- ''\r
- @url = '/' + params['controller'] + i + a + qry\r
- @pager = new Pettanr.Pager(@counter)\r
+ @url = '/' + @action.url(@params)\r
\r
class Pettanr.AppController\r
constructor: () ->\r
@set_model()\r
@my_list_model = Manifest.manifest().models[@my_action.item_name]\r
@my_list_model_class = @my_list_model.classify()\r
- @counter = new Pettanr.CounterModel({}, {url: @my_action.url(i)})\r
- @list = new Pettanr.FilerCollection({}, {model: @my_list_model_class, counter: @counter, params: @params})\r
+ @pager = new Pettanr.Pager({action: @my_action, params: @params})\r
+ @list = new Pettanr.FilerCollection({}, {model: @my_list_model_class, action: @my_action, params: @params})\r
\r
filer_list: () ->\r
@set_list()\r
f = new Locmare.Filer({\r
el: "#pettanr",\r
item_name: @my_list_model_class.item_name(), \r
- list: @list, \r
- pager: @list.pager, \r
+ collection: @list, \r
+ pager: @pager, \r
operators: window.operators\r
})\r
\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
this.route(':controller/:id/:action', 'c_i_a')\r
this.route(':controller/:id?*query_string', 'c_i')\r
this.route(':controller/:id', 'c_i')\r
\r
+ home: () ->\r
+ params = {}\r
+ params['controller'] = 'folders'\r
+ params['action'] = 'root'\r
+ @fire(params)\r
+ \r
hoge: () ->\r
names = _.map Manifest.manifest().controllers, (controller_manifest, controller_name) ->\r
c = Pettanr[Pettanr.camelize(controller_name) + 'Controller']\r
type: 'list',\r
args: {\r
list_name: 'public',\r
+ param_id: 'none',\r
},\r
},\r
show: {\r
type: 'list',\r
args: {\r
list_name: 'public',\r
+ param_id: 'none',\r
},\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
play: {\r
type: 'list',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_scroll: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_story: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
play: {\r
type: 'list',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_comic: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_story: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_comic: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_sheet: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
play: {\r
type: 'list',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_story: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_sheet: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_story: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
play: {\r
type: 'list',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_sheet: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_scroll: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_sheet: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_speech_balloon_template: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_speech_balloon_template: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_author: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'private',\r
+ param_id: 'none',\r
},\r
},\r
show: {\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_artist: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_license_group: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_license: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_artist: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_panel: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_system_picture: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
show: {\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
by_license_group: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
by_system_picture: {\r
type: 'list',\r
+ args: {\r
+ param_id: 'suffix',\r
+ },\r
},\r
show: {\r
type: 'show',\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
show: {\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
show: {\r
type: 'list',\r
args: {\r
list_name: 'public',\r
- \r
+ param_id: 'none',\r
},\r
},\r
show: {\r
args: {\r
item_name: 'scroll',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
scroll_panels: {\r
args: {\r
item_name: 'scroll_panel',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
comics: {\r
args: {\r
item_name: 'comic',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
stories: {\r
args: {\r
item_name: 'story',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
story_sheets: {\r
args: {\r
item_name: 'story_sheet',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
sheets: {\r
args: {\r
item_name: 'sheet',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
sheet_panels: {\r
args: {\r
item_name: 'sheet_panel',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
panels: {\r
args: {\r
item_name: 'panel',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
panel_pictures: {\r
args: {\r
item_name: 'panel_picture',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
speech_balloons: {\r
args: {\r
item_name: 'speech_balloon',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
speeches: {\r
args: {\r
item_name: 'speech',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
balloons: {\r
args: {\r
item_name: 'balloon',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
ground_pictures: {\r
args: {\r
item_name: 'ground_picture',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
ground_colors: {\r
args: {\r
item_name: 'ground_color',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
original_pictures: {\r
args: {\r
item_name: 'original_picture',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
resource_pictures: {\r
args: {\r
item_name: 'resource_picture',\r
list_name: 'private',\r
- \r
+ param_id: 'none',\r
},\r
},\r
},\r
#マニフェスト\r
@models = {\r
folder: {\r
+ table_name: 'folders',\r
associations: {\r
belongs_to: {\r
},\r
},\r
},\r
scroll: {\r
+ table_name: 'scrolls',\r
associations: {\r
belongs_to: {\r
author: {\r
},\r
},\r
scroll_panel: {\r
+ table_name: 'scroll_panels',\r
associations: {\r
belongs_to: {\r
panel: {\r
},\r
},\r
comic: {\r
+ table_name: 'comics',\r
associations: {\r
belongs_to: {\r
author: {\r
},\r
},\r
comic_story: {\r
+ table_name: 'comic_stories',\r
associations: {\r
belongs_to: {\r
comic: {\r
},\r
},\r
story: {\r
+ table_name: 'stories',\r
associations: {\r
belongs_to: {\r
author: {\r
},\r
},\r
story_sheet: {\r
+ table_name: 'story_sheets',\r
associations: {\r
belongs_to: {\r
story: {\r
},\r
},\r
sheet: {\r
+ table_name: 'sheets',\r
associations: {\r
belongs_to: {\r
author: {\r
},\r
},\r
sheet_panel: {\r
+ table_name: 'sheet_panels',\r
associations: {\r
belongs_to: {\r
sheet: {\r
},\r
},\r
panel: {\r
+ table_name: 'panels',\r
associations: {\r
belongs_to: {\r
author: {\r
},\r
},\r
panel_picture: {\r
+ table_name: 'panel_pictures',\r
associations: {\r
belongs_to: {\r
panel: {\r
},\r
},\r
speech_balloon: {\r
+ table_name: 'speech_balloons',\r
associations: {\r
belongs_to: {\r
panel: {\r
},\r
}, \r
balloon: {\r
+ table_name: 'balloons',\r
associations: {\r
belongs_to: {\r
speech_balloon: {\r
},\r
},\r
speech: {\r
+ table_name: 'speeches',\r
associations: {\r
belongs_to: {\r
speech_balloon: {\r
},\r
},\r
ground_picture: {\r
+ table_name: 'ground_pictures',\r
associations: {\r
belongs_to: {\r
panel: {\r
},\r
},\r
ground_color: {\r
+ table_name: 'ground_colors',\r
associations: {\r
belongs_to: {\r
panel: {\r
},\r
},\r
original_picture: {\r
+ table_name: 'original_pictures',\r
associations: {\r
belongs_to: {\r
artist: {\r
},\r
},\r
picture: {\r
+ table_name: 'pictures',\r
associations: {\r
belongs_to: {\r
license: {\r
}\r
},\r
resource_picture: {\r
+ table_name: 'resource_pictures',\r
associations: {\r
belongs_to: {\r
original_picture: {\r
},\r
},\r
original_picture_license_group: {\r
+ table_name: 'original_picture_license_groups',\r
associations: {\r
belongs_to: {\r
original_picture: {\r
},\r
},\r
original_picture_license: {\r
+ table_name: 'original_picture_licenses',\r
associations: {\r
belongs_to: {\r
original_picture: {\r
},\r
},\r
speech_balloon_template: {\r
+ table_name: 'speech_balloon_templates',\r
associations: {\r
belongs_to: {\r
system_picture: {\r
},\r
},\r
writing_format: {\r
+ table_name: 'writing_formats',\r
associations: {\r
belongs_to: {\r
system_picture: {\r
},\r
},\r
license_group: {\r
+ table_name: 'license_groups',\r
associations: {\r
belongs_to: {\r
},\r
},\r
},\r
license: {\r
+ table_name: 'licenses',\r
associations: {\r
belongs_to: {\r
license_group: {\r
},\r
},\r
author: {\r
+ table_name: 'authors',\r
associations: {\r
belongs_to: {\r
},\r
},\r
},\r
artist: {\r
+ table_name: 'artists',\r
associations: {\r
belongs_to: {\r
},\r
},\r
},\r
system_picture: {\r
+ table_name: 'system_pictures',\r
associations: {\r
belongs_to: {\r
},\r
def show_prof_format format
format.prof {
self.formats = [:html]
- @profiler = Locmare::Profiler.new @my_model.model_name, @item, @operators
+ @profiler = Locmare::Profiler.new @my_model.item_name, @item, @operators
render @profiler.template_name, :locals => {
:profiler => @profiler
}
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
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"play": {\r
"type": "list",\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_scroll": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_story": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"play": {\r
"type": "list",\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_comic": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_story": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_comic": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_sheet": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"play": {\r
"type": "list",\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_story": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_sheet": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_story": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"play": {\r
"type": "list",\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_sheet": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_scroll": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_sheet": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_speech_balloon_template": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_speech_balloon_template": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_author": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_artist": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_license_group": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_license": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_artist": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_panel": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_system_picture": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"by_license_group": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"by_system_picture": {\r
- "type": "list"\r
+ "type": "list",\r
+ "args": {\r
+ "param_id": "suffix"\r
+ }\r
},\r
"show": {\r
"type": "show"\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public"\r
+ "list_name": "public",\r
+ "param_id": "none"\r
}\r
},\r
"show": {\r
"type": "list",\r
"args": {\r
"item_name": "scroll",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"scroll_panels": {\r
"type": "list",\r
"args": {\r
"item_name": "scroll_panel",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"comics": {\r
"type": "list",\r
"args": {\r
"item_name": "comic",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"stories": {\r
"type": "list",\r
"args": {\r
"item_name": "story",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"story_sheets": {\r
"type": "list",\r
"args": {\r
"item_name": "story_sheet",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"sheets": {\r
"type": "list",\r
"args": {\r
"item_name": "sheet",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"sheet_panels": {\r
"type": "list",\r
"args": {\r
"item_name": "sheet_panel",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"panels": {\r
"type": "list",\r
"args": {\r
"item_name": "panel",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"panel_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "panel_picture",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"speech_balloons": {\r
"type": "list",\r
"args": {\r
"item_name": "speech_balloon",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"speeches": {\r
"type": "list",\r
"args": {\r
"item_name": "speech",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"balloons": {\r
"type": "list",\r
"args": {\r
"item_name": "balloon",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"ground_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "ground_picture",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"ground_colors": {\r
"type": "list",\r
"args": {\r
"item_name": "ground_color",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"original_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "original_picture",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
},\r
"resource_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "resource_picture",\r
- "list_name": "private"\r
+ "list_name": "private",\r
+ "param_id": "none"\r
}\r
}\r
}\r
},\r
"models": {\r
"folder": {\r
+ "table_name": "folders",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {}\r
}\r
},\r
"scroll": {\r
+ "table_name": "scrolls",\r
"associations": {\r
"belongs_to": {\r
"author": {}\r
}\r
},\r
"scroll_panel": {\r
+ "table_name": "scroll_panels",\r
"associations": {\r
"belongs_to": {\r
"panel": {},\r
}\r
},\r
"comic": {\r
+ "table_name": "comics",\r
"associations": {\r
"belongs_to": {\r
"author": {}\r
}\r
},\r
"comic_story": {\r
+ "table_name": "comic_stories",\r
"associations": {\r
"belongs_to": {\r
"comic": {},\r
}\r
},\r
"story": {\r
+ "table_name": "stories",\r
"associations": {\r
"belongs_to": {\r
"author": {}\r
}\r
},\r
"story_sheet": {\r
+ "table_name": "story_sheets",\r
"associations": {\r
"belongs_to": {\r
"story": {},\r
}\r
},\r
"sheet": {\r
+ "table_name": "sheets",\r
"associations": {\r
"belongs_to": {\r
"author": {}\r
}\r
},\r
"sheet_panel": {\r
+ "table_name": "sheet_panels",\r
"associations": {\r
"belongs_to": {\r
"sheet": {},\r
}\r
},\r
"panel": {\r
+ "table_name": "panels",\r
"associations": {\r
"belongs_to": {\r
"author": {}\r
}\r
},\r
"panel_picture": {\r
+ "table_name": "panel_pictures",\r
"associations": {\r
"belongs_to": {\r
"panel": {}\r
}\r
},\r
"speech_balloon": {\r
+ "table_name": "speech_balloons",\r
"associations": {\r
"belongs_to": {\r
"panel": {},\r
}\r
},\r
"balloon": {\r
+ "table_name": "balloons",\r
"associations": {\r
"belongs_to": {\r
"speech_balloon": {},\r
}\r
},\r
"speech": {\r
+ "table_name": "speeches",\r
"associations": {\r
"belongs_to": {\r
"speech_balloon": {},\r
}\r
},\r
"ground_picture": {\r
+ "table_name": "ground_pictures",\r
"associations": {\r
"belongs_to": {\r
"panel": {}\r
}\r
},\r
"ground_color": {\r
+ "table_name": "ground_colors",\r
"associations": {\r
"belongs_to": {\r
"panel": {}\r
}\r
},\r
"original_picture": {\r
+ "table_name": "original_pictures",\r
"associations": {\r
"belongs_to": {\r
"artist": {}\r
}\r
},\r
"picture": {\r
+ "table_name": "pictures",\r
"associations": {\r
"belongs_to": {\r
"license": {},\r
}\r
},\r
"resource_picture": {\r
+ "table_name": "resource_pictures",\r
"associations": {\r
"belongs_to": {\r
"original_picture": {},\r
}\r
},\r
"original_picture_license_group": {\r
+ "table_name": "original_picture_license_groups",\r
"associations": {\r
"belongs_to": {\r
"original_picture": {},\r
}\r
},\r
"original_picture_license": {\r
+ "table_name": "original_picture_licenses",\r
"associations": {\r
"belongs_to": {\r
"original_picture": {},\r
}\r
},\r
"speech_balloon_template": {\r
+ "table_name": "speech_balloon_templates",\r
"associations": {\r
"belongs_to": {\r
"system_picture": {}\r
}\r
},\r
"writing_format": {\r
+ "table_name": "writing_formats",\r
"associations": {\r
"belongs_to": {\r
"system_picture": {}\r
}\r
},\r
"license_group": {\r
+ "table_name": "license_groups",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
}\r
},\r
"license": {\r
+ "table_name": "licenses",\r
"associations": {\r
"belongs_to": {\r
"license_group": {},\r
}\r
},\r
"author": {\r
+ "table_name": "authors",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
}\r
},\r
"artist": {\r
+ "table_name": "artists",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
}\r
},\r
"system_picture": {\r
+ "table_name": "system_pictures",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r