caboose-rets 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,224 +1,224 @@
1
1
  <%
2
2
  p = @property
3
3
  is_custom_property = p.id > 1000000
4
- attributes = [
5
- 'acreage',
6
- 'adjoining_land_use',
7
- 'agent_notes',
8
- 'agent_other_contact_desc',
9
- 'agent_other_contact_phone',
10
- 'annual_taxes',
11
- 'approx_age',
12
- 'area',
13
- 'baths',
14
- 'baths_full',
15
- 'baths_half',
16
- 'bedrooms',
17
- 'bom_date',
18
- 'book_number',
19
- 'book_page',
20
- 'book_type',
21
- 'box_on_unit',
22
- 'box_on_unit_yn',
23
- 'business_included_yn',
24
- 'buyer_broker',
25
- 'buyer_broker_type',
26
- 'buyer_city',
27
- 'buyer_name',
28
- 'buyer_state',
29
- 'buyer_zip',
30
- 'category',
31
- 'city',
32
- 'city_code',
33
- 'co_la_code',
34
- 'co_lo_code',
35
- 'co_sa_code',
36
- 'co_so_code',
37
- 'contacts',
38
- 'contr_broker',
39
- 'contr_broker_type',
40
- 'county',
41
- 'current_price',
42
- 'date_created',
43
- 'date_leased',
44
- 'date_modified',
45
- 'df_yn',
46
- 'directions',
47
- 'display_address_yn',
48
- 'dom',
49
- 'elem_school',
50
- 'expenses_assoc',
51
- 'expenses_ins',
52
- 'expenses_maint',
53
- 'expenses_mgmt',
54
- 'expenses_other',
55
- 'expenses_tax',
56
- 'expenses_utility',
57
- 'expire_date',
58
- 'flood_plain',
59
- 'ftr_building',
60
- 'ftr_building_type',
61
- 'ftr_closing',
62
- 'ftr_cooling',
63
- 'ftr_docs_on_file',
64
- 'ftr_exterior',
65
- 'ftr_financing',
66
- 'ftr_flooring',
67
- 'ftr_heating',
68
- 'ftr_interior',
69
- 'ftr_internet',
70
- 'ftr_lease_terms',
71
- 'ftr_property_desc',
72
- 'ftr_roof',
73
- 'ftr_sale_terms',
74
- 'ftr_sewer',
75
- 'ftr_showing',
76
- 'ftr_sprinkler',
77
- 'ftr_style',
78
- 'ftr_utilities',
79
- 'ftr_utilities_rental',
80
- 'ftr_water',
81
- 'geo_precision',
82
- 'georesult',
83
- 'high_school',
84
- 'hoa_fee',
85
- 'hoa_fee_yn',
86
- 'hoa_term',
87
- 'income_gross',
88
- 'income_net',
89
- 'income_other',
90
- 'income_rental',
91
- 'internet_yn',
92
- 'la_code',
93
- 'leased_through',
94
- 'legal_block',
95
- 'legal_lot',
96
- 'legals',
97
- 'list_date',
98
- 'list_price',
99
- 'listing_type',
100
- 'lo_code',
101
- 'lockbox_yn',
102
- 'lot_dimensions',
103
- 'lot_dimensions_source',
104
- 'media_flag',
105
- 'middle_school',
106
- 'mls_acct',
107
- 'municipality',
108
- 'num_units',
109
- 'num_units_occupied',
110
- 'off_mkt_date',
111
- 'off_mkt_days',
112
- 'office_notes',
113
- 'orig_lp',
114
- 'other_fee',
115
- 'other_fee_type',
116
- 'owner_name',
117
- 'owner_phone',
118
- 'parcel_id',
119
- 'pending_date',
120
- 'photo_count',
121
- 'photo_date_modified',
122
- 'photo_description',
123
- 'photo_instr',
124
- 'posession',
125
- 'price_change_date',
126
- 'price_sqft',
127
- 'proj_close_date',
128
- 'prop_desc',
129
- 'prop_id',
130
- 'prop_type',
131
- 'remarks',
132
- 'road_frontage_ft',
133
- 'sa_code',
134
- 'sale_lease',
135
- 'sale_notes',
136
- 'so_code',
137
- 'sold_date',
138
- 'sold_price',
139
- 'sold_terms',
140
- 'sqft_source',
141
- 'state',
142
- 'status',
143
- 'status_date',
144
- 'status_flag',
145
- 'street',
146
- 'street_dir',
147
- 'street_name',
148
- 'street_num',
149
- 'sub_agent',
150
- 'sub_agent_type',
151
- 'sub_area',
152
- 'subdivision',
153
- 'take_photo_yn',
154
- 'third_party_comm_yn',
155
- 'tot_heat_sqft',
156
- 'tour_date',
157
- 'tour_submit_date',
158
- 'type_detailed',
159
- 'u1_dims',
160
- 'u1_free_standing_yn',
161
- 'u1_sqft_manuf',
162
- 'u1_sqft_office',
163
- 'u1_sqft_retail',
164
- 'u1_sqft_total',
165
- 'u1_sqft_warehouse',
166
- 'u1_year_built',
167
- 'u2_dims',
168
- 'u2_free_standing_yn',
169
- 'u2_sqft_manuf',
170
- 'u2_sqft_office',
171
- 'u2_sqft_retail',
172
- 'u2_sqft_total',
173
- 'u2_sqft_warehouse',
174
- 'u2_year_built',
175
- 'u3_dims',
176
- 'u3_free_standing_yn',
177
- 'u3_sqft_manuf',
178
- 'u3_sqft_office',
179
- 'u3_sqft_retail',
180
- 'u3_sqft_total',
181
- 'u3_sqft_warehouse',
182
- 'u3_year_built',
183
- 'unit_num',
184
- 'upload_source',
185
- 'vacancy_rate',
186
- 'vacant_yn',
187
- 'valuation_yn',
188
- 'vt_yn',
189
- 'waterfront_yn',
190
- 'withdrawn_date',
191
- 'year_built',
192
- 'zip',
193
- 'zoning_northport',
194
- 'zoning_tusc'
195
- ]
4
+ attributes = {
5
+ 'mls_acct' => { nice_name: 'MLS#' , type: 'text' },
6
+ 'banner' => { nice_name: 'Banner' , type: 'text' },
7
+ 'prop_desc' => { nice_name: 'Property Name' , type: 'text' },
8
+ 'street_name' => { nice_name: 'Street Name' , type: 'text' },
9
+ 'street_num' => { nice_name: 'Street Number' , type: 'text' },
10
+ 'city' => { nice_name: 'City' , type: 'text' },
11
+ 'zip' => { nice_name: 'Zip' , type: 'text' },
12
+ 'prop_type' => { nice_name: 'Type' , type: 'text' },
13
+ 'status' => { nice_name: 'Status' , type: 'select', text: p.status, options_url: '/admin/commercial/status-options' },
14
+ 'u1_sqft_total' => { nice_name: 'Square Footage' , type: 'text' },
15
+ 'acreage' => { nice_name: 'Acreage' , type: 'text' },
16
+ 'agent_notes' => { nice_name: 'Description' , type: 'textarea' },
17
+ 'current_price' => { nice_name: 'Price' , type: 'text' },
18
+ 'negotiable_price' => { nice_name: 'Negotiable Price' , type: 'checkbox' },
19
+ 'la_code' => { nice_name: 'Agent' , type: 'select', text: (p.agent ? "#{p.agent.first_name} #{p.agent.last_name}" : ""), options_url: '/admin/agents/options' },
20
+ 'lo_code' => { nice_name: 'Office' , type: 'select', text: (p.office ? p.office.lo_name : ""), options_url: '/admin/offices/options'},
21
+
22
+ 'adjoining_land_use' => { nice_name: 'Adjoining Land Use' , type: 'text' },
23
+ 'agent_other_contact_desc' => { nice_name: 'agent_other_contact_desc' , type: 'text' },
24
+ 'agent_other_contact_phone' => { nice_name: 'agent_other_contact_phone' , type: 'text' },
25
+ 'annual_taxes' => { nice_name: 'Annual Taxes' , type: 'text' },
26
+ 'approx_age' => { nice_name: 'Approximate Age' , type: 'text' },
27
+ 'area' => { nice_name: 'Area' , type: 'text' },
28
+ 'baths' => { nice_name: 'Baths' , type: 'text' },
29
+ 'baths_full' => { nice_name: 'Full Baths' , type: 'text' },
30
+ 'baths_half' => { nice_name: 'Half Baths' , type: 'text' },
31
+ 'bedrooms' => { nice_name: 'Bedrooms' , type: 'text' },
32
+ 'bom_date' => { nice_name: 'bom_date' , type: 'text' },
33
+ 'book_number' => { nice_name: 'book_number' , type: 'text' },
34
+ 'book_page' => { nice_name: 'book_page' , type: 'text' },
35
+ 'book_type' => { nice_name: 'book_type' , type: 'text' },
36
+ 'box_on_unit' => { nice_name: 'box_on_unit' , type: 'text' },
37
+ 'box_on_unit_yn' => { nice_name: 'box_on_unit_yn' , type: 'text' },
38
+ 'business_included_yn' => { nice_name: 'business_included_yn' , type: 'text' },
39
+ 'buyer_broker' => { nice_name: 'buyer_broker' , type: 'text' },
40
+ 'buyer_broker_type' => { nice_name: 'buyer_broker_type' , type: 'text' },
41
+ 'buyer_city' => { nice_name: 'buyer_city' , type: 'text' },
42
+ 'buyer_name' => { nice_name: 'buyer_name' , type: 'text' },
43
+ 'buyer_state' => { nice_name: 'buyer_state' , type: 'text' },
44
+ 'buyer_zip' => { nice_name: 'buyer_zip' , type: 'text' },
45
+ 'category' => { nice_name: 'category' , type: 'text' },
46
+ 'city_code' => { nice_name: 'city_code' , type: 'text' },
47
+ 'co_la_code' => { nice_name: 'co_la_code' , type: 'text' },
48
+ 'co_lo_code' => { nice_name: 'co_lo_code' , type: 'text' },
49
+ 'co_sa_code' => { nice_name: 'co_sa_code' , type: 'text' },
50
+ 'co_so_code' => { nice_name: 'co_so_code' , type: 'text' },
51
+ 'contacts' => { nice_name: 'contacts' , type: 'text' },
52
+ 'contr_broker' => { nice_name: 'contr_broker' , type: 'text' },
53
+ 'contr_broker_type' => { nice_name: 'contr_broker_type' , type: 'text' },
54
+ 'county' => { nice_name: 'county' , type: 'text' },
55
+ 'date_created' => { nice_name: 'date_created' , type: 'text' },
56
+ 'date_leased' => { nice_name: 'date_leased' , type: 'text' },
57
+ 'date_modified' => { nice_name: 'date_modified' , type: 'text' },
58
+ 'df_yn' => { nice_name: 'df_yn' , type: 'text' },
59
+ 'directions' => { nice_name: 'directions' , type: 'text' },
60
+ 'display_address_yn' => { nice_name: 'display_address_yn' , type: 'text' },
61
+ 'dom' => { nice_name: 'dom' , type: 'text' },
62
+ 'elem_school' => { nice_name: 'elem_school' , type: 'text' },
63
+ 'expenses_assoc' => { nice_name: 'expenses_assoc' , type: 'text' },
64
+ 'expenses_ins' => { nice_name: 'expenses_ins' , type: 'text' },
65
+ 'expenses_maint' => { nice_name: 'expenses_maint' , type: 'text' },
66
+ 'expenses_mgmt' => { nice_name: 'expenses_mgmt' , type: 'text' },
67
+ 'expenses_other' => { nice_name: 'expenses_other' , type: 'text' },
68
+ 'expenses_tax' => { nice_name: 'expenses_tax' , type: 'text' },
69
+ 'expenses_utility' => { nice_name: 'expenses_utility' , type: 'text' },
70
+ 'expire_date' => { nice_name: 'expire_date' , type: 'text' },
71
+ 'flood_plain' => { nice_name: 'flood_plain' , type: 'text' },
72
+ 'ftr_building' => { nice_name: 'ftr_building' , type: 'text' },
73
+ 'ftr_building_type' => { nice_name: 'ftr_building_type' , type: 'text' },
74
+ 'ftr_closing' => { nice_name: 'ftr_closing' , type: 'text' },
75
+ 'ftr_cooling' => { nice_name: 'ftr_cooling' , type: 'text' },
76
+ 'ftr_docs_on_file' => { nice_name: 'ftr_docs_on_file' , type: 'text' },
77
+ 'ftr_exterior' => { nice_name: 'ftr_exterior' , type: 'text' },
78
+ 'ftr_financing' => { nice_name: 'ftr_financing' , type: 'text' },
79
+ 'ftr_flooring' => { nice_name: 'ftr_flooring' , type: 'text' },
80
+ 'ftr_heating' => { nice_name: 'ftr_heating' , type: 'text' },
81
+ 'ftr_interior' => { nice_name: 'ftr_interior' , type: 'text' },
82
+ 'ftr_internet' => { nice_name: 'ftr_internet' , type: 'text' },
83
+ 'ftr_lease_terms' => { nice_name: 'ftr_lease_terms' , type: 'text' },
84
+ 'ftr_property_desc' => { nice_name: 'ftr_property_desc' , type: 'text' },
85
+ 'ftr_roof' => { nice_name: 'ftr_roof' , type: 'text' },
86
+ 'ftr_sale_terms' => { nice_name: 'ftr_sale_terms' , type: 'text' },
87
+ 'ftr_sewer' => { nice_name: 'ftr_sewer' , type: 'text' },
88
+ 'ftr_showing' => { nice_name: 'ftr_showing' , type: 'text' },
89
+ 'ftr_sprinkler' => { nice_name: 'ftr_sprinkler' , type: 'text' },
90
+ 'ftr_style' => { nice_name: 'ftr_style' , type: 'text' },
91
+ 'ftr_utilities' => { nice_name: 'ftr_utilities' , type: 'text' },
92
+ 'ftr_utilities_rental' => { nice_name: 'ftr_utilities_rental' , type: 'text' },
93
+ 'ftr_water' => { nice_name: 'ftr_water' , type: 'text' },
94
+ 'geo_precision' => { nice_name: 'geo_precision' , type: 'text' },
95
+ 'georesult' => { nice_name: 'georesult' , type: 'text' },
96
+ 'high_school' => { nice_name: 'high_school' , type: 'text' },
97
+ 'hoa_fee' => { nice_name: 'hoa_fee' , type: 'text' },
98
+ 'hoa_fee_yn' => { nice_name: 'hoa_fee_yn' , type: 'text' },
99
+ 'hoa_term' => { nice_name: 'hoa_term' , type: 'text' },
100
+ 'income_gross' => { nice_name: 'income_gross' , type: 'text' },
101
+ 'income_net' => { nice_name: 'income_net' , type: 'text' },
102
+ 'income_other' => { nice_name: 'income_other' , type: 'text' },
103
+ 'income_rental' => { nice_name: 'income_rental' , type: 'text' },
104
+ 'internet_yn' => { nice_name: 'internet_yn' , type: 'text' },
105
+ 'leased_through' => { nice_name: 'leased_through' , type: 'text' },
106
+ 'legal_block' => { nice_name: 'legal_block' , type: 'text' },
107
+ 'legal_lot' => { nice_name: 'legal_lot' , type: 'text' },
108
+ 'legals' => { nice_name: 'legals' , type: 'text' },
109
+ 'list_date' => { nice_name: 'list_date' , type: 'text' },
110
+ 'list_price' => { nice_name: 'list_price' , type: 'text' },
111
+ 'listing_type' => { nice_name: 'listing_type' , type: 'text' },
112
+ 'lockbox_yn' => { nice_name: 'lockbox_yn' , type: 'text' },
113
+ 'lot_dimensions' => { nice_name: 'lot_dimensions' , type: 'text' },
114
+ 'lot_dimensions_source' => { nice_name: 'lot_dimensions_source' , type: 'text' },
115
+ 'media_flag' => { nice_name: 'media_flag' , type: 'text' },
116
+ 'middle_school' => { nice_name: 'middle_school' , type: 'text' },
117
+ 'municipality' => { nice_name: 'municipality' , type: 'text' },
118
+ 'num_units' => { nice_name: 'num_units' , type: 'text' },
119
+ 'num_units_occupied' => { nice_name: 'num_units_occupied' , type: 'text' },
120
+ 'off_mkt_date' => { nice_name: 'off_mkt_date' , type: 'text' },
121
+ 'off_mkt_days' => { nice_name: 'off_mkt_days' , type: 'text' },
122
+ 'office_notes' => { nice_name: 'office_notes' , type: 'text' },
123
+ 'orig_lp' => { nice_name: 'orig_lp' , type: 'text' },
124
+ 'other_fee' => { nice_name: 'other_fee' , type: 'text' },
125
+ 'other_fee_type' => { nice_name: 'other_fee_type' , type: 'text' },
126
+ 'owner_name' => { nice_name: 'owner_name' , type: 'text' },
127
+ 'owner_phone' => { nice_name: 'owner_phone' , type: 'text' },
128
+ 'parcel_id' => { nice_name: 'parcel_id' , type: 'text' },
129
+ 'pending_date' => { nice_name: 'pending_date' , type: 'text' },
130
+ 'photo_count' => { nice_name: 'photo_count' , type: 'text' },
131
+ 'photo_date_modified' => { nice_name: 'photo_date_modified' , type: 'text' },
132
+ 'photo_description' => { nice_name: 'photo_description' , type: 'text' },
133
+ 'photo_instr' => { nice_name: 'photo_instr' , type: 'text' },
134
+ 'posession' => { nice_name: 'posession' , type: 'text' },
135
+ 'price_change_date' => { nice_name: 'price_change_date' , type: 'text' },
136
+ 'price_sqft' => { nice_name: 'price_sqft' , type: 'text' },
137
+ 'proj_close_date' => { nice_name: 'proj_close_date' , type: 'text' },
138
+ 'prop_id' => { nice_name: 'prop_id' , type: 'text' },
139
+ 'remarks' => { nice_name: 'remarks' , type: 'text' },
140
+ 'road_frontage_ft' => { nice_name: 'road_frontage_ft' , type: 'text' },
141
+ 'sa_code' => { nice_name: 'sa_code' , type: 'text' },
142
+ 'sale_lease' => { nice_name: 'sale_lease' , type: 'text' },
143
+ 'sale_notes' => { nice_name: 'sale_notes' , type: 'text' },
144
+ 'so_code' => { nice_name: 'so_code' , type: 'text' },
145
+ 'sold_date' => { nice_name: 'sold_date' , type: 'text' },
146
+ 'sold_price' => { nice_name: 'sold_price' , type: 'text' },
147
+ 'sold_terms' => { nice_name: 'sold_terms' , type: 'text' },
148
+ 'sqft_source' => { nice_name: 'sqft_source' , type: 'text' },
149
+ 'state' => { nice_name: 'state' , type: 'text' },
150
+ 'status_date' => { nice_name: 'status_date' , type: 'text' },
151
+ 'status_flag' => { nice_name: 'status_flag' , type: 'text' },
152
+ 'street' => { nice_name: 'street' , type: 'text' },
153
+ 'street_dir' => { nice_name: 'street_dir' , type: 'text' },
154
+ 'sub_agent' => { nice_name: 'sub_agent' , type: 'text' },
155
+ 'sub_agent_type' => { nice_name: 'sub_agent_type' , type: 'text' },
156
+ 'sub_area' => { nice_name: 'sub_area' , type: 'text' },
157
+ 'subdivision' => { nice_name: 'subdivision' , type: 'text' },
158
+ 'take_photo_yn' => { nice_name: 'take_photo_yn' , type: 'text' },
159
+ 'third_party_comm_yn' => { nice_name: 'third_party_comm_yn' , type: 'text' },
160
+ 'tot_heat_sqft' => { nice_name: 'tot_heat_sqft' , type: 'text' },
161
+ 'tour_date' => { nice_name: 'tour_date' , type: 'text' },
162
+ 'tour_submit_date' => { nice_name: 'tour_submit_date' , type: 'text' },
163
+ 'type_detailed' => { nice_name: 'type_detailed' , type: 'text' },
164
+ 'u1_dims' => { nice_name: 'u1_dims' , type: 'text' },
165
+ 'u1_free_standing_yn' => { nice_name: 'u1_free_standing_yn' , type: 'text' },
166
+ 'u1_sqft_manuf' => { nice_name: 'u1_sqft_manuf' , type: 'text' },
167
+ 'u1_sqft_office' => { nice_name: 'u1_sqft_office' , type: 'text' },
168
+ 'u1_sqft_retail' => { nice_name: 'u1_sqft_retail' , type: 'text' },
169
+ 'u1_sqft_warehouse' => { nice_name: 'u1_sqft_warehouse' , type: 'text' },
170
+ 'u1_year_built' => { nice_name: 'u1_year_built' , type: 'text' },
171
+ 'u2_dims' => { nice_name: 'u2_dims' , type: 'text' },
172
+ 'u2_free_standing_yn' => { nice_name: 'u2_free_standing_yn' , type: 'text' },
173
+ 'u2_sqft_manuf' => { nice_name: 'u2_sqft_manuf' , type: 'text' },
174
+ 'u2_sqft_office' => { nice_name: 'u2_sqft_office' , type: 'text' },
175
+ 'u2_sqft_retail' => { nice_name: 'u2_sqft_retail' , type: 'text' },
176
+ 'u2_sqft_total' => { nice_name: 'u2_sqft_total' , type: 'text' },
177
+ 'u2_sqft_warehouse' => { nice_name: 'u2_sqft_warehouse' , type: 'text' },
178
+ 'u2_year_built' => { nice_name: 'u2_year_built' , type: 'text' },
179
+ 'u3_dims' => { nice_name: 'u3_dims' , type: 'text' },
180
+ 'u3_free_standing_yn' => { nice_name: 'u3_free_standing_yn' , type: 'text' },
181
+ 'u3_sqft_manuf' => { nice_name: 'u3_sqft_manuf' , type: 'text' },
182
+ 'u3_sqft_office' => { nice_name: 'u3_sqft_office' , type: 'text' },
183
+ 'u3_sqft_retail' => { nice_name: 'u3_sqft_retail' , type: 'text' },
184
+ 'u3_sqft_total' => { nice_name: 'u3_sqft_total' , type: 'text' },
185
+ 'u3_sqft_warehouse' => { nice_name: 'u3_sqft_warehouse' , type: 'text' },
186
+ 'u3_year_built' => { nice_name: 'u3_year_built' , type: 'text' },
187
+ 'unit_num' => { nice_name: 'unit_num' , type: 'text' },
188
+ 'upload_source' => { nice_name: 'upload_source' , type: 'text' },
189
+ 'vacancy_rate' => { nice_name: 'vacancy_rate' , type: 'text' },
190
+ 'vacant_yn' => { nice_name: 'vacant_yn' , type: 'text' },
191
+ 'valuation_yn' => { nice_name: 'valuation_yn' , type: 'text' },
192
+ 'vt_yn' => { nice_name: 'vt_yn' , type: 'text' },
193
+ 'waterfront_yn' => { nice_name: 'waterfront_yn' , type: 'text' },
194
+ 'withdrawn_date' => { nice_name: 'withdrawn_date' , type: 'text' },
195
+ 'year_built' => { nice_name: 'year_built' , type: 'text' },
196
+ 'zoning_northport' => { nice_name: 'zoning_northport' , type: 'text' },
197
+ 'zoning_tusc' => { nice_name: 'zoning_tusc' , type: 'text' },
198
+ }
196
199
 
197
200
  %>
198
201
  <h1>Edit Commercial Property</h1>
199
202
  <p>MLS#: <%= p.mls_acct %>
200
203
  <p>
201
204
  <input type='button' value='< Back' onclick="window.location='/admin/commercial';" />
205
+ <input type='button' value='Images and Files' onclick="window.location='/admin/media/<%= p.mls_acct %>';" />
202
206
  <% if !is_custom_property %>
203
- <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
207
+ <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
204
208
  <% end %>
205
209
  </p>
206
210
  <div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
207
211
 
208
212
  <% if is_custom_property %>
209
-
210
- <% attributes.each do |attrib| %>
211
- <div id='commercialproperty_<%= p.id %>_<%= attrib %>'></div>
212
- <% end %>
213
-
213
+ <% attributes.each do |attrib, h| %>
214
+ <div id='commercialproperty_<%= p.id %>_<%= attrib %>'></div>
215
+ <% end %>
214
216
  <% else %>
215
-
216
- <table class='data'>
217
- <% attributes.each do |attrib| %>
218
- <tr><td><%= attrib %><td><%= p[attrib.to_sym] %></td></tr>
219
- <% end %>
220
- </table>
221
-
217
+ <table class='data'>
218
+ <% attributes.each do |attrib, h| %>
219
+ <tr><td><%= h[:nice_name] %><td><%= p[attrib] %></td></tr>
220
+ <% end %>
221
+ </table>
222
222
  <% end %>
223
223
 
224
224
  <% content_for :caboose_js do %>
@@ -238,7 +238,6 @@ function refresh_property_from_mls(mls_acct)
238
238
  }
239
239
 
240
240
  <% if is_custom_property %>
241
-
242
241
  $(document).ready(function() {
243
242
  m = new ModelBinder({
244
243
  name: 'CommercialProperty',
@@ -246,200 +245,20 @@ $(document).ready(function() {
246
245
  update_url: '/admin/commercial/<%= p.id %>',
247
246
  authenticity_token: '<%= form_authenticity_token %>',
248
247
  attributes: [
249
- { name: 'acreage' , nice_name: 'acreage' , type: 'text', value: <%= raw Caboose.json(p.acreage ) %>, width: 600 },
250
- { name: 'adjoining_land_use' , nice_name: 'adjoining_land_use' , type: 'text', value: <%= raw Caboose.json(p.adjoining_land_use ) %>, width: 600 },
251
- { name: 'agent_notes' , nice_name: 'agent_notes' , type: 'textarea', value: <%= raw Caboose.json(p.agent_notes ) %>, width: 600 },
252
- { name: 'agent_other_contact_desc' , nice_name: 'agent_other_contact_desc' , type: 'text', value: <%= raw Caboose.json(p.agent_other_contact_desc ) %>, width: 600 },
253
- { name: 'agent_other_contact_phone' , nice_name: 'agent_other_contact_phone' , type: 'text', value: <%= raw Caboose.json(p.agent_other_contact_phone ) %>, width: 600 },
254
- { name: 'annual_taxes' , nice_name: 'annual_taxes' , type: 'text', value: <%= raw Caboose.json(p.annual_taxes ) %>, width: 600 },
255
- { name: 'approx_age' , nice_name: 'approx_age' , type: 'text', value: <%= raw Caboose.json(p.approx_age ) %>, width: 600 },
256
- { name: 'area' , nice_name: 'area' , type: 'text', value: <%= raw Caboose.json(p.area ) %>, width: 600 },
257
- { name: 'baths' , nice_name: 'baths' , type: 'text', value: <%= raw Caboose.json(p.baths ) %>, width: 600 },
258
- { name: 'baths_full' , nice_name: 'baths_full' , type: 'text', value: <%= raw Caboose.json(p.baths_full ) %>, width: 600 },
259
- { name: 'baths_half' , nice_name: 'baths_half' , type: 'text', value: <%= raw Caboose.json(p.baths_half ) %>, width: 600 },
260
- { name: 'bedrooms' , nice_name: 'bedrooms' , type: 'text', value: <%= raw Caboose.json(p.bedrooms ) %>, width: 600 },
261
- { name: 'bom_date' , nice_name: 'bom_date' , type: 'text', value: <%= raw Caboose.json(p.bom_date ) %>, width: 600 },
262
- { name: 'book_number' , nice_name: 'book_number' , type: 'text', value: <%= raw Caboose.json(p.book_number ) %>, width: 600 },
263
- { name: 'book_page' , nice_name: 'book_page' , type: 'text', value: <%= raw Caboose.json(p.book_page ) %>, width: 600 },
264
- { name: 'book_type' , nice_name: 'book_type' , type: 'text', value: <%= raw Caboose.json(p.book_type ) %>, width: 600 },
265
- { name: 'box_on_unit' , nice_name: 'box_on_unit' , type: 'text', value: <%= raw Caboose.json(p.box_on_unit ) %>, width: 600 },
266
- { name: 'box_on_unit_yn' , nice_name: 'box_on_unit_yn' , type: 'text', value: <%= raw Caboose.json(p.box_on_unit_yn ) %>, width: 600 },
267
- { name: 'business_included_yn' , nice_name: 'business_included_yn' , type: 'text', value: <%= raw Caboose.json(p.business_included_yn ) %>, width: 600 },
268
- { name: 'buyer_broker' , nice_name: 'buyer_broker' , type: 'text', value: <%= raw Caboose.json(p.buyer_broker ) %>, width: 600 },
269
- { name: 'buyer_broker_type' , nice_name: 'buyer_broker_type' , type: 'text', value: <%= raw Caboose.json(p.buyer_broker_type ) %>, width: 600 },
270
- { name: 'buyer_city' , nice_name: 'buyer_city' , type: 'text', value: <%= raw Caboose.json(p.buyer_city ) %>, width: 600 },
271
- { name: 'buyer_name' , nice_name: 'buyer_name' , type: 'text', value: <%= raw Caboose.json(p.buyer_name ) %>, width: 600 },
272
- { name: 'buyer_state' , nice_name: 'buyer_state' , type: 'text', value: <%= raw Caboose.json(p.buyer_state ) %>, width: 600 },
273
- { name: 'buyer_zip' , nice_name: 'buyer_zip' , type: 'text', value: <%= raw Caboose.json(p.buyer_zip ) %>, width: 600 },
274
- { name: 'category' , nice_name: 'category' , type: 'text', value: <%= raw Caboose.json(p.category ) %>, width: 600 },
275
- { name: 'city' , nice_name: 'city' , type: 'text', value: <%= raw Caboose.json(p.city ) %>, width: 600 },
276
- { name: 'city_code' , nice_name: 'city_code' , type: 'text', value: <%= raw Caboose.json(p.city_code ) %>, width: 600 },
277
- { name: 'co_la_code' , nice_name: 'co_la_code' , type: 'text', value: <%= raw Caboose.json(p.co_la_code ) %>, width: 600 },
278
- { name: 'co_lo_code' , nice_name: 'co_lo_code' , type: 'text', value: <%= raw Caboose.json(p.co_lo_code ) %>, width: 600 },
279
- { name: 'co_sa_code' , nice_name: 'co_sa_code' , type: 'text', value: <%= raw Caboose.json(p.co_sa_code ) %>, width: 600 },
280
- { name: 'co_so_code' , nice_name: 'co_so_code' , type: 'text', value: <%= raw Caboose.json(p.co_so_code ) %>, width: 600 },
281
- { name: 'contacts' , nice_name: 'contacts' , type: 'text', value: <%= raw Caboose.json(p.contacts ) %>, width: 600 },
282
- { name: 'contr_broker' , nice_name: 'contr_broker' , type: 'text', value: <%= raw Caboose.json(p.contr_broker ) %>, width: 600 },
283
- { name: 'contr_broker_type' , nice_name: 'contr_broker_type' , type: 'text', value: <%= raw Caboose.json(p.contr_broker_type ) %>, width: 600 },
284
- { name: 'county' , nice_name: 'county' , type: 'text', value: <%= raw Caboose.json(p.county ) %>, width: 600 },
285
- { name: 'current_price' , nice_name: 'current_price' , type: 'text', value: <%= raw Caboose.json(p.current_price ) %>, width: 600 },
286
- { name: 'date_created' , nice_name: 'date_created' , type: 'text', value: <%= raw Caboose.json(p.date_created ) %>, width: 600 },
287
- { name: 'date_leased' , nice_name: 'date_leased' , type: 'text', value: <%= raw Caboose.json(p.date_leased ) %>, width: 600 },
288
- { name: 'date_modified' , nice_name: 'date_modified' , type: 'text', value: <%= raw Caboose.json(p.date_modified ) %>, width: 600 },
289
- { name: 'df_yn' , nice_name: 'df_yn' , type: 'text', value: <%= raw Caboose.json(p.df_yn ) %>, width: 600 },
290
- { name: 'directions' , nice_name: 'directions' , type: 'text', value: <%= raw Caboose.json(p.directions ) %>, width: 600 },
291
- { name: 'display_address_yn' , nice_name: 'display_address_yn' , type: 'text', value: <%= raw Caboose.json(p.display_address_yn ) %>, width: 600 },
292
- { name: 'dom' , nice_name: 'dom' , type: 'text', value: <%= raw Caboose.json(p.dom ) %>, width: 600 },
293
- { name: 'elem_school' , nice_name: 'elem_school' , type: 'text', value: <%= raw Caboose.json(p.elem_school ) %>, width: 600 },
294
- { name: 'expenses_assoc' , nice_name: 'expenses_assoc' , type: 'text', value: <%= raw Caboose.json(p.expenses_assoc ) %>, width: 600 },
295
- { name: 'expenses_ins' , nice_name: 'expenses_ins' , type: 'text', value: <%= raw Caboose.json(p.expenses_ins ) %>, width: 600 },
296
- { name: 'expenses_maint' , nice_name: 'expenses_maint' , type: 'text', value: <%= raw Caboose.json(p.expenses_maint ) %>, width: 600 },
297
- { name: 'expenses_mgmt' , nice_name: 'expenses_mgmt' , type: 'text', value: <%= raw Caboose.json(p.expenses_mgmt ) %>, width: 600 },
298
- { name: 'expenses_other' , nice_name: 'expenses_other' , type: 'text', value: <%= raw Caboose.json(p.expenses_other ) %>, width: 600 },
299
- { name: 'expenses_tax' , nice_name: 'expenses_tax' , type: 'text', value: <%= raw Caboose.json(p.expenses_tax ) %>, width: 600 },
300
- { name: 'expenses_utility' , nice_name: 'expenses_utility' , type: 'text', value: <%= raw Caboose.json(p.expenses_utility ) %>, width: 600 },
301
- { name: 'expire_date' , nice_name: 'expire_date' , type: 'text', value: <%= raw Caboose.json(p.expire_date ) %>, width: 600 },
302
- { name: 'flood_plain' , nice_name: 'flood_plain' , type: 'text', value: <%= raw Caboose.json(p.flood_plain ) %>, width: 600 },
303
- { name: 'ftr_building' , nice_name: 'ftr_building' , type: 'text', value: <%= raw Caboose.json(p.ftr_building ) %>, width: 600 },
304
- { name: 'ftr_building_type' , nice_name: 'ftr_building_type' , type: 'text', value: <%= raw Caboose.json(p.ftr_building_type ) %>, width: 600 },
305
- { name: 'ftr_closing' , nice_name: 'ftr_closing' , type: 'text', value: <%= raw Caboose.json(p.ftr_closing ) %>, width: 600 },
306
- { name: 'ftr_cooling' , nice_name: 'ftr_cooling' , type: 'text', value: <%= raw Caboose.json(p.ftr_cooling ) %>, width: 600 },
307
- { name: 'ftr_docs_on_file' , nice_name: 'ftr_docs_on_file' , type: 'text', value: <%= raw Caboose.json(p.ftr_docs_on_file ) %>, width: 600 },
308
- { name: 'ftr_exterior' , nice_name: 'ftr_exterior' , type: 'text', value: <%= raw Caboose.json(p.ftr_exterior ) %>, width: 600 },
309
- { name: 'ftr_financing' , nice_name: 'ftr_financing' , type: 'text', value: <%= raw Caboose.json(p.ftr_financing ) %>, width: 600 },
310
- { name: 'ftr_flooring' , nice_name: 'ftr_flooring' , type: 'text', value: <%= raw Caboose.json(p.ftr_flooring ) %>, width: 600 },
311
- { name: 'ftr_heating' , nice_name: 'ftr_heating' , type: 'text', value: <%= raw Caboose.json(p.ftr_heating ) %>, width: 600 },
312
- { name: 'ftr_interior' , nice_name: 'ftr_interior' , type: 'text', value: <%= raw Caboose.json(p.ftr_interior ) %>, width: 600 },
313
- { name: 'ftr_internet' , nice_name: 'ftr_internet' , type: 'text', value: <%= raw Caboose.json(p.ftr_internet ) %>, width: 600 },
314
- { name: 'ftr_lease_terms' , nice_name: 'ftr_lease_terms' , type: 'text', value: <%= raw Caboose.json(p.ftr_lease_terms ) %>, width: 600 },
315
- { name: 'ftr_property_desc' , nice_name: 'ftr_property_desc' , type: 'text', value: <%= raw Caboose.json(p.ftr_property_desc ) %>, width: 600 },
316
- { name: 'ftr_roof' , nice_name: 'ftr_roof' , type: 'text', value: <%= raw Caboose.json(p.ftr_roof ) %>, width: 600 },
317
- { name: 'ftr_sale_terms' , nice_name: 'ftr_sale_terms' , type: 'text', value: <%= raw Caboose.json(p.ftr_sale_terms ) %>, width: 600 },
318
- { name: 'ftr_sewer' , nice_name: 'ftr_sewer' , type: 'text', value: <%= raw Caboose.json(p.ftr_sewer ) %>, width: 600 },
319
- { name: 'ftr_showing' , nice_name: 'ftr_showing' , type: 'text', value: <%= raw Caboose.json(p.ftr_showing ) %>, width: 600 },
320
- { name: 'ftr_sprinkler' , nice_name: 'ftr_sprinkler' , type: 'text', value: <%= raw Caboose.json(p.ftr_sprinkler ) %>, width: 600 },
321
- { name: 'ftr_style' , nice_name: 'ftr_style' , type: 'text', value: <%= raw Caboose.json(p.ftr_style ) %>, width: 600 },
322
- { name: 'ftr_utilities' , nice_name: 'ftr_utilities' , type: 'text', value: <%= raw Caboose.json(p.ftr_utilities ) %>, width: 600 },
323
- { name: 'ftr_utilities_rental' , nice_name: 'ftr_utilities_rental' , type: 'text', value: <%= raw Caboose.json(p.ftr_utilities_rental ) %>, width: 600 },
324
- { name: 'ftr_water' , nice_name: 'ftr_water' , type: 'text', value: <%= raw Caboose.json(p.ftr_water ) %>, width: 600 },
325
- { name: 'geo_precision' , nice_name: 'geo_precision' , type: 'text', value: <%= raw Caboose.json(p.geo_precision ) %>, width: 600 },
326
- { name: 'georesult' , nice_name: 'georesult' , type: 'text', value: <%= raw Caboose.json(p.georesult ) %>, width: 600 },
327
- { name: 'high_school' , nice_name: 'high_school' , type: 'text', value: <%= raw Caboose.json(p.high_school ) %>, width: 600 },
328
- { name: 'hoa_fee' , nice_name: 'hoa_fee' , type: 'text', value: <%= raw Caboose.json(p.hoa_fee ) %>, width: 600 },
329
- { name: 'hoa_fee_yn' , nice_name: 'hoa_fee_yn' , type: 'text', value: <%= raw Caboose.json(p.hoa_fee_yn ) %>, width: 600 },
330
- { name: 'hoa_term' , nice_name: 'hoa_term' , type: 'text', value: <%= raw Caboose.json(p.hoa_term ) %>, width: 600 },
331
- { name: 'income_gross' , nice_name: 'income_gross' , type: 'text', value: <%= raw Caboose.json(p.income_gross ) %>, width: 600 },
332
- { name: 'income_net' , nice_name: 'income_net' , type: 'text', value: <%= raw Caboose.json(p.income_net ) %>, width: 600 },
333
- { name: 'income_other' , nice_name: 'income_other' , type: 'text', value: <%= raw Caboose.json(p.income_other ) %>, width: 600 },
334
- { name: 'income_rental' , nice_name: 'income_rental' , type: 'text', value: <%= raw Caboose.json(p.income_rental ) %>, width: 600 },
335
- { name: 'internet_yn' , nice_name: 'internet_yn' , type: 'text', value: <%= raw Caboose.json(p.internet_yn ) %>, width: 600 },
336
- { name: 'la_code' , nice_name: 'la_code' , type: 'text', value: <%= raw Caboose.json(p.la_code ) %>, width: 600 },
337
- { name: 'leased_through' , nice_name: 'leased_through' , type: 'text', value: <%= raw Caboose.json(p.leased_through ) %>, width: 600 },
338
- { name: 'legal_block' , nice_name: 'legal_block' , type: 'text', value: <%= raw Caboose.json(p.legal_block ) %>, width: 600 },
339
- { name: 'legal_lot' , nice_name: 'legal_lot' , type: 'text', value: <%= raw Caboose.json(p.legal_lot ) %>, width: 600 },
340
- { name: 'legals' , nice_name: 'legals' , type: 'text', value: <%= raw Caboose.json(p.legals ) %>, width: 600 },
341
- { name: 'list_date' , nice_name: 'list_date' , type: 'text', value: <%= raw Caboose.json(p.list_date ) %>, width: 600 },
342
- { name: 'list_price' , nice_name: 'list_price' , type: 'text', value: <%= raw Caboose.json(p.list_price ) %>, width: 600 },
343
- { name: 'listing_type' , nice_name: 'listing_type' , type: 'text', value: <%= raw Caboose.json(p.listing_type ) %>, width: 600 },
344
- { name: 'lo_code' , nice_name: 'lo_code' , type: 'text', value: <%= raw Caboose.json(p.lo_code ) %>, width: 600 },
345
- { name: 'lockbox_yn' , nice_name: 'lockbox_yn' , type: 'text', value: <%= raw Caboose.json(p.lockbox_yn ) %>, width: 600 },
346
- { name: 'lot_dimensions' , nice_name: 'lot_dimensions' , type: 'text', value: <%= raw Caboose.json(p.lot_dimensions ) %>, width: 600 },
347
- { name: 'lot_dimensions_source' , nice_name: 'lot_dimensions_source' , type: 'text', value: <%= raw Caboose.json(p.lot_dimensions_source ) %>, width: 600 },
348
- { name: 'media_flag' , nice_name: 'media_flag' , type: 'text', value: <%= raw Caboose.json(p.media_flag ) %>, width: 600 },
349
- { name: 'middle_school' , nice_name: 'middle_school' , type: 'text', value: <%= raw Caboose.json(p.middle_school ) %>, width: 600 },
350
- //{ name: 'mls_acct' , nice_name: 'mls_acct' , type: 'text', value: <%= raw Caboose.json(p.mls_acct ) %>, width: 600 },
351
- { name: 'municipality' , nice_name: 'municipality' , type: 'text', value: <%= raw Caboose.json(p.municipality ) %>, width: 600 },
352
- { name: 'num_units' , nice_name: 'num_units' , type: 'text', value: <%= raw Caboose.json(p.num_units ) %>, width: 600 },
353
- { name: 'num_units_occupied' , nice_name: 'num_units_occupied' , type: 'text', value: <%= raw Caboose.json(p.num_units_occupied ) %>, width: 600 },
354
- { name: 'off_mkt_date' , nice_name: 'off_mkt_date' , type: 'text', value: <%= raw Caboose.json(p.off_mkt_date ) %>, width: 600 },
355
- { name: 'off_mkt_days' , nice_name: 'off_mkt_days' , type: 'text', value: <%= raw Caboose.json(p.off_mkt_days ) %>, width: 600 },
356
- { name: 'office_notes' , nice_name: 'office_notes' , type: 'text', value: <%= raw Caboose.json(p.office_notes ) %>, width: 600 },
357
- { name: 'orig_lp' , nice_name: 'orig_lp' , type: 'text', value: <%= raw Caboose.json(p.orig_lp ) %>, width: 600 },
358
- { name: 'other_fee' , nice_name: 'other_fee' , type: 'text', value: <%= raw Caboose.json(p.other_fee ) %>, width: 600 },
359
- { name: 'other_fee_type' , nice_name: 'other_fee_type' , type: 'text', value: <%= raw Caboose.json(p.other_fee_type ) %>, width: 600 },
360
- { name: 'owner_name' , nice_name: 'owner_name' , type: 'text', value: <%= raw Caboose.json(p.owner_name ) %>, width: 600 },
361
- { name: 'owner_phone' , nice_name: 'owner_phone' , type: 'text', value: <%= raw Caboose.json(p.owner_phone ) %>, width: 600 },
362
- { name: 'parcel_id' , nice_name: 'parcel_id' , type: 'text', value: <%= raw Caboose.json(p.parcel_id ) %>, width: 600 },
363
- { name: 'pending_date' , nice_name: 'pending_date' , type: 'text', value: <%= raw Caboose.json(p.pending_date ) %>, width: 600 },
364
- { name: 'photo_count' , nice_name: 'photo_count' , type: 'text', value: <%= raw Caboose.json(p.photo_count ) %>, width: 600 },
365
- { name: 'photo_date_modified' , nice_name: 'photo_date_modified' , type: 'text', value: <%= raw Caboose.json(p.photo_date_modified ) %>, width: 600 },
366
- { name: 'photo_description' , nice_name: 'photo_description' , type: 'text', value: <%= raw Caboose.json(p.photo_description ) %>, width: 600 },
367
- { name: 'photo_instr' , nice_name: 'photo_instr' , type: 'text', value: <%= raw Caboose.json(p.photo_instr ) %>, width: 600 },
368
- { name: 'posession' , nice_name: 'posession' , type: 'text', value: <%= raw Caboose.json(p.posession ) %>, width: 600 },
369
- { name: 'price_change_date' , nice_name: 'price_change_date' , type: 'text', value: <%= raw Caboose.json(p.price_change_date ) %>, width: 600 },
370
- { name: 'price_sqft' , nice_name: 'price_sqft' , type: 'text', value: <%= raw Caboose.json(p.price_sqft ) %>, width: 600 },
371
- { name: 'proj_close_date' , nice_name: 'proj_close_date' , type: 'text', value: <%= raw Caboose.json(p.proj_close_date ) %>, width: 600 },
372
- { name: 'prop_desc' , nice_name: 'prop_desc' , type: 'text', value: <%= raw Caboose.json(p.prop_desc ) %>, width: 600 },
373
- { name: 'prop_id' , nice_name: 'prop_id' , type: 'text', value: <%= raw Caboose.json(p.prop_id ) %>, width: 600 },
374
- { name: 'prop_type' , nice_name: 'prop_type' , type: 'text', value: <%= raw Caboose.json(p.prop_type ) %>, width: 600 },
375
- { name: 'remarks' , nice_name: 'remarks' , type: 'text', value: <%= raw Caboose.json(p.remarks ) %>, width: 600 },
376
- { name: 'road_frontage_ft' , nice_name: 'road_frontage_ft' , type: 'text', value: <%= raw Caboose.json(p.road_frontage_ft ) %>, width: 600 },
377
- { name: 'sa_code' , nice_name: 'sa_code' , type: 'text', value: <%= raw Caboose.json(p.sa_code ) %>, width: 600 },
378
- { name: 'sale_lease' , nice_name: 'sale_lease' , type: 'text', value: <%= raw Caboose.json(p.sale_lease ) %>, width: 600 },
379
- { name: 'sale_notes' , nice_name: 'sale_notes' , type: 'text', value: <%= raw Caboose.json(p.sale_notes ) %>, width: 600 },
380
- { name: 'so_code' , nice_name: 'so_code' , type: 'text', value: <%= raw Caboose.json(p.so_code ) %>, width: 600 },
381
- { name: 'sold_date' , nice_name: 'sold_date' , type: 'text', value: <%= raw Caboose.json(p.sold_date ) %>, width: 600 },
382
- { name: 'sold_price' , nice_name: 'sold_price' , type: 'text', value: <%= raw Caboose.json(p.sold_price ) %>, width: 600 },
383
- { name: 'sold_terms' , nice_name: 'sold_terms' , type: 'text', value: <%= raw Caboose.json(p.sold_terms ) %>, width: 600 },
384
- { name: 'sqft_source' , nice_name: 'sqft_source' , type: 'text', value: <%= raw Caboose.json(p.sqft_source ) %>, width: 600 },
385
- { name: 'state' , nice_name: 'state' , type: 'text', value: <%= raw Caboose.json(p.state ) %>, width: 600 },
386
- { name: 'status' , nice_name: 'status' , type: 'text', value: <%= raw Caboose.json(p.status ) %>, width: 600 },
387
- { name: 'status_date' , nice_name: 'status_date' , type: 'text', value: <%= raw Caboose.json(p.status_date ) %>, width: 600 },
388
- { name: 'status_flag' , nice_name: 'status_flag' , type: 'text', value: <%= raw Caboose.json(p.status_flag ) %>, width: 600 },
389
- { name: 'street' , nice_name: 'street' , type: 'text', value: <%= raw Caboose.json(p.street ) %>, width: 600 },
390
- { name: 'street_dir' , nice_name: 'street_dir' , type: 'text', value: <%= raw Caboose.json(p.street_dir ) %>, width: 600 },
391
- { name: 'street_name' , nice_name: 'street_name' , type: 'text', value: <%= raw Caboose.json(p.street_name ) %>, width: 600 },
392
- { name: 'street_num' , nice_name: 'street_num' , type: 'text', value: <%= raw Caboose.json(p.street_num ) %>, width: 600 },
393
- { name: 'sub_agent' , nice_name: 'sub_agent' , type: 'text', value: <%= raw Caboose.json(p.sub_agent ) %>, width: 600 },
394
- { name: 'sub_agent_type' , nice_name: 'sub_agent_type' , type: 'text', value: <%= raw Caboose.json(p.sub_agent_type ) %>, width: 600 },
395
- { name: 'sub_area' , nice_name: 'sub_area' , type: 'text', value: <%= raw Caboose.json(p.sub_area ) %>, width: 600 },
396
- { name: 'subdivision' , nice_name: 'subdivision' , type: 'text', value: <%= raw Caboose.json(p.subdivision ) %>, width: 600 },
397
- { name: 'take_photo_yn' , nice_name: 'take_photo_yn' , type: 'text', value: <%= raw Caboose.json(p.take_photo_yn ) %>, width: 600 },
398
- { name: 'third_party_comm_yn' , nice_name: 'third_party_comm_yn' , type: 'text', value: <%= raw Caboose.json(p.third_party_comm_yn ) %>, width: 600 },
399
- { name: 'tot_heat_sqft' , nice_name: 'tot_heat_sqft' , type: 'text', value: <%= raw Caboose.json(p.tot_heat_sqft ) %>, width: 600 },
400
- { name: 'tour_date' , nice_name: 'tour_date' , type: 'text', value: <%= raw Caboose.json(p.tour_date ) %>, width: 600 },
401
- { name: 'tour_submit_date' , nice_name: 'tour_submit_date' , type: 'text', value: <%= raw Caboose.json(p.tour_submit_date ) %>, width: 600 },
402
- { name: 'type_detailed' , nice_name: 'type_detailed' , type: 'text', value: <%= raw Caboose.json(p.type_detailed ) %>, width: 600 },
403
- { name: 'u1_dims' , nice_name: 'u1_dims' , type: 'text', value: <%= raw Caboose.json(p.u1_dims ) %>, width: 600 },
404
- { name: 'u1_free_standing_yn' , nice_name: 'u1_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u1_free_standing_yn ) %>, width: 600 },
405
- { name: 'u1_sqft_manuf' , nice_name: 'u1_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_manuf ) %>, width: 600 },
406
- { name: 'u1_sqft_office' , nice_name: 'u1_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_office ) %>, width: 600 },
407
- { name: 'u1_sqft_retail' , nice_name: 'u1_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_retail ) %>, width: 600 },
408
- { name: 'u1_sqft_total' , nice_name: 'u1_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_total ) %>, width: 600 },
409
- { name: 'u1_sqft_warehouse' , nice_name: 'u1_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_warehouse ) %>, width: 600 },
410
- { name: 'u1_year_built' , nice_name: 'u1_year_built' , type: 'text', value: <%= raw Caboose.json(p.u1_year_built ) %>, width: 600 },
411
- { name: 'u2_dims' , nice_name: 'u2_dims' , type: 'text', value: <%= raw Caboose.json(p.u2_dims ) %>, width: 600 },
412
- { name: 'u2_free_standing_yn' , nice_name: 'u2_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u2_free_standing_yn ) %>, width: 600 },
413
- { name: 'u2_sqft_manuf' , nice_name: 'u2_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_manuf ) %>, width: 600 },
414
- { name: 'u2_sqft_office' , nice_name: 'u2_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_office ) %>, width: 600 },
415
- { name: 'u2_sqft_retail' , nice_name: 'u2_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_retail ) %>, width: 600 },
416
- { name: 'u2_sqft_total' , nice_name: 'u2_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_total ) %>, width: 600 },
417
- { name: 'u2_sqft_warehouse' , nice_name: 'u2_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_warehouse ) %>, width: 600 },
418
- { name: 'u2_year_built' , nice_name: 'u2_year_built' , type: 'text', value: <%= raw Caboose.json(p.u2_year_built ) %>, width: 600 },
419
- { name: 'u3_dims' , nice_name: 'u3_dims' , type: 'text', value: <%= raw Caboose.json(p.u3_dims ) %>, width: 600 },
420
- { name: 'u3_free_standing_yn' , nice_name: 'u3_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u3_free_standing_yn ) %>, width: 600 },
421
- { name: 'u3_sqft_manuf' , nice_name: 'u3_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_manuf ) %>, width: 600 },
422
- { name: 'u3_sqft_office' , nice_name: 'u3_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_office ) %>, width: 600 },
423
- { name: 'u3_sqft_retail' , nice_name: 'u3_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_retail ) %>, width: 600 },
424
- { name: 'u3_sqft_total' , nice_name: 'u3_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_total ) %>, width: 600 },
425
- { name: 'u3_sqft_warehouse' , nice_name: 'u3_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_warehouse ) %>, width: 600 },
426
- { name: 'u3_year_built' , nice_name: 'u3_year_built' , type: 'text', value: <%= raw Caboose.json(p.u3_year_built ) %>, width: 600 },
427
- { name: 'unit_num' , nice_name: 'unit_num' , type: 'text', value: <%= raw Caboose.json(p.unit_num ) %>, width: 600 },
428
- { name: 'upload_source' , nice_name: 'upload_source' , type: 'text', value: <%= raw Caboose.json(p.upload_source ) %>, width: 600 },
429
- { name: 'vacancy_rate' , nice_name: 'vacancy_rate' , type: 'text', value: <%= raw Caboose.json(p.vacancy_rate ) %>, width: 600 },
430
- { name: 'vacant_yn' , nice_name: 'vacant_yn' , type: 'text', value: <%= raw Caboose.json(p.vacant_yn ) %>, width: 600 },
431
- { name: 'valuation_yn' , nice_name: 'valuation_yn' , type: 'text', value: <%= raw Caboose.json(p.valuation_yn ) %>, width: 600 },
432
- { name: 'vt_yn' , nice_name: 'vt_yn' , type: 'text', value: <%= raw Caboose.json(p.vt_yn ) %>, width: 600 },
433
- { name: 'waterfront_yn' , nice_name: 'waterfront_yn' , type: 'text', value: <%= raw Caboose.json(p.waterfront_yn ) %>, width: 600 },
434
- { name: 'withdrawn_date' , nice_name: 'withdrawn_date' , type: 'text', value: <%= raw Caboose.json(p.withdrawn_date ) %>, width: 600 },
435
- { name: 'year_built' , nice_name: 'year_built' , type: 'text', value: <%= raw Caboose.json(p.year_built ) %>, width: 600 },
436
- { name: 'zip' , nice_name: 'zip' , type: 'text', value: <%= raw Caboose.json(p.zip ) %>, width: 600 },
437
- { name: 'zoning_northport' , nice_name: 'zoning_northport' , type: 'text', value: <%= raw Caboose.json(p.zoning_northport ) %>, width: 600 },
438
- { name: 'zoning_tusc' , nice_name: 'zoning_tusc' , type: 'text', value: <%= raw Caboose.json(p.zoning_tusc ) %>, width: 600 }
248
+ <% attributes.each do |attrib, h| %>
249
+ {
250
+ name: '<%= attrib %>',
251
+ nice_name: '<%= h[:nice_name] %>',
252
+ type: '<%= h[:type] %>',
253
+ value: <%= raw Caboose.json(p[attrib]) %>,
254
+ <% if h[:text] %>text: <%= raw Caboose.json(h[:text]) %>,<% end %>
255
+ <% if h[:options_url] %>options_url: <%= raw Caboose.json(h[:options_url]) %>,<% end %>
256
+ width: 600
257
+ },
258
+ <% end %>
439
259
  ]
440
260
  });
441
261
  });
442
-
443
262
  <% end %>
444
263
 
445
264
  var modal = false;