this\r
\r
my_class: () ->\r
- Pettanr[@constructor.name]\r
+ @constructor\r
\r
@my_peta: () ->\r
return null if not Manifest.manifest().items\r
'Name'\r
\r
@plural: () ->\r
- 'Names'\r
+ table_name = Manifest.manifest().pluralize @item_name()\r
+ Pettanr.camelize(table_name)\r
\r
@class_name: () ->\r
@singular()\r
@parent_model: () ->\r
null\r
\r
+ @has_picture: () ->\r
+ false\r
+ \r
@path_name: (with_engine = false) ->\r
@table_name()\r
\r
#InstanceMethods\r
\r
singular: () ->\r
- Pettanr[@constructor.name].singular()\r
+ @my_class().singular()\r
\r
plural: () ->\r
- Pettanr[@constructor.name].plural()\r
+ @my_class().plural()\r
\r
item_name: () ->\r
@my_class().item_name()\r
@item_name()\r
\r
boosts: (level) ->\r
- _this = this\r
c = @my_class().my_peta().boost\r
- _.each c, (boost_manifest, boost_name) ->\r
- next if level == 'read' and boost_manifest.level == 'post'\r
- _this.boost boost_manifest\r
+ _.each c, (boost_manifest, boost_name) =>\r
+ return if level == 'read' and boost_manifest.level == 'post'\r
+ @boost boost_manifest\r
\r
boost: (boost_manifest) ->\r
@boosters ||= {}\r
- @boosters[boost_manifest.name] ||= new Locmare.Booster(boost_manifest, this)\r
+ @boosters[boost_manifest.name] = new Locmare.Booster(boost_manifest, this)\r
+ # fetched item is not cleared . force write booster\r
+ #@boosters[boost_manifest.name] ||= new Locmare.Booster(boost_manifest, this)\r
\r
boosters: () ->\r
@boosters ||= {}\r
return false if not operators.is_resource_reader()\r
true\r
\r
+ icon_view: (half) ->\r
+ new Pettanr.Views[@my_class().singular()].Icon({item: this, half: half})\r
+ \r
+ @index_url: () ->\r
+ Pettanr.url(@table_name(), 'index', {id: null})\r
+ \r
+ index_url: () ->\r
+ @my_class().index_url()\r
+ \r
+ list_url: (action_name = 'index') ->\r
+ Pettanr.url(@table_name(), action_name, {id: @get('id')})\r
+ \r
+ show_url: () ->\r
+ Pettanr.url(@table_name(), 'show', {id: @get('id')})\r
+ \r
+ prof_url: () ->\r
+ Pettanr.url(@table_name(), 'show', {id: @get('id'), format: 'prof'})\r
+ \r
+ edit_url: () ->\r
+ Pettanr.url(@table_name(), 'edit', {id: @get('id')})\r
+ \r
+ destroy_url: () ->\r
+ Pettanr.url(@table_name(), 'destroy', {id: @get('id')})\r
+ \r
is_editize: () ->\r
@editor\r
\r