caboose-rets 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +4 -0
- data/Rakefile +38 -0
- data/app/controllers/caboose_rets/agents_controller.rb +169 -0
- data/app/controllers/caboose_rets/application_controller.rb +6 -0
- data/app/controllers/caboose_rets/commercial_controller.rb +281 -0
- data/app/controllers/caboose_rets/land_controller.rb +69 -0
- data/app/controllers/caboose_rets/open_houses_controller.rb +60 -0
- data/app/controllers/caboose_rets/residential_controller.rb +108 -0
- data/app/helpers/caboose_rets/application_helper.rb +4 -0
- data/app/models/caboose_rets/agent.rb +65 -0
- data/app/models/caboose_rets/commercial_property.rb +214 -0
- data/app/models/caboose_rets/land_property.rb +143 -0
- data/app/models/caboose_rets/media.rb +23 -0
- data/app/models/caboose_rets/multi_family_property.rb +198 -0
- data/app/models/caboose_rets/office.rb +27 -0
- data/app/models/caboose_rets/open_house.rb +19 -0
- data/app/models/caboose_rets/residential_property.rb +236 -0
- data/app/models/caboose_rets/rets_importer.rb +303 -0
- data/app/models/caboose_rets/rets_plugin.rb +26 -0
- data/app/views/caboose_rets/agents/_admin_top_nav.html.erb +7 -0
- data/app/views/caboose_rets/agents/admin_edit.html.erb +28 -0
- data/app/views/caboose_rets/agents/admin_edit_bio.html.erb +31 -0
- data/app/views/caboose_rets/agents/admin_edit_contact_info.html.erb +31 -0
- data/app/views/caboose_rets/agents/admin_edit_mls_info.html.erb +71 -0
- data/app/views/caboose_rets/agents/admin_index.html.erb +48 -0
- data/app/views/caboose_rets/agents/details.html.erb +140 -0
- data/app/views/caboose_rets/agents/index.html.erb +163 -0
- data/app/views/caboose_rets/agents/listings.html.erb +121 -0
- data/app/views/caboose_rets/commercial/admin_edit.html.erb +452 -0
- data/app/views/caboose_rets/commercial/admin_index.html.erb +46 -0
- data/app/views/caboose_rets/commercial/details.html.erb +134 -0
- data/app/views/caboose_rets/commercial/index.html.erb +87 -0
- data/app/views/caboose_rets/open_houses/admin_new.html.erb +31 -0
- data/app/views/caboose_rets/residential/admin_edit.html.erb +250 -0
- data/app/views/caboose_rets/residential/admin_index.html.erb +44 -0
- data/app/views/caboose_rets/residential/details.html.erb +139 -0
- data/app/views/caboose_rets/residential/index.html.erb +102 -0
- data/app/views/caboose_rets/residential/residential_not_exists.html.erb +15 -0
- data/app/views/caboose_rets/residential/test_form.html.erb +4 -0
- data/config/routes.rb +87 -0
- data/lib/caboose-rets.rb +4 -0
- data/lib/caboose_rets/caboose_rets_helper.rb +2 -0
- data/lib/caboose_rets/engine.rb +7 -0
- data/lib/caboose_rets/version.rb +3 -0
- data/lib/tasks/caboose_rets.rake +855 -0
- data/test/caboose_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +25 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +169 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
<h1>Residential Properties</h1>
|
2
|
+
|
3
|
+
<style type='text/css'>
|
4
|
+
#search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; }
|
5
|
+
</style>
|
6
|
+
|
7
|
+
<div id='search_form_wrapper'>
|
8
|
+
<form action='/admin/residential' method='get' id='search_form'>
|
9
|
+
<input type='text' name='mls_acct' placeholder='MLS #' value="<%= @gen.params['mls_acct'] %>" style='width: 100px;' />
|
10
|
+
<input type='submit' value='Search' />
|
11
|
+
</form>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<table class='data' id='properties_table'>
|
15
|
+
<tr>
|
16
|
+
<%= raw @gen.sortable_table_headings({
|
17
|
+
'mls_acct' => 'MLS #',
|
18
|
+
'street_num, street_name' => 'Address',
|
19
|
+
'la_code' => 'Agent',
|
20
|
+
'lo_code' => 'Office'
|
21
|
+
})
|
22
|
+
%>
|
23
|
+
</tr>
|
24
|
+
<% @properties.each do |p| %>
|
25
|
+
<% agent = p.agent %>
|
26
|
+
<% office = p.office %>
|
27
|
+
<tr onclick="window.location='/admin/residential/<%= p.mls_acct %>/edit';">
|
28
|
+
<td><%= raw p.mls_acct %></td>
|
29
|
+
<td><%= raw "#{p.street_num} #{p.street_name}, #{p.city}" %></td>
|
30
|
+
<td><%= p.agent ? "#{agent.first_name} #{agent.last_name}" : p.la_code %></td>
|
31
|
+
<td><%= p.office ? office.name : p.lo_code %></td>
|
32
|
+
</tr>
|
33
|
+
<% end %>
|
34
|
+
</table>
|
35
|
+
|
36
|
+
<p><%= raw @gen.generate %></p>
|
37
|
+
|
38
|
+
<% content_for :caboose_js do %>
|
39
|
+
<script type='text/javascript'>
|
40
|
+
$(document).ready(function() {
|
41
|
+
var modal = new CabooseModal(800);
|
42
|
+
});
|
43
|
+
</script>
|
44
|
+
<% end %>
|
@@ -0,0 +1,139 @@
|
|
1
|
+
|
2
|
+
<% content_for :caboose_css do %>
|
3
|
+
<style type="text/css">
|
4
|
+
#recaptcha_area, #recaptcha_table { width: auto !important; }
|
5
|
+
#recaptcha_image { width: 80% !important; }
|
6
|
+
#recaptcha_image img { width:80% !important; margin-left: -20%; padding: 0px; }
|
7
|
+
fieldset.captcha { width:100px !important; }
|
8
|
+
#recaptcha_container { margin: 0px; padding: 0px; width: 157px !important; }
|
9
|
+
input#recaptcha_response_field { padding: 0px; }
|
10
|
+
#recaptcha_widget_div { width: 150%; }
|
11
|
+
.realtor_info { background-color: white; padding: 10px; margin-bottom: 20px; text-align: center; border: 1px solid #d0d0d0;}
|
12
|
+
</style>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% tiny_img = "https://s3.amazonaws.com/advantagerealtygroup.com/residential/#{@property.mls_acct}_%d_tiny.jpg" %>
|
16
|
+
<% large_img = "https://s3.amazonaws.com/advantagerealtygroup.com/residential/#{@property.mls_acct}_%d_large.jpg" %>
|
17
|
+
|
18
|
+
<div class="l-wrapper">
|
19
|
+
<div class="l-section">
|
20
|
+
<div class="l-sidebar-border inflate-tenor-baritone">
|
21
|
+
<div class="sidebar-aside">
|
22
|
+
<% if @agent %>
|
23
|
+
<div class="realtor_info">
|
24
|
+
<h4>Advantage Agent</h4>
|
25
|
+
<img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%= @agent.id %>_thumb.jpg?<%= DateTime.now.strftime('%F') %>" alt="<%= @agent.first_name %> <%= @agent.last_name %>" />
|
26
|
+
<br />
|
27
|
+
<a href="/agents/<%= @agent.la_code %>"><%= @agent.first_name %> <%= @agent.last_name %></a><br>
|
28
|
+
<a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
<address class="h-type-h5">
|
32
|
+
<% if !@property.unit_num.nil? && @property.unit_num.strip.length > 0 %>Unit <%= @property.unit_num %>, <% end %>
|
33
|
+
<%= @property.street_num %> <%= @property.street_name.titleize %><br />
|
34
|
+
<%= @property.city.titleize %>, <%= @property.state %> <%= @property.zip %>
|
35
|
+
</address>
|
36
|
+
<p class="h-space-mvs h-type-highlight h-type-h4"> <%=h number_to_currency @property.current_price %>
|
37
|
+
<% if @property.foreclosure_yn == 'Y' %>
|
38
|
+
<br><span style='font-size: 0.8em; color: rgb(114, 114, 114);'>(Foreclosure)</span>
|
39
|
+
<% end %>
|
40
|
+
<!-- if @property.foreclosure_yn == 'Y' -->
|
41
|
+
</p>
|
42
|
+
<p class="h-space-mvs h-type-highlight h-type-h4">MLS #<%= @property.mls_acct %></p>
|
43
|
+
|
44
|
+
<% if @property.street_num && @property.street_name && @property.city && @property.state && @property.zip %>
|
45
|
+
<div class="m-map-small h-border h-space-mbm" address="<%= @property.street_num %> <%= @property.street_name %> <%= @property.city %>, <%= @property.state %> <%= @property.zip %>"></div>
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
|
49
|
+
<h4 class="h-space-mvt">Directions</h4>
|
50
|
+
<p class="paragraph"><%= @property.directions %></p>
|
51
|
+
<h4 class="h-space-mvt">Neighborhood Information</h4>
|
52
|
+
|
53
|
+
<ul class="m-list-pad">
|
54
|
+
<li><strong>Area</strong>: <%= @property.area.titleize %></li>
|
55
|
+
<% if @property.subdivision %><li><strong>Subdivision</strong>: <%= @property.subdivision.titleize %></li><% end %>
|
56
|
+
<% if @property.elem_school %><li><strong>Elementary School</strong>: <%= @property.elem_school.titleize %></li><% end %>
|
57
|
+
<% if @property.middle_school %><li><strong>Middle School</strong>: <%= @property.middle_school.titleize %></li><% end %>
|
58
|
+
<% if @property.high_school %><li><strong>High School</strong>: <%= @property.high_school.titleize %></li><% end %>
|
59
|
+
<li><strong>County</strong>: <%= @property.county.titleize %></li>
|
60
|
+
<li><strong>Lot Size</strong>: <%= @property.ftr_lotdesc %></li>
|
61
|
+
</ul>
|
62
|
+
|
63
|
+
<% if @agent %>
|
64
|
+
<h4 class="h-space-mvt">Contact <%= @agent.first_name %> <%= @agent.last_name %> </h4>
|
65
|
+
<% else %>
|
66
|
+
<h4 class="h-space-mvt">Contact Advantage</h4>
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<%= form_for @message, :url => "/contact/create", :html => { :class => "m-form", :'accept-charset' => "utf-8", :method => "POST" } do |f| %>
|
70
|
+
<%= f.text_field :name, :placeholder => "Name", :value => "", :id => "contact_name", :maxlength => "150" %>
|
71
|
+
<%= f.text_field :email, :placeholder => "Email", :value => "", :id => "contact_addres", :maxlength => "150" %>
|
72
|
+
<%= f.text_area :body, :placeholder => "Message", :cols => "50", :rows => "4", :id => "contact_message", :class => "contact_message" %>
|
73
|
+
<p class="h-space-mvs"><%= recaptcha_tags %></p>
|
74
|
+
<input class="m-btn-red btn-large h-float-right h-space-mts" type="submit" value="Send" />
|
75
|
+
<% end %>
|
76
|
+
|
77
|
+
</div> <!-- .sidebar-aside -->
|
78
|
+
|
79
|
+
<div class="sidebar-body">
|
80
|
+
|
81
|
+
<div class="photos" style="text-align: center;">
|
82
|
+
<% if @property.photo_count.to_i >= 1 %>
|
83
|
+
<a class="photo" style="display: block; margin: 25px;" href="<%= large_img % 1 %>"><img src="<%= large_img % 1 %>"/></a>
|
84
|
+
<div style="display: block;">
|
85
|
+
<% (2..@property.photo_count.to_i).each do |i| %>
|
86
|
+
<% if i != 2 && (i - 2) % 8 == 0 %></div><div style="display: block;"><% end %>
|
87
|
+
<a class="photo" style="float: left; display: block; width: 12.5%; padding: 2px;" href="<%= large_img % i %>">
|
88
|
+
<img style="display: block; width: 100%;" src="<%= tiny_img % i %>"/>
|
89
|
+
</a>
|
90
|
+
<% end %>
|
91
|
+
</div>
|
92
|
+
<% end %>
|
93
|
+
</div>
|
94
|
+
<div style="clear: both;"></div><br />
|
95
|
+
<p class="paragraph"><%= @property.remarks %></p>
|
96
|
+
<h4 class="h-type-standard h-type-highlight h-type-caps h-space-mts">Property Details</h4>
|
97
|
+
<h5 class="h-type-standard">Single Family Home</h5>
|
98
|
+
|
99
|
+
<ul class="m-list-bullet h-space-mts">
|
100
|
+
<% if @property.price_sqft != "" %><li><strong>Price/Sq. Ft.</strong>: <span id='square_footage'><%=h number_to_currency @property.price_sqft %></span></li><% end %>
|
101
|
+
<% if @property.bedrooms != "" %><li><strong>Bedrooms</strong>: <%= @property.bedrooms %></li><% end %>
|
102
|
+
<% if @property.baths != "" %><li><strong>Baths</strong>: <%= @property.baths %> full <% if @property.baths_half != "" && @property.baths_half != "0" %> & <%= @property.baths_half %> half baths<% end %></li><% end %>
|
103
|
+
<% if @property.acreage != "" %><li><strong>Acreage</strong>: <%= @property.acreage %></li><% end %>
|
104
|
+
</ul> <!-- .m-list-bullet -->
|
105
|
+
<h4 class="h-type-standard h-type-highlight h-type-caps h-space-mts">Features</h4>
|
106
|
+
|
107
|
+
<ul>
|
108
|
+
<% if @property.ftr_interior %><li><strong>Interior</strong>: <%= @property.ftr_interior %> </li><% end %>
|
109
|
+
<% if @property.ftr_cooling %><li><strong>Cooling</strong>: <%= @property.ftr_cooling %> </li><% end %>
|
110
|
+
<% if @property.ftr_heating %><li><strong>Heating</strong>: <%= @property.ftr_heating %> </li><% end %>
|
111
|
+
<% if @property.year_built %><li><strong>Year Built</strong>: <%= @property.year_built %> </li><% end %>
|
112
|
+
</ul>
|
113
|
+
<br>
|
114
|
+
<% if @property.virtual_tour %><a class="m-btn h-space-mtm" href='<%= @property.virtual_tour %>' target='_blank'>Virtual Tour</a><% end %>
|
115
|
+
|
116
|
+
<a data-pin-do="buttonPin" data-pin-config="beside" href="//pinterest.com/pin/create/button/?url=<%= request.original_url %>&media=<%= large_img % 1 %>" ></a>
|
117
|
+
</div> <!-- .sidebar-body -->
|
118
|
+
</div> <!-- .l-sidebar -->
|
119
|
+
</div> <!-- .body-section -->
|
120
|
+
</div> <!-- .l-wrapper -->
|
121
|
+
|
122
|
+
<div class="body-sink"></div>
|
123
|
+
|
124
|
+
<% content_for :caboose_js do %>
|
125
|
+
<%= javascript_include_tag '//assets.pinterest.com/js/pinit.js' %>
|
126
|
+
<%= javascript_include_tag 'details_colorbox' %>
|
127
|
+
<script type="text/javascript">
|
128
|
+
|
129
|
+
if (document.contains('square_footage')) {
|
130
|
+
var str = document.getElementById('square_footage').innerHTML;
|
131
|
+
str = str.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
132
|
+
document.getElementById('square_footage').innerHTML = str;
|
133
|
+
}
|
134
|
+
|
135
|
+
<% if !flash[:notice].blank? %>
|
136
|
+
alert('<%= flash[:notice] %>');
|
137
|
+
<% end %>
|
138
|
+
</script>
|
139
|
+
<% end %>
|
@@ -0,0 +1,102 @@
|
|
1
|
+
<div class="l-wrapper">
|
2
|
+
<a class="m-btn h-space-mtm" href="/search/residential">Search Residential Listings</a>
|
3
|
+
|
4
|
+
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
5
|
+
<div class="sidebar-body l-grid-border">
|
6
|
+
<p></p>
|
7
|
+
<div class="l-grid inflate-baritone-bass listing">
|
8
|
+
<% if @properties.nil? || @properties == [] %>
|
9
|
+
<div class='no-results'>No results found</div>
|
10
|
+
<% else %>
|
11
|
+
<% @properties.each do |p| %>
|
12
|
+
<div class='grid-row'>
|
13
|
+
<div class='grid-unit-1of4 list-part' id='list1'>
|
14
|
+
<a href="/residential/<%= p.mls_acct %>/details"><img src='https://s3.amazonaws.com/advantagerealtygroup.com/residential/<%= p.mls_acct %>_1_thumb.jpg' width="400" /></a><br>
|
15
|
+
<div id='list-meta'>
|
16
|
+
<span class='address'><% if !p.unit_num.nil? && p.unit_num.strip.length > 0 %>Unit <%= p.unit_num %>, <% end %><%= p.street_num %> <%= p.street_name.titleize %></span><br> <!-- , {city}, {state} {zip} -->
|
17
|
+
<% if p.lo_code != '46' %>
|
18
|
+
<span class="nonadvantage_agent"><% if p.owner_name && p.office && p.office.name %>Listing Courtesy of <%= p.office.name.titleize %><% end %></span>
|
19
|
+
<% else %>
|
20
|
+
<span class="advantage_agent"><% if p.agent %>Listing Courtesy of <%= p.agent.first_name.titleize %> <%= p.agent.last_name.titleize %><% end %></span>
|
21
|
+
<% end %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class='grid-unit-1of4 list-part' id='list2'>
|
26
|
+
<% if p.current_price != 0 %><span class='price'><%=h number_to_currency(p.current_price, :precision => 0) %></span><br><% end %>
|
27
|
+
<% if p.foreclosure_yn == 'Y' %> <span class='list-info' style='font-size: 0.8em;'>(Foreclosure)</span><br> <% end %>
|
28
|
+
<div class="info-meta">
|
29
|
+
<span class='list-info'>Sq. footage: <span class='sqfeet'> <%= p.tot_heat_sqft %></span></span> <br>
|
30
|
+
<span class='list-info'>Bedrooms: <%= p.bedrooms %></span> <br>
|
31
|
+
<span class='list-info'>Full baths: <%= p.baths_full %></span> <br>
|
32
|
+
<span class='list-info'>Half baths: <%= p.baths_half %></span> <br>
|
33
|
+
</div>
|
34
|
+
<span>MLS#: <%= p.mls_acct %></span>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class='grid-unit-1of4 list-part' id='list3'>
|
38
|
+
<div class="list-schools">
|
39
|
+
Schools:<br>
|
40
|
+
<span class="school"> Elementary - <%= p.elem_school.titleize %></span> <br>
|
41
|
+
<span class="school">Middle - <%= p.middle_school.titleize %></span> <br>
|
42
|
+
<span class="school">High - <%= p.high_school.titleize %></span> <br>
|
43
|
+
</div>
|
44
|
+
<div class='desc-container'>
|
45
|
+
<span class='description'><%= p.remarks %></span>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class='grid-unit-1of4 list-part' id='list4'>
|
50
|
+
<a href="/residential/<%= p.mls_acct %>/details" class="m-btn-ornate">
|
51
|
+
<div class="btn-inner see-more">MORE DETAILS</div>
|
52
|
+
</a>
|
53
|
+
<br>
|
54
|
+
<% if p.lo_code == '46' && p.agent %>
|
55
|
+
<a href="/agents/<%= p.la_code %>" class="m-btn-ornate">
|
56
|
+
<div class="btn-inner contact-btn">Contact <%= p.agent.first_name.titleize %> <%= p.agent.last_name.titleize %></div>
|
57
|
+
</a>
|
58
|
+
<% else %>
|
59
|
+
<a href="/agents/048540000" class="m-btn-ornate">
|
60
|
+
<div class="btn-inner contact-btn">Contact Advantage</div>
|
61
|
+
</a>
|
62
|
+
<% end %>
|
63
|
+
<br>
|
64
|
+
<% unless defined? p.virtual_tour && p.virtual_tour %>
|
65
|
+
<a href="<%= p.virtual_tour %>" class="m-btn-ornate">
|
66
|
+
<div class="btn-inner contact-btn">Take Virtual Tour</div>
|
67
|
+
</a>
|
68
|
+
<% end %>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<% end %>
|
72
|
+
<%= @gen.generate.html_safe %>
|
73
|
+
<% end %>
|
74
|
+
</div>
|
75
|
+
</div> <!-- .sidebar-body -->
|
76
|
+
</div> <!-- .l-sidebar -->
|
77
|
+
</div> <!-- .l-wrapper -->
|
78
|
+
|
79
|
+
<% content_for :caboose_js do %>
|
80
|
+
<script style="text/javascript">
|
81
|
+
function toTitleCase(str) {
|
82
|
+
return str.replace(/\w\S*/g, function(txt) {
|
83
|
+
if (txt != "of" && txt != "<br>") {
|
84
|
+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
85
|
+
} else {
|
86
|
+
return txt;
|
87
|
+
}
|
88
|
+
});
|
89
|
+
}
|
90
|
+
$.fn.digits = function() {
|
91
|
+
return this.each(function(){
|
92
|
+
$(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") );
|
93
|
+
})
|
94
|
+
}
|
95
|
+
$('.price').digits();
|
96
|
+
$('.sqfeet').digits();
|
97
|
+
//$.each( $(".advantage_agent"), function() { $(this).text( toTitleCase( $(this).text() ))});
|
98
|
+
//$.each( $(".contact-btn"), function() { $(this).text( toTitleCase( $(this).text() ))});
|
99
|
+
//$.each( $(".address"), function() { $(this).text( toTitleCase( $(this).text() ))});
|
100
|
+
//$.each( $(".school"), function() { $(this).text( toTitleCase( $(this).text() ))});
|
101
|
+
</script>
|
102
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="l-wrapper">
|
2
|
+
<div class="l-section">
|
3
|
+
<div class="l-sidebar-border inflate-tenor-baritone">
|
4
|
+
<div class="sidebar-body">
|
5
|
+
|
6
|
+
<h4 class="h-type-standard h-type-highlight h-type-caps">Sorry</h4>
|
7
|
+
<p>A property with MLS #<%= @mls_acct %> doesn't exist.</p>
|
8
|
+
|
9
|
+
</div> <!-- .sidebar-body -->
|
10
|
+
</div> <!-- .l-sidebar -->
|
11
|
+
</div> <!-- .body-section -->
|
12
|
+
</div> <!-- .l-wrapper -->
|
13
|
+
|
14
|
+
<div class="body-sink"></div>
|
15
|
+
|
data/config/routes.rb
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
Caboose::Engine.routes.draw do
|
2
|
+
|
3
|
+
get "admin" => "admin#index"
|
4
|
+
put "admin/station" => "station#index_admin"
|
5
|
+
get "station" => "station#index"
|
6
|
+
get "station/plugin-count" => "station#plugin_count"
|
7
|
+
|
8
|
+
get "login" => "login#index"
|
9
|
+
post "login" => "login#login"
|
10
|
+
get "logout" => "logout#index"
|
11
|
+
get "register" => "register#index"
|
12
|
+
post "register" => "register#register"
|
13
|
+
|
14
|
+
get "admin/users" => "users#index"
|
15
|
+
get "admin/users/options" => "users#options"
|
16
|
+
get "admin/users/new" => "users#new"
|
17
|
+
get "admin/users/:id/edit-password" => "users#edit_password"
|
18
|
+
get "admin/users/:id/edit" => "users#edit"
|
19
|
+
put "admin/users/:id" => "users#update"
|
20
|
+
post "admin/users" => "users#create"
|
21
|
+
delete "admin/users/:id" => "users#destroy"
|
22
|
+
|
23
|
+
get "admin/roles" => "roles#index"
|
24
|
+
get "admin/roles/options" => "roles#options"
|
25
|
+
get "admin/roles/new" => "roles#new"
|
26
|
+
get "admin/roles/:id/edit" => "roles#edit"
|
27
|
+
put "admin/roles/:id" => "roles#update"
|
28
|
+
post "admin/roles" => "roles#create"
|
29
|
+
delete "admin/roles/:id" => "roles#destroy"
|
30
|
+
|
31
|
+
get "admin/permissions" => "permissions#index"
|
32
|
+
get "admin/permissions/options" => "permissions#options"
|
33
|
+
get "admin/permissions/new" => "permissions#new"
|
34
|
+
get "admin/permissions/:id/edit" => "permissions#edit"
|
35
|
+
put "admin/permissions/:id" => "permissions#update"
|
36
|
+
post "admin/permissions" => "permissions#create"
|
37
|
+
delete "admin/permissions/:id" => "permissions#destroy"
|
38
|
+
|
39
|
+
get "admin/settings" => "settings#index"
|
40
|
+
get "admin/settings/options" => "settings#options"
|
41
|
+
get "admin/settings/new" => "settings#new"
|
42
|
+
get "admin/settings/:id/edit" => "settings#edit"
|
43
|
+
put "admin/settings/:id" => "settings#update"
|
44
|
+
post "admin/settings" => "settings#create"
|
45
|
+
delete "admin/settings/:id" => "settings#destroy"
|
46
|
+
|
47
|
+
#get "pages" => "pages#index"
|
48
|
+
get "pages/:id" => "pages#show"
|
49
|
+
get "pages/:id/redirect" => "pages#redirect"
|
50
|
+
get "admin/pages/sitemap-options" => "pages#admin_sitemap_options"
|
51
|
+
get "admin/pages/robots-options" => "pages#admin_robots_options"
|
52
|
+
get "admin/pages/format-options" => "pages#admin_content_format_options"
|
53
|
+
get "admin/pages/new" => "pages#admin_new"
|
54
|
+
get "admin/pages/:id/uri" => "pages#admin_page_uri"
|
55
|
+
get "admin/pages/:id/delete" => "pages#admin_delete_form"
|
56
|
+
get "admin/pages/:id/sitemap" => "pages#admin_sitemap"
|
57
|
+
get "admin/pages/:id/edit" => "pages#admin_edit_general"
|
58
|
+
get "admin/pages/:id/css" => "pages#admin_edit_css"
|
59
|
+
get "admin/pages/:id/js" => "pages#admin_edit_js"
|
60
|
+
get "admin/pages/:id/seo" => "pages#admin_edit_seo"
|
61
|
+
get "admin/pages/:id/content" => "pages#admin_edit_content"
|
62
|
+
put "admin/pages/:id" => "pages#admin_update"
|
63
|
+
get "admin/pages" => "pages#admin_index"
|
64
|
+
post "admin/pages" => "pages#admin_create"
|
65
|
+
delete "admin/pages/:id" => "pages#admin_delete"
|
66
|
+
|
67
|
+
get "posts" => "posts#index"
|
68
|
+
get "posts/:id" => "posts#detail"
|
69
|
+
get "admin/posts/category-options" => "posts#admin_category_options"
|
70
|
+
get "admin/posts/new" => "posts#admin_new"
|
71
|
+
get "admin/posts/:id/delete" => "posts#admin_delete_form"
|
72
|
+
get "admin/posts/:id/edit" => "posts#admin_edit_general"
|
73
|
+
get "admin/posts/:id/content" => "posts#admin_edit_content"
|
74
|
+
get "admin/posts/:id/categories" => "posts#admin_edit_categories"
|
75
|
+
get "admin/posts/:id/add-to-category" => "posts#admin_add_to_category"
|
76
|
+
get "admin/posts/:id/remove-from-category" => "posts#admin_remove_from_category"
|
77
|
+
get "admin/posts/:id/delete" => "posts#admin_delete_form"
|
78
|
+
put "admin/posts/:id" => "posts#admin_update"
|
79
|
+
post "admin/posts/:id" => "posts#admin_update"
|
80
|
+
get "admin/posts" => "posts#admin_index"
|
81
|
+
post "admin/posts" => "posts#admin_add"
|
82
|
+
delete "admin/posts/:id" => "posts#admin_delete"
|
83
|
+
|
84
|
+
match '*path' => 'pages#show'
|
85
|
+
root :to => 'pages#show'
|
86
|
+
|
87
|
+
end
|
data/lib/caboose-rets.rb
ADDED
@@ -0,0 +1,855 @@
|
|
1
|
+
require "caboose_rets/version"
|
2
|
+
|
3
|
+
namespace :caboose_rets do
|
4
|
+
|
5
|
+
desc "Initialize RETS database"
|
6
|
+
task :init_db => :environment do
|
7
|
+
c = ActiveRecord::Base.connection
|
8
|
+
create_agents(c)
|
9
|
+
create_offices(c)
|
10
|
+
create_media(c)
|
11
|
+
create_open_houses(c)
|
12
|
+
create_residential(c)
|
13
|
+
create_commercial(c)
|
14
|
+
create_land(c)
|
15
|
+
create_multi_family(c)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_agents(c)
|
19
|
+
c.drop_table :rets_agents if c.table_exists?('rets_agents')
|
20
|
+
c.create_table :rets_agents do |t|
|
21
|
+
t.string :beeper_phone
|
22
|
+
t.string :last_name
|
23
|
+
t.string :member_email
|
24
|
+
t.string :phone_home_fax
|
25
|
+
t.string :car_phone
|
26
|
+
t.string :la_code
|
27
|
+
t.string :member_page
|
28
|
+
t.string :phone_pager
|
29
|
+
t.string :date_created
|
30
|
+
t.string :lo_code
|
31
|
+
t.string :member_status
|
32
|
+
t.string :phone_second_home
|
33
|
+
t.string :date_modified
|
34
|
+
t.string :mail_addr1
|
35
|
+
t.string :nrds_id
|
36
|
+
t.string :phone_toll_free
|
37
|
+
t.string :defaultemail
|
38
|
+
t.string :mail_addr2
|
39
|
+
t.string :office_phone
|
40
|
+
t.string :phone_voice_mail
|
41
|
+
t.string :fax_phone
|
42
|
+
t.string :mail_city
|
43
|
+
t.string :other_phone
|
44
|
+
t.string :phone_voice_pager
|
45
|
+
t.string :first_name
|
46
|
+
t.string :mail_state
|
47
|
+
t.string :phone_change_date
|
48
|
+
t.string :photo_count
|
49
|
+
t.string :home_phone
|
50
|
+
t.string :mail_zip
|
51
|
+
t.string :phone_direct_office
|
52
|
+
t.string :photo_date_modified
|
53
|
+
|
54
|
+
t.boolean :hide, :default => false
|
55
|
+
t.text :bio
|
56
|
+
t.text :contact_info
|
57
|
+
t.string :assistant_to
|
58
|
+
end
|
59
|
+
c.add_attachment :rets_agents, :image
|
60
|
+
end
|
61
|
+
|
62
|
+
def create_offices(c)
|
63
|
+
c.drop_table :rets_offices if c.table_exists?('rets_offices')
|
64
|
+
c.create_table :rets_offices do |t|
|
65
|
+
t.string :lo_date_created
|
66
|
+
t.string :lo_date_modified
|
67
|
+
t.string :lo_email
|
68
|
+
t.string :lo_fax_phone
|
69
|
+
t.string :lo_idx_yn
|
70
|
+
t.string :lo_lo_code
|
71
|
+
t.string :lo_mailaddr1
|
72
|
+
t.string :lo_mailaddr2
|
73
|
+
t.string :lo_mailcity
|
74
|
+
t.string :lo_mailstate
|
75
|
+
t.string :lo_mailzip
|
76
|
+
t.string :lo_main_lo_code
|
77
|
+
t.string :lo_name
|
78
|
+
t.string :lo_other_phone
|
79
|
+
t.string :lo_page
|
80
|
+
t.string :lo_phone
|
81
|
+
t.string :lo_status
|
82
|
+
t.string :photo_count
|
83
|
+
t.string :photo_date_modified
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def create_media(c)
|
88
|
+
c.drop_table :rets_media if c.table_exists?('rets_media')
|
89
|
+
c.create_table :rets_media do |t|
|
90
|
+
t.string :date_modified
|
91
|
+
t.string :file_name
|
92
|
+
t.string :media_id
|
93
|
+
t.string :media_order
|
94
|
+
t.string :media_remarks
|
95
|
+
t.string :media_type
|
96
|
+
t.string :mls_acct
|
97
|
+
t.text :url
|
98
|
+
end
|
99
|
+
c.add_attachment :rets_media, :image
|
100
|
+
end
|
101
|
+
|
102
|
+
def create_open_houses(c)
|
103
|
+
c.drop_table :rets_open_houses if c.table_exists?('rets_open_houses')
|
104
|
+
c.create_table :rets_open_houses do |t|
|
105
|
+
#t.string :id
|
106
|
+
t.string :comments
|
107
|
+
t.string :date_created
|
108
|
+
t.string :date_modified
|
109
|
+
t.string :end_time
|
110
|
+
t.string :la_code
|
111
|
+
t.string :mls_acct
|
112
|
+
t.string :open_house_date
|
113
|
+
t.string :open_house_type
|
114
|
+
t.string :perpetual_yn
|
115
|
+
t.string :prop_type
|
116
|
+
t.string :start_time
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def create_residential(c)
|
121
|
+
c.drop_table :rets_residential if c.table_exists?('rets_residential')
|
122
|
+
c.create_table :rets_residential do |t|
|
123
|
+
t.text :bedrooms
|
124
|
+
t.text :dom
|
125
|
+
t.text :ftr_pool
|
126
|
+
t.text :rm_other3_desc
|
127
|
+
t.text :baths_full
|
128
|
+
t.text :ftr_diningroom
|
129
|
+
t.text :ftr_porchpatio
|
130
|
+
t.text :rm_other3_name
|
131
|
+
t.text :baths_half
|
132
|
+
t.text :directions
|
133
|
+
t.text :ftr_possession
|
134
|
+
t.text :rm_other4
|
135
|
+
t.text :baths
|
136
|
+
t.text :display_address_yn
|
137
|
+
t.integer :current_price, :default => 0
|
138
|
+
t.text :rm_other4_desc
|
139
|
+
t.text :avm_automated_sales_disabled
|
140
|
+
t.text :ftr_drive
|
141
|
+
t.text :price_change_date
|
142
|
+
t.text :rm_other4_name
|
143
|
+
t.text :avm_instant_valuation_disabled
|
144
|
+
t.text :elem_school
|
145
|
+
t.text :price_sqft
|
146
|
+
t.text :rm_recrm
|
147
|
+
t.text :acreage
|
148
|
+
t.text :expire_date
|
149
|
+
t.text :prop_type
|
150
|
+
t.text :rm_recrm_desc
|
151
|
+
t.text :ftr_age
|
152
|
+
t.text :ftr_exterior
|
153
|
+
t.text :rm_bath1
|
154
|
+
t.text :rm_study
|
155
|
+
t.text :agent_notes
|
156
|
+
t.text :ftr_citycommunit
|
157
|
+
t.text :rm_bath1_desc
|
158
|
+
t.text :rm_study_desc
|
159
|
+
t.text :agent_other_contact_desc
|
160
|
+
t.text :ftr_fireplace
|
161
|
+
t.text :rm_bath2
|
162
|
+
t.text :rm_sun
|
163
|
+
t.text :agent_other_contact_phone
|
164
|
+
t.text :flood_plain
|
165
|
+
t.text :rm_bath2_desc
|
166
|
+
t.text :rm_sun_desc
|
167
|
+
t.text :annual_taxes
|
168
|
+
t.text :foreclosure_yn
|
169
|
+
t.text :rm_bath3
|
170
|
+
t.text :remarks
|
171
|
+
t.text :internet_yn
|
172
|
+
t.text :georesult
|
173
|
+
t.text :rm_bath3_desc
|
174
|
+
t.text :right_red_date
|
175
|
+
t.text :ftr_appliances
|
176
|
+
t.text :ftr_garage
|
177
|
+
t.text :rm_br1
|
178
|
+
t.text :ftr_roof
|
179
|
+
t.text :tot_heat_sqft
|
180
|
+
t.text :geo_precision
|
181
|
+
t.text :rm_br1_desc
|
182
|
+
t.text :status_flag
|
183
|
+
t.text :area
|
184
|
+
t.text :ftr_hoaamenities
|
185
|
+
t.text :rm_br2
|
186
|
+
t.text :hoa_fee
|
187
|
+
t.text :ftr_hoaincludes
|
188
|
+
t.text :rm_br2_desc
|
189
|
+
t.text :sale_notes
|
190
|
+
t.text :hoa_term
|
191
|
+
t.text :hoa_fee_yn
|
192
|
+
t.text :rm_br3
|
193
|
+
t.text :ftr_terms
|
194
|
+
t.text :ftr_attic
|
195
|
+
t.text :ftr_heating
|
196
|
+
t.text :rm_br3_desc
|
197
|
+
t.text :sale_lease
|
198
|
+
t.text :ftr_docs_on_file
|
199
|
+
t.text :high_school
|
200
|
+
t.text :rm_br4
|
201
|
+
t.text :owner_name
|
202
|
+
t.text :bom_date
|
203
|
+
t.text :homestead_yn
|
204
|
+
t.text :rm_br4_desc
|
205
|
+
t.text :owner_phone
|
206
|
+
t.text :basement_yn
|
207
|
+
t.text :ftr_interior
|
208
|
+
t.text :rm_br5
|
209
|
+
t.text :sa_code
|
210
|
+
t.text :ftr_basement
|
211
|
+
t.text :lease_exp_date
|
212
|
+
t.text :rm_br5_desc
|
213
|
+
t.text :so_code
|
214
|
+
t.text :book_number
|
215
|
+
t.text :ftr_landscaping
|
216
|
+
t.text :rm_brkfst
|
217
|
+
t.text :ftr_sewer
|
218
|
+
t.text :book_page
|
219
|
+
t.text :ftr_laundry
|
220
|
+
t.text :rm_brkfst_desc
|
221
|
+
t.text :ftr_showing
|
222
|
+
t.text :book_type
|
223
|
+
t.text :legals
|
224
|
+
t.text :rm_den
|
225
|
+
t.text :sold_date
|
226
|
+
t.text :buyer_name
|
227
|
+
t.text :levels
|
228
|
+
t.text :rm_den_desc
|
229
|
+
t.text :sold_price
|
230
|
+
t.text :city_code
|
231
|
+
t.text :list_price
|
232
|
+
t.text :rm_dining
|
233
|
+
t.text :sold_terms
|
234
|
+
t.text :converted
|
235
|
+
t.text :list_date
|
236
|
+
t.text :rm_dining_desc
|
237
|
+
t.text :sqft_source
|
238
|
+
t.text :currentlease_yn
|
239
|
+
t.text :status
|
240
|
+
t.text :rm_family
|
241
|
+
t.text :state
|
242
|
+
t.text :category
|
243
|
+
t.text :listing_type
|
244
|
+
t.text :rm_family_desc
|
245
|
+
t.text :street_dir
|
246
|
+
t.text :city
|
247
|
+
t.text :la_code
|
248
|
+
t.text :rm_foyer
|
249
|
+
t.text :street_name
|
250
|
+
t.text :co_la_code
|
251
|
+
t.text :lo_code
|
252
|
+
t.text :rm_foyer_desc
|
253
|
+
t.text :street_num
|
254
|
+
t.text :co_lo_code
|
255
|
+
t.text :ftr_lotdesc
|
256
|
+
t.text :rm_great
|
257
|
+
t.text :style
|
258
|
+
t.text :co_so_code
|
259
|
+
t.text :lot_dimensions
|
260
|
+
t.text :rm_great_desc
|
261
|
+
t.text :subdivision
|
262
|
+
t.text :co_sa_code
|
263
|
+
t.text :mls_acct
|
264
|
+
t.text :rm_kitchen
|
265
|
+
t.text :take_photo_yn
|
266
|
+
t.text :buyer_broker
|
267
|
+
t.text :master_bed_lvl
|
268
|
+
t.text :rm_kitchen2
|
269
|
+
t.text :upload_source
|
270
|
+
t.text :buyer_broker_type
|
271
|
+
t.text :middle_school
|
272
|
+
t.text :rm_kitchen2_desc
|
273
|
+
t.text :unit_num
|
274
|
+
t.text :sub_agent
|
275
|
+
t.text :ftr_miscellaneous
|
276
|
+
t.text :rm_kitchen_desc
|
277
|
+
t.text :valuation_yn
|
278
|
+
t.text :sub_agent_type
|
279
|
+
t.text :other_fee
|
280
|
+
t.text :rm_laundry
|
281
|
+
t.text :third_party_comm_yn
|
282
|
+
t.text :contr_broker
|
283
|
+
t.text :off_mkt_date
|
284
|
+
t.text :rm_laundry_desc
|
285
|
+
t.text :vt_yn
|
286
|
+
t.text :contr_broker_type
|
287
|
+
t.text :off_mkt_days
|
288
|
+
t.text :rm_living
|
289
|
+
t.text :ftr_warrantyprogrm
|
290
|
+
t.text :construction_date_comp
|
291
|
+
t.text :outlier_yn
|
292
|
+
t.text :rm_living_desc
|
293
|
+
t.text :wf_feet
|
294
|
+
t.text :ftr_construction
|
295
|
+
t.text :office_notes
|
296
|
+
t.text :rm_lrdr
|
297
|
+
t.text :ftr_waterheater
|
298
|
+
t.text :construction_status
|
299
|
+
t.text :onsite_yn
|
300
|
+
t.text :rm_lrdr_desc
|
301
|
+
t.text :ftr_watersupply
|
302
|
+
t.text :contacts
|
303
|
+
t.text :onsite_days_hours
|
304
|
+
t.text :rm_master
|
305
|
+
t.text :waterfront
|
306
|
+
t.text :ftr_cooling
|
307
|
+
t.text :orig_lp
|
308
|
+
t.text :rm_master_desc
|
309
|
+
t.text :ftr_window_treat
|
310
|
+
t.text :county
|
311
|
+
t.text :other_fee_type
|
312
|
+
t.text :rm_other1
|
313
|
+
t.text :ftr_windows
|
314
|
+
t.text :df_yn
|
315
|
+
t.text :photo_count
|
316
|
+
t.text :rm_other1_desc
|
317
|
+
t.text :year_built
|
318
|
+
t.text :date_modified
|
319
|
+
t.text :photo_date_modified
|
320
|
+
t.text :rm_other1_name
|
321
|
+
t.text :year_built_source
|
322
|
+
t.text :status_date
|
323
|
+
t.text :prop_id
|
324
|
+
t.text :rm_other2
|
325
|
+
t.text :zip
|
326
|
+
t.text :date_created
|
327
|
+
t.text :parcel_id
|
328
|
+
t.text :rm_other2_desc
|
329
|
+
t.text :proj_close_date
|
330
|
+
t.text :pending_date
|
331
|
+
t.text :rm_other2_name
|
332
|
+
t.text :withdrawn_date
|
333
|
+
t.text :media_flag
|
334
|
+
t.text :rm_other3
|
335
|
+
t.text :virtual_tour
|
336
|
+
|
337
|
+
t.float :latitude
|
338
|
+
t.float :longitude
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
def create_commercial(c)
|
343
|
+
c.drop_table :rets_commercial if c.table_exists?('rets_commercial')
|
344
|
+
c.create_table :rets_commercial do |t|
|
345
|
+
t.text :acreage
|
346
|
+
t.text :adjoining_land_use
|
347
|
+
t.text :agent_notes
|
348
|
+
t.text :agent_other_contact_desc
|
349
|
+
t.text :agent_other_contact_phone
|
350
|
+
t.text :annual_taxes
|
351
|
+
t.text :approx_age
|
352
|
+
t.text :area
|
353
|
+
t.text :baths
|
354
|
+
t.text :baths_full
|
355
|
+
t.text :baths_half
|
356
|
+
t.text :bedrooms
|
357
|
+
t.text :bom_date
|
358
|
+
t.text :book_number
|
359
|
+
t.text :book_page
|
360
|
+
t.text :book_type
|
361
|
+
t.text :box_on_unit
|
362
|
+
t.text :box_on_unit_yn
|
363
|
+
t.text :business_included_yn
|
364
|
+
t.text :buyer_broker
|
365
|
+
t.text :buyer_broker_type
|
366
|
+
t.text :buyer_city
|
367
|
+
t.text :buyer_name
|
368
|
+
t.text :buyer_state
|
369
|
+
t.text :buyer_zip
|
370
|
+
t.text :category
|
371
|
+
t.text :city
|
372
|
+
t.text :city_code
|
373
|
+
t.text :co_la_code
|
374
|
+
t.text :co_lo_code
|
375
|
+
t.text :co_sa_code
|
376
|
+
t.text :co_so_code
|
377
|
+
t.text :contacts
|
378
|
+
t.text :contr_broker
|
379
|
+
t.text :contr_broker_type
|
380
|
+
t.text :county
|
381
|
+
t.integer :current_price, :default => 0
|
382
|
+
t.text :date_created
|
383
|
+
t.text :date_leased
|
384
|
+
t.text :date_modified
|
385
|
+
t.text :df_yn
|
386
|
+
t.text :directions
|
387
|
+
t.text :display_address_yn
|
388
|
+
t.text :dom
|
389
|
+
t.text :elem_school
|
390
|
+
t.text :expenses_assoc
|
391
|
+
t.text :expenses_ins
|
392
|
+
t.text :expenses_maint
|
393
|
+
t.text :expenses_mgmt
|
394
|
+
t.text :expenses_other
|
395
|
+
t.text :expenses_tax
|
396
|
+
t.text :expenses_utility
|
397
|
+
t.text :expire_date
|
398
|
+
t.text :flood_plain
|
399
|
+
t.text :ftr_building
|
400
|
+
t.text :ftr_building_type
|
401
|
+
t.text :ftr_closing
|
402
|
+
t.text :ftr_cooling
|
403
|
+
t.text :ftr_docs_on_file
|
404
|
+
t.text :ftr_exterior
|
405
|
+
t.text :ftr_financing
|
406
|
+
t.text :ftr_flooring
|
407
|
+
t.text :ftr_heating
|
408
|
+
t.text :ftr_interior
|
409
|
+
t.text :ftr_internet
|
410
|
+
t.text :ftr_lease_terms
|
411
|
+
t.text :ftr_property_desc
|
412
|
+
t.text :ftr_roof
|
413
|
+
t.text :ftr_sale_terms
|
414
|
+
t.text :ftr_sewer
|
415
|
+
t.text :ftr_showing
|
416
|
+
t.text :ftr_sprinkler
|
417
|
+
t.text :ftr_style
|
418
|
+
t.text :ftr_utilities
|
419
|
+
t.text :ftr_utilities_rental
|
420
|
+
t.text :ftr_water
|
421
|
+
t.text :geo_precision
|
422
|
+
t.text :georesult
|
423
|
+
t.text :high_school
|
424
|
+
t.text :hoa_fee
|
425
|
+
t.text :hoa_fee_yn
|
426
|
+
t.text :hoa_term
|
427
|
+
t.text :income_gross
|
428
|
+
t.text :income_net
|
429
|
+
t.text :income_other
|
430
|
+
t.text :income_rental
|
431
|
+
t.text :internet_yn
|
432
|
+
t.text :la_code
|
433
|
+
t.text :leased_through
|
434
|
+
t.text :legal_block
|
435
|
+
t.text :legal_lot
|
436
|
+
t.text :legals
|
437
|
+
t.text :list_date
|
438
|
+
t.text :list_price
|
439
|
+
t.text :listing_type
|
440
|
+
t.text :lo_code
|
441
|
+
t.text :lockbox_yn
|
442
|
+
t.text :lot_dimensions
|
443
|
+
t.text :lot_dimensions_source
|
444
|
+
t.text :media_flag
|
445
|
+
t.text :middle_school
|
446
|
+
t.text :mls_acct
|
447
|
+
t.text :municipality
|
448
|
+
t.text :num_units
|
449
|
+
t.text :num_units_occupied
|
450
|
+
t.text :off_mkt_date
|
451
|
+
t.text :off_mkt_days
|
452
|
+
t.text :office_notes
|
453
|
+
t.text :orig_lp
|
454
|
+
t.text :other_fee
|
455
|
+
t.text :other_fee_type
|
456
|
+
t.text :owner_name
|
457
|
+
t.text :owner_phone
|
458
|
+
t.text :parcel_id
|
459
|
+
t.text :pending_date
|
460
|
+
t.text :photo_count
|
461
|
+
t.text :photo_date_modified
|
462
|
+
t.text :photo_description
|
463
|
+
t.text :photo_instr
|
464
|
+
t.text :posession
|
465
|
+
t.text :price_change_date
|
466
|
+
t.text :price_sqft
|
467
|
+
t.text :proj_close_date
|
468
|
+
t.text :prop_desc
|
469
|
+
t.text :prop_id
|
470
|
+
t.text :prop_type
|
471
|
+
t.text :remarks
|
472
|
+
t.text :road_frontage_ft
|
473
|
+
t.text :sa_code
|
474
|
+
t.text :sale_lease
|
475
|
+
t.text :sale_notes
|
476
|
+
t.text :so_code
|
477
|
+
t.text :sold_date
|
478
|
+
t.text :sold_price
|
479
|
+
t.text :sold_terms
|
480
|
+
t.text :sqft_source
|
481
|
+
t.text :state
|
482
|
+
t.text :status
|
483
|
+
t.text :status_date
|
484
|
+
t.text :status_flag
|
485
|
+
t.text :street
|
486
|
+
t.text :street_dir
|
487
|
+
t.text :street_name
|
488
|
+
t.text :street_num
|
489
|
+
t.text :sub_agent
|
490
|
+
t.text :sub_agent_type
|
491
|
+
t.text :sub_area
|
492
|
+
t.text :subdivision
|
493
|
+
t.text :take_photo_yn
|
494
|
+
t.text :third_party_comm_yn
|
495
|
+
t.text :tot_heat_sqft
|
496
|
+
t.text :tour_date
|
497
|
+
t.text :tour_submit_date
|
498
|
+
t.text :type_detailed
|
499
|
+
t.text :u1_dims
|
500
|
+
t.text :u1_free_standing_yn
|
501
|
+
t.text :u1_sqft_manuf
|
502
|
+
t.text :u1_sqft_office
|
503
|
+
t.text :u1_sqft_retail
|
504
|
+
t.text :u1_sqft_total
|
505
|
+
t.text :u1_sqft_warehouse
|
506
|
+
t.text :u1_year_built
|
507
|
+
t.text :u2_dims
|
508
|
+
t.text :u2_free_standing_yn
|
509
|
+
t.text :u2_sqft_manuf
|
510
|
+
t.text :u2_sqft_office
|
511
|
+
t.text :u2_sqft_retail
|
512
|
+
t.text :u2_sqft_total
|
513
|
+
t.text :u2_sqft_warehouse
|
514
|
+
t.text :u2_year_built
|
515
|
+
t.text :u3_dims
|
516
|
+
t.text :u3_free_standing_yn
|
517
|
+
t.text :u3_sqft_manuf
|
518
|
+
t.text :u3_sqft_office
|
519
|
+
t.text :u3_sqft_retail
|
520
|
+
t.text :u3_sqft_total
|
521
|
+
t.text :u3_sqft_warehouse
|
522
|
+
t.text :u3_year_built
|
523
|
+
t.text :unit_num
|
524
|
+
t.text :upload_source
|
525
|
+
t.text :vacancy_rate
|
526
|
+
t.text :vacant_yn
|
527
|
+
t.text :valuation_yn
|
528
|
+
t.text :vt_yn
|
529
|
+
t.text :waterfront_yn
|
530
|
+
t.text :withdrawn_date
|
531
|
+
t.text :year_built
|
532
|
+
t.text :zip
|
533
|
+
t.text :zoning_northport
|
534
|
+
t.text :zoning_tusc
|
535
|
+
t.text :virtual_tour
|
536
|
+
|
537
|
+
t.float :latitude
|
538
|
+
t.float :longitude
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
def create_land(c)
|
543
|
+
c.drop_table :rets_land if c.table_exists?('rets_land')
|
544
|
+
c.create_table :rets_land do |t|
|
545
|
+
t.text :acreage
|
546
|
+
t.text :acreage_source
|
547
|
+
t.text :adjoining_land_use
|
548
|
+
t.text :agent_notes
|
549
|
+
t.text :agent_other_contact_desc
|
550
|
+
t.text :agent_other_contact_phone
|
551
|
+
t.text :annual_taxes
|
552
|
+
t.text :area
|
553
|
+
t.text :bom_date
|
554
|
+
t.text :book_number
|
555
|
+
t.text :book_page
|
556
|
+
t.text :book_type
|
557
|
+
t.text :buyer_broker
|
558
|
+
t.text :buyer_broker_type
|
559
|
+
t.text :buyer_name
|
560
|
+
t.text :category
|
561
|
+
t.text :city
|
562
|
+
t.text :city_code
|
563
|
+
t.text :co_la_code
|
564
|
+
t.text :co_lo_code
|
565
|
+
t.text :co_sa_code
|
566
|
+
t.text :co_so_code
|
567
|
+
t.text :contacts
|
568
|
+
t.text :contr_broker
|
569
|
+
t.text :contr_broker_type
|
570
|
+
t.text :converted
|
571
|
+
t.text :county
|
572
|
+
t.integer :current_price, :default => 0
|
573
|
+
t.text :date_created
|
574
|
+
t.text :date_modified
|
575
|
+
t.text :df_yn
|
576
|
+
t.text :directions
|
577
|
+
t.text :display_address_yn
|
578
|
+
t.text :dom
|
579
|
+
t.text :elem_school
|
580
|
+
t.text :expire_date
|
581
|
+
t.text :ftr_access
|
582
|
+
t.text :ftr_docs_on_file
|
583
|
+
t.text :ftr_existing_struct
|
584
|
+
t.text :ftr_extras
|
585
|
+
t.text :ftr_internet
|
586
|
+
t.text :ftr_lotdesc
|
587
|
+
t.text :ftr_mineralrights
|
588
|
+
t.text :ftr_possibleuse
|
589
|
+
t.text :ftr_restrictions
|
590
|
+
t.text :ftr_sewer
|
591
|
+
t.text :ftr_showing
|
592
|
+
t.text :ftr_terms
|
593
|
+
t.text :ftr_topography
|
594
|
+
t.text :ftr_utils
|
595
|
+
t.text :ftr_zoning
|
596
|
+
t.text :geo_precision
|
597
|
+
t.text :georesult
|
598
|
+
t.text :high_school
|
599
|
+
t.text :internet_yn
|
600
|
+
t.text :la_code
|
601
|
+
t.text :legal_block
|
602
|
+
t.text :legal_lot
|
603
|
+
t.text :legal_section
|
604
|
+
t.text :legals
|
605
|
+
t.text :list_date
|
606
|
+
t.text :list_price
|
607
|
+
t.text :listing_type
|
608
|
+
t.text :lo_code
|
609
|
+
t.text :lot_dim_source
|
610
|
+
t.text :lot_dimensions
|
611
|
+
t.text :media_flag
|
612
|
+
t.text :middle_school
|
613
|
+
t.text :mls_acct
|
614
|
+
t.text :municipality
|
615
|
+
t.text :off_mkt_date
|
616
|
+
t.text :off_mkt_days
|
617
|
+
t.text :office_notes
|
618
|
+
t.text :orig_lp
|
619
|
+
t.text :orig_price
|
620
|
+
t.text :other_fee
|
621
|
+
t.text :other_fee_type
|
622
|
+
t.text :owner_name
|
623
|
+
t.text :owner_phone
|
624
|
+
t.text :parcel_id
|
625
|
+
t.text :pending_date
|
626
|
+
t.text :photo_count
|
627
|
+
t.text :photo_date_modified
|
628
|
+
t.text :price_change_date
|
629
|
+
t.text :price_sqft
|
630
|
+
t.text :proj_close_date
|
631
|
+
t.text :prop_id
|
632
|
+
t.text :prop_type
|
633
|
+
t.text :remarks
|
634
|
+
t.text :road_frontage_ft
|
635
|
+
t.text :sa_code
|
636
|
+
t.text :sale_lease
|
637
|
+
t.text :sale_notes
|
638
|
+
t.text :so_code
|
639
|
+
t.text :sold_date
|
640
|
+
t.text :sold_price
|
641
|
+
t.text :sold_terms
|
642
|
+
t.text :state
|
643
|
+
t.text :status
|
644
|
+
t.text :status_date
|
645
|
+
t.text :status_flag
|
646
|
+
t.text :street
|
647
|
+
t.text :street_dir
|
648
|
+
t.text :street_name
|
649
|
+
t.text :street_num
|
650
|
+
t.text :sub_agent
|
651
|
+
t.text :sub_agent_type
|
652
|
+
t.text :subdivision
|
653
|
+
t.text :third_party_comm_yn
|
654
|
+
t.text :unit_num
|
655
|
+
t.text :upload_source
|
656
|
+
t.text :valuation_yn
|
657
|
+
t.text :vt_yn
|
658
|
+
t.text :waterfront
|
659
|
+
t.text :waterfront_yn
|
660
|
+
t.text :wf_feet
|
661
|
+
t.text :withdrawn_date
|
662
|
+
t.text :zip
|
663
|
+
t.text :zoning_northport
|
664
|
+
t.text :zoning_tusc
|
665
|
+
|
666
|
+
t.float :latitude
|
667
|
+
t.float :longitude
|
668
|
+
end
|
669
|
+
end
|
670
|
+
|
671
|
+
def create_multi_family(c)
|
672
|
+
c.drop_table :rets_multi_family if c.table_exists?('rets_multi_family')
|
673
|
+
c.create_table :rets_multi_family do |t|
|
674
|
+
t.text :acreage
|
675
|
+
t.text :agent_notes
|
676
|
+
t.text :agent_other_contact_desc
|
677
|
+
t.text :agent_other_contact_phone
|
678
|
+
t.text :annual_taxes
|
679
|
+
t.text :area
|
680
|
+
t.text :bom_date
|
681
|
+
t.text :book_number
|
682
|
+
t.text :book_page
|
683
|
+
t.text :book_type
|
684
|
+
t.text :box_on_unit
|
685
|
+
t.text :buyer_broker
|
686
|
+
t.text :buyer_broker_type
|
687
|
+
t.text :buyer_name
|
688
|
+
t.text :category
|
689
|
+
t.text :city
|
690
|
+
t.text :city_code
|
691
|
+
t.text :contacts
|
692
|
+
t.text :contr_broker
|
693
|
+
t.text :contr_broker_type
|
694
|
+
t.text :county
|
695
|
+
t.text :co_la_code
|
696
|
+
t.text :co_lo_code
|
697
|
+
t.text :co_sa_code
|
698
|
+
t.text :co_so_code
|
699
|
+
t.integer :current_price
|
700
|
+
t.text :date_created
|
701
|
+
t.text :date_leased
|
702
|
+
t.text :date_modified
|
703
|
+
t.text :df_yn
|
704
|
+
t.text :directions
|
705
|
+
t.text :display_address_yn
|
706
|
+
t.text :dom
|
707
|
+
t.text :elem_school
|
708
|
+
t.text :expenses_association
|
709
|
+
t.text :expenses_insurance
|
710
|
+
t.text :expenses_maintenance
|
711
|
+
t.text :expenses_management
|
712
|
+
t.text :expenses_other
|
713
|
+
t.text :expenses_tax
|
714
|
+
t.text :expire_date
|
715
|
+
t.text :flood_plain
|
716
|
+
t.text :ftr_building_type
|
717
|
+
t.text :ftr_construction
|
718
|
+
t.text :ftr_cooling
|
719
|
+
t.text :ftr_exterior
|
720
|
+
t.text :ftr_exterioramenit
|
721
|
+
t.text :ftr_floors
|
722
|
+
t.text :ftr_heating
|
723
|
+
t.text :ftr_interior
|
724
|
+
t.text :ftr_rent_incl
|
725
|
+
t.text :ftr_roof
|
726
|
+
t.text :ftr_roof_age
|
727
|
+
t.text :ftr_showing
|
728
|
+
t.text :ftr_utils
|
729
|
+
t.text :ftr_zoning
|
730
|
+
t.text :georesult
|
731
|
+
t.text :geo_precision
|
732
|
+
t.text :high_school
|
733
|
+
t.text :hoa_fee
|
734
|
+
t.text :hoa_fee_yn
|
735
|
+
t.text :hoa_term
|
736
|
+
t.text :income
|
737
|
+
t.text :income_other
|
738
|
+
t.text :income_rent
|
739
|
+
t.text :internet_yn
|
740
|
+
t.text :la_code
|
741
|
+
t.text :legals
|
742
|
+
t.text :limited_service_yn
|
743
|
+
t.text :listing_type
|
744
|
+
t.text :list_date
|
745
|
+
t.text :list_price
|
746
|
+
t.text :lot_dimensions
|
747
|
+
t.text :lot_dimensions_source
|
748
|
+
t.text :lo_code
|
749
|
+
t.text :management
|
750
|
+
t.text :media_flag
|
751
|
+
t.text :middle_school
|
752
|
+
t.text :mls_acct
|
753
|
+
t.text :municipality
|
754
|
+
t.text :num_units
|
755
|
+
t.text :num_units_occupied
|
756
|
+
t.text :office_notes
|
757
|
+
t.text :off_mkt_date
|
758
|
+
t.text :off_mkt_days
|
759
|
+
t.text :orig_lp
|
760
|
+
t.text :orig_price
|
761
|
+
t.text :other_fee
|
762
|
+
t.text :other_fee_type
|
763
|
+
t.text :owner_name
|
764
|
+
t.text :owner_phone
|
765
|
+
t.text :parcel_id
|
766
|
+
t.text :pending_date
|
767
|
+
t.text :photo_count
|
768
|
+
t.text :photo_date_modified
|
769
|
+
t.text :price_change_date
|
770
|
+
t.text :price_sqft
|
771
|
+
t.text :proj_close_date
|
772
|
+
t.text :prop_id
|
773
|
+
t.text :prop_type
|
774
|
+
t.text :remarks
|
775
|
+
t.text :sale_notes
|
776
|
+
t.text :sale_rent
|
777
|
+
t.text :sa_code
|
778
|
+
t.text :sold_date
|
779
|
+
t.text :sold_price
|
780
|
+
t.text :sold_terms
|
781
|
+
t.text :so_code
|
782
|
+
t.text :state
|
783
|
+
t.text :status
|
784
|
+
t.text :status_date
|
785
|
+
t.text :status_flag
|
786
|
+
t.text :street
|
787
|
+
t.text :street_dir
|
788
|
+
t.text :street_name
|
789
|
+
t.text :street_num
|
790
|
+
t.text :subdivision
|
791
|
+
t.text :sub_agent
|
792
|
+
t.text :sub_agent_type
|
793
|
+
t.text :third_party_comm_yn
|
794
|
+
t.text :tot_heat_sqft
|
795
|
+
t.text :u1_baths
|
796
|
+
t.text :u1_num
|
797
|
+
t.text :u1_occ
|
798
|
+
t.text :u1_rent
|
799
|
+
t.text :u1_sqft
|
800
|
+
t.text :u1_yn
|
801
|
+
t.text :u2_baths
|
802
|
+
t.text :u2_num
|
803
|
+
t.text :u2_occ
|
804
|
+
t.text :u2_rent
|
805
|
+
t.text :u2_sqft
|
806
|
+
t.text :u2_yn
|
807
|
+
t.text :u3_baths
|
808
|
+
t.text :u3_num
|
809
|
+
t.text :u3_occ
|
810
|
+
t.text :u3_rent
|
811
|
+
t.text :u3_sqft
|
812
|
+
t.text :u3_yn
|
813
|
+
t.text :u4_baths
|
814
|
+
t.text :u4_num
|
815
|
+
t.text :u4_occ
|
816
|
+
t.text :u4_rent
|
817
|
+
t.text :u4_sqft
|
818
|
+
t.text :u4_yn
|
819
|
+
t.text :u5_baths
|
820
|
+
t.text :u5_num
|
821
|
+
t.text :u5_occ
|
822
|
+
t.text :u5_rent
|
823
|
+
t.text :u5_sqft
|
824
|
+
t.text :u5_yn
|
825
|
+
t.text :u6_baths
|
826
|
+
t.text :u6_num
|
827
|
+
t.text :u6_occ
|
828
|
+
t.text :u6_rent
|
829
|
+
t.text :u6_sqft
|
830
|
+
t.text :u6_yn
|
831
|
+
t.text :u7_baths
|
832
|
+
t.text :u7_num
|
833
|
+
t.text :u7_occ
|
834
|
+
t.text :u7_rent
|
835
|
+
t.text :u7_sqft
|
836
|
+
t.text :u7_yn
|
837
|
+
t.text :u8_num
|
838
|
+
t.text :u8_occ
|
839
|
+
t.text :u8_rent
|
840
|
+
t.text :u8_sqft
|
841
|
+
t.text :u8_yn
|
842
|
+
t.text :unit_num
|
843
|
+
t.text :upload_source
|
844
|
+
t.text :valuation_yn
|
845
|
+
t.text :vt_yn
|
846
|
+
t.text :withdrawn_date
|
847
|
+
t.text :year_built
|
848
|
+
t.text :zip
|
849
|
+
|
850
|
+
t.float :latitude
|
851
|
+
t.float :longitude
|
852
|
+
end
|
853
|
+
end
|
854
|
+
|
855
|
+
end
|