1 class Locmare.ProfilerModule.AssociationModule.HasOne extends Backbone.View
\r
4 initialize: (options) ->
\r
5 @association = options.association
\r
6 @has_one_manifest = options.has_one_manifest
\r
8 controller = Manifest.manifest().controllers[@has_one_manifest.table_name]
\r
9 action = controller.actions[@has_one_manifest.list_name]
\r
10 @list = Locmare.ListGroup.list(@has_one_manifest.item_name, @has_one_manifest.list_name)
\r
11 params = {id: @item().get('id')}
\r
13 @list.open(@profiler().operators, params, action, {}, (page_status) ->
\r
14 _this.filer = new Locmare.Filer({
\r
15 item_name: _this.has_one_model().item_name(),
\r
16 items: _this.list.models,
\r
17 pager: _this.pager,
\r
18 operators: _this.profiler().operators
\r
26 this.$el.html(@filer.render().el)
\r
32 has_one_model: () ->
\r
33 @has_one_manifest.model()
\r
36 @association.profiler
\r