caboose-rets 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +15 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +4 -0
  4. data/Rakefile +38 -0
  5. data/app/controllers/caboose_rets/agents_controller.rb +169 -0
  6. data/app/controllers/caboose_rets/application_controller.rb +6 -0
  7. data/app/controllers/caboose_rets/commercial_controller.rb +281 -0
  8. data/app/controllers/caboose_rets/land_controller.rb +69 -0
  9. data/app/controllers/caboose_rets/open_houses_controller.rb +60 -0
  10. data/app/controllers/caboose_rets/residential_controller.rb +108 -0
  11. data/app/helpers/caboose_rets/application_helper.rb +4 -0
  12. data/app/models/caboose_rets/agent.rb +65 -0
  13. data/app/models/caboose_rets/commercial_property.rb +214 -0
  14. data/app/models/caboose_rets/land_property.rb +143 -0
  15. data/app/models/caboose_rets/media.rb +23 -0
  16. data/app/models/caboose_rets/multi_family_property.rb +198 -0
  17. data/app/models/caboose_rets/office.rb +27 -0
  18. data/app/models/caboose_rets/open_house.rb +19 -0
  19. data/app/models/caboose_rets/residential_property.rb +236 -0
  20. data/app/models/caboose_rets/rets_importer.rb +303 -0
  21. data/app/models/caboose_rets/rets_plugin.rb +26 -0
  22. data/app/views/caboose_rets/agents/_admin_top_nav.html.erb +7 -0
  23. data/app/views/caboose_rets/agents/admin_edit.html.erb +28 -0
  24. data/app/views/caboose_rets/agents/admin_edit_bio.html.erb +31 -0
  25. data/app/views/caboose_rets/agents/admin_edit_contact_info.html.erb +31 -0
  26. data/app/views/caboose_rets/agents/admin_edit_mls_info.html.erb +71 -0
  27. data/app/views/caboose_rets/agents/admin_index.html.erb +48 -0
  28. data/app/views/caboose_rets/agents/details.html.erb +140 -0
  29. data/app/views/caboose_rets/agents/index.html.erb +163 -0
  30. data/app/views/caboose_rets/agents/listings.html.erb +121 -0
  31. data/app/views/caboose_rets/commercial/admin_edit.html.erb +452 -0
  32. data/app/views/caboose_rets/commercial/admin_index.html.erb +46 -0
  33. data/app/views/caboose_rets/commercial/details.html.erb +134 -0
  34. data/app/views/caboose_rets/commercial/index.html.erb +87 -0
  35. data/app/views/caboose_rets/open_houses/admin_new.html.erb +31 -0
  36. data/app/views/caboose_rets/residential/admin_edit.html.erb +250 -0
  37. data/app/views/caboose_rets/residential/admin_index.html.erb +44 -0
  38. data/app/views/caboose_rets/residential/details.html.erb +139 -0
  39. data/app/views/caboose_rets/residential/index.html.erb +102 -0
  40. data/app/views/caboose_rets/residential/residential_not_exists.html.erb +15 -0
  41. data/app/views/caboose_rets/residential/test_form.html.erb +4 -0
  42. data/config/routes.rb +87 -0
  43. data/lib/caboose-rets.rb +4 -0
  44. data/lib/caboose_rets/caboose_rets_helper.rb +2 -0
  45. data/lib/caboose_rets/engine.rb +7 -0
  46. data/lib/caboose_rets/version.rb +3 -0
  47. data/lib/tasks/caboose_rets.rake +855 -0
  48. data/test/caboose_test.rb +7 -0
  49. data/test/dummy/README.rdoc +261 -0
  50. data/test/dummy/Rakefile +7 -0
  51. data/test/dummy/app/assets/javascripts/application.js +15 -0
  52. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  53. data/test/dummy/app/controllers/application_controller.rb +3 -0
  54. data/test/dummy/app/helpers/application_helper.rb +2 -0
  55. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  56. data/test/dummy/config.ru +4 -0
  57. data/test/dummy/config/application.rb +59 -0
  58. data/test/dummy/config/boot.rb +10 -0
  59. data/test/dummy/config/database.yml +25 -0
  60. data/test/dummy/config/environment.rb +5 -0
  61. data/test/dummy/config/environments/development.rb +37 -0
  62. data/test/dummy/config/environments/production.rb +67 -0
  63. data/test/dummy/config/environments/test.rb +37 -0
  64. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  65. data/test/dummy/config/initializers/inflections.rb +15 -0
  66. data/test/dummy/config/initializers/mime_types.rb +5 -0
  67. data/test/dummy/config/initializers/secret_token.rb +7 -0
  68. data/test/dummy/config/initializers/session_store.rb +8 -0
  69. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/test/dummy/config/locales/en.yml +5 -0
  71. data/test/dummy/config/routes.rb +4 -0
  72. data/test/dummy/db/test.sqlite3 +0 -0
  73. data/test/dummy/log/test.log +25 -0
  74. data/test/dummy/public/404.html +26 -0
  75. data/test/dummy/public/422.html +26 -0
  76. data/test/dummy/public/500.html +25 -0
  77. data/test/dummy/public/favicon.ico +0 -0
  78. data/test/dummy/script/rails +6 -0
  79. data/test/integration/navigation_test.rb +10 -0
  80. data/test/test_helper.rb +15 -0
  81. metadata +169 -0
@@ -0,0 +1,452 @@
1
+ <%
2
+ p = @property
3
+ is_custom_property = p.mls_acct.starts_with?('0')
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
+ ]
196
+
197
+ %>
198
+ <h1>Edit Commercial Property</h1>
199
+ <p>MLS#: <%= p.mls_acct %>
200
+ <p>
201
+ <input type='button' value='< Back' onclick="window.location='/admin/commercial';" />
202
+ <% if !is_custom_property %>
203
+ <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
204
+ <% end %>
205
+ </p>
206
+ <div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
207
+
208
+ <% if is_custom_property %>
209
+
210
+ <% attributes.each do |attrib| %>
211
+ <div id='commercialproperty_<%= p.id %>_<%= attrib %>'></div>
212
+ <% end %>
213
+
214
+ <% 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
+
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)
235
+ modal.autosize("<p class='note error'>" + resp.error + "</p>");
236
+ if (resp.reload)
237
+ location.reload();
238
+ }
239
+ });
240
+ }
241
+
242
+ <% if p.mls_acct.starts_with?('0') %>
243
+
244
+ $(document).ready(function() {
245
+ m = new ModelBinder({
246
+ name: 'CommercialProperty',
247
+ id: <%= p.id %>,
248
+ update_url: '/admin/commercial/<%= p.id %>',
249
+ authenticity_token: '<%= form_authenticity_token %>',
250
+ attributes: [
251
+ { name: 'acreage' , nice_name: 'acreage' , type: 'text', value: <%= raw Caboose.json(p.acreage ) %>, width: 600 },
252
+ { name: 'adjoining_land_use' , nice_name: 'adjoining_land_use' , type: 'text', value: <%= raw Caboose.json(p.adjoining_land_use ) %>, width: 600 },
253
+ { name: 'agent_notes' , nice_name: 'agent_notes' , type: 'textarea', value: <%= raw Caboose.json(p.agent_notes ) %>, width: 600 },
254
+ { name: 'agent_other_contact_desc' , nice_name: 'agent_other_contact_desc' , type: 'text', value: <%= raw Caboose.json(p.agent_other_contact_desc ) %>, width: 600 },
255
+ { name: 'agent_other_contact_phone' , nice_name: 'agent_other_contact_phone' , type: 'text', value: <%= raw Caboose.json(p.agent_other_contact_phone ) %>, width: 600 },
256
+ { name: 'annual_taxes' , nice_name: 'annual_taxes' , type: 'text', value: <%= raw Caboose.json(p.annual_taxes ) %>, width: 600 },
257
+ { name: 'approx_age' , nice_name: 'approx_age' , type: 'text', value: <%= raw Caboose.json(p.approx_age ) %>, width: 600 },
258
+ { name: 'area' , nice_name: 'area' , type: 'text', value: <%= raw Caboose.json(p.area ) %>, width: 600 },
259
+ { name: 'baths' , nice_name: 'baths' , type: 'text', value: <%= raw Caboose.json(p.baths ) %>, width: 600 },
260
+ { name: 'baths_full' , nice_name: 'baths_full' , type: 'text', value: <%= raw Caboose.json(p.baths_full ) %>, width: 600 },
261
+ { name: 'baths_half' , nice_name: 'baths_half' , type: 'text', value: <%= raw Caboose.json(p.baths_half ) %>, width: 600 },
262
+ { name: 'bedrooms' , nice_name: 'bedrooms' , type: 'text', value: <%= raw Caboose.json(p.bedrooms ) %>, width: 600 },
263
+ { name: 'bom_date' , nice_name: 'bom_date' , type: 'text', value: <%= raw Caboose.json(p.bom_date ) %>, width: 600 },
264
+ { name: 'book_number' , nice_name: 'book_number' , type: 'text', value: <%= raw Caboose.json(p.book_number ) %>, width: 600 },
265
+ { name: 'book_page' , nice_name: 'book_page' , type: 'text', value: <%= raw Caboose.json(p.book_page ) %>, width: 600 },
266
+ { name: 'book_type' , nice_name: 'book_type' , type: 'text', value: <%= raw Caboose.json(p.book_type ) %>, width: 600 },
267
+ { name: 'box_on_unit' , nice_name: 'box_on_unit' , type: 'text', value: <%= raw Caboose.json(p.box_on_unit ) %>, width: 600 },
268
+ { name: 'box_on_unit_yn' , nice_name: 'box_on_unit_yn' , type: 'text', value: <%= raw Caboose.json(p.box_on_unit_yn ) %>, width: 600 },
269
+ { name: 'business_included_yn' , nice_name: 'business_included_yn' , type: 'text', value: <%= raw Caboose.json(p.business_included_yn ) %>, width: 600 },
270
+ { name: 'buyer_broker' , nice_name: 'buyer_broker' , type: 'text', value: <%= raw Caboose.json(p.buyer_broker ) %>, width: 600 },
271
+ { name: 'buyer_broker_type' , nice_name: 'buyer_broker_type' , type: 'text', value: <%= raw Caboose.json(p.buyer_broker_type ) %>, width: 600 },
272
+ { name: 'buyer_city' , nice_name: 'buyer_city' , type: 'text', value: <%= raw Caboose.json(p.buyer_city ) %>, width: 600 },
273
+ { name: 'buyer_name' , nice_name: 'buyer_name' , type: 'text', value: <%= raw Caboose.json(p.buyer_name ) %>, width: 600 },
274
+ { name: 'buyer_state' , nice_name: 'buyer_state' , type: 'text', value: <%= raw Caboose.json(p.buyer_state ) %>, width: 600 },
275
+ { name: 'buyer_zip' , nice_name: 'buyer_zip' , type: 'text', value: <%= raw Caboose.json(p.buyer_zip ) %>, width: 600 },
276
+ { name: 'category' , nice_name: 'category' , type: 'text', value: <%= raw Caboose.json(p.category ) %>, width: 600 },
277
+ { name: 'city' , nice_name: 'city' , type: 'text', value: <%= raw Caboose.json(p.city ) %>, width: 600 },
278
+ { name: 'city_code' , nice_name: 'city_code' , type: 'text', value: <%= raw Caboose.json(p.city_code ) %>, width: 600 },
279
+ { name: 'co_la_code' , nice_name: 'co_la_code' , type: 'text', value: <%= raw Caboose.json(p.co_la_code ) %>, width: 600 },
280
+ { name: 'co_lo_code' , nice_name: 'co_lo_code' , type: 'text', value: <%= raw Caboose.json(p.co_lo_code ) %>, width: 600 },
281
+ { name: 'co_sa_code' , nice_name: 'co_sa_code' , type: 'text', value: <%= raw Caboose.json(p.co_sa_code ) %>, width: 600 },
282
+ { name: 'co_so_code' , nice_name: 'co_so_code' , type: 'text', value: <%= raw Caboose.json(p.co_so_code ) %>, width: 600 },
283
+ { name: 'contacts' , nice_name: 'contacts' , type: 'text', value: <%= raw Caboose.json(p.contacts ) %>, width: 600 },
284
+ { name: 'contr_broker' , nice_name: 'contr_broker' , type: 'text', value: <%= raw Caboose.json(p.contr_broker ) %>, width: 600 },
285
+ { name: 'contr_broker_type' , nice_name: 'contr_broker_type' , type: 'text', value: <%= raw Caboose.json(p.contr_broker_type ) %>, width: 600 },
286
+ { name: 'county' , nice_name: 'county' , type: 'text', value: <%= raw Caboose.json(p.county ) %>, width: 600 },
287
+ { name: 'current_price' , nice_name: 'current_price' , type: 'text', value: <%= raw Caboose.json(p.current_price ) %>, width: 600 },
288
+ { name: 'date_created' , nice_name: 'date_created' , type: 'text', value: <%= raw Caboose.json(p.date_created ) %>, width: 600 },
289
+ { name: 'date_leased' , nice_name: 'date_leased' , type: 'text', value: <%= raw Caboose.json(p.date_leased ) %>, width: 600 },
290
+ { name: 'date_modified' , nice_name: 'date_modified' , type: 'text', value: <%= raw Caboose.json(p.date_modified ) %>, width: 600 },
291
+ { name: 'df_yn' , nice_name: 'df_yn' , type: 'text', value: <%= raw Caboose.json(p.df_yn ) %>, width: 600 },
292
+ { name: 'directions' , nice_name: 'directions' , type: 'text', value: <%= raw Caboose.json(p.directions ) %>, width: 600 },
293
+ { name: 'display_address_yn' , nice_name: 'display_address_yn' , type: 'text', value: <%= raw Caboose.json(p.display_address_yn ) %>, width: 600 },
294
+ { name: 'dom' , nice_name: 'dom' , type: 'text', value: <%= raw Caboose.json(p.dom ) %>, width: 600 },
295
+ { name: 'elem_school' , nice_name: 'elem_school' , type: 'text', value: <%= raw Caboose.json(p.elem_school ) %>, width: 600 },
296
+ { name: 'expenses_assoc' , nice_name: 'expenses_assoc' , type: 'text', value: <%= raw Caboose.json(p.expenses_assoc ) %>, width: 600 },
297
+ { name: 'expenses_ins' , nice_name: 'expenses_ins' , type: 'text', value: <%= raw Caboose.json(p.expenses_ins ) %>, width: 600 },
298
+ { name: 'expenses_maint' , nice_name: 'expenses_maint' , type: 'text', value: <%= raw Caboose.json(p.expenses_maint ) %>, width: 600 },
299
+ { name: 'expenses_mgmt' , nice_name: 'expenses_mgmt' , type: 'text', value: <%= raw Caboose.json(p.expenses_mgmt ) %>, width: 600 },
300
+ { name: 'expenses_other' , nice_name: 'expenses_other' , type: 'text', value: <%= raw Caboose.json(p.expenses_other ) %>, width: 600 },
301
+ { name: 'expenses_tax' , nice_name: 'expenses_tax' , type: 'text', value: <%= raw Caboose.json(p.expenses_tax ) %>, width: 600 },
302
+ { name: 'expenses_utility' , nice_name: 'expenses_utility' , type: 'text', value: <%= raw Caboose.json(p.expenses_utility ) %>, width: 600 },
303
+ { name: 'expire_date' , nice_name: 'expire_date' , type: 'text', value: <%= raw Caboose.json(p.expire_date ) %>, width: 600 },
304
+ { name: 'flood_plain' , nice_name: 'flood_plain' , type: 'text', value: <%= raw Caboose.json(p.flood_plain ) %>, width: 600 },
305
+ { name: 'ftr_building' , nice_name: 'ftr_building' , type: 'text', value: <%= raw Caboose.json(p.ftr_building ) %>, width: 600 },
306
+ { name: 'ftr_building_type' , nice_name: 'ftr_building_type' , type: 'text', value: <%= raw Caboose.json(p.ftr_building_type ) %>, width: 600 },
307
+ { name: 'ftr_closing' , nice_name: 'ftr_closing' , type: 'text', value: <%= raw Caboose.json(p.ftr_closing ) %>, width: 600 },
308
+ { name: 'ftr_cooling' , nice_name: 'ftr_cooling' , type: 'text', value: <%= raw Caboose.json(p.ftr_cooling ) %>, width: 600 },
309
+ { name: 'ftr_docs_on_file' , nice_name: 'ftr_docs_on_file' , type: 'text', value: <%= raw Caboose.json(p.ftr_docs_on_file ) %>, width: 600 },
310
+ { name: 'ftr_exterior' , nice_name: 'ftr_exterior' , type: 'text', value: <%= raw Caboose.json(p.ftr_exterior ) %>, width: 600 },
311
+ { name: 'ftr_financing' , nice_name: 'ftr_financing' , type: 'text', value: <%= raw Caboose.json(p.ftr_financing ) %>, width: 600 },
312
+ { name: 'ftr_flooring' , nice_name: 'ftr_flooring' , type: 'text', value: <%= raw Caboose.json(p.ftr_flooring ) %>, width: 600 },
313
+ { name: 'ftr_heating' , nice_name: 'ftr_heating' , type: 'text', value: <%= raw Caboose.json(p.ftr_heating ) %>, width: 600 },
314
+ { name: 'ftr_interior' , nice_name: 'ftr_interior' , type: 'text', value: <%= raw Caboose.json(p.ftr_interior ) %>, width: 600 },
315
+ { name: 'ftr_internet' , nice_name: 'ftr_internet' , type: 'text', value: <%= raw Caboose.json(p.ftr_internet ) %>, width: 600 },
316
+ { name: 'ftr_lease_terms' , nice_name: 'ftr_lease_terms' , type: 'text', value: <%= raw Caboose.json(p.ftr_lease_terms ) %>, width: 600 },
317
+ { name: 'ftr_property_desc' , nice_name: 'ftr_property_desc' , type: 'text', value: <%= raw Caboose.json(p.ftr_property_desc ) %>, width: 600 },
318
+ { name: 'ftr_roof' , nice_name: 'ftr_roof' , type: 'text', value: <%= raw Caboose.json(p.ftr_roof ) %>, width: 600 },
319
+ { name: 'ftr_sale_terms' , nice_name: 'ftr_sale_terms' , type: 'text', value: <%= raw Caboose.json(p.ftr_sale_terms ) %>, width: 600 },
320
+ { name: 'ftr_sewer' , nice_name: 'ftr_sewer' , type: 'text', value: <%= raw Caboose.json(p.ftr_sewer ) %>, width: 600 },
321
+ { name: 'ftr_showing' , nice_name: 'ftr_showing' , type: 'text', value: <%= raw Caboose.json(p.ftr_showing ) %>, width: 600 },
322
+ { name: 'ftr_sprinkler' , nice_name: 'ftr_sprinkler' , type: 'text', value: <%= raw Caboose.json(p.ftr_sprinkler ) %>, width: 600 },
323
+ { name: 'ftr_style' , nice_name: 'ftr_style' , type: 'text', value: <%= raw Caboose.json(p.ftr_style ) %>, width: 600 },
324
+ { name: 'ftr_utilities' , nice_name: 'ftr_utilities' , type: 'text', value: <%= raw Caboose.json(p.ftr_utilities ) %>, width: 600 },
325
+ { name: 'ftr_utilities_rental' , nice_name: 'ftr_utilities_rental' , type: 'text', value: <%= raw Caboose.json(p.ftr_utilities_rental ) %>, width: 600 },
326
+ { name: 'ftr_water' , nice_name: 'ftr_water' , type: 'text', value: <%= raw Caboose.json(p.ftr_water ) %>, width: 600 },
327
+ { name: 'geo_precision' , nice_name: 'geo_precision' , type: 'text', value: <%= raw Caboose.json(p.geo_precision ) %>, width: 600 },
328
+ { name: 'georesult' , nice_name: 'georesult' , type: 'text', value: <%= raw Caboose.json(p.georesult ) %>, width: 600 },
329
+ { name: 'high_school' , nice_name: 'high_school' , type: 'text', value: <%= raw Caboose.json(p.high_school ) %>, width: 600 },
330
+ { name: 'hoa_fee' , nice_name: 'hoa_fee' , type: 'text', value: <%= raw Caboose.json(p.hoa_fee ) %>, width: 600 },
331
+ { name: 'hoa_fee_yn' , nice_name: 'hoa_fee_yn' , type: 'text', value: <%= raw Caboose.json(p.hoa_fee_yn ) %>, width: 600 },
332
+ { name: 'hoa_term' , nice_name: 'hoa_term' , type: 'text', value: <%= raw Caboose.json(p.hoa_term ) %>, width: 600 },
333
+ { name: 'income_gross' , nice_name: 'income_gross' , type: 'text', value: <%= raw Caboose.json(p.income_gross ) %>, width: 600 },
334
+ { name: 'income_net' , nice_name: 'income_net' , type: 'text', value: <%= raw Caboose.json(p.income_net ) %>, width: 600 },
335
+ { name: 'income_other' , nice_name: 'income_other' , type: 'text', value: <%= raw Caboose.json(p.income_other ) %>, width: 600 },
336
+ { name: 'income_rental' , nice_name: 'income_rental' , type: 'text', value: <%= raw Caboose.json(p.income_rental ) %>, width: 600 },
337
+ { name: 'internet_yn' , nice_name: 'internet_yn' , type: 'text', value: <%= raw Caboose.json(p.internet_yn ) %>, width: 600 },
338
+ { name: 'la_code' , nice_name: 'la_code' , type: 'text', value: <%= raw Caboose.json(p.la_code ) %>, width: 600 },
339
+ { name: 'leased_through' , nice_name: 'leased_through' , type: 'text', value: <%= raw Caboose.json(p.leased_through ) %>, width: 600 },
340
+ { name: 'legal_block' , nice_name: 'legal_block' , type: 'text', value: <%= raw Caboose.json(p.legal_block ) %>, width: 600 },
341
+ { name: 'legal_lot' , nice_name: 'legal_lot' , type: 'text', value: <%= raw Caboose.json(p.legal_lot ) %>, width: 600 },
342
+ { name: 'legals' , nice_name: 'legals' , type: 'text', value: <%= raw Caboose.json(p.legals ) %>, width: 600 },
343
+ { name: 'list_date' , nice_name: 'list_date' , type: 'text', value: <%= raw Caboose.json(p.list_date ) %>, width: 600 },
344
+ { name: 'list_price' , nice_name: 'list_price' , type: 'text', value: <%= raw Caboose.json(p.list_price ) %>, width: 600 },
345
+ { name: 'listing_type' , nice_name: 'listing_type' , type: 'text', value: <%= raw Caboose.json(p.listing_type ) %>, width: 600 },
346
+ { name: 'lo_code' , nice_name: 'lo_code' , type: 'text', value: <%= raw Caboose.json(p.lo_code ) %>, width: 600 },
347
+ { name: 'lockbox_yn' , nice_name: 'lockbox_yn' , type: 'text', value: <%= raw Caboose.json(p.lockbox_yn ) %>, width: 600 },
348
+ { name: 'lot_dimensions' , nice_name: 'lot_dimensions' , type: 'text', value: <%= raw Caboose.json(p.lot_dimensions ) %>, width: 600 },
349
+ { name: 'lot_dimensions_source' , nice_name: 'lot_dimensions_source' , type: 'text', value: <%= raw Caboose.json(p.lot_dimensions_source ) %>, width: 600 },
350
+ { name: 'media_flag' , nice_name: 'media_flag' , type: 'text', value: <%= raw Caboose.json(p.media_flag ) %>, width: 600 },
351
+ { name: 'middle_school' , nice_name: 'middle_school' , type: 'text', value: <%= raw Caboose.json(p.middle_school ) %>, width: 600 },
352
+ //{ name: 'mls_acct' , nice_name: 'mls_acct' , type: 'text', value: <%= raw Caboose.json(p.mls_acct ) %>, width: 600 },
353
+ { name: 'municipality' , nice_name: 'municipality' , type: 'text', value: <%= raw Caboose.json(p.municipality ) %>, width: 600 },
354
+ { name: 'num_units' , nice_name: 'num_units' , type: 'text', value: <%= raw Caboose.json(p.num_units ) %>, width: 600 },
355
+ { name: 'num_units_occupied' , nice_name: 'num_units_occupied' , type: 'text', value: <%= raw Caboose.json(p.num_units_occupied ) %>, width: 600 },
356
+ { name: 'off_mkt_date' , nice_name: 'off_mkt_date' , type: 'text', value: <%= raw Caboose.json(p.off_mkt_date ) %>, width: 600 },
357
+ { name: 'off_mkt_days' , nice_name: 'off_mkt_days' , type: 'text', value: <%= raw Caboose.json(p.off_mkt_days ) %>, width: 600 },
358
+ { name: 'office_notes' , nice_name: 'office_notes' , type: 'text', value: <%= raw Caboose.json(p.office_notes ) %>, width: 600 },
359
+ { name: 'orig_lp' , nice_name: 'orig_lp' , type: 'text', value: <%= raw Caboose.json(p.orig_lp ) %>, width: 600 },
360
+ { name: 'other_fee' , nice_name: 'other_fee' , type: 'text', value: <%= raw Caboose.json(p.other_fee ) %>, width: 600 },
361
+ { name: 'other_fee_type' , nice_name: 'other_fee_type' , type: 'text', value: <%= raw Caboose.json(p.other_fee_type ) %>, width: 600 },
362
+ { name: 'owner_name' , nice_name: 'owner_name' , type: 'text', value: <%= raw Caboose.json(p.owner_name ) %>, width: 600 },
363
+ { name: 'owner_phone' , nice_name: 'owner_phone' , type: 'text', value: <%= raw Caboose.json(p.owner_phone ) %>, width: 600 },
364
+ { name: 'parcel_id' , nice_name: 'parcel_id' , type: 'text', value: <%= raw Caboose.json(p.parcel_id ) %>, width: 600 },
365
+ { name: 'pending_date' , nice_name: 'pending_date' , type: 'text', value: <%= raw Caboose.json(p.pending_date ) %>, width: 600 },
366
+ { name: 'photo_count' , nice_name: 'photo_count' , type: 'text', value: <%= raw Caboose.json(p.photo_count ) %>, width: 600 },
367
+ { name: 'photo_date_modified' , nice_name: 'photo_date_modified' , type: 'text', value: <%= raw Caboose.json(p.photo_date_modified ) %>, width: 600 },
368
+ { name: 'photo_description' , nice_name: 'photo_description' , type: 'text', value: <%= raw Caboose.json(p.photo_description ) %>, width: 600 },
369
+ { name: 'photo_instr' , nice_name: 'photo_instr' , type: 'text', value: <%= raw Caboose.json(p.photo_instr ) %>, width: 600 },
370
+ { name: 'posession' , nice_name: 'posession' , type: 'text', value: <%= raw Caboose.json(p.posession ) %>, width: 600 },
371
+ { name: 'price_change_date' , nice_name: 'price_change_date' , type: 'text', value: <%= raw Caboose.json(p.price_change_date ) %>, width: 600 },
372
+ { name: 'price_sqft' , nice_name: 'price_sqft' , type: 'text', value: <%= raw Caboose.json(p.price_sqft ) %>, width: 600 },
373
+ { name: 'proj_close_date' , nice_name: 'proj_close_date' , type: 'text', value: <%= raw Caboose.json(p.proj_close_date ) %>, width: 600 },
374
+ { name: 'prop_desc' , nice_name: 'prop_desc' , type: 'text', value: <%= raw Caboose.json(p.prop_desc ) %>, width: 600 },
375
+ { name: 'prop_id' , nice_name: 'prop_id' , type: 'text', value: <%= raw Caboose.json(p.prop_id ) %>, width: 600 },
376
+ { name: 'prop_type' , nice_name: 'prop_type' , type: 'text', value: <%= raw Caboose.json(p.prop_type ) %>, width: 600 },
377
+ { name: 'remarks' , nice_name: 'remarks' , type: 'text', value: <%= raw Caboose.json(p.remarks ) %>, width: 600 },
378
+ { name: 'road_frontage_ft' , nice_name: 'road_frontage_ft' , type: 'text', value: <%= raw Caboose.json(p.road_frontage_ft ) %>, width: 600 },
379
+ { name: 'sa_code' , nice_name: 'sa_code' , type: 'text', value: <%= raw Caboose.json(p.sa_code ) %>, width: 600 },
380
+ { name: 'sale_lease' , nice_name: 'sale_lease' , type: 'text', value: <%= raw Caboose.json(p.sale_lease ) %>, width: 600 },
381
+ { name: 'sale_notes' , nice_name: 'sale_notes' , type: 'text', value: <%= raw Caboose.json(p.sale_notes ) %>, width: 600 },
382
+ { name: 'so_code' , nice_name: 'so_code' , type: 'text', value: <%= raw Caboose.json(p.so_code ) %>, width: 600 },
383
+ { name: 'sold_date' , nice_name: 'sold_date' , type: 'text', value: <%= raw Caboose.json(p.sold_date ) %>, width: 600 },
384
+ { name: 'sold_price' , nice_name: 'sold_price' , type: 'text', value: <%= raw Caboose.json(p.sold_price ) %>, width: 600 },
385
+ { name: 'sold_terms' , nice_name: 'sold_terms' , type: 'text', value: <%= raw Caboose.json(p.sold_terms ) %>, width: 600 },
386
+ { name: 'sqft_source' , nice_name: 'sqft_source' , type: 'text', value: <%= raw Caboose.json(p.sqft_source ) %>, width: 600 },
387
+ { name: 'state' , nice_name: 'state' , type: 'text', value: <%= raw Caboose.json(p.state ) %>, width: 600 },
388
+ { name: 'status' , nice_name: 'status' , type: 'text', value: <%= raw Caboose.json(p.status ) %>, width: 600 },
389
+ { name: 'status_date' , nice_name: 'status_date' , type: 'text', value: <%= raw Caboose.json(p.status_date ) %>, width: 600 },
390
+ { name: 'status_flag' , nice_name: 'status_flag' , type: 'text', value: <%= raw Caboose.json(p.status_flag ) %>, width: 600 },
391
+ { name: 'street' , nice_name: 'street' , type: 'text', value: <%= raw Caboose.json(p.street ) %>, width: 600 },
392
+ { name: 'street_dir' , nice_name: 'street_dir' , type: 'text', value: <%= raw Caboose.json(p.street_dir ) %>, width: 600 },
393
+ { name: 'street_name' , nice_name: 'street_name' , type: 'text', value: <%= raw Caboose.json(p.street_name ) %>, width: 600 },
394
+ { name: 'street_num' , nice_name: 'street_num' , type: 'text', value: <%= raw Caboose.json(p.street_num ) %>, width: 600 },
395
+ { name: 'sub_agent' , nice_name: 'sub_agent' , type: 'text', value: <%= raw Caboose.json(p.sub_agent ) %>, width: 600 },
396
+ { name: 'sub_agent_type' , nice_name: 'sub_agent_type' , type: 'text', value: <%= raw Caboose.json(p.sub_agent_type ) %>, width: 600 },
397
+ { name: 'sub_area' , nice_name: 'sub_area' , type: 'text', value: <%= raw Caboose.json(p.sub_area ) %>, width: 600 },
398
+ { name: 'subdivision' , nice_name: 'subdivision' , type: 'text', value: <%= raw Caboose.json(p.subdivision ) %>, width: 600 },
399
+ { name: 'take_photo_yn' , nice_name: 'take_photo_yn' , type: 'text', value: <%= raw Caboose.json(p.take_photo_yn ) %>, width: 600 },
400
+ { name: 'third_party_comm_yn' , nice_name: 'third_party_comm_yn' , type: 'text', value: <%= raw Caboose.json(p.third_party_comm_yn ) %>, width: 600 },
401
+ { name: 'tot_heat_sqft' , nice_name: 'tot_heat_sqft' , type: 'text', value: <%= raw Caboose.json(p.tot_heat_sqft ) %>, width: 600 },
402
+ { name: 'tour_date' , nice_name: 'tour_date' , type: 'text', value: <%= raw Caboose.json(p.tour_date ) %>, width: 600 },
403
+ { name: 'tour_submit_date' , nice_name: 'tour_submit_date' , type: 'text', value: <%= raw Caboose.json(p.tour_submit_date ) %>, width: 600 },
404
+ { name: 'type_detailed' , nice_name: 'type_detailed' , type: 'text', value: <%= raw Caboose.json(p.type_detailed ) %>, width: 600 },
405
+ { name: 'u1_dims' , nice_name: 'u1_dims' , type: 'text', value: <%= raw Caboose.json(p.u1_dims ) %>, width: 600 },
406
+ { name: 'u1_free_standing_yn' , nice_name: 'u1_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u1_free_standing_yn ) %>, width: 600 },
407
+ { name: 'u1_sqft_manuf' , nice_name: 'u1_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_manuf ) %>, width: 600 },
408
+ { name: 'u1_sqft_office' , nice_name: 'u1_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_office ) %>, width: 600 },
409
+ { name: 'u1_sqft_retail' , nice_name: 'u1_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_retail ) %>, width: 600 },
410
+ { name: 'u1_sqft_total' , nice_name: 'u1_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_total ) %>, width: 600 },
411
+ { name: 'u1_sqft_warehouse' , nice_name: 'u1_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u1_sqft_warehouse ) %>, width: 600 },
412
+ { name: 'u1_year_built' , nice_name: 'u1_year_built' , type: 'text', value: <%= raw Caboose.json(p.u1_year_built ) %>, width: 600 },
413
+ { name: 'u2_dims' , nice_name: 'u2_dims' , type: 'text', value: <%= raw Caboose.json(p.u2_dims ) %>, width: 600 },
414
+ { name: 'u2_free_standing_yn' , nice_name: 'u2_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u2_free_standing_yn ) %>, width: 600 },
415
+ { name: 'u2_sqft_manuf' , nice_name: 'u2_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_manuf ) %>, width: 600 },
416
+ { name: 'u2_sqft_office' , nice_name: 'u2_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_office ) %>, width: 600 },
417
+ { name: 'u2_sqft_retail' , nice_name: 'u2_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_retail ) %>, width: 600 },
418
+ { name: 'u2_sqft_total' , nice_name: 'u2_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_total ) %>, width: 600 },
419
+ { name: 'u2_sqft_warehouse' , nice_name: 'u2_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u2_sqft_warehouse ) %>, width: 600 },
420
+ { name: 'u2_year_built' , nice_name: 'u2_year_built' , type: 'text', value: <%= raw Caboose.json(p.u2_year_built ) %>, width: 600 },
421
+ { name: 'u3_dims' , nice_name: 'u3_dims' , type: 'text', value: <%= raw Caboose.json(p.u3_dims ) %>, width: 600 },
422
+ { name: 'u3_free_standing_yn' , nice_name: 'u3_free_standing_yn' , type: 'text', value: <%= raw Caboose.json(p.u3_free_standing_yn ) %>, width: 600 },
423
+ { name: 'u3_sqft_manuf' , nice_name: 'u3_sqft_manuf' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_manuf ) %>, width: 600 },
424
+ { name: 'u3_sqft_office' , nice_name: 'u3_sqft_office' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_office ) %>, width: 600 },
425
+ { name: 'u3_sqft_retail' , nice_name: 'u3_sqft_retail' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_retail ) %>, width: 600 },
426
+ { name: 'u3_sqft_total' , nice_name: 'u3_sqft_total' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_total ) %>, width: 600 },
427
+ { name: 'u3_sqft_warehouse' , nice_name: 'u3_sqft_warehouse' , type: 'text', value: <%= raw Caboose.json(p.u3_sqft_warehouse ) %>, width: 600 },
428
+ { name: 'u3_year_built' , nice_name: 'u3_year_built' , type: 'text', value: <%= raw Caboose.json(p.u3_year_built ) %>, width: 600 },
429
+ { name: 'unit_num' , nice_name: 'unit_num' , type: 'text', value: <%= raw Caboose.json(p.unit_num ) %>, width: 600 },
430
+ { name: 'upload_source' , nice_name: 'upload_source' , type: 'text', value: <%= raw Caboose.json(p.upload_source ) %>, width: 600 },
431
+ { name: 'vacancy_rate' , nice_name: 'vacancy_rate' , type: 'text', value: <%= raw Caboose.json(p.vacancy_rate ) %>, width: 600 },
432
+ { name: 'vacant_yn' , nice_name: 'vacant_yn' , type: 'text', value: <%= raw Caboose.json(p.vacant_yn ) %>, width: 600 },
433
+ { name: 'valuation_yn' , nice_name: 'valuation_yn' , type: 'text', value: <%= raw Caboose.json(p.valuation_yn ) %>, width: 600 },
434
+ { name: 'vt_yn' , nice_name: 'vt_yn' , type: 'text', value: <%= raw Caboose.json(p.vt_yn ) %>, width: 600 },
435
+ { name: 'waterfront_yn' , nice_name: 'waterfront_yn' , type: 'text', value: <%= raw Caboose.json(p.waterfront_yn ) %>, width: 600 },
436
+ { name: 'withdrawn_date' , nice_name: 'withdrawn_date' , type: 'text', value: <%= raw Caboose.json(p.withdrawn_date ) %>, width: 600 },
437
+ { name: 'year_built' , nice_name: 'year_built' , type: 'text', value: <%= raw Caboose.json(p.year_built ) %>, width: 600 },
438
+ { name: 'zip' , nice_name: 'zip' , type: 'text', value: <%= raw Caboose.json(p.zip ) %>, width: 600 },
439
+ { name: 'zoning_northport' , nice_name: 'zoning_northport' , type: 'text', value: <%= raw Caboose.json(p.zoning_northport ) %>, width: 600 },
440
+ { name: 'zoning_tusc' , nice_name: 'zoning_tusc' , type: 'text', value: <%= raw Caboose.json(p.zoning_tusc ) %>, width: 600 }
441
+ ]
442
+ });
443
+ });
444
+
445
+ <% end %>
446
+
447
+ var modal = false;
448
+ $(window).load(function() {
449
+ modal = new CabooseModal(800);
450
+ });
451
+ </script>
452
+ <% end %>
@@ -0,0 +1,46 @@
1
+ <h1>Commercial Properties</h1>
2
+
3
+ <% content_for :caboose_css do %>
4
+ <style type='text/css'>
5
+ #search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; }
6
+ </style>
7
+ <% end %>
8
+
9
+ <div id='search_form_wrapper'>
10
+ <form action='/admin/commercial' method='get' id='search_form'>
11
+ <input type='text' name='mls_acct' placeholder='MLS #' value="<%= @gen.params['mls_acct'] %>" style='width: 100px;' />
12
+ <input type='submit' value='Search' />
13
+ </form>
14
+ </div>
15
+
16
+ <table class='data' id='properties_table'>
17
+ <tr>
18
+ <%= raw @gen.sortable_table_headings({
19
+ 'mls_acct' => 'MLS #',
20
+ 'street_num, street_name' => 'Address',
21
+ 'la_code' => 'Agent',
22
+ 'lo_code' => 'Office'
23
+ })
24
+ %>
25
+ </tr>
26
+ <% @properties.each do |p| %>
27
+ <% agent = p.agent %>
28
+ <% office = p.office %>
29
+ <tr onclick="window.location='/admin/commercial/<%= p.mls_acct %>/edit';">
30
+ <td><%= raw p.mls_acct %></td>
31
+ <td><%= raw "#{p.street_num} #{p.street_name}, #{p.city}" %></td>
32
+ <td><%= p.agent ? "#{agent.first_name} #{agent.last_name}" : p.la_code %></td>
33
+ <td><%= p.office ? office.name : p.lo_code %></td>
34
+ </tr>
35
+ <% end %>
36
+ </table>
37
+
38
+ <p><%= raw @gen.generate %></p>
39
+
40
+ <% content_for :caboose_js do %>
41
+ <script type='text/javascript'>
42
+ $(document).ready(function() {
43
+ var modal = new CabooseModal(800);
44
+ });
45
+ </script>
46
+ <% end %>