index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
by_author: {\r
},\r
show: {\r
type: 'show',\r
- name: 'show',\r
},\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_author: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_scroll: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_panel: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_author: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_author: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
list_name: 'play',\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
by_comic: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_sheet: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_story: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
list_name: 'play',\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_story: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_panel: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_sheet: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_speech_balloon_template: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_scroll: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_author: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_panel: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_author: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_panel: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_writing_format: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_writing_format: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
# list_name: 'by_system_picture',\r
# },\r
#},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
},\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_author: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_panel: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_author: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_panel: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'private_list',\r
- \r
+ list_name: 'private',\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
},\r
},\r
pictures: {\r
+ actions: {\r
+ show: {\r
+ type: 'show',\r
+ },\r
+ },\r
},\r
resource_pictures: {\r
actions: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_artist: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_license: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
},\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_system_picture: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_system_picture: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
},\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
by_system_picture: {\r
type: 'list',\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
count_by_license_group: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
list_name: 'ground_colors',\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
new: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
list_name: 'resource_pictures',\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
new: {\r
index: {\r
type: 'list',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
\r
},\r
},\r
+ show: {\r
+ type: 'show',\r
+ },\r
count: {\r
type: 'count',\r
args: {\r
- list_name: 'public_list',\r
+ list_name: 'public',\r
},\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'scroll',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'scroll_panel',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'comic',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'story',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'story_sheet',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'sheet',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'sheet_panel',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'panel',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'panel_picture',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'speech_balloon',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'speech',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'balloon',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'ground_picture',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'ground_color',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'original_picture',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
type: 'list',\r
args: {\r
item_name: 'resource_picture',\r
- list_name: 'private_list',\r
+ list_name: 'private',\r
\r
},\r
},\r
#マニフェスト\r
@lists = {\r
scroll: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_author: {\r
},\r
},\r
},\r
scroll_panel: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_scroll: {\r
},\r
},\r
},\r
comic: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_author: {\r
},\r
},\r
story: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_comic: {\r
},\r
by_sheet: {\r
},\r
by_author: {\r
- type: 'element_filter',\r
- args: {\r
- from: 'author',\r
- filter_key: 'author_id',\r
- },\r
},\r
play: {\r
- type: 'play',\r
- args: {\r
- model: 'story_sheet',\r
- filter_key: 'story_id',\r
- },\r
},\r
},\r
story_sheet: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_story: {\r
},\r
},\r
},\r
sheet: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_story: {\r
},\r
by_author: {\r
},\r
play: {\r
- type: 'play',\r
- args: {\r
- model: 'sheet_panel',\r
- filter_key: 'sheet_id',\r
- },\r
},\r
},\r
sheet_panel: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_sheet: {\r
},\r
},\r
},\r
panel: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_scroll: {\r
},\r
by_author: {\r
},\r
by_speech_balloon_template: {\r
- type: 'through_filter',\r
- args: {\r
- from: 'speech_balloon_template',\r
- through: 'speech_balloons',\r
- filter_key: 'speech_balloon_template_id',\r
- },\r
},\r
},\r
panel_picture: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_panel: {\r
},\r
by_author: {\r
- where: 'by_author_where',\r
- includes: 'by_author_includes',\r
},\r
},\r
speech_balloon: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_panel: {\r
},\r
by_speech_balloon_template: {\r
- type: 'filter',\r
- args: {\r
- from: 'speech_balloon_template',\r
- filter_key: 'speech_balloon_template_id',\r
- },\r
},\r
by_author: {\r
},\r
},\r
speech: {\r
- public_list: {\r
+ public: {\r
},\r
by_speech_balloon: {\r
- type: 'filter',\r
- args: {\r
- from: 'speech_balloon',\r
- includes: {speech_balloon: {panel: {}}},\r
- filter_key: 'speech_balloon_id',\r
- },\r
},\r
by_writing_format: {\r
- type: 'filter',\r
- args: {\r
- from: 'writing_format',\r
- filter_key: 'writing_format_id',\r
- },\r
},\r
},\r
balloon: {\r
- public_list: {\r
+ public: {\r
},\r
by_speech_balloon: {\r
- type: 'filter',\r
- args: {\r
- from: 'speech_balloon',\r
- includes: {speech_balloon: {panel: {}}},\r
- filter_key: 'speech_balloon_id',\r
- },\r
},\r
#by_system_picture: {\r
- # type: 'filter',\r
- # from: 'system_picture',\r
- # filter_key: 'system_picture_id',\r
#},\r
},\r
ground_picture: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_panel: {\r
- type: 'filter',\r
- args: {\r
- from: 'panel',\r
- filter_key: 'panel_id',\r
- },\r
},\r
by_author: {\r
- type: 'element_filter',\r
- args: {\r
- from: 'author',\r
- filter_key: 'author_id',\r
- },\r
},\r
},\r
ground_color: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_panel: {\r
- type: 'filter',\r
- args: {\r
- from: 'panel',\r
- filter_key: 'panel_id',\r
- },\r
},\r
by_author: {\r
- type: 'element_filter',\r
- args: {\r
- from: 'author',\r
- filter_key: 'author_id',\r
- },\r
},\r
},\r
original_picture: {\r
- private_list: {\r
+ private: {\r
},\r
},\r
picture: {\r
},\r
resource_picture: {\r
- public_list: {\r
+ public: {\r
},\r
- private_list: {\r
+ private: {\r
},\r
by_license: {\r
- type: 'filter',\r
- args: {\r
- from: 'license',\r
- filter_key: 'license_id',\r
- },\r
},\r
by_artist: {\r
},\r
},\r
speech_balloon_template: {\r
- public_list: {\r
+ public: {\r
},\r
select_items: {\r
- type: 'system_resource',\r
},\r
},\r
writing_format: {\r
- public_list: {\r
+ public: {\r
},\r
select_items: {\r
- type: 'system_resource',\r
},\r
by_system_picture: {\r
},\r
},\r
license_group: {\r
- public_list: {\r
+ public: {\r
},\r
select_items: {\r
- type: 'system_resource',\r
},\r
},\r
license: {\r
- public_list: {\r
+ public: {\r
},\r
by_license_group: {\r
},\r
},\r
},\r
author: {\r
- public_list: {\r
+ public: {\r
},\r
},\r
artist: {\r
- public_list: {\r
+ public: {\r
},\r
},\r
system_picture: {\r
- public_list: {\r
+ public: {\r
},\r
},\r
}\r
#マニフェスト\r
@models = {\r
scroll: {\r
- class_name: 'Scroll',\r
- table_name: 'scrolls',\r
associations: {\r
belongs_to: {\r
author: {\r
- id_column: 'author_id'\r
}, \r
},\r
has_many: {\r
scroll_panels: {\r
- foreign_key: 'scroll_id',\r
- model_name: 'scroll_panel',\r
}, \r
panels: {\r
through: 'scroll_panel',\r
- foreign_key: 'scroll_id',\r
- model_name: 'panel',\r
}, \r
},\r
},\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_author: {\r
type: 'filter',\r
args: {\r
- filter_item_name: 'author',\r
- filter_key: 'author_id',\r
},\r
},\r
by_panel: {\r
type: 'through_filter',\r
args: {\r
- filter_item_name: 'panel',\r
through: 'scroll_panels',\r
- filter_key: 'panel_id',\r
},\r
},\r
play: {\r
},\r
},\r
scroll_panel: {\r
- class_name: 'ScrollPanel',\r
- table_name: 'scroll_panels',\r
associations: {\r
belongs_to: {\r
panel: {\r
- id_column: 'panel_id'\r
}, \r
scroll: {\r
- id_column: 'scroll_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'scroll',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_scroll: {\r
},\r
},\r
comic: {\r
- class_name: 'Comic',\r
- table_name: 'comics',\r
associations: {\r
belongs_to: {\r
author: {\r
- id_column: 'author_id'\r
}, \r
},\r
has_many: {\r
stories: {\r
- foreign_key: 'comic_id',\r
- model_name: 'story',\r
}, \r
},\r
- has_many_through: {\r
- },\r
},\r
attributes: {\r
id: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_author: {\r
},\r
},\r
story: {\r
- class_name: 'Story',\r
- table_name: 'stories',\r
associations: {\r
belongs_to: {\r
comic: {\r
- id_column: 'comic_id'\r
}, \r
},\r
has_many: {\r
story_sheets: {\r
- foreign_key: 'story_id',\r
- model_name: 'story_sheet',\r
}, \r
sheets: {\r
through: 'story_sheets',\r
- foreign_key: 'story_id',\r
- model_name: 'sheet',\r
}, \r
},\r
},\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'comic',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_comic: {\r
},\r
by_sheet: {\r
type: 'through_filter',\r
+ args: {\r
+ through: 'story_sheets',\r
+ },\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
},\r
play: {\r
type: 'play',\r
},\r
},\r
story_sheet: {\r
- class_name: 'StorySheet',\r
- table_name: 'story_sheets',\r
associations: {\r
belongs_to: {\r
story: {\r
- id_column: 'story_id'\r
}, \r
sheet: {\r
- id_column: 'sheet_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'story',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_story: {\r
},\r
},\r
sheet: {\r
- class_name: 'Sheet',\r
- table_name: 'sheets',\r
associations: {\r
belongs_to: {\r
author: {\r
- id_column: 'author_id'\r
}, \r
},\r
has_many: {\r
story_sheets: {\r
- foreign_key: 'story_id',\r
- model_name: 'story_sheet',\r
}, \r
stories: {\r
through: 'story_sheets',\r
- foreign_key: 'sheet_id',\r
- model_name: 'story',\r
}, \r
sheet_panels: {\r
- foreign_key: 'sheet_id',\r
- model_name: 'sheet_panel',\r
}, \r
panels: {\r
through: 'sheet_panels',\r
- foreign_key: 'sheet_id',\r
- model_name: 'panel',\r
}, \r
},\r
},\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_story: {\r
type: 'through_filter',\r
+ args: {\r
+ through: 'story_sheets',\r
+ },\r
},\r
by_panel: {\r
type: 'through_filter',\r
+ args: {\r
+ through: 'sheet_panels',\r
+ },\r
},\r
by_author: {\r
type: 'filter',\r
},\r
},\r
sheet_panel: {\r
- class_name: 'SheetPanel',\r
- table_name: 'sheet_panels',\r
associations: {\r
belongs_to: {\r
sheet: {\r
- id_column: 'sheet_id'\r
}, \r
panel: {\r
- id_column: 'panel_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'sheet',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_sheet: {\r
},\r
},\r
panel: {\r
- class_name: 'Panel',\r
- table_name: 'panels',\r
associations: {\r
belongs_to: {\r
author: {\r
- id_column: 'author_id'\r
}, \r
},\r
has_many: {\r
scroll_panels: {\r
- foreign_key: 'panel_id',\r
- model_name: 'scroll_panel',\r
}, \r
scrolls: {\r
through: 'scroll_panels',\r
- foreign_key: 'panel_id',\r
- model_name: 'scroll',\r
}, \r
sheet_panels: {\r
- foreign_key: 'panel_id',\r
- model_name: 'sheet_panel',\r
}, \r
sheets: {\r
through: 'sheet_panels',\r
- foreign_key: 'panel_id',\r
- model_name: 'sheet',\r
}, \r
panel_pictures: {\r
- foreign_key: 'panel_id',\r
- model_name: 'panel_picture',\r
}, \r
speech_balloons: {\r
- foreign_key: 'panel_id',\r
- model_name: 'speech_balloon',\r
}, \r
ground_pictures: {\r
- foreign_key: 'panel_id',\r
- model_name: 'ground_picture',\r
}, \r
ground_colors: {\r
- foreign_key: 'panel_id',\r
- model_name: 'ground_color',\r
}, \r
},\r
},\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_scroll: {\r
type: 'through_filter',\r
+ args: {\r
+ through: 'scroll_panels',\r
+ },\r
},\r
by_sheet: {\r
type: 'through_filter',\r
+ args: {\r
+ through: 'sheet_panels',\r
+ },\r
},\r
by_author: {\r
type: 'filter',\r
},\r
},\r
panel_picture: {\r
- class_name: 'PanelPicture',\r
- table_name: 'panel_pictures',\r
associations: {\r
belongs_to: {\r
panel: {\r
- id_column: 'panel_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'panel',\r
+ panel: 'panel',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_panel: {\r
type: 'filter',\r
+ args: {\r
+ where_name: 'public_list_where',\r
+ },\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
+ args: {\r
+ tree_name: 'owner',\r
+ },\r
},\r
},\r
},\r
speech_balloon: {\r
- class_name: 'SpeechBalloon',\r
- table_name: 'speech_balloons',\r
extend: 'classname', \r
associations: {\r
belongs_to: {\r
panel: {\r
- id_column: 'panel_id'\r
}, \r
},\r
has_many: {\r
},\r
has_one: {\r
balloon: {\r
- foreign_key: 'speech_balloon_id',\r
- model_name: 'balloon',\r
}, \r
speech: {\r
- foreign_key: 'speech_balloon_id',\r
- model_name: 'speech',\r
}, \r
},\r
},\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'panel',\r
+ panel: 'panel',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_panel: {\r
type: 'filter',\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
},\r
},\r
}, \r
balloon: {\r
- class_name: 'Balloon',\r
- table_name: 'balloons',\r
associations: {\r
belongs_to: {\r
speech_balloon: {\r
- id_column: 'speech_balloon_id'\r
}, \r
system_picture: {\r
- id_column: 'system_picture_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'speech_balloon',\r
+ panel: 'speech_balloon',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_panel: {\r
type: 'filter',\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
},\r
},\r
},\r
speech: {\r
- class_name: 'Speech',\r
- table_name: 'speeches',\r
associations: {\r
belongs_to: {\r
speech_balloon: {\r
- id_column: 'speech_balloon_id'\r
}, \r
writing_format: {\r
- id_column: 'writing_format_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'speech_balloon',\r
+ panel: 'speech_balloon',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
by_speech_balloon: {\r
},\r
},\r
ground_picture: {\r
- class_name: 'GroundPicture',\r
- table_name: 'ground_pictures',\r
associations: {\r
belongs_to: {\r
panel: {\r
- id_column: 'panel_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'panel',\r
+ panel: 'panel',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_panel: {\r
type: 'filter',\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
},\r
},\r
},\r
ground_color: {\r
- class_name: 'GroundColor',\r
- table_name: 'ground_colors',\r
associations: {\r
belongs_to: {\r
panel: {\r
- id_column: 'panel_id'\r
}, \r
},\r
has_many: {\r
type: 'datetime',\r
}\r
},\r
+ tree: {\r
+ owner: 'panel',\r
+ panel: 'panel',\r
+ },\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_panel: {\r
type: 'filter',\r
},\r
by_author: {\r
- type: 'element_filter',\r
+ type: 'foreign_filter',\r
},\r
},\r
},\r
original_picture: {\r
- class_name: 'OriginalPicture',\r
- table_name: 'original_pictures',\r
associations: {\r
belongs_to: {\r
artist: {\r
- id_column: 'artist_id'\r
}, \r
},\r
has_many: {\r
pictures: {\r
- foreign_key: 'original_picture_id',\r
- model_name: 'picture',\r
}, \r
},\r
has_one: {\r
resource_picture: {\r
- foreign_key: 'original_picture_id',\r
- model_name: 'resource_picture',\r
}, \r
},\r
},\r
}\r
},\r
lists: {\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
},\r
},\r
picture: {\r
- class_name: 'Picture',\r
- table_name: 'pictures',\r
associations: {\r
belongs_to: {\r
license: {\r
- id_column: 'license_id'\r
}, \r
artist: {\r
- id_column: 'artist_id'\r
}, \r
},\r
has_many: {\r
}\r
},\r
resource_picture: {\r
- class_name: 'ResourcePicture',\r
- table_name: 'resource_pictures',\r
associations: {\r
belongs_to: {\r
original_picture: {\r
- id_column: 'original_picture_id'\r
}, \r
license: {\r
- id_column: 'license_id'\r
}, \r
artist: {\r
- id_column: 'artist_id'\r
}, \r
},\r
has_many: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
- private_list: {\r
+ private: {\r
type: 'private',\r
},\r
by_license: {\r
},\r
},\r
speech_balloon_template: {\r
- class_name: 'SpeechBalloonTemplate',\r
- table_name: 'speech_balloon_templates',\r
associations: {\r
belongs_to: {\r
system_picture: {\r
- id_column: 'system_picture_id'\r
}, \r
},\r
has_many: {\r
speech_balloons: {\r
- foreign_key: 'speech_balloon_template_id',\r
- model_name: 'speech_balloon',\r
}, \r
panels: {\r
through: 'speech_balloons',\r
- foreign_key: 'speech_balloon_template_id',\r
- model_name: 'panel',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
select_items: {\r
},\r
},\r
writing_format: {\r
- class_name: 'WritingFormat',\r
- table_name: 'writing_formats',\r
associations: {\r
belongs_to: {\r
system_picture: {\r
- id_column: 'system_picture_id'\r
}, \r
},\r
has_many: {\r
speeches: {\r
- foreign_key: 'writing_format_id',\r
- model_name: 'speech',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
select_items: {\r
},\r
},\r
license_group: {\r
- class_name: 'LicenseGroup',\r
- table_name: 'license_groups',\r
associations: {\r
belongs_to: {\r
},\r
has_many: {\r
licenses: {\r
- foreign_key: 'license_group_id',\r
- model_name: 'license',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
select_items: {\r
},\r
},\r
license: {\r
- class_name: 'License',\r
- table_name: 'licenses',\r
associations: {\r
belongs_to: {\r
license_group: {\r
- id_column: 'license_group_id'\r
}, \r
system_picture: {\r
- id_column: 'system_picture_id'\r
}, \r
},\r
has_many: {\r
resource_pictures: {\r
- foreign_key: 'license_id',\r
- model_name: 'resource_picture',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
by_license_group: {\r
},\r
},\r
author: {\r
- class_name: 'Author',\r
- table_name: 'authors',\r
associations: {\r
belongs_to: {\r
},\r
has_many: {\r
scrolls: {\r
- foreign_key: 'author_id',\r
- model_name: 'scroll',\r
}, \r
comics: {\r
- foreign_key: 'author_id',\r
- model_name: 'comic',\r
}, \r
stories: {\r
- foreign_key: 'author_id',\r
- model_name: 'story',\r
}, \r
sheets: {\r
- foreign_key: 'author_id',\r
- model_name: 'sheet',\r
}, \r
panels: {\r
- foreign_key: 'author_id',\r
- model_name: 'panel',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
},\r
},\r
artist: {\r
- class_name: 'Artist',\r
- table_name: 'artists',\r
associations: {\r
belongs_to: {\r
},\r
has_many: {\r
resource_pictures: {\r
- foreign_key: 'artist_id',\r
- model_name: 'resource_picture',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
},\r
},\r
system_picture: {\r
- class_name: 'SystemPicture',\r
- table_name: 'system_pictures',\r
associations: {\r
belongs_to: {\r
},\r
has_many: {\r
balloons: {\r
- foreign_key: 'system_picture_id',\r
- model_name: 'balloon',\r
}, \r
- balloon_templates: {\r
- foreign_key: 'system_picture_id',\r
- model_name: 'balloon_template',\r
+ speech_balloon_templates: {\r
}, \r
licenses: {\r
- foreign_key: 'system_picture_id',\r
- model_name: 'license',\r
}, \r
},\r
has_one: {\r
}\r
},\r
lists: {\r
- public_list: {\r
+ public: {\r
type: 'public',\r
},\r
},\r
list_name: 'by_scroll',\r
}, \r
}, \r
- columns: [\r
+ column_names: [\r
'id', \r
'title', \r
'description', \r
# model_name: 'balloon',\r
# list_name: 'by_system_picture',\r
#}, \r
- 'speech_balloon_templates.by_system_picture': {\r
- model_name: 'speech_balloon_template',\r
- list_name: 'by_system_picture',\r
- }, \r
+ #'speech_balloon_templates.by_system_picture': {\r
+ # model_name: 'speech_balloon_template',\r
+ # list_name: 'by_system_picture',\r
+ #}, \r
'licenses.by_system_picture': {\r
model_name: 'license',\r
list_name: 'by_system_picture',\r
],\r
has_many: [\r
#'balloons.by_system_picture', \r
- 'speech_balloon_templates.by_system_picture', \r
+ #'speech_balloon_templates.by_system_picture', \r
'licenses.by_system_picture', \r
],\r
has_one: [\r
:filer => @filer
}
}
- format.json { render json: @items.to_json(self.class.model.list_json_opt) }
+ format.json { render json: @items.to_json(@my_model_class.list_json_opt) }
format.atom
format.rss
end
end
+ def set_show
+ set_model
+ @item = @my_model_class.show(params[:id], @operators)
+ end
+
+ def show_prof_format format
+ format.prof {
+ self.formats = [:html]
+ @profiler = Manifest::View::Profiler.new @my_model.model_name, @item, @operators
+ render @profiler.template_name, :locals => {
+ :profiler => @profiler
+ }
+ }
+ end
+
+ def show_json_format format
+ format.json { render json: @item.to_json(@my_model_class.show_json_opt) }
+ end
+
def set_new
set_model
@item = @my_model_class.new
end
def assist_items item_name, list_name
- list_manager = Pettanr::Application::manifest.list_managers[item_name]
- list = list_manager.open list_name, 1, 5, @operators
- list.items
+ list = Manifest.manifest.lists[item_name][list_name]
+ list_result = list.open(@operators, {:id => @item.id, :page => 1, :page_size => 5})
+ list_result.items
end
def assist_filer item_name, items
+ @filer = Manifest::View::Filer.new @list.item_name, list_result.items, list_result.paginate, @operators
filer_manager = Pettanr::Application::manifest.filer_managers[item_name]
filer_manager.open(item_name, items, @operators, nil)
end
filer_list
end
- def show
- @item = Artist.show(params[:id], @operators)
+ def show_html_format format
+ format.html {
+ @artist = @item
+ }
+ end
+ def show
+ set_show
respond_to do |format|
- format.html {
- @artist = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(Artist.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @author = @item
+ }
+ end
+
def show
- @item = Author.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- @author = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(Author.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @balloon = @item
+ }
+ end
+
def show
- @item = Balloon.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @balloon = @item
- }
- format_prof format
- format.json { render json: @item.to_json(Balloon.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ }
+ end
+
def show
- @item = Comic.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- }
- format_prof format
- format.json { render json: @item.to_json(Comic.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
format.atom
format.rss
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @ground_color = @item
+ }
+ end
+
def show
- @item = GroundColor.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @ground_color = @item
- }
- format_prof format
- format.json { render json: @item.to_json(GroundColor.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @ground_picture = @item
+ }
+ end
+
def show
- @item = GroundPicture.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @ground_picture = @item
- }
- format_prof format
- format.json { render json: @item.to_json(GroundPicture.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @license_group = @item
+ }
+ end
+
def show
- @item = LicenseGroup.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @license_group = @item
- }
- format_prof format
- format.json { render json: @item.to_json(LicenseGroup.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @license = @item
+ }
+ end
+
def show
- @item = License.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @license = @item
- }
- format_prof format
- format.json { render json: @item.to_json(License.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @original_picture = @item
+ #ライセンス付与のために原画ライセンスグループ作成準備
+ @original_picture_license_group = OriginalPictureLicenseGroup.new :original_picture_id => @item.id
+ render
+ }
+ end
+
def show
- @item = OriginalPicture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
opt = {:type => @item.mime_type, :disposition=>"inline"}
- format.png { send_data(@item.restore, opt ) }
- format.gif { send_data(@item.restore, opt ) }
- format.jpeg { send_data(@item.restore, opt ) }
- format.html {
- @original_picture = @item
- #ライセンス付与のために原画ライセンスグループ作成準備
- @original_picture_license_group = OriginalPictureLicenseGroup.new :original_picture_id => @item.id
- render
- }
- format_prof format
- format.json { render json: @item.to_json(OriginalPicture.show_json_opt)}
+ format.png { send_data(@item.restore(params[:subdir]), opt ) }
+ format.gif { send_data(@item.restore(params[:subdir]), opt ) }
+ format.jpeg { send_data(@item.restore(params[:subdir]), opt ) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @panel_picture = @item
+ }
+ end
+
def show
- @item = PanelPicture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- @panel_picture = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(PanelPicture.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @panel = @item
+ if @operators.author
+ @new_scroll_items = assist_items('scroll', 'private_list')
+ #@new_scroll_filer = assist_filer 'scroll', @new_scroll_items
+ @fresh_scroll_items = assist_items('scroll_panel', 'private_list').map {|sp| sp.scroll}
+ #@fresh_scroll_filer = assist_filer 'scroll', @fresh_scroll_items
+
+ @new_sheet_items = assist_items('sheet', 'private_list')
+ #@new_sheet_filer = assist_filer 'sheet', @new_sheet_items
+ @fresh_sheet_items = assist_items('sheet_panel', 'private_list').map {|sp| sp.sheet}
+ #@fresh_sheet_filer = assist_filer 'sheet', @fresh_sheet_items
+ end
+ }
+ end
+
def show
- @item = Panel.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- @panel = @item
- if @operators.author
- @new_scroll_items = assist_items('scroll', 'private_list')
- # @new_scroll_filer = assist_filer 'scroll', @new_scroll_items
- @fresh_scroll_items = assist_items('scroll_panel', 'private_list').map {|sp| sp.scroll}
- # @fresh_scroll_filer = assist_filer 'scroll', @fresh_scroll_items
-
- @new_sheet_items = assist_items('sheet', 'private_list')
- # @new_sheet_filer = assist_filer 'sheet', @new_sheet_items
- @fresh_sheet_items = assist_items('sheet_panel', 'private_list').map {|sp| sp.sheet}
- # @fresh_sheet_filer = assist_filer 'sheet', @fresh_sheet_items
- end
- }
- format_prof format
- format.json { render json: @item.panel_elements_as_json }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
before_filter :authenticate_author, :only => []
end
+ def show_html_format format
+ format.html {
+ @picture = @item
+ }
+ end
+
def show
- @item = Picture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
opt = {:type => @item.mime_type, :disposition=>"inline"}
format.png { send_data(@item.restore(params[:subdir]), opt ) }
format.gif { send_data(@item.restore(params[:subdir]), opt ) }
format.jpeg { send_data(@item.restore(params[:subdir]), opt ) }
- format.html {
- @picture = @item
- }
- format_prof format
- format.json { render :json => @item.to_json}
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @resource_picture = @item
+ }
+ end
+
def show
- @item = ResourcePicture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
opt = {:type => @item.mime_type, :disposition=>"inline"}
format.png { send_data(@item.restore(params[:subdir]), opt ) }
format.gif { send_data(@item.restore(params[:subdir]), opt ) }
format.jpeg { send_data(@item.restore(params[:subdir]), opt ) }
- format.html {
- @resource_picture = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(ResourcePicture.show_json_opt)}
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
end
def show
- @item = ScrollPanel.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format_prof format
+ show_prof_format format
format.json { render json: @item.scroll_panel_as_json(@operators.author) }
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @scroll = @item
+ if @operators.author
+ @new_panel_items = assist_items('panel', 'private_list')
+ #@new_panel_filer = assist_filer 'panel', @new_panel_items
+ end
+ }
+ end
+
def show
- @item = Scroll.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- if @operators.author
- @new_panel_items = assist_items('panel', 'private_list')
- @new_panel_filer = assist_filer 'panel', @new_panel_items
- end
- }
- format.json { render json: @item.to_json(Scroll.show_json_opt) }
- format_prof format
- format.atom
- format.rss
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
end
def show
- @item = SheetPanel.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format_prof format
+ show_prof_format format
format.json { render json: @item.sheet_panel_as_json(@operators.author) }
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ if @operators.author
+ @new_panel_items = assist_items('panel', 'private_list')
+ #new_panel_filer = assist_filer 'panel', @new_panel_items
+
+ @new_story_items = assist_items('story', 'private_list')
+ #new_story_filer = assist_filer 'story', @new_story_items
+ @fresh_story_items = assist_items('story_sheet', 'private_list').map {|ss| ss.story}
+ #@fresh_story_filer = assist_filer 'story', @fresh_story_items
+ end
+ }
+ end
+
def show
- @item = Sheet.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- if @operators.author
- @new_panel_items = assist_items('panel', 'private_list')
- @new_panel_filer = assist_filer 'panel', @new_panel_items
-
- @new_story_items = assist_items('story', 'private_list')
- @new_story_filer = assist_filer 'story', @new_story_items
- @fresh_story_items = assist_items('story_sheet', 'private_list').map {|ss| ss.story}
- @fresh_story_filer = assist_filer 'story', @fresh_story_items
- end
- }
- format_prof format
- format.json { render json: @item.to_json(Sheet.show_json_opt) }
- format.atom
- format.rss
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @speech_balloon_template = @item
+ }
+ end
+
def show
- @item = SpeechBalloonTemplate.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- @speech_balloon_template = @item
- }
- format_prof format
- format.json {
- render :json => @item.to_json(SpeechBalloonTemplate.show_json_opt)
- }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @speech_balloon = @item
+ }
+ end
+
def show
- @item = SpeechBalloon.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @speech_balloon = @item
- }
- format_prof format
- format.json { render json: @item.to_json(SpeechBalloon.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @speech = @item
+ }
+ end
+
def show
- @item = Speech.show(params[:id], @operators)
+ set_show
respond_to do |format|
- format.html {
- @speech = @item
- }
- format_prof format
- format.json { render json: @item.to_json(Speech.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ if @operators.author
+ @new_sheet_items = assist_items('sheet', 'private_list')
+ #@new_sheet_filer = assist_filer 'sheet', @new_sheet_items
+ end
+ }
+ end
+
def show
- @item = Story.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- if @operators.author
- @new_sheet_items = assist_items('sheet', 'private_list')
- @new_sheet_filer = assist_filer 'sheet', @new_sheet_items
- end
- }
- format_prof format
- format.json { render json: @item.to_json(Story.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
end
def show
- @item = StorySheet.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format_prof format
- format.json { render json: @item.to_json(StorySheet.show_json_opt) }
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @system_picture = @item
+ }
+ end
+
def show
- @item = SystemPicture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
opt = {:type => @item.mime_type, :disposition=>"inline"}
format.png { send_data(@item.restore, opt ) }
format.gif { send_data(@item.restore, opt ) }
format.jpeg { send_data(@item.restore, opt ) }
- format.html {
- @system_picture = @item
- }
- format_prof format
- format.json { render json: @item.to_json(SystemPicture.show_json_opt)}
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @writing_format = @item
+ }
+ end
+
def show
- @item = WritingFormat.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
- format.html {
- @writing_format = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(WritingFormat.show_json_opt) }
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end
-<%= render 'system/filer.html', :filer => profiler.header_filer %>\r
-<% profiler.each_column do |column| %>\r
- <div>\r
- <%= column.label self %>\r
- <%= column.disp_value self %>\r
- <%= column.note self %>\r
- </div>\r
-<% end %>\r
-<div>\r
- <%= 'associations' %>\r
+<div class="profiler">\r
+ <%= render profiler.header_template_name, :profiler => profiler %>\r
+ <%= render profiler.columns_template_name, :profiler => profiler %>\r
+ <%= render profiler.associations_template_name, :profiler => profiler %>\r
</div>\r
-<div>\r
- <%= 'belongs_to' %>\r
-</div>\r
-<% profiler.each_belongs_to do |parent_filer| %>\r
- <%= render 'system/filer.html', :filer => parent_filer %>\r
-<% end %>\r
-<div>\r
- <%= 'has_many' %>\r
-</div>\r
-<% profiler.each_has_many do |has_many_filer, more_url| %>\r
- <%= render 'system/filer.html', :filer => has_many_filer %>\r
- <%= link_to h('more'), more_url %>\r
-<% end %>\r
-<div>\r
- <%= 'has_one' %>\r
-</div>\r
-<% profiler.each_has_one do |has_one_filer| %>\r
- <%= render 'system/filer.html', :filer => has_one_filer %>\r
-<% end %>\r
--- /dev/null
+<div class="filer">
+ <%= render filer.header.template_name, :header => filer.header %>
+ <%= render filer.body.template_name, :body => filer.body %>
+ <%= render filer.footer.template_name, :footer => filer.footer %>
+</div>
-<div class="filer">
- <%= render filer.header.template_name, :header => filer.header %>
- <%= render filer.body.template_name, :body => filer.body %>
- <%= render filer.footer.template_name, :footer => filer.footer %>
-</div>
+<%= render filer.template_name, :filer => filer %>
--- /dev/null
+<div class="associations">
+ <div>
+ <%= 'associations' %>
+ </div>
+ <div>
+ <%= 'belongs_to' %>
+ </div>
+ <% associations.each_belongs_to_filer do |filer| %>
+ <%= render filer.template_name, :filer => filer %>
+ <% end %>
+ <div>
+ <%= 'has_many' %>
+ </div>
+ <% associations.each_has_many_filer do |filer| %>
+ <%= render filer.template_name, :filer => filer %>
+ <% end %>
+ <div>
+ <%= 'has_one' %>
+ </div>
+ <% associations.each_has_one_filer do |filer| %>
+ <%= render filer.template_name, :filer => filer %>
+ <% end %>
+</div>
--- /dev/null
+<div class="column">
+ <%= column.label %>
+ <%= render column.value_template_name, :column => column %>
+ <%= render column.note_template_name, :column => column %>
+</div>
--- /dev/null
+<div class="columns">
+ <% profiler.columns.each do |column| %>
+ <%= render column.template_name, :column => column %>
+ <% end %>
+</div>
--- /dev/null
+<div class="header">
+ <%= render header.filer.template_name, :filer => header.filer %>
+</div>
--- /dev/null
+<div class="profiler">
+ <%= render profiler.header_template_name, :header => profiler.header %>
+ <%= render profiler.columns_template_name, :profiler => profiler %>
+ <%= render profiler.associations_template_name, :associations => profiler.associations %>
+</div>
--- /dev/null
+(<%= t_selected_item(column.select_item_name, column.value) %>)
--- /dev/null
+<%= l column.value %>
--- /dev/null
+<%= column.value %>
--- /dev/null
+<%= render profiler.template_name, :profiler => profiler %>
require_dependency "manifest/list/system_resource"
require_dependency "manifest/list/filter"
require_dependency "manifest/list/through_filter"
-require_dependency "manifest/list/element_filter"
+require_dependency "manifest/list/foreign_filter"
require_dependency "manifest/list/play"
module Manifest
module ListModule
class ListFactory
@@types = {
'public' => ListModule::PublicList, 'private' => PrivateList, 'system_resource' => SystemResourceList,
- 'filter' => FilterList,
- 'through_filter' => ThroughFilterList, 'element_filter' => ElementFilterList,
+ 'filter' => FilterList, 'through_filter' => ThroughFilterList, 'foreign_filter' => ForeignFilterList,
'play' => PlayList
}
def self.factory manifest, item_name, my_manifests
+require_dependency "manifest/list/where"
+require_dependency "manifest/list/includes"
module Manifest
module ListModule
class Base
end
attr :manifest, :item_name, :list_name, :list_manifest,
- :default_page_size, :max_page_size
+ :model, :model_manifest, :model_list_manifest,
+ :where, :includes
def initialize manifest, item_name, list_name, list_manifest
@manifest = manifest
@item_name = item_name
def set_default
@model_manifest = @manifest.models[@item_name]
@model_list_manifest = @model_manifest.lists[@list_name]
- @list_manifest['default_page_size'] ||= @model_list_manifest.default_page_size
- @list_manifest['max_page_size'] ||= @model_list_manifest.max_page_size
+ @list_manifest['where'] ||= {}
+ @list_manifest['includes'] ||= {}
end
def init
- @default_page_size = @list_manifest['default_page_size']
- @max_page_size = @list_manifest['max_page_size']
-
@model = ::Manifest.item_name_to_model @item_name
@table_name = @model.table_name
- if @model.content?
- @owner_model = @model.owner_model
- @owner_table_name = @owner_model.table_name if @owner_model
- end
+ @where = WhereFactory.factory self, @list_manifest['where']
+ @includes = IncludeFactory.factory self, @list_manifest['includes']
+ end
+
+ def default_page_size
+ @model_list_manifest.default_page_size
+ end
+
+ def max_page_size
+ @model_list_manifest.max_page_size
end
def page_number prm = nil
def page_size prm
page_size = prm.to_i
- page_size = @max_page_size if page_size > @max_page_size
- page_size = @default_page_size if page_size < 1
+ page_size = self.max_page_size if page_size > self.max_page_size
+ page_size = self.default_page_size if page_size < 1
page_size
end
- def where
- @model.list_where
+ def base_where_condition
+ method_name = @where.conditions do |name|
+ name
+ end
+ @model.__send__ method_name
end
- def includes
- if @owner_model
- if @owner_model.owner_model
- {@owner_model.item_name => {@owner_model.owner_model.item_name => {}}}
- else
- {@owner_model.item_name => {}}
- end
- else
- {}
- end
+ def where_condition
+ base_where_condition
+ end
+
+ def include_hash
+ @includes.includes
end
def order
end
def items operators, options, offset, page_size
- @model.where(self.where).includes(self.includes).order(self.order).offset(offset).limit(page_size)
+ @model.where(self.where_condition).includes(self.include_hash).order(self.order).offset(offset).limit(page_size)
end
def count operators, options
- @model.where(self.where).includes(self.includes)
+ @model.where(self.where_condition).includes(self.include_hash).count
end
- def paginate items, offset, page_size
- c = items ? items.count : 0
+ def paginate count, offset, page_size
+ c = count ? count.to_i : 0
Kaminari.paginate_array(Array.new(c, nil)).page(offset).per(page_size)
end
page_size = self.page_size options[:page_size]
offset = (page -1) * page_size
items = self.items operators, options, offset, page_size
- paginate = self.paginate items, offset, page_size
- ListResult.new items, paginate
+ count = self.count operators, options
+ pg = self.paginate count, offset, page_size
+ ListResult.new items, pg
end
end
def init
super
+ @filter_item_name = @model_list_manifest.filter_item_name
@filter_key = @model_list_manifest.filter_key
end
- def where filter_item_id
- w = @model.list_where
+ def where_condition filter_item_id
+ w = self.base_where_condition
w += ' and ' unless w.blank?
[w + @table_name + '.' + @filter_key + ' = ?', filter_item_id]
end
- def includes
- return @includes if @includes
- w = @owner_model ? {@owner_model.item_name => {}} : {}
- w.merge({@from => {} })
+ def include_hash
+ w = super
+ w.merge({@filter_item_name => {} }) unless w[@filter_item_name]
end
- def items options, offset, page_size
+ def items operators, options, offset, page_size
filter_item_id = options[:id]
- @model.where(self.where(filter_item_)).includes(self.includes).order(self.order).offset(offset).limit(page_size)
+ @model.where(self.where_condition(filter_item_id)).includes(self.include_hash).order(self.order).offset(offset).limit(page_size)
end
def count operators, options
filter_item_id = options[:id]
- @model.where(self.where(filter_item_id)).includes(self.includes).count
+ @model.where(self.where_condition(filter_item_id)).includes(self.include_hash).count
end
def self._add_action item_name, action_name, list_name, list_conf
module Manifest
module ListModule
- class ElementFilterList < FilterList
+ class ForeignFilterList < FilterList
def set_default
super
def init
super
+ @filter_table_name = ::Manifest.manifest.models[@filter_item_name].classify.table_name
end
- def includes
- {@owner_model.item_name => {}}
- end
-
- def where filter_item
- w = @model.list_where
+ def where_condition filter_item_id
+ w = super()
w += ' and ' unless w.blank?
- [w + @owner_table_name + '.' + @filter_key + ' = ?', filter_item.id]
+ [w + @filter_table_name + '.id' + ' = ?', filter_item_id]
end
def self.add_action item_name, action_name, list_name, list_conf
--- /dev/null
+require_dependency "manifest/list/includes/base"
+require_dependency "manifest/list/includes/method"
+require_dependency "manifest/list/includes/auto"
+require_dependency "manifest/list/includes/none"
+module Manifest
+ module ListModule
+ class IncludeFactory
+ include IncludeModule
+ @@types = {
+ 'method' => IncludeMethod, 'auto' => IncludeAuto, 'none' => IncludeNone
+ }
+
+ def self.factory list, my_manifest
+ my_manifest['type'] ||= 'auto'
+ type = my_manifest['type']
+ raise "undefined type for lists > #{list.item_name} > #{list.list_name} > includes\n" unless type
+ my_class = @@types[type]
+ raise "undefined class for lists > #{list.item_name} > #{list.list_name} > includes > #{type}\n" unless my_class
+ my_class.new(list, my_manifest)
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module IncludeModule
+ class IncludeAuto < Base
+ attr :tree_name
+ def set_default
+ super
+ @includes_manifest['args']['tree_name'] ||= 'owner'
+ end
+
+ def init
+ super
+ @tree_name = @args['tree_name']
+ @parent_model_manifest = @list.model_manifest.tree_model_manifest(@tree_name)
+ if @parent_model_manifest
+ @parent_model_name = @parent_model_manifest.classify.item_name
+ @root_model_manifest = @parent_model_manifest.tree_model_manifest(@tree_name)
+ if @root_model_manifest
+ @root_model_name = @root_model_manifest.classify.item_name
+ end
+ end
+ end
+
+ def includes
+ if @parent_model_name
+ if @root_model_name
+ {@parent_model_name => {@root_model_name => {}}}
+ else
+ {@parent_model_name => {}}
+ end
+ else
+ {}
+ end
+ end
+
+ def foreign_model_name
+ if @root_model_name
+ @root_model_name
+ else
+ @parent_model_name
+ end
+ end
+
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module IncludeModule
+ class Base
+ attr :list, :includes_manifest, :type
+ def initialize list, includes_manifest
+ @list = list
+ @includes_manifest = includes_manifest
+ self.set_default
+ self.init
+ end
+
+ def set_default
+ @includes_manifest['args'] ||= {}
+ end
+
+ def init
+ @type = @includes_manifest['type']
+ @args = @includes_manifest['args']
+ end
+
+ def item_name
+ @list.item_name
+ end
+
+ def list_name
+ @list.list_name
+ end
+
+ def model
+ @list.model
+ end
+
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module IncludeModule
+ class IncludeMethod < Base
+ attr :method_name
+ def set_default
+ super
+ @includes_manifest['args']['method_name'] ||= self.list_name + '_list_includes'
+ end
+
+ def init
+ super
+ @method_name = @args['method_name']
+ end
+
+ def includes
+ self.model.__send__ @method_name
+ end
+
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module IncludeModule
+ class IncludeNone < Base
+ attr :tree_name
+ def set_default
+ super
+ end
+
+ def init
+ super
+ end
+
+ def includes
+ {}
+ end
+
+ end
+
+ end
+ end
+end
module Manifest
module ListModule
class PrivateList < Base
- def where operators
+ def where_condition operators
case @model.owner_type
when :author
operator = operators.author
else
@table_name
end
- [t + '.' + @model.owner_type.to_s + '_id = ?', operator.id]
+ @where.conditions do |name|
+ [t + '.' + @model.owner_type.to_s + '_id = ?', operator.id]
+ end
end
def items operators, options, offset, page_size
- @model.where(self.where(operators)).includes(self.includes).order(self.order).offset(offset).limit(page_size)
+ @model.where(self.where_condition(operators)).includes(self.include_hash).order(self.order).offset(offset).limit(page_size)
+ end
+
+ def count operators, options
+ filter_item_id = options[:id]
+ @model.where(self.where_condition(operators)).includes(self.include_hash).count
end
end
super
end
- def where
- @model.list_where
- end
-
- def includes
- if @owner_model
- if @owner_model.owner_model
- {@owner_model.item_name => {@owner_model.owner_model.item_name => {}}}
- else
- {@owner_model.item_name => {}}
- end
- else
- {}
- end
- end
-
def order
@model.list_order
end
def init
super
- return
- @through = @list_list_conf['through']
+ @through = @model_list_manifest.through
+ @filter_table_name = ::Manifest.manifest.models[@filter_item_name].classify.table_name
end
- def includes
- {@through => {@from => {}} }
+ def include_hash
+ {@through => {@filter_item_name => {}} }
end
- def where filter_item
- w = @model.list_where
+ def where_condition filter_item_id
+ w = self.base_where_condition
w += ' and ' unless w.blank?
- [w + @through + '.' + @filter_key + ' = ?', filter_item.id]
+ [w + @filter_table_name + '.id' + ' = ?', filter_item_id]
end
end
--- /dev/null
+require_dependency "manifest/list/where/base"
+require_dependency "manifest/list/where/method"
+require_dependency "manifest/list/where/auto"
+module Manifest
+ module ListModule
+ class WhereFactory
+ include WhereModule
+ @@types = {
+ 'method' => WhereMethod, 'auto' => WhereAuto
+ }
+
+ def self.factory list, my_manifest
+ my_manifest['type'] ||= 'auto'
+ type = my_manifest['type']
+ raise "undefined type for lists > #{list.item_name} > #{list.list_name} > where\n" unless type
+ my_class = @@types[type]
+ raise "undefined class for lists > #{list.item_name} > #{list.list_name} > where > #{type}\n" unless my_class
+ my_class.new(list, my_manifest)
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module WhereModule
+ class WhereAuto < Base
+ attr :method_name
+ def set_default
+ super
+ @where_manifest['args']['method_name'] ||= self.base_name
+ end
+
+ def init
+ super
+ @method_name = @args['method_name']
+ end
+
+ def base_name
+ if self.model.content?
+ 'public_list_where'
+ else
+ 'list_where'
+ end
+ end
+
+ def conditions
+ yield @method_name
+ end
+
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module WhereModule
+ class Base
+ attr :list, :where_manifest, :type
+ def initialize list, where_manifest
+ @list = list
+ @where_manifest = where_manifest
+ self.set_default
+ self.init
+ end
+
+ def set_default
+ @where_manifest['args'] ||= {}
+ end
+
+ def init
+ @type = @where_manifest['type']
+ @args = @where_manifest['args']
+ end
+
+ def item_name
+ @list.item_name
+ end
+
+ def list_name
+ @list.list_name
+ end
+
+ def model
+ @list.model
+ end
+
+ end
+
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module ListModule
+ module WhereModule
+ class WhereMethod < Base
+ attr :method_name
+ def set_default
+ super
+ @where_manifest['args']['method_name'] ||= self.list_name + '_list_where'
+ end
+
+ def init
+ super
+ @method_name = @args['method_name']
+ end
+
+ def conditions
+ yield @method_name
+ end
+
+ end
+
+ end
+ end
+end
require_dependency "manifest/local/view/filer"
require_dependency "manifest/local/view/form"
+require_dependency "manifest/local/view/profiler"
module Manifest
module View
end
--- /dev/null
+require_dependency "manifest/local/view/profiler/header"
+require_dependency "manifest/local/view/profiler/column"
+require_dependency "manifest/local/view/profiler/association"
+module Manifest
+ module View
+ class Profiler
+ include ProfilerModule
+ attr :profiler_manifest, :item_name, :item, :operators, :template_dir,
+ :header, :columns, :associations
+ def initialize item_name, item, operators
+ @item_name = item_name
+ @item = item
+ @operators = operators
+ @profiler_manifest = Manifest.manifest.profilers[@item_name]
+ @template_dir = 'templates/r/profiler/'
+ @header = Header.new self
+ @columns = @profiler_manifest.column_names.map {|column_name|
+ Column.new self, column_name
+ }
+ @associations = Association.new self, @profiler_manifest.associations
+ end
+
+ def model
+ ::Manifest::item_name_to_model @item_name
+ end
+
+ def template_file_name
+ "profiler"
+ end
+
+ def template_name
+ self.template_dir + self.template_file_name
+ end
+
+ def header_template_file_name
+ "header"
+ end
+
+ def header_template_name
+ self.template_dir + self.header_template_file_name
+ end
+
+ def columns_template_file_name
+ "columns"
+ end
+
+ def columns_template_name
+ self.template_dir + self.columns_template_file_name
+ end
+
+ def associations_template_file_name
+ "associations"
+ end
+
+ def associations_template_name
+ self.template_dir + self.associations_template_file_name
+ end
+
+ def image_dir
+ '/images/'
+ end
+
+ end
+ end
+end
--- /dev/null
+require_dependency "manifest/local/view/profiler/association/belongs_to"
+require_dependency "manifest/local/view/profiler/association/has_many"
+require_dependency "manifest/local/view/profiler/association/has_one"
+module Manifest
+ module View
+ module ProfilerModule
+ class Association
+ include AssociationModule
+ attr :profiler, :association_manifest,
+ :belongs_to, :has_many, :has_one
+ def initialize profiler, association_manifest
+ @profiler = profiler
+ @association_manifest = association_manifest
+ @belongs_to = @association_manifest.belongs_to.map {|belongs_to_manifest|
+ BelongsTo.new self, belongs_to_manifest
+ }
+ @has_many = @association_manifest.has_many.map {|list_name|
+ HasMany.new self, list_name
+ }
+ @has_one = @association_manifest.has_one.map {|list_name|
+ HasOne.new self, list_name
+ }
+ end
+
+ def item
+ @profiler.item
+ end
+
+ def model_manifest
+ ::Manifest.manifest.models[@profiler.item_name]
+ end
+
+ def model_attribute_manifest
+ model_manifest.attributes[@column_name]
+ end
+
+ def template_dir
+ @profiler.template_dir
+ end
+
+ def template_file_name
+ "associations"
+ end
+
+ def template_name
+ self.template_dir + self.template_file_name
+ end
+
+ def each_belongs_to_filer
+ @belongs_to.each {|b|
+ yield b.filer
+ }
+ end
+
+ def each_has_many_filer
+ @has_many.each {|h|
+ yield h.filer
+ }
+ end
+
+ def each_has_one_filer
+ @has_one.each {|h|
+ yield h.filer
+ }
+ end
+
+ end
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module View
+ module ProfilerModule
+ module AssociationModule
+ class BelongsTo
+ attr :association, :belongs_to_manifest
+ def initialize association, belongs_to_manifest
+ @association = association
+ @belongs_to_manifest = belongs_to_manifest
+ end
+
+ def item
+ self.profiler.item
+ end
+
+ def parent_model
+ @belongs_to_manifest.model
+ end
+
+ def parent_id
+ self.item.attributes[self.model_belongs_to_manifest.id_column]
+ end
+
+ def filer
+ filer = nil
+ begin
+ r = self.parent_model.show(self.parent_id, self.profiler.operators)
+ if r
+ filer = ::Manifest::View::Filer.new self.parent_model.item_name, [r], nil, self.profiler.operators
+ end
+ rescue ActiveRecord::RecordNotFound, ActiveRecord::Forbidden
+ end
+ filer
+ end
+
+ def model_manifest
+ ::Manifest.manifest.models[self.profiler.item_name]
+ end
+
+ def model_belongs_to_manifest
+ self.model_manifest.associations.belongs_to[@belongs_to_manifest.model_name]
+ end
+
+ def profiler
+ @association.profiler
+ end
+
+ end
+ end
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module View
+ module ProfilerModule
+ module AssociationModule
+ class HasMany
+ attr :association, :has_many_manifest
+ def initialize association, has_many_manifest
+ @association = association
+ @has_many_manifest = has_many_manifest
+ end
+
+ def item
+ self.profiler.item
+ end
+
+ def has_many_model
+ @has_many_manifest.model
+ end
+
+ def filer
+ l = @has_many_manifest.list
+ list_result = @has_many_manifest.list.open(self.profiler.operators, {:id => self.item.id, :page => 1, :page_size => 3})
+ items = list_result.items
+ ::Manifest::View::Filer.new self.has_many_model.item_name, items, nil, self.profiler.operators
+ end
+
+ def profiler
+ @association.profiler
+ end
+
+ end
+ end
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module View
+ module ProfilerModule
+ module AssociationModule
+ class HasOne
+ attr :association, :column_name
+ def initialize association, belongs_to_name
+ @association = association
+ @belongs_to_name = belongs_to_name
+ end
+
+ def profiler
+ @association.profiler
+ end
+
+ def item
+ self.profiler.item
+ end
+
+ def parent_model
+ self.model_belongs_to_manifest.model
+ end
+
+ def parent_id
+ self.item.attributes[self.model_belongs_to_manifest.id_column]
+ end
+
+ def filer
+ filer = nil
+ begin
+ r = self.parent_model.show(self.parent_id, self.profiler.operators)
+ if r
+ filer = Manifest::View::Filer.new self.item.item_name, [r], nil, self.profiler.operators
+ end
+ rescue ActiveRecord::RecordNotFound, ActiveRecord::Forbidden
+ end
+ filer
+ end
+
+ def model_manifest
+ ::Manifest.manifest.models[@profiler.item_name]
+ end
+
+ def model_belongs_to_manifest
+ self.model_manifest.belongs_to[@belongs_to_name]
+ end
+
+ def template_dir
+ @profiler.template_dir
+ end
+
+ def template_file_name
+ "ssociations"
+ end
+
+ def template_name
+ self.template_dir + self.template_file_name
+ end
+
+ end
+ end
+ end
+ end
+end
--- /dev/null
+module Manifest
+ module View
+ module ProfilerModule
+ class Column
+ attr :profiler, :column_name
+ def initialize profiler, column_name
+ @profiler = profiler
+ @column_name = column_name
+ end
+
+ def label
+ self.item.class.human_attribute_name(@column_name)
+ end
+
+ def value
+ self.item.attributes[@column_name]
+ end
+
+ def note
+ end
+
+ def date?
+ case model_attribute_manifest.type
+ when 'datetime'
+ if self.value
+ true
+ else
+ false
+ end
+ else
+ false
+ end
+ end
+
+ def note?
+ if self.model_attribute_source_manifest
+ case self.model_attribute_source_manifest.type
+ when 'magic_number'
+ true
+ when 'model'
+ false
+ else
+ false
+ end
+ else
+ false
+ end
+ end
+
+ def select_item_name
+ self.model_attribute_source_manifest.select_item_name
+ end
+
+ def item
+ @profiler.item
+ end
+
+ def model_manifest
+ ::Manifest.manifest.models[@profiler.item_name]
+ end
+
+ def model_attribute_manifest
+ self.model_manifest.attributes[@column_name]
+ end
+
+ def model_attribute_source_manifest
+ self.model_attribute_manifest.source
+ end
+
+ def template_dir
+ @profiler.template_dir
+ end
+
+ def template_file_name
+ "column"
+ end
+
+ def template_name
+ self.template_dir + self.template_file_name
+ end
+
+ def value_template_dir
+ @profiler.template_dir + "column_value/"
+ end
+
+ def value_template_file_name
+ if self.date?
+ 'date'
+ else
+ 'default'
+ end
+ end
+
+ def value_template_name
+ self.value_template_dir + self.value_template_file_name
+ end
+
+ def note_template_dir
+ @profiler.template_dir + "column_note/"
+ end
+
+ def note_template_file_name
+ if self.note?
+ 'default'
+ else
+ 'none'
+ end
+ end
+
+ def note_template_name
+ self.note_template_dir + self.note_template_file_name
+ end
+
+ end
+ end
+ end
+end
+
--- /dev/null
+module Manifest
+ module View
+ module ProfilerModule
+ class Header
+ attr :profiler
+ def initialize profiler
+ @profiler = profiler
+ end
+
+ def filer
+ ::Manifest::View::Filer.new @profiler.item_name, [@profiler.item], nil, @profiler.operators
+ end
+
+ end
+
+ end
+ end
+end
+
+++ /dev/null
- class ProfilerView
- attr :filer_manifest, :item_name, :manifest, :filer_conf,
- :symbol, :caption, :summary, :icon, :date, :edit
- def initialize filer_manifest, items, operators, paginate
- @filer_manifest = filer_manifest
- @items = items
- @file_items = @items.map {|item|
- FileItem.new self, @filer_manifest
- }
- end
-
- def render view
- end
-
- def model_name
- @item_name
- end
-
- def model
- model_name.classify.constantize
- end
-
- end
-
- class ProfilerManager
- class Profiler
- def initialize item_name, item, operators, conf, manifest
- @item_name = item_name
- @item = item
- @operators = operators
- @conf = conf
- @manifest = manifest
-
- @lists = @manifest.profiler(@item_name).lists
- @belongs_to_conf = @manifest.profiler(@item_name).belongs_to
- @has_many_conf = @manifest.profiler(@item_name).has_many
- @has_one_conf = @manifest.profiler(@item_name).has_one
- end
-
- def modelize str
- str.classify.constantize
- end
-
- def header_filer
- @manifest.filer_managers[@item_name].open @item_name, [@item], @operators, nil
- end
-
- def each_column
- @conf['columns'].each do |column_name|
- column = Column.new @item_name, column_name, @item, @operators, @manifest
- yield column
- end
- end
-
- def parent_item parent_model, model_belongs_to_conf
- r = nil
- id_column = model_belongs_to_conf['id_column']
- begin
- r = parent_model.show(@item.attributes[id_column], @operators)
- rescue ActiveRecord::RecordNotFound, ActiveRecord::Forbidden
- end
- r
- end
-
- def each_belongs_to
- @belongs_to_conf.each do |association_model_name|
- model_belongs_to_conf = @manifest.model(@item_name).belongs_to[association_model_name]
- parent_model = self.modelize association_model_name
- parent = self.parent_item parent_model, model_belongs_to_conf
- if parent
- parent_filer = @manifest.filer_managers[parent_model.item_name].open parent_model.item_name, [parent], @operators, nil
- yield parent_filer
- end
- end
- end
-
- def each_has_many
- @has_many_conf.each do |profiler_list_name|
- raise "undefined lists for #{profiler_list_name} in #{@lists}\n" unless @lists[profiler_list_name]
- model_name = @lists[profiler_list_name]['model_name']
- list_name = @lists[profiler_list_name]['list_name']
- raise "undefined has_many list for #{model_name}::#{list_name}\nconf:#{@controller_conf}\n" unless @manifest.list_managers[model_name]
- list = @manifest.list_managers[model_name].open(list_name, 1, 3, @operators)
- items = list.items @item
-#p [model_name, list_name, @item, list.class, list.includes, list.where(@item )]
- has_many_filer = @manifest.filer_managers[model_name].open model_name, items, @operators, nil
- model = model_name.classify.constantize
- more_url = "/#{model.table_name}/#{list_name}/#{@item.id}"
- yield has_many_filer, more_url
- end
- end
-
- def each_has_one
- @has_one_conf.each do |profiler_list_name|
- raise "undefined lists for #{profiler_list_name} in #{@lists}\n" unless @lists[profiler_list_name]
- model_name = @lists[profiler_list_name]['model_name']
- list_name = @lists[profiler_list_name]['list_name']
- raise "undefined has_one list for #{model_name}::#{list_name}\nconf:#{@controller_conf}\n" unless @manifest.list_managers[model_name]
- list = @manifest.list_managers[model_name].open(list_name, 1, 1, @operators)
- items = list.items @item
- has_one_filer = @manifest.filer_managers[model_name].open model_name, items, @operators, nil
- yield has_one_filer
- end
- end
-
- end
-
- def initialize profiler_manifest
- @profiler_manifest = profiler_manifest
- @item_name = @profiler_manifest.item_name
- @manifest = profiler_manifest.manifest
- @profiler_conf = @profiler_manifest.conf
- end
-
- end
-
@controllers = Controller.manager(self, @manifest['controllers'])
@models = Model.manager(self, @manifest['models'])
@locals = @manifest['locals']
+ @lists = List.manager(self, @locals['lists'])
@filers = Filer.manager(self, @locals['filers'])
@profilers = Profiler.manager(self, @locals['profilers'])
@forms = Form.base_manager(self, @locals['forms'])
@forms.merge(Form.extend_manager(self, @locals['forms']))
- @lists = List.manager(self, @locals['lists'])
@system_resources.init
add_action
end
end
attr :model_name, :model_manifest,
- :attributes, :associations, :lists
+ :attributes, :associations, :tree, :lists
def initialize manifest, model_name, model_manifest
@manifest = manifest
@model_name = model_name
def set_default
@model_manifest['attributes'] ||= {}
@model_manifest['associations'] ||= {}
+ @model_manifest['tree'] ||= {}
@model_manifest['lists'] ||= {}
end
@model_manifest['attributes'].each {|attribute_name, attribute_manifest|
@attributes[attribute_name] = ModelModule::Attribute.new(self, attribute_name, attribute_manifest)
}
- @associations = {}
- @model_manifest['associations'].each {|association_name, association_manifest|
- @associations[association_name] = ModelModule::Association.new(self, association_name, association_manifest)
- }
+ @associations = ModelModule::Association.new(self, @model_manifest['associations'])
+ @tree = @model_manifest['tree']
@lists = {}
@model_manifest['lists'].each {|list_name, list_manifest|
@lists[list_name] = ModelModule::ListFactory.factory(self, list_name, list_manifest)
::Manifest.item_name_to_model @model_name
end
+ def tree_model_manifest tree_name
+ if tree_name
+ if @tree[tree_name]
+ r = ::Manifest.manifest.models[@tree[tree_name]]
+ raise "undefined tree_model for models > #{@model_name} > tree > #{tree_name}\n" unless r
+ r
+ else
+ nil
+ end
+ else
+ nil
+ end
+ end
+
end
end
module Manifest
module ModelModule
class Association
- attr :model, :association_name, :association_manifest,
+ include AssociationModule
+ attr :model, :association_manifest,
:belongs_to, :has_many, :has_one
- def initialize model, association_name, association_manifest
+ def initialize model, association_manifest
@model = model
- @association_name = association_name
@association_manifest = association_manifest
self.set_default
self.init
@id_column = @belongs_to_manifest['id_column']
end
+ def model
+ ::Manifest.item_name_to_model @model_name
+ end
+
def association_name
@association.association_name
end
def set_default
@has_many_manifest['model_name'] ||= @has_many_name.singularize
+ @has_many_manifest['foreign_key'] ||= @association.model_name + '_id'
end
def init
@model_name = @has_many_manifest['model_name']
- raise "undefined foreign_key for models > #{@association.model.model_name} > associations > has_many > #{@has_many_name}\n" unless @has_many_manifest['foreign_key']
@foreign_key = @has_many_manifest['foreign_key']
@through = @has_many_manifest['through']
end
+ def model
+ ::Manifest.item_name_to_model @model_name
+ end
+
def association_name
@association.association_name
end
def set_default
@has_one_manifest['model_name'] ||= @has_one_name
+ @has_one_manifest['foreign_key'] ||= @association.model_name + '_id'
end
def init
@model_name = @has_one_manifest['model_name']
- raise "undefined foreign_key for models > #{@association.model.model_name} > associations > has_one > #{@has_one_name}\n" unless @has_one_manifest['foreign_key']
@foreign_key = @has_one_manifest['foreign_key']
end
+ def model
+ ::Manifest.item_name_to_model @model_name
+ end
+
def association_name
@association.association_name
end
class Attribute
include AttributeModule
attr :model, :attribute_name, :attribute_manifest,
- :primary_key, :rules, :source
+ :type, :primary_key, :rules, :source
def initialize model, attribute_name, attribute_manifest
@model = model
@attribute_name = attribute_name
end
def init
+ @type = @attribute_manifest['type']
@primary_key = @attribute_manifest['primary_key']
@rules = @attribute_manifest['rules']
if @attribute_manifest['source']
require_dependency "manifest/model/list/public"
require_dependency "manifest/model/list/private"
require_dependency "manifest/model/list/system_resource"
-require_dependency "manifest/model/list/has_many"
-require_dependency "manifest/model/list/has_many_through"
require_dependency "manifest/model/list/filter"
require_dependency "manifest/model/list/through_filter"
-require_dependency "manifest/model/list/element_filter"
+require_dependency "manifest/model/list/foreign_filter"
require_dependency "manifest/model/list/play"
module Manifest
module ModelModule
include ListModule
@@types = {
'public' => PublicList, 'private' => PrivateList, 'system_resource' => SystemResourceList,
- 'has_many' => HasManyList, 'has_many_through' => HasManyThroughList, 'filter' => FilterList,
- 'through_filter' => ThroughFilterList, 'element_filter' => ElementFilterList,
+ 'filter' => FilterList, 'through_filter' => ThroughFilterList, 'foreign_filter' => ForeignFilterList,
'play' => PlayList
}
module ModelModule
module ListModule
class FilterList < Base
- attr :filter_key
+ attr :filter_key, :filter_item_name
def set_default
super
def init
super
+ @filter_item_name = @args['filter_item_name']
@filter_key = @args['filter_key']
end
module Manifest
module ModelModule
module ListModule
- class ElementFilterList < FilterList
+ class ForeignFilterList < FilterList
def set_default
super
+++ /dev/null
-module Manifest
- module ModelModule
- module ListModule
- class HasManyList < Base
- def initialize list, list_name, list_manifest
- super
- end
-
- def set_default
- super
- return
- option_manifest['association_name'] ||= 100
- end
-
- def init
- super
- return
- @list_list_conf = @manifest.list(@item_name).lists[list_name] || {}
- @association_name = @list_list_conf['association_name']
- @has_many_conf = @manifest.model(@item_name).associations['has_many'] || {}
- @association_conf = @has_many_conf[@association_name] || {}
- @association_model_name = @association_conf['model']
- @association_model = @association_model_name.classify.constantize
- @foreign_key = @association_conf['foreign_key']
- if @association_model.content?
- @owner_model = @association_model.owner_model
- @owner_table_name = @owner_model.table_name if @owner_model
- end
- end
-
- def where parent_item
- w = @association_model.list_where
- w += ' and ' unless w.blank?
- [w + @association_model.table_name + '.' + @foreign_key + ' = ?', parent_item.id]
- end
-
- def includes
- # @with_model_name ? {@with_model_name.classify.constantize.table_name => {}} : {}
- w = @owner_model ? {@owner_model.item_name => {}} : {}
- w.merge({})
- end
-
- def items parent_item
- @association_model.where(self.where(parent_item)).includes(self.includes).order(self.order).offset(@offset).limit(@page_size)
- end
-
- def paginate parent_item
- Kaminari.paginate_array(Array.new(@association_model.where(self.where(parent_item)).includes(self.includes).count, nil)).page(@offset).per(@page_size)
- end
-
- def self._add_action item_name, action_name, list_name, list_conf
- model = item_name.classify.constantize
- controller_name = model.plural + 'Controller'
- controller = controller_name.constantize
- association_name = list_conf['association_name']
- has_many_conf = Pettanr::Application::manifest.model(item_name).associations['has_many'] || {}
- association_conf = has_many_conf[association_name] || {}
- association_model_name = association_conf['model']
- return if controller.method_defined?(action_name)
- controller.define_method(action_name) do
- has_many_list item_name, list_name, association_model_name, params
- end
- end
- end
-
- end
- end
-end
+++ /dev/null
-module Manifest
- module ModelModule
- module ListModule
- class HasManyThroughList < Base
- attr :list, :list_name, :list_manifest,
- :belongs_to, :has_many, :has_one
-
- def set_default
- super
- end
-
- def init
- super
- return
- @list_list_conf = @manifest.list(@item_name).lists[list_name] || {}
- @association_name = @list_list_conf['association_name']
- @has_many_conf = @manifest.model(@item_name).associations['has_many'] || {}
- @association_conf = @has_many_conf[@association_name] || {}
- @association_through_model_name = @association_conf['through']
- @association_through_model = @association_through_model_name.classify.constantize
- @association_model_name = @association_conf['model']
- @association_model = @association_model_name.classify.constantize
- @foreign_key = @association_conf['foreign_key']
- if @association_model.content?
- @owner_model = @association_model.owner_model
- @owner_table_name = @owner_model.table_name if @owner_model
- end
- end
-
- def where root_item
- w = @association_model.list_where
- w += ' and ' unless w.blank?
- [w + @association_through_model.table_name + '.' + @foreign_key + ' = ?', root_item.id]
- end
-
- def includes
- {@association_through_model.table_name => {@item_name => {}}}
- end
-
- def items root_item
- @association_model.where(self.where(root_item)).includes(self.includes).order(self.order).offset(@offset).limit(@page_size)
- end
-
- def paginate root_item
- Kaminari.paginate_array(Array.new(@association_model.where(self.where(root_item)).includes(self.includes).count, nil)).page(@offset).per(@page_size)
- end
-
- def self.add_action item_name, action_name, list_name, list_conf
- return
- end
- end
-
- end
- end
-end
module ModelModule
module ListModule
class ThroughFilterList < FilterList
- attr :list, :list_name, :list_manifest
+ attr :through
def set_default
super
def init
super
- return
- @through = @list_list_conf['through']
- end
-
- def includes
- {@through => {@from => {}} }
- end
-
- def where filter_item
- w = @model.list_where
- w += ' and ' unless w.blank?
- [w + @through + '.' + @filter_key + ' = ?', filter_item.id]
+ @through = @args['through']
end
end
end
attr :profiler_manifest, :item_name, :manifest,
- :columns, :lists, :associations
+ :column_names, :lists, :associations
def initialize manifest, item_name, profiler_manifest
@manifest = manifest
@item_name = item_name
end
def set_default
- @profiler_manifest['columns'] ||= []
+ @profiler_manifest['column_names'] ||= []
@profiler_manifest['lists'] ||= {}
@profiler_manifest['associations'] ||= {}
end
def init
- @columns = @profiler_manifest['columns']
+ @column_names = @profiler_manifest['column_names']
@lists = {}
@profiler_manifest['lists'].each {|list_name, list_manifest|
@lists[list_name] = ProfilerModule::List.new(self, list_name, list_manifest)
@associations = ProfilerModule::Association.new(self, @profiler_manifest['associations'])
end
- def open item, operators
- ProfilerView.new @item_name, item, operators, @profiler_conf, @manifest
+ def each_column
+ @column_names
end
end
@profiler.model_name
end
- def model_manifest
+ def profiler_manifest
@profiler.profiler_manifest
end
def init
end
+ def model
+ ::Manifest::item_name_to_model @model_name
+ end
+
def association_name
@association.association_name
end
module ProfilerModule
module AssociationModule
class HasMany
- attr :association, :list_name
- def initialize association, list_name
+ attr :association, :profiler_list_name,
+ :model_name, :list_name, :list
+ def initialize association, profiler_list_name
@association = association
- @list_name = list_name
+ @profiler_list_name = profiler_list_name
self.set_default
self.init
end
end
def init
+ if list_manifest = self.profiler.lists[@profiler_list_name]
+ @model_name = list_manifest.model_name
+ @list_name = list_manifest.list_name
+ else
+ n = @profiler_list_name.split '.'
+ if n.size > 1
+ @model_name = n[0]
+ @list_name = n[1]
+ else
+ raise "undefined list for profilers > #{self.profiler.item_name} > lists > #{@my_name}\n" unless @list_manifest['model_name']
+ end
+ end
+ @my_list = ::Manifest.manifest.lists[@model_name]
+ raise "undefined my_list for profilers > #{self.profiler.item_name} > lists > #{@my_name} ... #{@model_name}\n" unless @my_list
+ @list = @my_list[@list_name]
+ raise "undefined list for profilers > #{self.profiler.item_name} > lists > #{@my_name} ... #{@list_name}\n" unless @list
+ end
+
+ def model
+ ::Manifest::item_name_to_model @model_name
end
def association_name
@association.association_name
end
+ def profiler
+ @association.profiler
+ end
+
+ def profiler_manifest
+ @association.profiler_manifest
+ end
+
end
end
def init
end
+ def model
+ ::Manifest::item_name_to_model @model_name
+ end
+
def association_name
@association.association_name
end
end
def set_default
- list_manifest['model_name'] ||= {}
- list_manifest['list_name'] ||= {}
+ raise "undefined model_name for profilers > #{self.profiler_name} > lists > #{@my_name}\n" unless @list_manifest['model_name']
+ raise "undefined list_name for profilers > #{self.profiler_name} > lists > #{@my_name}\n" unless @list_manifest['list_name']
end
def init
@profiler.item_name
end
- def filer_manifest
+ def profiler_manifest
@profiler.profiler_manifest
end
self.owner_type.to_s + '_id'
end
+ def self.public_list_where
+ ''
+ end
+
def self.edit content_id, operators
content = self.find content_id, self.show_opt
raise ActiveRecord::Forbidden unless content.own?(operators)
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_author": {\r
}\r
},\r
"show": {\r
- "type": "show",\r
- "name": "show"\r
+ "type": "show"\r
},\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_author": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_panel": {\r
"by_scroll": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_panel": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_author": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_author": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_comic": {\r
"list_name": "play"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_author": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_story": {\r
"by_sheet": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_story": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_story": {\r
"list_name": "play"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_story": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_sheet": {\r
"by_panel": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_sheet": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_scroll": {\r
"by_speech_balloon_template": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_scroll": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_panel": {\r
"by_author": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_panel": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_panel": {\r
"by_author": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_panel": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_writing_format": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_writing_format": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
}\r
}\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_panel": {\r
"by_author": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_panel": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_panel": {\r
"by_author": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_panel": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
}\r
}\r
},\r
- "pictures": {},\r
+ "pictures": {\r
+ "actions": {\r
+ "show": {\r
+ "type": "show"\r
+ }\r
+ }\r
+ },\r
"resource_pictures": {\r
"actions": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_license": {\r
"by_artist": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_license": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
}\r
}\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_system_picture": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_system_picture": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
}\r
}\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"by_license_group": {\r
"by_system_picture": {\r
"type": "list"\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"count_by_license_group": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"scrolls": {\r
"list_name": "ground_colors"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"new": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"resource_pictures": {\r
"list_name": "resource_pictures"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
"new": {\r
"index": {\r
"type": "list",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
},\r
+ "show": {\r
+ "type": "show"\r
+ },\r
"count": {\r
"type": "count",\r
"args": {\r
- "list_name": "public_list"\r
+ "list_name": "public"\r
}\r
}\r
}\r
"type": "list",\r
"args": {\r
"item_name": "scroll",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"scroll_panels": {\r
"type": "list",\r
"args": {\r
"item_name": "scroll_panel",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"comics": {\r
"type": "list",\r
"args": {\r
"item_name": "comic",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"stories": {\r
"type": "list",\r
"args": {\r
"item_name": "story",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"story_sheets": {\r
"type": "list",\r
"args": {\r
"item_name": "story_sheet",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"sheets": {\r
"type": "list",\r
"args": {\r
"item_name": "sheet",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"sheet_panels": {\r
"type": "list",\r
"args": {\r
"item_name": "sheet_panel",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"panels": {\r
"type": "list",\r
"args": {\r
"item_name": "panel",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"panel_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "panel_picture",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"speech_balloons": {\r
"type": "list",\r
"args": {\r
"item_name": "speech_balloon",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"speeches": {\r
"type": "list",\r
"args": {\r
"item_name": "speech",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"balloons": {\r
"type": "list",\r
"args": {\r
"item_name": "balloon",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"ground_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "ground_picture",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"ground_colors": {\r
"type": "list",\r
"args": {\r
"item_name": "ground_color",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"original_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "original_picture",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
},\r
"resource_pictures": {\r
"type": "list",\r
"args": {\r
"item_name": "resource_picture",\r
- "list_name": "private_list"\r
+ "list_name": "private"\r
}\r
}\r
}\r
},\r
"models": {\r
"scroll": {\r
- "class_name": "Scroll",\r
- "table_name": "scrolls",\r
"associations": {\r
"belongs_to": {\r
- "author": {\r
- "id_column": "author_id"\r
- }\r
+ "author": {}\r
},\r
"has_many": {\r
- "scroll_panels": {\r
- "foreign_key": "scroll_id",\r
- "model_name": "scroll_panel"\r
- },\r
+ "scroll_panels": {},\r
"panels": {\r
- "through": "scroll_panel",\r
- "foreign_key": "scroll_id",\r
- "model_name": "panel"\r
+ "through": "scroll_panel"\r
}\r
}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_author": {\r
"type": "filter",\r
- "args": {\r
- "filter_item_name": "author",\r
- "filter_key": "author_id"\r
- }\r
+ "args": {}\r
},\r
"by_panel": {\r
"type": "through_filter",\r
"args": {\r
- "filter_item_name": "panel",\r
- "through": "scroll_panels",\r
- "filter_key": "panel_id"\r
+ "through": "scroll_panels"\r
}\r
},\r
"play": {\r
}\r
},\r
"scroll_panel": {\r
- "class_name": "ScrollPanel",\r
- "table_name": "scroll_panels",\r
"associations": {\r
"belongs_to": {\r
- "panel": {\r
- "id_column": "panel_id"\r
- },\r
- "scroll": {\r
- "id_column": "scroll_id"\r
- }\r
+ "panel": {},\r
+ "scroll": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "scroll"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_scroll": {\r
}\r
},\r
"comic": {\r
- "class_name": "Comic",\r
- "table_name": "comics",\r
"associations": {\r
"belongs_to": {\r
- "author": {\r
- "id_column": "author_id"\r
- }\r
+ "author": {}\r
},\r
"has_many": {\r
- "stories": {\r
- "foreign_key": "comic_id",\r
- "model_name": "story"\r
- }\r
- },\r
- "has_many_through": {}\r
+ "stories": {}\r
+ }\r
},\r
"attributes": {\r
"id": {\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_author": {\r
}\r
},\r
"story": {\r
- "class_name": "Story",\r
- "table_name": "stories",\r
"associations": {\r
"belongs_to": {\r
- "comic": {\r
- "id_column": "comic_id"\r
- }\r
+ "comic": {}\r
},\r
"has_many": {\r
- "story_sheets": {\r
- "foreign_key": "story_id",\r
- "model_name": "story_sheet"\r
- },\r
+ "story_sheets": {},\r
"sheets": {\r
- "through": "story_sheets",\r
- "foreign_key": "story_id",\r
- "model_name": "sheet"\r
+ "through": "story_sheets"\r
}\r
}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "comic"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_comic": {\r
"type": "filter"\r
},\r
"by_sheet": {\r
- "type": "through_filter"\r
+ "type": "through_filter",\r
+ "args": {\r
+ "through": "story_sheets"\r
+ }\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter"\r
},\r
"play": {\r
"type": "play"\r
}\r
},\r
"story_sheet": {\r
- "class_name": "StorySheet",\r
- "table_name": "story_sheets",\r
"associations": {\r
"belongs_to": {\r
- "story": {\r
- "id_column": "story_id"\r
- },\r
- "sheet": {\r
- "id_column": "sheet_id"\r
- }\r
+ "story": {},\r
+ "sheet": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "story"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_story": {\r
}\r
},\r
"sheet": {\r
- "class_name": "Sheet",\r
- "table_name": "sheets",\r
"associations": {\r
"belongs_to": {\r
- "author": {\r
- "id_column": "author_id"\r
- }\r
+ "author": {}\r
},\r
"has_many": {\r
- "story_sheets": {\r
- "foreign_key": "story_id",\r
- "model_name": "story_sheet"\r
- },\r
+ "story_sheets": {},\r
"stories": {\r
- "through": "story_sheets",\r
- "foreign_key": "sheet_id",\r
- "model_name": "story"\r
- },\r
- "sheet_panels": {\r
- "foreign_key": "sheet_id",\r
- "model_name": "sheet_panel"\r
+ "through": "story_sheets"\r
},\r
+ "sheet_panels": {},\r
"panels": {\r
- "through": "sheet_panels",\r
- "foreign_key": "sheet_id",\r
- "model_name": "panel"\r
+ "through": "sheet_panels"\r
}\r
}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_story": {\r
- "type": "through_filter"\r
+ "type": "through_filter",\r
+ "args": {\r
+ "through": "story_sheets"\r
+ }\r
},\r
"by_panel": {\r
- "type": "through_filter"\r
+ "type": "through_filter",\r
+ "args": {\r
+ "through": "sheet_panels"\r
+ }\r
},\r
"by_author": {\r
"type": "filter"\r
}\r
},\r
"sheet_panel": {\r
- "class_name": "SheetPanel",\r
- "table_name": "sheet_panels",\r
"associations": {\r
"belongs_to": {\r
- "sheet": {\r
- "id_column": "sheet_id"\r
- },\r
- "panel": {\r
- "id_column": "panel_id"\r
- }\r
+ "sheet": {},\r
+ "panel": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "sheet"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_sheet": {\r
}\r
},\r
"panel": {\r
- "class_name": "Panel",\r
- "table_name": "panels",\r
"associations": {\r
"belongs_to": {\r
- "author": {\r
- "id_column": "author_id"\r
- }\r
+ "author": {}\r
},\r
"has_many": {\r
- "scroll_panels": {\r
- "foreign_key": "panel_id",\r
- "model_name": "scroll_panel"\r
- },\r
+ "scroll_panels": {},\r
"scrolls": {\r
- "through": "scroll_panels",\r
- "foreign_key": "panel_id",\r
- "model_name": "scroll"\r
- },\r
- "sheet_panels": {\r
- "foreign_key": "panel_id",\r
- "model_name": "sheet_panel"\r
+ "through": "scroll_panels"\r
},\r
+ "sheet_panels": {},\r
"sheets": {\r
- "through": "sheet_panels",\r
- "foreign_key": "panel_id",\r
- "model_name": "sheet"\r
- },\r
- "panel_pictures": {\r
- "foreign_key": "panel_id",\r
- "model_name": "panel_picture"\r
- },\r
- "speech_balloons": {\r
- "foreign_key": "panel_id",\r
- "model_name": "speech_balloon"\r
+ "through": "sheet_panels"\r
},\r
- "ground_pictures": {\r
- "foreign_key": "panel_id",\r
- "model_name": "ground_picture"\r
- },\r
- "ground_colors": {\r
- "foreign_key": "panel_id",\r
- "model_name": "ground_color"\r
- }\r
+ "panel_pictures": {},\r
+ "speech_balloons": {},\r
+ "ground_pictures": {},\r
+ "ground_colors": {}\r
}\r
},\r
"attributes": {\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_scroll": {\r
- "type": "through_filter"\r
+ "type": "through_filter",\r
+ "args": {\r
+ "through": "scroll_panels"\r
+ }\r
},\r
"by_sheet": {\r
- "type": "through_filter"\r
+ "type": "through_filter",\r
+ "args": {\r
+ "through": "sheet_panels"\r
+ }\r
},\r
"by_author": {\r
"type": "filter"\r
}\r
},\r
"panel_picture": {\r
- "class_name": "PanelPicture",\r
- "table_name": "panel_pictures",\r
"associations": {\r
"belongs_to": {\r
- "panel": {\r
- "id_column": "panel_id"\r
- }\r
+ "panel": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "panel",\r
+ "panel": "panel"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_panel": {\r
- "type": "filter"\r
+ "type": "filter",\r
+ "args": {\r
+ "where_name": "public_list_where"\r
+ }\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter",\r
+ "args": {\r
+ "tree_name": "owner"\r
+ }\r
}\r
}\r
},\r
"speech_balloon": {\r
- "class_name": "SpeechBalloon",\r
- "table_name": "speech_balloons",\r
"extend": "classname",\r
"associations": {\r
"belongs_to": {\r
- "panel": {\r
- "id_column": "panel_id"\r
- }\r
+ "panel": {}\r
},\r
"has_many": {},\r
"has_one": {\r
- "balloon": {\r
- "foreign_key": "speech_balloon_id",\r
- "model_name": "balloon"\r
- },\r
- "speech": {\r
- "foreign_key": "speech_balloon_id",\r
- "model_name": "speech"\r
- }\r
+ "balloon": {},\r
+ "speech": {}\r
}\r
},\r
"attributes": {\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "panel",\r
+ "panel": "panel"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_panel": {\r
"type": "filter"\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter"\r
}\r
}\r
},\r
"balloon": {\r
- "class_name": "Balloon",\r
- "table_name": "balloons",\r
"associations": {\r
"belongs_to": {\r
- "speech_balloon": {\r
- "id_column": "speech_balloon_id"\r
- },\r
- "system_picture": {\r
- "id_column": "system_picture_id"\r
- }\r
+ "speech_balloon": {},\r
+ "system_picture": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "speech_balloon",\r
+ "panel": "speech_balloon"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_panel": {\r
"type": "filter"\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter"\r
}\r
}\r
},\r
"speech": {\r
- "class_name": "Speech",\r
- "table_name": "speeches",\r
"associations": {\r
"belongs_to": {\r
- "speech_balloon": {\r
- "id_column": "speech_balloon_id"\r
- },\r
- "writing_format": {\r
- "id_column": "writing_format_id"\r
- }\r
+ "speech_balloon": {},\r
+ "writing_format": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "speech_balloon",\r
+ "panel": "speech_balloon"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
"by_speech_balloon": {\r
}\r
},\r
"ground_picture": {\r
- "class_name": "GroundPicture",\r
- "table_name": "ground_pictures",\r
"associations": {\r
"belongs_to": {\r
- "panel": {\r
- "id_column": "panel_id"\r
- }\r
+ "panel": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "panel",\r
+ "panel": "panel"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_panel": {\r
"type": "filter"\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter"\r
}\r
}\r
},\r
"ground_color": {\r
- "class_name": "GroundColor",\r
- "table_name": "ground_colors",\r
"associations": {\r
"belongs_to": {\r
- "panel": {\r
- "id_column": "panel_id"\r
- }\r
+ "panel": {}\r
},\r
"has_many": {}\r
},\r
"type": "datetime"\r
}\r
},\r
+ "tree": {\r
+ "owner": "panel",\r
+ "panel": "panel"\r
+ },\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_panel": {\r
"type": "filter"\r
},\r
"by_author": {\r
- "type": "element_filter"\r
+ "type": "foreign_filter"\r
}\r
}\r
},\r
"original_picture": {\r
- "class_name": "OriginalPicture",\r
- "table_name": "original_pictures",\r
"associations": {\r
"belongs_to": {\r
- "artist": {\r
- "id_column": "artist_id"\r
- }\r
+ "artist": {}\r
},\r
"has_many": {\r
- "pictures": {\r
- "foreign_key": "original_picture_id",\r
- "model_name": "picture"\r
- }\r
+ "pictures": {}\r
},\r
"has_one": {\r
- "resource_picture": {\r
- "foreign_key": "original_picture_id",\r
- "model_name": "resource_picture"\r
- }\r
+ "resource_picture": {}\r
}\r
},\r
"attributes": {\r
}\r
},\r
"lists": {\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
}\r
}\r
},\r
"picture": {\r
- "class_name": "Picture",\r
- "table_name": "pictures",\r
"associations": {\r
"belongs_to": {\r
- "license": {\r
- "id_column": "license_id"\r
- },\r
- "artist": {\r
- "id_column": "artist_id"\r
- }\r
+ "license": {},\r
+ "artist": {}\r
},\r
"has_many": {},\r
"has_one": {}\r
}\r
},\r
"resource_picture": {\r
- "class_name": "ResourcePicture",\r
- "table_name": "resource_pictures",\r
"associations": {\r
"belongs_to": {\r
- "original_picture": {\r
- "id_column": "original_picture_id"\r
- },\r
- "license": {\r
- "id_column": "license_id"\r
- },\r
- "artist": {\r
- "id_column": "artist_id"\r
- }\r
+ "original_picture": {},\r
+ "license": {},\r
+ "artist": {}\r
},\r
"has_many": {},\r
"has_one": {}\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
- "private_list": {\r
+ "private": {\r
"type": "private"\r
},\r
"by_license": {\r
}\r
},\r
"speech_balloon_template": {\r
- "class_name": "SpeechBalloonTemplate",\r
- "table_name": "speech_balloon_templates",\r
"associations": {\r
"belongs_to": {\r
- "system_picture": {\r
- "id_column": "system_picture_id"\r
- }\r
+ "system_picture": {}\r
},\r
"has_many": {\r
- "speech_balloons": {\r
- "foreign_key": "speech_balloon_template_id",\r
- "model_name": "speech_balloon"\r
- },\r
+ "speech_balloons": {},\r
"panels": {\r
- "through": "speech_balloons",\r
- "foreign_key": "speech_balloon_template_id",\r
- "model_name": "panel"\r
+ "through": "speech_balloons"\r
}\r
},\r
"has_one": {}\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
"select_items": {\r
}\r
},\r
"writing_format": {\r
- "class_name": "WritingFormat",\r
- "table_name": "writing_formats",\r
"associations": {\r
"belongs_to": {\r
- "system_picture": {\r
- "id_column": "system_picture_id"\r
- }\r
+ "system_picture": {}\r
},\r
"has_many": {\r
- "speeches": {\r
- "foreign_key": "writing_format_id",\r
- "model_name": "speech"\r
- }\r
+ "speeches": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
"select_items": {\r
}\r
},\r
"license_group": {\r
- "class_name": "LicenseGroup",\r
- "table_name": "license_groups",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
- "licenses": {\r
- "foreign_key": "license_group_id",\r
- "model_name": "license"\r
- }\r
+ "licenses": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
"select_items": {\r
}\r
},\r
"license": {\r
- "class_name": "License",\r
- "table_name": "licenses",\r
"associations": {\r
"belongs_to": {\r
- "license_group": {\r
- "id_column": "license_group_id"\r
- },\r
- "system_picture": {\r
- "id_column": "system_picture_id"\r
- }\r
+ "license_group": {},\r
+ "system_picture": {}\r
},\r
"has_many": {\r
- "resource_pictures": {\r
- "foreign_key": "license_id",\r
- "model_name": "resource_picture"\r
- }\r
+ "resource_pictures": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
},\r
"by_license_group": {\r
}\r
},\r
"author": {\r
- "class_name": "Author",\r
- "table_name": "authors",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
- "scrolls": {\r
- "foreign_key": "author_id",\r
- "model_name": "scroll"\r
- },\r
- "comics": {\r
- "foreign_key": "author_id",\r
- "model_name": "comic"\r
- },\r
- "stories": {\r
- "foreign_key": "author_id",\r
- "model_name": "story"\r
- },\r
- "sheets": {\r
- "foreign_key": "author_id",\r
- "model_name": "sheet"\r
- },\r
- "panels": {\r
- "foreign_key": "author_id",\r
- "model_name": "panel"\r
- }\r
+ "scrolls": {},\r
+ "comics": {},\r
+ "stories": {},\r
+ "sheets": {},\r
+ "panels": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
}\r
}\r
},\r
"artist": {\r
- "class_name": "Artist",\r
- "table_name": "artists",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
- "resource_pictures": {\r
- "foreign_key": "artist_id",\r
- "model_name": "resource_picture"\r
- }\r
+ "resource_pictures": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
}\r
}\r
},\r
"system_picture": {\r
- "class_name": "SystemPicture",\r
- "table_name": "system_pictures",\r
"associations": {\r
"belongs_to": {},\r
"has_many": {\r
- "balloons": {\r
- "foreign_key": "system_picture_id",\r
- "model_name": "balloon"\r
- },\r
- "balloon_templates": {\r
- "foreign_key": "system_picture_id",\r
- "model_name": "balloon_template"\r
- },\r
- "licenses": {\r
- "foreign_key": "system_picture_id",\r
- "model_name": "license"\r
- }\r
+ "balloons": {},\r
+ "speech_balloon_templates": {},\r
+ "licenses": {}\r
},\r
"has_one": {}\r
},\r
}\r
},\r
"lists": {\r
- "public_list": {\r
+ "public": {\r
"type": "public"\r
}\r
}\r
"list_name": "by_scroll"\r
}\r
},\r
- "columns": [\r
+ "column_names": [\r
"id",\r
"title",\r
"description",\r
},\r
"system_picture": {\r
"lists": {\r
- "speech_balloon_templates.by_system_picture": {\r
- "model_name": "speech_balloon_template",\r
- "list_name": "by_system_picture"\r
- },\r
"licenses.by_system_picture": {\r
"model_name": "license",\r
"list_name": "by_system_picture"\r
"associations": {\r
"belongs_to": [],\r
"has_many": [\r
- "speech_balloon_templates.by_system_picture",\r
"licenses.by_system_picture"\r
],\r
"has_one": []\r
},\r
"lists": {\r
"scroll": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_author": {},\r
"by_panel": {},\r
"play": {}\r
},\r
"scroll_panel": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_scroll": {},\r
"by_panel": {}\r
},\r
"comic": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_author": {}\r
},\r
"story": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_comic": {},\r
"by_sheet": {},\r
- "by_author": {\r
- "type": "element_filter",\r
- "args": {\r
- "from": "author",\r
- "filter_key": "author_id"\r
- }\r
- },\r
- "play": {\r
- "type": "play",\r
- "args": {\r
- "model": "story_sheet",\r
- "filter_key": "story_id"\r
- }\r
- }\r
+ "by_author": {},\r
+ "play": {}\r
},\r
"story_sheet": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_story": {},\r
"by_sheet": {}\r
},\r
"sheet": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_story": {},\r
"by_panel": {},\r
"by_author": {},\r
- "play": {\r
- "type": "play",\r
- "args": {\r
- "model": "sheet_panel",\r
- "filter_key": "sheet_id"\r
- }\r
- }\r
+ "play": {}\r
},\r
"sheet_panel": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_sheet": {},\r
"by_panel": {}\r
},\r
"panel": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_scroll": {},\r
"by_sheet": {},\r
"by_author": {},\r
- "by_speech_balloon_template": {\r
- "type": "through_filter",\r
- "args": {\r
- "from": "speech_balloon_template",\r
- "through": "speech_balloons",\r
- "filter_key": "speech_balloon_template_id"\r
- }\r
- }\r
+ "by_speech_balloon_template": {}\r
},\r
"panel_picture": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_panel": {},\r
- "by_author": {\r
- "where": "by_author_where",\r
- "includes": "by_author_includes"\r
- }\r
+ "by_author": {}\r
},\r
"speech_balloon": {\r
- "public_list": {},\r
- "private_list": {},\r
+ "public": {},\r
+ "private": {},\r
"by_panel": {},\r
- "by_speech_balloon_template": {\r
- "type": "filter",\r
- "args": {\r
- "from": "speech_balloon_template",\r
- "filter_key": "speech_balloon_template_id"\r
- }\r
- },\r
+ "by_speech_balloon_template": {},\r
"by_author": {}\r
},\r
"speech": {\r
- "public_list": {},\r
- "by_speech_balloon": {\r
- "type": "filter",\r
- "args": {\r
- "from": "speech_balloon",\r
- "includes": {\r
- "speech_balloon": {\r
- "panel": {}\r
- }\r
- },\r
- "filter_key": "speech_balloon_id"\r
- }\r
- },\r
- "by_writing_format": {\r
- "type": "filter",\r
- "args": {\r
- "from": "writing_format",\r
- "filter_key": "writing_format_id"\r
- }\r
- }\r
+ "public": {},\r
+ "by_speech_balloon": {},\r
+ "by_writing_format": {}\r
},\r
"balloon": {\r
- "public_list": {},\r
- "by_speech_balloon": {\r
- "type": "filter",\r
- "args": {\r
- "from": "speech_balloon",\r
- "includes": {\r
- "speech_balloon": {\r
- "panel": {}\r
- }\r
- },\r
- "filter_key": "speech_balloon_id"\r
- }\r
- }\r
+ "public": {},\r
+ "by_speech_balloon": {}\r
},\r
"ground_picture": {\r
- "public_list": {},\r
- "private_list": {},\r
- "by_panel": {\r
- "type": "filter",\r
- "args": {\r
- "from": "panel",\r
- "filter_key": "panel_id"\r
- }\r
- },\r
- "by_author": {\r
- "type": "element_filter",\r
- "args": {\r
- "from": "author",\r
- "filter_key": "author_id"\r
- }\r
- }\r
+ "public": {},\r
+ "private": {},\r
+ "by_panel": {},\r
+ "by_author": {}\r
},\r
"ground_color": {\r
- "public_list": {},\r
- "private_list": {},\r
- "by_panel": {\r
- "type": "filter",\r
- "args": {\r
- "from": "panel",\r
- "filter_key": "panel_id"\r
- }\r
- },\r
- "by_author": {\r
- "type": "element_filter",\r
- "args": {\r
- "from": "author",\r
- "filter_key": "author_id"\r
- }\r
- }\r
+ "public": {},\r
+ "private": {},\r
+ "by_panel": {},\r
+ "by_author": {}\r
},\r
"original_picture": {\r
- "private_list": {}\r
+ "private": {}\r
},\r
"picture": {},\r
"resource_picture": {\r
- "public_list": {},\r
- "private_list": {},\r
- "by_license": {\r
- "type": "filter",\r
- "args": {\r
- "from": "license",\r
- "filter_key": "license_id"\r
- }\r
- },\r
+ "public": {},\r
+ "private": {},\r
+ "by_license": {},\r
"by_artist": {}\r
},\r
"speech_balloon_template": {\r
- "public_list": {},\r
- "select_items": {\r
- "type": "system_resource"\r
- }\r
+ "public": {},\r
+ "select_items": {}\r
},\r
"writing_format": {\r
- "public_list": {},\r
- "select_items": {\r
- "type": "system_resource"\r
- },\r
+ "public": {},\r
+ "select_items": {},\r
"by_system_picture": {}\r
},\r
"license_group": {\r
- "public_list": {},\r
- "select_items": {\r
- "type": "system_resource"\r
- }\r
+ "public": {},\r
+ "select_items": {}\r
},\r
"license": {\r
- "public_list": {},\r
+ "public": {},\r
"by_license_group": {},\r
"by_system_picture": {}\r
},\r
"author": {\r
- "public_list": {}\r
+ "public": {}\r
},\r
"artist": {\r
- "public_list": {}\r
+ "public": {}\r
},\r
"system_picture": {\r
- "public_list": {}\r
+ "public": {}\r
}\r
},\r
"elements": [\r