caboose-rets 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/caboose_rets/admin_media.js +7 -7
- data/app/assets/javascripts/caboose_rets/caboose_rets.js +8 -8
- data/app/controllers/caboose_rets/agents_controller.rb +67 -75
- data/app/controllers/caboose_rets/offices_controller.rb +4 -4
- data/app/controllers/caboose_rets/open_houses_controller.rb +3 -3
- data/app/controllers/caboose_rets/properties_controller.rb +160 -0
- data/app/controllers/caboose_rets/rets_controller.rb +2 -2
- data/app/controllers/caboose_rets/rets_media_controller.rb +13 -13
- data/app/controllers/caboose_rets/saved_properties_controller.rb +35 -35
- data/app/models/caboose_rets/agent.rb +42 -55
- data/app/models/caboose_rets/agent_meta.rb +7 -7
- data/app/models/caboose_rets/media.rb +63 -57
- data/app/models/caboose_rets/office.rb +35 -21
- data/app/models/caboose_rets/open_house.rb +15 -15
- data/app/models/caboose_rets/property.rb +203 -0
- data/app/models/caboose_rets/rets_importer.rb +193 -233
- data/app/models/caboose_rets/rets_importer_bak.rb +77 -77
- data/app/models/caboose_rets/rets_importer_old.rb +625 -0
- data/app/models/caboose_rets/saved_property.rb +4 -4
- data/app/models/caboose_rets/saved_search.rb +36 -33
- data/app/models/caboose_rets/schema.rb +324 -855
- data/app/models/caboose_rets/schema_past.rb +918 -0
- data/app/models/caboose_rets/search_option.rb +6 -6
- data/app/views/caboose/blocks/_layout_rets.html.erb +9 -6
- data/app/views/caboose/blocks/_rets_agent_listings.html.erb +3 -3
- data/app/views/caboose_rets/agents/index.html.erb +23 -40
- data/app/views/caboose_rets/media/admin_property_media.html.erb +2 -2
- data/app/views/caboose_rets/{residential → properties}/_search_form.html.erb +42 -42
- data/app/views/caboose_rets/{residential → properties}/admin_edit.html.erb +7 -7
- data/app/views/caboose_rets/{land → properties}/admin_index.html.erb +11 -11
- data/app/views/caboose_rets/properties/details.html.erb +127 -0
- data/app/views/caboose_rets/{land → properties}/index.html.erb +0 -0
- data/app/views/caboose_rets/{residential/residential_not_exists.html.erb → properties/property_not_exists.html.erb} +4 -5
- data/app/views/caboose_rets/{residential → properties}/test_form.html.erb +1 -1
- data/app/views/caboose_rets/rets/admin_import_form.html.erb +1 -1
- data/config/routes.rb +70 -55
- data/lib/caboose-rets.rb +1 -1
- data/lib/caboose_rets/engine.rb +3 -3
- data/lib/caboose_rets/version.rb +1 -1
- data/lib/rets/base/core.rb +1 -1
- data/lib/rets/base/sax_search.rb +1 -1
- data/lib/tasks/caboose_rets.rake +106 -17
- metadata +16 -50
- data/app/controllers/caboose_rets/commercial_controller.rb +0 -349
- data/app/controllers/caboose_rets/land_controller.rb +0 -144
- data/app/controllers/caboose_rets/multi_family_controller.rb +0 -107
- data/app/controllers/caboose_rets/residential_controller.rb +0 -163
- data/app/models/caboose_rets/commercial_property.rb +0 -214
- data/app/models/caboose_rets/land_property.rb +0 -144
- data/app/models/caboose_rets/multi_family_property.rb +0 -199
- data/app/models/caboose_rets/residential_property.rb +0 -236
- data/app/views/caboose/blocks/_rets_commercial_details.html.erb +0 -192
- data/app/views/caboose/blocks/_rets_commercial_headers.html.erb +0 -17
- data/app/views/caboose/blocks/_rets_commercial_index.html.erb +0 -71
- data/app/views/caboose/blocks/_rets_commercial_row.html.erb +0 -39
- data/app/views/caboose/blocks/_rets_commercial_search_form.html.erb +0 -201
- data/app/views/caboose/blocks/_rets_land_details.html.erb +0 -165
- data/app/views/caboose/blocks/_rets_land_index.html.erb +0 -63
- data/app/views/caboose/blocks/_rets_land_row.html.erb +0 -58
- data/app/views/caboose/blocks/_rets_land_search_form.html.erb +0 -194
- data/app/views/caboose/blocks/_rets_multifamily_details.html.erb +0 -161
- data/app/views/caboose/blocks/_rets_multifamily_index.html.erb +0 -63
- data/app/views/caboose/blocks/_rets_multifamily_row.html.erb +0 -56
- data/app/views/caboose/blocks/_rets_multifamily_search_form.html.erb +0 -273
- data/app/views/caboose/blocks/_rets_openhouse_details.html.erb +0 -12
- data/app/views/caboose/blocks/_rets_openhouses_index.html.erb +0 -79
- data/app/views/caboose/blocks/_rets_residential_details.html.erb +0 -243
- data/app/views/caboose/blocks/_rets_residential_index.html.erb +0 -65
- data/app/views/caboose/blocks/_rets_residential_row.html.erb +0 -59
- data/app/views/caboose/blocks/_rets_residential_search_form.html.erb +0 -304
- data/app/views/caboose_rets/commercial/admin_edit.html.erb +0 -269
- data/app/views/caboose_rets/commercial/admin_index.html.erb +0 -51
- data/app/views/caboose_rets/commercial/admin_new.html.erb +0 -57
- data/app/views/caboose_rets/commercial/details.html.erb +0 -0
- data/app/views/caboose_rets/commercial/index.html.erb +0 -87
- data/app/views/caboose_rets/land/admin_edit.html.erb +0 -156
- data/app/views/caboose_rets/land/details.html.erb +0 -0
- data/app/views/caboose_rets/multi_family/admin_edit.html.erb +0 -211
- data/app/views/caboose_rets/multi_family/admin_index.html.erb +0 -46
- data/app/views/caboose_rets/residential/admin_index.html.erb +0 -46
- data/app/views/caboose_rets/residential/details.html.erb +0 -0
- data/app/views/caboose_rets/residential/index.html.erb +0 -0
@@ -1,304 +0,0 @@
|
|
1
|
-
<!-- <div class="body-sink"></div> -->
|
2
|
-
|
3
|
-
<div class="l-wrapper" id="search_form_drop">
|
4
|
-
<div class="l-section">
|
5
|
-
<form class="l-grid l-section h-space-mvm inflate-baritone" action="/residential/search" method="get" id='search_form'>
|
6
|
-
<h3 class="h-type-center h-space-mbs">Search Residential Listings</h3>
|
7
|
-
|
8
|
-
<div class="grid-row">
|
9
|
-
<div class="grid-unit-1of3">
|
10
|
-
<section class="l-section">
|
11
|
-
<label class="h-float-left">Price Range</label>
|
12
|
-
</section> <!-- .l-section -->
|
13
|
-
|
14
|
-
<section class="l-section-bevel m-select-combo">
|
15
|
-
<div class="m-select">
|
16
|
-
<select id="current_price_gte" name="current_price_gte">
|
17
|
-
<option value="" selected="selected">Select</option>
|
18
|
-
<% (10000..50000).step(10000) do |x| %><option value="<%= x %>"><%= number_to_currency(x, :precision => 0) %></option><% end %>
|
19
|
-
<% (100000..1000000).step(50000) do |x| %><option value="<%= x %>"><%= number_to_currency(x, :precision => 0) %></option><% end %>
|
20
|
-
</select>
|
21
|
-
</div> <!-- .m-select -->
|
22
|
-
|
23
|
-
<span>To</span>
|
24
|
-
|
25
|
-
<div class="m-select">
|
26
|
-
<select id="current_price_lte" name="current_price_lte">
|
27
|
-
<option value="" selected="selected">Select</option>
|
28
|
-
<% (10000..50000).step(10000) do |x| %><option value="<%= x %>"><%= number_to_currency(x, :precision => 0) %></option><% end %>
|
29
|
-
<% (100000..1000000).step(50000) do |x| %><option value="<%= x %>"><%= number_to_currency(x, :precision => 0) %></option><% end %>
|
30
|
-
</select>
|
31
|
-
</div> <!-- .m-select -->
|
32
|
-
</section> <!-- .l-section-bevel -->
|
33
|
-
</div> <!-- .grid-unit -->
|
34
|
-
|
35
|
-
<div class="grid-unit-1of3">
|
36
|
-
<div class="l-section">
|
37
|
-
<label class="h-float-left">How Many Beds?</label>
|
38
|
-
</div> <!-- .l-section -->
|
39
|
-
|
40
|
-
<section class="l-section-bevel m-select-combo">
|
41
|
-
<div class="m-select">
|
42
|
-
<select id="bedrooms_gte" name="bedrooms_gte">
|
43
|
-
<option value="">Any</option>
|
44
|
-
<% (1..5).each do |x| %><option value="<%= x %>"><%= x %></option><% end %>
|
45
|
-
</select>
|
46
|
-
</div> <!-- .m-select -->
|
47
|
-
|
48
|
-
<span>To</span>
|
49
|
-
|
50
|
-
<div class="m-select">
|
51
|
-
<select id="bedrooms_lte" name="bedrooms_lte">
|
52
|
-
<option value="">Any</option>
|
53
|
-
<% (1..5).each do |x| %><option value="<%= x %>"><%= x %></option><% end %>
|
54
|
-
</select>
|
55
|
-
</div> <!-- .m-select -->
|
56
|
-
</section> <!-- .l-section-bevel -->
|
57
|
-
</div> <!-- .grid-unit -->
|
58
|
-
|
59
|
-
<div class="grid-unit-1of3">
|
60
|
-
<section class="l-section">
|
61
|
-
<label for="prop_type">Property Type</label>
|
62
|
-
</section> <!-- .l-section -->
|
63
|
-
|
64
|
-
<div class="l-section-bevel">
|
65
|
-
<div class="m-select">
|
66
|
-
<select id="prop_type" name="prop_type">
|
67
|
-
<option value="">Select</option>
|
68
|
-
<% CabooseRets::ResidentialProperty.pluq('prop_type').each do |f| %>
|
69
|
-
<option value="<%= f %>"> <%= f.titleize %></option>
|
70
|
-
<% end %>
|
71
|
-
</select>
|
72
|
-
</div> <!-- .m-select -->
|
73
|
-
</div> <!-- .l-section -->
|
74
|
-
</div> <!-- .grid-unit -->
|
75
|
-
</div> <!-- .grid-row -->
|
76
|
-
|
77
|
-
<div class="grid-row">
|
78
|
-
<div class="grid-unit-1of3">
|
79
|
-
<div class="l-section">
|
80
|
-
<label for="mls_acct">MLS #</label>
|
81
|
-
</div> <!-- .l-section -->
|
82
|
-
|
83
|
-
<div class="l-media">
|
84
|
-
|
85
|
-
<div class="media-body">
|
86
|
-
<div class="l-section-bevel">
|
87
|
-
<input class="search-input" id="mls_acct" name="mls_acct" type="text" class="fix_placeholder" placeholder="Enter Here" />
|
88
|
-
</div> <!-- .l-section -->
|
89
|
-
</div> <!-- .sidebar-body -->
|
90
|
-
</div> <!-- .l-media -->
|
91
|
-
</div> <!-- .grid-unit -->
|
92
|
-
|
93
|
-
<div class="grid-unit-1of3">
|
94
|
-
<div class="l-section">
|
95
|
-
<label for="tot_heat_sqft">Square Feet</label>
|
96
|
-
</div> <!-- .l-section -->
|
97
|
-
|
98
|
-
<section class="l-section-bevel m-select-combo">
|
99
|
-
<div class="m-select">
|
100
|
-
<select id="tot_heat_sqft_gte" name="tot_heat_sqft_gte">
|
101
|
-
<option value="" selected="selected">Select</option>
|
102
|
-
<% (250..4000).step(250) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x) %></option><% end %>
|
103
|
-
</select>
|
104
|
-
</div> <!-- .m-select -->
|
105
|
-
|
106
|
-
<span>To</span>
|
107
|
-
|
108
|
-
<div class="m-select">
|
109
|
-
<select id="tot_heat_sqft_lte" name="tot_heat_sqft_lte">
|
110
|
-
<option value="" selected="selected">Select</option>
|
111
|
-
<% (250..4000).step(250) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x) %></option><% end %>
|
112
|
-
</select>
|
113
|
-
</div> <!-- .m-select -->
|
114
|
-
</section> <!-- .l-section-bevel -->
|
115
|
-
|
116
|
-
</div><!-- .grid-unit -->
|
117
|
-
|
118
|
-
<div class="grid-unit-1of3">
|
119
|
-
<div class="l-section">
|
120
|
-
<label for="acreage">Acreage</label>
|
121
|
-
</div> <!-- .l-section -->
|
122
|
-
<section class="l-section-bevel m-select-combo">
|
123
|
-
<div class="m-select">
|
124
|
-
<select id="acreage_gte" name="acreage_gte">
|
125
|
-
<option value="" selected="selected">Select</option>
|
126
|
-
<% (0.0...10 ).step(0.5) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 1) %></option><% end %>
|
127
|
-
<% (10...20 ).step( 1) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
128
|
-
<% (20...100 ).step( 5) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
129
|
-
<% (100..1000).step( 50) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
130
|
-
</select>
|
131
|
-
</div> <!-- .m-select -->
|
132
|
-
<span>To</span>
|
133
|
-
<div class="m-select">
|
134
|
-
<select id="acreage_lte" name="acreage_lte">
|
135
|
-
<option value="" selected="selected">Select</option>
|
136
|
-
<% (0.0...10 ).step(0.5) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 1) %></option><% end %>
|
137
|
-
<% (10...20 ).step( 1) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
138
|
-
<% (20...100 ).step( 5) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
139
|
-
<% (100..1000).step( 50) do |x| %><option value="<%= x %>"><%= number_with_delimiter(x, :precision => 0) %></option><% end %>
|
140
|
-
</select>
|
141
|
-
</div> <!-- .m-select -->
|
142
|
-
</section> <!-- .l-section-bevel -->
|
143
|
-
</div><!-- .grid-unit -->
|
144
|
-
|
145
|
-
</div> <!-- .grid-row -->
|
146
|
-
|
147
|
-
<div class="grid-row">
|
148
|
-
<div class="grid-unit-1of3">
|
149
|
-
<div class="l-section">
|
150
|
-
<label for="elem_school">Elementary School</label>
|
151
|
-
</div> <!-- .l-section -->
|
152
|
-
<div class="l-section-bevel">
|
153
|
-
<div class="m-select">
|
154
|
-
<select id="elem_school" name="elem_school">
|
155
|
-
<option value="">Select</option>
|
156
|
-
<% CabooseRets::ResidentialProperty.pluq('elem_school').each do |f| %>
|
157
|
-
<option value="<%= f %>"><%= f.titleize %></option>
|
158
|
-
<% end %>
|
159
|
-
</select>
|
160
|
-
</div> <!-- .l-section -->
|
161
|
-
</div> <!-- .m-select -->
|
162
|
-
</div> <!-- .grid-unit -->
|
163
|
-
|
164
|
-
<div class="grid-unit-1of3">
|
165
|
-
<div class="l-section">
|
166
|
-
<label for="middle_school">Middle School</label>
|
167
|
-
</div> <!-- .l-section -->
|
168
|
-
|
169
|
-
<div class="l-section-bevel">
|
170
|
-
<div class="m-select">
|
171
|
-
<select id="middle_school" name="middle_school">
|
172
|
-
<option value="">Select</option>
|
173
|
-
<% CabooseRets::ResidentialProperty.pluq('middle_school').each do |f| %>
|
174
|
-
<option value="<%= f %>"><%= f.titleize %></option>
|
175
|
-
<% end %>
|
176
|
-
</select>
|
177
|
-
</div> <!-- .m-select -->
|
178
|
-
</div> <!-- .l-section -->
|
179
|
-
</div> <!-- .grid-unit -->
|
180
|
-
|
181
|
-
<div class="grid-unit-1of3">
|
182
|
-
<div class="l-section">
|
183
|
-
<label for="high_school">High School</label>
|
184
|
-
</div> <!-- .l-section -->
|
185
|
-
|
186
|
-
<div class="l-section-bevel">
|
187
|
-
<div class="m-select">
|
188
|
-
<select id="high_school" name="high_school">
|
189
|
-
<option value="">Select</option>
|
190
|
-
<% CabooseRets::ResidentialProperty.pluq('high_school').each do |f| %>
|
191
|
-
<option value="<%= f %>"><%= f.titleize %></option>
|
192
|
-
<% end %>
|
193
|
-
</select>
|
194
|
-
</div> <!-- .m-select -->
|
195
|
-
</div> <!-- .l-section -->
|
196
|
-
</div> <!-- .grid-unit -->
|
197
|
-
</div> <!-- .grid-row -->
|
198
|
-
|
199
|
-
<div class="grid-row">
|
200
|
-
<div class="grid-unit-1of3">
|
201
|
-
<div class="l-section">
|
202
|
-
<label for="address_like">Street</label>
|
203
|
-
</div> <!-- .l-section -->
|
204
|
-
|
205
|
-
<div class="l-section-bevel">
|
206
|
-
<input id="address_like" name="address_like" type="text" class="fix_placeholder" placeholder="Street" />
|
207
|
-
</div> <!-- .l-section -->
|
208
|
-
</div> <!-- .grid-unit -->
|
209
|
-
|
210
|
-
<div class="grid-unit-1of3">
|
211
|
-
<div class="l-section">
|
212
|
-
<label for="neighborhood">Neighborhood</label>
|
213
|
-
</div> <!-- .l-section -->
|
214
|
-
|
215
|
-
<div class="l-section-bevel">
|
216
|
-
<div class="m-select">
|
217
|
-
<select id="subdivision" name="subdivision">
|
218
|
-
<option value="">Neighborhood</option>
|
219
|
-
<% CabooseRets::ResidentialProperty.pluq('subdivision').each do |f| %>
|
220
|
-
<option value="<%= f %>"><%= f.titleize %></option>
|
221
|
-
<% end %>
|
222
|
-
</select>
|
223
|
-
</div> <!-- .m-select -->
|
224
|
-
</div> <!-- .l-section -->
|
225
|
-
</div> <!-- .grid-unit -->
|
226
|
-
|
227
|
-
<div class="grid-unit-1of3">
|
228
|
-
<div class="l-section">
|
229
|
-
<label for="remarks_like">Search Keyword</label>
|
230
|
-
</div> <!-- .l-section -->
|
231
|
-
|
232
|
-
<div class="l-section-bevel">
|
233
|
-
<input id="remarks" name="remarks_like" type="text" class="fix_placeholder" placeholder="Keywords" />
|
234
|
-
</div>
|
235
|
-
</div> <!-- .grid-unit -->
|
236
|
-
|
237
|
-
</div> <!-- .grid-row -->
|
238
|
-
|
239
|
-
<div class="grid-row">
|
240
|
-
|
241
|
-
<div class="grid-unit-1of3">
|
242
|
-
<div class="l-section"><label for="latest">Show listings created when?</label></div>
|
243
|
-
<div class="l-section-bevel">
|
244
|
-
<div class="m-select">
|
245
|
-
<select id="date_created_gte" name="date_created_gte">
|
246
|
-
<option value="">All Listings</option>
|
247
|
-
<% d = DateTime.now - 3 %><option value="<%= d.strftime('%F') %>">In the past 3 days</option>
|
248
|
-
<% d = DateTime.now - 7 %><option value="<%= d.strftime('%F') %>">In the past 7 days</option>
|
249
|
-
<% d = DateTime.now - 30 %><option value="<%= d.strftime('%F') %>">In the past month</option>
|
250
|
-
</select>
|
251
|
-
</div> <!-- .l-section -->
|
252
|
-
</div> <!-- .m-select -->
|
253
|
-
</div> <!-- .grid-unit -->
|
254
|
-
|
255
|
-
<div class="grid-unit-1of3">
|
256
|
-
<section class="l-section">
|
257
|
-
<label class="h-float-left">Waterfront</label>
|
258
|
-
<label class="h-float-right">Golf Course</label>
|
259
|
-
</section> <!-- .l-section -->
|
260
|
-
<section class="l-section-bevel m-select-combo">
|
261
|
-
<div class="m-select">
|
262
|
-
<select id="waterfront" name="waterfront">
|
263
|
-
<option value="" selected="selected">Select</option>
|
264
|
-
<option value="Lake Tuscaloosa">Lake</option>
|
265
|
-
<option value="River">River</option>
|
266
|
-
<option value="Other">Other</option>
|
267
|
-
<option value="">No</option>
|
268
|
-
</select>
|
269
|
-
</div> <!-- .m-select -->
|
270
|
-
<div class="m-select">
|
271
|
-
<select id="ftr_lotdesc_like" name="ftr_lotdesc_like">
|
272
|
-
<option value="" selected="selected">Select</option>
|
273
|
-
<option value="golf">Yes</option>
|
274
|
-
<option value="">No</option>
|
275
|
-
</select>
|
276
|
-
</div> <!-- .m-select -->
|
277
|
-
</section>
|
278
|
-
</div> <!-- .grid-unit -->
|
279
|
-
|
280
|
-
<!--
|
281
|
-
<div class="grid-unit-1of3">
|
282
|
-
<div class="l-section"><label for="status">Property Status</label></div>
|
283
|
-
<div class="l-section-bevel">
|
284
|
-
<div class="m-select">
|
285
|
-
<select id="status" name="status">
|
286
|
-
<option value="">All</option>
|
287
|
-
<% CabooseRets::ResidentialProperty.pluq('status').each do |x| %>
|
288
|
-
<option value="<%= x %>" <% if x == 'Active'%> selected="selected" <% end %> ><%= x %></option>
|
289
|
-
<% end %>
|
290
|
-
</select>
|
291
|
-
</div>
|
292
|
-
</div>
|
293
|
-
</div>
|
294
|
-
-->
|
295
|
-
|
296
|
-
<div class="l-section-drop">
|
297
|
-
<input class="m-btn-red btn-large" style='float:right;' type="submit" value="Search" onclick='search_properties(); return false;' />
|
298
|
-
</div> <!-- .l-section -->
|
299
|
-
</div>
|
300
|
-
</form> <!-- .l-grid -->
|
301
|
-
|
302
|
-
</div> <!-- .l-section -->
|
303
|
-
</div> <!-- .l-wrapper -->
|
304
|
-
|
@@ -1,269 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
p = @property
|
3
|
-
is_custom_property = p.id > 1000000
|
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
|
-
}
|
199
|
-
|
200
|
-
%>
|
201
|
-
<h1>Edit Commercial Property</h1>
|
202
|
-
<p>MLS#: <%= p.mls_acct %>
|
203
|
-
<p>
|
204
|
-
<input type='button' value='< Back' onclick="window.location='/admin/commercial';" />
|
205
|
-
<input type='button' value='Images and Files' onclick="window.location='/admin/properties/<%= p.mls_acct %>/media';" />
|
206
|
-
<% if !is_custom_property %>
|
207
|
-
<input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
|
208
|
-
<% end %>
|
209
|
-
</p>
|
210
|
-
<div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
|
211
|
-
|
212
|
-
<% if is_custom_property %>
|
213
|
-
<% attributes.each do |attrib, h| %>
|
214
|
-
<div id='commercialproperty_<%= p.id %>_<%= attrib %>'></div>
|
215
|
-
<% end %>
|
216
|
-
<% else %>
|
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
|
-
<% end %>
|
223
|
-
|
224
|
-
<% content_for :caboose_js do %>
|
225
|
-
<%= javascript_include_tag "caboose/model/all" %>
|
226
|
-
<script type='text/javascript'>
|
227
|
-
|
228
|
-
function refresh_property_from_mls(mls_acct)
|
229
|
-
{
|
230
|
-
modal.autosize("<p class='loading'>Refreshing property info and images from MLS...</p>");
|
231
|
-
$.ajax({
|
232
|
-
url: '/admin/commercial/' + mls_acct + '/refresh',
|
233
|
-
success: function(resp) {
|
234
|
-
if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
|
235
|
-
if (resp.success) modal.autosize("<p class='note success'>" + resp.success + "</p>");
|
236
|
-
}
|
237
|
-
});
|
238
|
-
}
|
239
|
-
|
240
|
-
<% if is_custom_property %>
|
241
|
-
$(document).ready(function() {
|
242
|
-
m = new ModelBinder({
|
243
|
-
name: 'CommercialProperty',
|
244
|
-
id: <%= p.id %>,
|
245
|
-
update_url: '/admin/commercial/<%= p.id %>',
|
246
|
-
authenticity_token: '<%= form_authenticity_token %>',
|
247
|
-
attributes: [
|
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 %>
|
259
|
-
]
|
260
|
-
});
|
261
|
-
});
|
262
|
-
<% end %>
|
263
|
-
|
264
|
-
var modal = false;
|
265
|
-
$(window).load(function() {
|
266
|
-
modal = new CabooseModal(800);
|
267
|
-
});
|
268
|
-
</script>
|
269
|
-
<% end %>
|