caboose-rets 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +5 -13
  2. data/app/controllers/caboose_rets/residential_controller.rb +24 -5
  3. data/app/models/caboose_rets/agent.rb +5 -1
  4. data/app/models/caboose_rets/rets_importer.rb +4 -3
  5. data/app/models/caboose_rets/schema.rb +41 -1
  6. data/app/views/caboose/blocks/_layout_rets.html.erb +56 -0
  7. data/app/views/caboose/blocks/_rets_agent_details.html.erb +88 -0
  8. data/app/views/caboose/blocks/_rets_agent_listings.html.erb +122 -0
  9. data/app/views/caboose/blocks/_rets_agents_index.html.erb +51 -0
  10. data/app/views/caboose/blocks/_rets_commercial_details.html.erb +192 -0
  11. data/app/views/caboose/blocks/_rets_commercial_headers.html.erb +17 -0
  12. data/app/views/caboose/blocks/_rets_commercial_index.html.erb +71 -0
  13. data/app/views/caboose/blocks/_rets_commercial_row.html.erb +39 -0
  14. data/app/views/caboose/blocks/_rets_commercial_search_form.html.erb +201 -0
  15. data/app/views/caboose/blocks/_rets_land_details.html.erb +165 -0
  16. data/app/views/caboose/blocks/_rets_land_index.html.erb +63 -0
  17. data/app/views/caboose/blocks/_rets_land_row.html.erb +58 -0
  18. data/app/views/caboose/blocks/_rets_land_search_form.html.erb +194 -0
  19. data/app/views/caboose/blocks/_rets_multifamily_details.html.erb +161 -0
  20. data/app/views/caboose/blocks/_rets_multifamily_index.html.erb +63 -0
  21. data/app/views/caboose/blocks/_rets_multifamily_row.html.erb +56 -0
  22. data/app/views/caboose/blocks/_rets_multifamily_search_form.html.erb +273 -0
  23. data/app/views/caboose/blocks/_rets_openhouse_details.html.erb +12 -0
  24. data/app/views/caboose/blocks/_rets_openhouses_index.html.erb +79 -0
  25. data/app/views/caboose/blocks/_rets_residential_details.html.erb +243 -0
  26. data/app/views/caboose/blocks/_rets_residential_index.html.erb +65 -0
  27. data/app/views/caboose/blocks/_rets_residential_row.html.erb +59 -0
  28. data/app/views/caboose/blocks/_rets_residential_search_form.html.erb +304 -0
  29. data/app/views/caboose/blocks/_rets_savedproperties_index.html.erb +28 -0
  30. data/app/views/caboose_rets/residential/details.html.erb +0 -139
  31. data/app/views/caboose_rets/residential/index.html.erb +0 -49
  32. data/lib/caboose_rets/version.rb +1 -1
  33. metadata +33 -9
@@ -0,0 +1,12 @@
1
+ <div class="body-sink"></div>
2
+
3
+ <div class="l-wrapper">
4
+ <div class="l-section">
5
+ <h1 class="h-type-center h-space-mbs"><%= raw @post[:title] %></h1>
6
+ <% if @post.image %>
7
+ <figure class="h-type-center"><img src="<%= @post.image.url(:large) %>"></figure>
8
+ <% end %>
9
+ <article class="h-space-mvm"><%= raw @post[:body] %></article>
10
+ <footer class="section-foot"><%= raw Caboose::Setting.value_for('footer_text') %></footer>
11
+ </div> <!-- .l-section -->
12
+ </div> <!-- .l-wrapper -->
@@ -0,0 +1,79 @@
1
+ <div class="body-sink"></div>
2
+
3
+ <div class="l-wrapper">
4
+ <div class="l-section">
5
+ <h3 class="h-type-center h-space-mbs">Open Houses</h3>
6
+
7
+ <ul class="m-list-border h-space-mbm">
8
+ <% if @open_houses %>
9
+ <% @open_houses.each do |op| %>
10
+ <%
11
+ p = op.property
12
+ next if p.nil? or p.lo_code != '46'
13
+ a = p.agent
14
+
15
+ hosts = []
16
+ if op.comments.strip.length > 0
17
+ op.comments.strip.split(',').each do |la_code|
18
+ la_code.strip!
19
+ if la_code != a.la_code && CabooseRets::Agent.exists?(:la_code => la_code)
20
+ hosts << CabooseRets::Agent.where(:la_code => la_code).first
21
+ end
22
+ end
23
+ end
24
+
25
+ st = "#{op.start_time}"
26
+ et = "#{op.end_time}"
27
+ st = "0#{st}" if st.length == 3
28
+ et = "0#{et}" if et.length == 3
29
+
30
+ d1 = DateTime.parse("#{op.open_house_date}T#{st[0..1]}:#{st[2..3]}")
31
+ d2 = DateTime.parse("#{op.open_house_date}T#{et[0..1]}:#{et[2..3]}")
32
+ start_time = d1.strftime("%l:%M").strip
33
+ end_time = d2.strftime("%l:%M").strip
34
+ %>
35
+ <li class="l-media inflate-tenor">
36
+ <% if p.images && p.images.count > 0 %>
37
+ <figure class="media-aside"><a href="<%= p.url %>"><img src="<%= p.images[0].image_url(:thumb) %>"></a></figure>
38
+ <% end %>
39
+ <% if a %>
40
+ <% end %>
41
+ <div class="media-body">
42
+ <h5><strong><%= d1.strftime("%A, %b. %e") %>
43
+ from <%= start_time %>-<%= end_time %> <%= d2.strftime("%P") %>
44
+ at <%= p.street_num %> <%= p.street_name %>
45
+ </strong></h5>
46
+ <p><%= number_to_currency(p.current_price, :precision => 0) %></p>
47
+ <% if a && a.image %>
48
+ <div style="float: right; margin-left: 10px; width: 100px">
49
+ <img src="<%= a.image_url(:thumb) %>" width="100" />
50
+ Listed by <%= a.first_name %> <%= a.last_name %>
51
+ </div>
52
+ <% end %>
53
+ <% if hosts.count > 0 %>
54
+ <% hosts.each do |host| %>
55
+ <% if host.image %>
56
+ <div style="float: right; margin-left: 10px; width: 100px">
57
+ <img src="<%= host.image_url(:thumb) %>" width="100" />
58
+ Hosted by <%= host.first_name %> <%= host.last_name %>
59
+ </div>
60
+ <% end %>
61
+ <% end %>
62
+ <% end %>
63
+ <p class="h-space-mbt"><%= p.remarks %></p>
64
+ <a class="m-btn-red h-space-mts" href="<%= p.url %>">Read More</a>
65
+ </div> <!-- .media-body -->
66
+ </li> <!-- .l-media -->
67
+ <% end %>
68
+ <% end %>
69
+ </ul> <!-- .m-list -->
70
+
71
+ <footer class="section-foot"><%= raw Caboose::Setting.value_for('footer_text') %></footer>
72
+ </div> <!-- .l-section -->
73
+ </div> <!-- .l-wrapper -->
74
+
75
+ <script type="text/javascript">
76
+ <% unless flash[:notice].blank? %>
77
+ alert('<%= flash[:notice] %>');
78
+ <% end %>
79
+ </script>
@@ -0,0 +1,243 @@
1
+ <%
2
+ # Residential property details
3
+ p = property
4
+ %>
5
+
6
+ <div class="l-wrapper">
7
+ <div class="l-section">
8
+ <div class="l-sidebar-border inflate-tenor-baritone">
9
+ <div class="sidebar-aside">
10
+ <% if agent %>
11
+ <div class="realtor_info">
12
+ <h4>Agent</h4>
13
+ <img src="<%= agent.image_url(:thumb) %>?<%= DateTime.now.strftime('%F') %>" alt="<% if agent.meta.designation %><%= agent.meta.designation %> <% end %><%= agent.first_name %> <%= agent.last_name %>" />
14
+ <br />
15
+ <a href="/agents/<%= agent.la_code %>"><%= agent.first_name %> <%= agent.last_name %></a><br>
16
+ <a href="tel:<%= agent.car_phone %>"><%= agent.car_phone %></a>
17
+
18
+ <% co_agent = CabooseRets::Agent.where(:la_code => p.co_la_code).first %>
19
+ <% if co_agent %>
20
+ <h4>Co-Agent</h4>
21
+ <img src="<%= co_agent.image_url(:thumb) %>?<%= DateTime.now.strftime('%F') %>" alt="<% if co_agent.designation %><%= co_agent.designation %> <% end %><%= co_agent.first_name %> <%= co_agent.last_name %>" />
22
+ <br />
23
+ <a href="/agents/<%= co_agent.la_code %>"><%= co_agent.first_name %> <%= co_agent.last_name %></a><br>
24
+ <a href="tel:<%= co_agent.car_phone %>"><%= co_agent.car_phone %></a>
25
+ <% end %>
26
+
27
+ </div>
28
+ <% end %>
29
+
30
+
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"> <%= number_to_currency(property.current_price, :precision => 0) %>
37
+
38
+ <% if property.foreclosure_yn == 'Y' %>
39
+ <br><span style='font-size: 0.8em; color: rgb(114, 114, 114);'>(Foreclosure)</span>
40
+ <% end %>
41
+ <!-- if property.foreclosure_yn == 'Y' -->
42
+ </p>
43
+ <p class="h-space-mvs h-type-highlight h-type-h4">
44
+ MLS #<%= property.mls_acct %>
45
+ <% if property.lo_code != '46' %>
46
+ <br /><span class="nonadvantage_agent">
47
+ Listing Courtesy of <% if property.office && property.office.lo_name %> <%= property.office.lo_name.titleize %><% else %><%= property.lo_code %><% end %>
48
+ </span>
49
+ <% end %>
50
+ <a class="toggle_save_property button_to m-btn-red h-space-mtm" data-mls_acct="<%= property.mls_acct %>" href="" style="padding-top: 6px;">
51
+ <img src="<%= asset_path 'icon-star.png' %>" alt="" style="height:40px;">
52
+ Save Listing
53
+ </a>
54
+ </p>
55
+ <% if property.street_num && property.street_name && property.city && property.state && property.zip %>
56
+ <div class="m-map-small h-border h-space-mbm" address="<%= property.street_num %> <%= property.street_name %> <%= property.city %>, <%= property.state %> <%= property.zip %>"></div>
57
+ <% end %>
58
+
59
+
60
+ <h4 class="h-space-mvt">Directions</h4>
61
+ <p class="paragraph"><%= property.directions %></p>
62
+ <h4 class="h-space-mvt">Neighborhood Information</h4>
63
+
64
+ <ul class="m-list-pad">
65
+ <li><strong>Area</strong>: <%= property.area.titleize %></li>
66
+ <% if property.subdivision %><li><strong>Subdivision</strong>: <%= property.subdivision.titleize %></li><% end %>
67
+ <% if property.elem_school %><li><strong>Elementary School</strong>: <%= property.elem_school.titleize %></li><% end %>
68
+ <% if property.middle_school %><li><strong>Middle School</strong>: <%= property.middle_school.titleize %></li><% end %>
69
+ <% if property.high_school %><li><strong>High School</strong>: <%= property.high_school.titleize %></li><% end %>
70
+ <li><strong>County</strong>: <%= property.county.titleize %></li>
71
+ <li><strong>Lot Size</strong>: <%= property.ftr_lotdesc %></li>
72
+ </ul>
73
+
74
+ <h4 class="h-space-mvt">Contact the Agent</h4>
75
+ <form action='/contact/property' method='post' class="m-form" id="contact_form">
76
+ <input type='hidden' name='authenticity_token' value="<%= form_authenticity_token %>" />
77
+ <input type='hidden' name='contact_mls_acct' id='contact_mls_acct' value='<%= property.mls_acct %>' />
78
+ <input type='text' name='contact_name' id="contact_name" value='' placeholder="Name" maxlength="150" />
79
+ <input type='text' name='contact_email' id="contact_email" value='' placeholder="Email" maxlength="150" />
80
+ <textarea name='contact_body' id="contact_body" placeholder="Message" cols="50" rows="4" class="contact_message"></textarea>
81
+ <div id='contact_message'></div>
82
+ <p><input class="m-btn-red btn-large h-float-right h-space-mts" type="submit" value="Send" onclick='post_contact_form(); return false;' /></p>
83
+ </form>
84
+
85
+ </div> <!-- .sidebar-aside -->
86
+
87
+ <div class="sidebar-body">
88
+ <div class="photos" style="text-align: center;">
89
+ <p>
90
+ <input type='button' value='<' onclick='gallery.previous_image();' id='previous_image' />
91
+ <input type='button' value='>' onclick='gallery.next_image();' id='next_image' />
92
+ </p>
93
+ <div id='large_image'></div>
94
+ <div id='large_caption'></div>
95
+ <div style="display: block;">
96
+ <% property.images.each_index do |i| %>
97
+ <% m = property.images[i] %>
98
+ <% img = property.images[i].image %>
99
+ <a class="photo" id='image_trigger_<%= m.id %>' style="float: left; display: block; width: 12.5%; padding: 2px;" href="<%= m.image_url(:large) %>" data-index="<%= i %>">
100
+ <img style="display: block; width: 100%;" src="<%= m.image_url(:thumb) %>"/>
101
+ </a>
102
+ <% end %>
103
+ </div>
104
+ </div>
105
+ <div style="clear: both;"></div><br />
106
+ <p class="paragraph"><%= property.remarks %></p>
107
+ <h4 class="h-type-standard h-type-highlight h-type-caps h-space-mts">Property Details</h4>
108
+ <h5 class="h-type-standard">Single Family Home</h5>
109
+
110
+ <ul class="m-list-bullet h-space-mts">
111
+ <% if property.tot_heat_sqft != "" %><li><strong>Total Heated Sq. Ft.</strong>: <span id='square_footage'><%=h property.tot_heat_sqft %></span></li><% end %>
112
+ <% if property.price_sqft != "" %><li><strong>Price/Sq. Ft.</strong>: <span id='square_footage'><%=h number_to_currency property.price_sqft %></span></li><% end %>
113
+ <% if property.bedrooms != "" %><li><strong>Bedrooms</strong>: <%= property.bedrooms %></li><% end %>
114
+ <% if property.baths != "" %><li><strong>Baths</strong>: <%= property.baths_full %> full <% if property.baths_half != "" && property.baths_half != "0" %> &amp; <%= property.baths_half %> half baths<% end %></li><% end %>
115
+ <% if property.acreage != "" %><li><strong>Acreage</strong>: <%= property.acreage %></li><% end %>
116
+ </ul> <!-- .m-list-bullet -->
117
+ <h4 class="h-type-standard h-type-highlight h-type-caps h-space-mts">Features</h4>
118
+
119
+ <ul>
120
+ <% if property.ftr_interior %><li><strong>Interior</strong>: <%= property.ftr_interior %> </li><% end %>
121
+ <% if property.ftr_cooling %><li><strong>Cooling</strong>: <%= property.ftr_cooling %> </li><% end %>
122
+ <% if property.ftr_heating %><li><strong>Heating</strong>: <%= property.ftr_heating %> </li><% end %>
123
+ <% if property.year_built %><li><strong>Year Built</strong>: <%= property.year_built %> </li><% end %>
124
+ </ul>
125
+ <br>
126
+ <% if property.virtual_tour %><p><a class="m-btn h-space-mtm" href='<%= property.virtual_tour %>' target='_blank'>Virtual Tour</a></p><% end %>
127
+
128
+ <a data-pin-do="buttonPin" data-pin-config="beside" href="//pinterest.com/pin/create/button/?url=<%= request.original_url %>&amp;media=<%= property.images[0].image_url(:large) %>"></a>
129
+ </div> <!-- .sidebar-body -->
130
+ </div> <!-- .l-sidebar -->
131
+ </div> <!-- .body-section -->
132
+ </div> <!-- .l-wrapper -->
133
+
134
+ <div class="body-sink"></div>
135
+
136
+ <% content_for :caboose_css do %>
137
+ <style type='text/css'>
138
+ #large_caption { padding-bottom: 20px; }
139
+ </style>
140
+ <% end %>
141
+ <% content_for :caboose_js do %>
142
+ <%= javascript_include_tag "caboose_rets/caboose_rets" %>
143
+ <%= javascript_include_tag '//assets.pinterest.com/js/pinit.js' %>
144
+ <%= javascript_include_tag 'details_colorbox' %>
145
+ <script type="text/javascript">
146
+
147
+ function post_contact_form()
148
+ {
149
+ $.ajax({
150
+ url: '/contact/property',
151
+ type: 'post',
152
+ data: $('#contact_form').serialize(),
153
+ success: function(resp) {
154
+ if (resp.error) $('#contact_message').html("<p class='note error'>" + resp.error + "</p>");
155
+ if (resp.success) $('#contact_message').html("<p class='note success'>" + resp.success + "</p>");
156
+ if (resp.redirect) window.location = resp.redirect;
157
+ }
158
+ });
159
+ }
160
+
161
+ //if (document.contains('square_footage')) {
162
+ // var str = document.getElementById('square_footage').innerHTML;
163
+ // str = str.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
164
+ // document.getElementById('square_footage').innerHTML = str;
165
+ //}
166
+
167
+ var gallery = false;
168
+ $(document).ready(function() {
169
+ var images = [];
170
+ <%
171
+ if property.images && property.images.count > 0
172
+ property.images.each_index do |i|
173
+ m = property.images[i]
174
+ next if m.nil? || m.image.nil?
175
+ %>
176
+ images.push({
177
+ thumb_url: <%= raw Caboose.json(m.image_url(:thumb)) %>,
178
+ large_url: <%= raw Caboose.json(m.image_url(:large)) %>,
179
+ caption: <%= raw Caboose.json(m.media_remarks) %>
180
+ });
181
+ <%
182
+ end
183
+ end
184
+ %>
185
+ gallery = new PropertyGallery({ images: images });
186
+ gallery.show_image(0);
187
+ });
188
+
189
+ var PropertyGallery = function(params) { this.init(params); };
190
+ PropertyGallery.prototype = {
191
+
192
+ images: false,
193
+ current_image: 0,
194
+
195
+ init: function(params) {
196
+ for (var thing in params)
197
+ this[thing] = params[thing];
198
+ var i = 0;
199
+ var that = this;
200
+ $('a.photo').click(function(e) {
201
+ e.preventDefault();
202
+ that.show_image($(this).data("index"));
203
+ i = i + 1;
204
+ });
205
+ },
206
+
207
+ show_image: function(i)
208
+ {
209
+ if (i >= this.images.length) i = 0;
210
+ if (i < 0) i = this.images.length - 1;
211
+
212
+ var h = 60;
213
+ if ($('#current_image').length)
214
+ h = $('#current_image').outerHeight();
215
+ $('#large_image').html("<p class='loading' style='height: " + h + "px;'>Loading...</p>");
216
+ var img = new Image();
217
+ var that = this;
218
+ img.onload = function() {
219
+ $('#large_image').html("<p><img id='current_image' src='" + img.src + "' /></p>");
220
+ $('#large_caption').html("<p class='caption'>" + that.images[i].caption + "</p>");
221
+ };
222
+ img.src = this.images[i].large_url;
223
+ this.current_image = i;
224
+ },
225
+ next_image: function() { this.show_image(this.current_image + 1); },
226
+ previous_image: function() { this.show_image(this.current_image - 1); }
227
+ };
228
+
229
+ </script>
230
+ <% end %>
231
+
232
+ <% content_for :caboose_css do %>
233
+ <style type="text/css">
234
+ #recaptcha_area, #recaptcha_table { width: auto !important; }
235
+ #recaptcha_image { width: 80% !important; }
236
+ #recaptcha_image img { width:80% !important; margin-left: -20%; padding: 0px; }
237
+ fieldset.captcha { width:100px !important; }
238
+ #recaptcha_container { margin: 0px; padding: 0px; width: 157px !important; }
239
+ input#recaptcha_response_field { padding: 0px; }
240
+ #recaptcha_widget_div { width: 150%; }
241
+ .realtor_info { background-color: white; padding: 10px; margin-bottom: 20px; text-align: center; border: 1px solid #d0d0d0;}
242
+ </style>
243
+ <% end %>
@@ -0,0 +1,65 @@
1
+
2
+ <!-- residential -->
3
+ <div class="l-wrapper">
4
+ <a class="m-btn h-space-mtm" href="/search/residential" id="show_search_form">Search Residential Listings</a>
5
+ <% if logged_in_user %>
6
+ <% if saved_search %>
7
+ <a id='saved_searches_button' href='/saved-searches' class="button_to m-btn h-space-mtm">This search is saved. View Saved Searches.</a>
8
+ <% else %>
9
+ <a id="save_search_button" class="button_to m-btn-red h-space-mtm">Notify Me of Future Listings</a>
10
+ <% end %>
11
+ <% else %>
12
+ <a href='/login?return_url=<%= request.fullpath %>' id='login' class="button_to m-btn-red h-space-mtm">Notify me of future listings that match this search</a>
13
+ <% end -%>
14
+
15
+ <%= block.partial('rets_residential_search_form', local_assigns) %>
16
+
17
+ <div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
18
+ <div class="sidebar-body l-grid-border">
19
+ <p></p>
20
+ <div class="l-grid inflate-baritone-bass listing">
21
+ <% properties = properties.reject{ |p| p.prop_type.blank? || p.mls_acct.blank? || p.street_num.blank? || p.street_name.blank? || p.nil? } %>
22
+ <% if properties.nil? || properties.count == 0 %>
23
+ <div class='no-results'>No results found</div>
24
+ <% else %>
25
+ <% properties.each do |p| %>
26
+ <%= block.partial('rets_residential_row', local_assigns.merge({:p => p})) %>
27
+ <% end %>
28
+ <%= pager.generate.html_safe %>
29
+ <% end %>
30
+ </div>
31
+ </div> <!-- .sidebar-body -->
32
+ </div> <!-- .l-sidebar -->
33
+ </div> <!-- .l-wrapper -->
34
+
35
+ <% content_for :caboose_js do %>
36
+ <%= javascript_include_tag "caboose_rets/caboose_rets" %>
37
+ <%= javascript_include_tag "properties" %>
38
+ <script type='text/javascript'>
39
+
40
+ CabooseRets.search_params = {
41
+ uri: "<%= request.fullpath %>",
42
+ property_type: "residential",
43
+ params: <%= raw Caboose.json(pager.params) %>
44
+ };
45
+
46
+ function input_val(el) {
47
+ t = $(el).attr('type');
48
+ if (t == 'button' || t == 'submit')
49
+ return false;
50
+ val = $(el).val();
51
+ placeholder = $(el).attr('placeholder');
52
+ if (val.length > 0 && (!placeholder || (placeholder && val != placeholder)))
53
+ return "" + $(el).attr('id') + "/" + val;
54
+ }
55
+
56
+ function search_properties() {
57
+ data = [];
58
+ $('#search_form input' ).each(function(i, el) { v = input_val(el); if (v) data[data.length] = v; });
59
+ $('#search_form select' ).each(function(i, el) { v = input_val(el); if (v) data[data.length] = v; });
60
+ data = data.join('/');
61
+ window.location = '/residential/search/' + data;
62
+ }
63
+
64
+ </script>
65
+ <% end %>
@@ -0,0 +1,59 @@
1
+
2
+ <div class='grid-row'>
3
+ <div class='grid-unit-1of4 list-part' id='list1'>
4
+ <a href="<%= p.url %>"><img src='<%= p.images && p.images.count > 0 ? p.images[0].image_url(:thumb) : "" %>' width="400" /></a><br>
5
+ <div id='list-meta' style="max-width: 263px;">
6
+ <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>
7
+ <% if p.lo_code != '46' %>
8
+ <span class="nonadvantage_agent">
9
+ Listing Courtesy of <% if p.office && p.office.lo_name %> <%= p.office.lo_name.titleize %><% else %><%= p.lo_code %><% end %>
10
+ </span>
11
+ <% else %>
12
+ <span class="advantage_agent"><% if p.agent %>Listing Courtesy of <%= p.agent.first_name.titleize %> <%= p.agent.last_name.titleize %><% end %></span>
13
+ <% end %>
14
+ </div>
15
+ </div>
16
+ <div class='grid-unit-1of4 list-part' id='list2'>
17
+ <% if p.current_price != 0 %><span class='price'><%=h number_to_currency(p.current_price, :precision => 0) %></span><br><% end %>
18
+ <% if p.foreclosure_yn == 'Y' %> <span class='list-info' style='font-size: 0.8em;'>(Foreclosure)</span><br> <% end %>
19
+ <div class="info-meta">
20
+ <span class='list-info'>Sq. footage: <span class='sqfeet'> <%= number_with_delimiter(p.tot_heat_sqft.to_i, :delimiter => ',') %></span></span> <br>
21
+ <span class='list-info'>Bedrooms: <%= p.bedrooms %></span> <br>
22
+ <span class='list-info'>Full baths: <%= p.baths_full %></span> <br>
23
+ <span class='list-info'>Half baths: <%= p.baths_half %></span> <br>
24
+ </div>
25
+ <span>MLS#: <%= p.mls_acct %></span>
26
+ </div>
27
+ <div class='grid-unit-1of4 list-part' id='list3'>
28
+ <div class="list-schools">
29
+ Schools:<br>
30
+ <span class="school"> Elementary - <%= p.elem_school.titleize %></span> <br>
31
+ <span class="school">Middle - <%= p.middle_school.titleize %></span> <br>
32
+ <span class="school">High - <%= p.high_school.titleize %></span> <br>
33
+ </div>
34
+ <div class='desc-container'>
35
+ <span class='description'><%= p.remarks %></span>
36
+ </div>
37
+ </div>
38
+ <div class='grid-unit-1of4 list-part' id='list4'>
39
+ <a href="/residential/<%= p.mls_acct %>" class="m-btn-ornate">
40
+ <div class="btn-inner see-more">MORE DETAILS</div>
41
+ </a>
42
+ <br>
43
+ <% if p.lo_code == '46' && p.agent %>
44
+ <a href="/agents/<%= p.la_code %>" class="m-btn-ornate">
45
+ <div class="btn-inner contact-btn">Contact <%= p.agent.first_name.titleize %> <%= p.agent.last_name.titleize %></div>
46
+ </a>
47
+ <% else %>
48
+ <a href="/agents/048540000" class="m-btn-ornate">
49
+ <div class="btn-inner contact-btn">Contact Advantage</div>
50
+ </a>
51
+ <% end %>
52
+ <br>
53
+ <% unless defined? p.virtual_tour && p.virtual_tour %>
54
+ <a href="<%= p.virtual_tour %>" class="m-btn-ornate">
55
+ <div class="btn-inner contact-btn">Take Virtual Tour</div>
56
+ </a>
57
+ <% end %>
58
+ </div>
59
+ </div>