class Locmare.ProfilerModule.AssociationModule.HasOne extends Backbone.View tagName: 'div' initialize: (options) -> @association = options.association @has_one_manifest = options.has_one_manifest @filer = null controller = Manifest.manifest().controllers[@has_one_manifest.table_name] action = controller.actions[@has_one_manifest.list_name] @list = Locmare.ListGroup.list(@has_one_manifest.item_name, @has_one_manifest.list_name) params = {id: @item().get('id')} _this = this @list.open(@profiler().operators, params, action, {}, (page_status) -> _this.filer = new Locmare.Filer({ item_name: _this.has_one_model().item_name(), items: _this.list.models, pager: _this.pager, operators: _this.profiler().operators }) _this.render() ) render: () -> this.$el.html('') if @filer this.$el.html(@filer.render().el) this item: () -> @profiler().item has_one_model: () -> @has_one_manifest.model() profiler: () -> @association.profiler