caboose-rets 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/caboose_rets/admin_media.js +7 -7
  3. data/app/assets/javascripts/caboose_rets/caboose_rets.js +8 -8
  4. data/app/controllers/caboose_rets/agents_controller.rb +67 -75
  5. data/app/controllers/caboose_rets/offices_controller.rb +4 -4
  6. data/app/controllers/caboose_rets/open_houses_controller.rb +3 -3
  7. data/app/controllers/caboose_rets/properties_controller.rb +160 -0
  8. data/app/controllers/caboose_rets/rets_controller.rb +2 -2
  9. data/app/controllers/caboose_rets/rets_media_controller.rb +13 -13
  10. data/app/controllers/caboose_rets/saved_properties_controller.rb +35 -35
  11. data/app/models/caboose_rets/agent.rb +42 -55
  12. data/app/models/caboose_rets/agent_meta.rb +7 -7
  13. data/app/models/caboose_rets/media.rb +63 -57
  14. data/app/models/caboose_rets/office.rb +35 -21
  15. data/app/models/caboose_rets/open_house.rb +15 -15
  16. data/app/models/caboose_rets/property.rb +203 -0
  17. data/app/models/caboose_rets/rets_importer.rb +193 -233
  18. data/app/models/caboose_rets/rets_importer_bak.rb +77 -77
  19. data/app/models/caboose_rets/rets_importer_old.rb +625 -0
  20. data/app/models/caboose_rets/saved_property.rb +4 -4
  21. data/app/models/caboose_rets/saved_search.rb +36 -33
  22. data/app/models/caboose_rets/schema.rb +324 -855
  23. data/app/models/caboose_rets/schema_past.rb +918 -0
  24. data/app/models/caboose_rets/search_option.rb +6 -6
  25. data/app/views/caboose/blocks/_layout_rets.html.erb +9 -6
  26. data/app/views/caboose/blocks/_rets_agent_listings.html.erb +3 -3
  27. data/app/views/caboose_rets/agents/index.html.erb +23 -40
  28. data/app/views/caboose_rets/media/admin_property_media.html.erb +2 -2
  29. data/app/views/caboose_rets/{residential → properties}/_search_form.html.erb +42 -42
  30. data/app/views/caboose_rets/{residential → properties}/admin_edit.html.erb +7 -7
  31. data/app/views/caboose_rets/{land → properties}/admin_index.html.erb +11 -11
  32. data/app/views/caboose_rets/properties/details.html.erb +127 -0
  33. data/app/views/caboose_rets/{land → properties}/index.html.erb +0 -0
  34. data/app/views/caboose_rets/{residential/residential_not_exists.html.erb → properties/property_not_exists.html.erb} +4 -5
  35. data/app/views/caboose_rets/{residential → properties}/test_form.html.erb +1 -1
  36. data/app/views/caboose_rets/rets/admin_import_form.html.erb +1 -1
  37. data/config/routes.rb +70 -55
  38. data/lib/caboose-rets.rb +1 -1
  39. data/lib/caboose_rets/engine.rb +3 -3
  40. data/lib/caboose_rets/version.rb +1 -1
  41. data/lib/rets/base/core.rb +1 -1
  42. data/lib/rets/base/sax_search.rb +1 -1
  43. data/lib/tasks/caboose_rets.rake +106 -17
  44. metadata +16 -50
  45. data/app/controllers/caboose_rets/commercial_controller.rb +0 -349
  46. data/app/controllers/caboose_rets/land_controller.rb +0 -144
  47. data/app/controllers/caboose_rets/multi_family_controller.rb +0 -107
  48. data/app/controllers/caboose_rets/residential_controller.rb +0 -163
  49. data/app/models/caboose_rets/commercial_property.rb +0 -214
  50. data/app/models/caboose_rets/land_property.rb +0 -144
  51. data/app/models/caboose_rets/multi_family_property.rb +0 -199
  52. data/app/models/caboose_rets/residential_property.rb +0 -236
  53. data/app/views/caboose/blocks/_rets_commercial_details.html.erb +0 -192
  54. data/app/views/caboose/blocks/_rets_commercial_headers.html.erb +0 -17
  55. data/app/views/caboose/blocks/_rets_commercial_index.html.erb +0 -71
  56. data/app/views/caboose/blocks/_rets_commercial_row.html.erb +0 -39
  57. data/app/views/caboose/blocks/_rets_commercial_search_form.html.erb +0 -201
  58. data/app/views/caboose/blocks/_rets_land_details.html.erb +0 -165
  59. data/app/views/caboose/blocks/_rets_land_index.html.erb +0 -63
  60. data/app/views/caboose/blocks/_rets_land_row.html.erb +0 -58
  61. data/app/views/caboose/blocks/_rets_land_search_form.html.erb +0 -194
  62. data/app/views/caboose/blocks/_rets_multifamily_details.html.erb +0 -161
  63. data/app/views/caboose/blocks/_rets_multifamily_index.html.erb +0 -63
  64. data/app/views/caboose/blocks/_rets_multifamily_row.html.erb +0 -56
  65. data/app/views/caboose/blocks/_rets_multifamily_search_form.html.erb +0 -273
  66. data/app/views/caboose/blocks/_rets_openhouse_details.html.erb +0 -12
  67. data/app/views/caboose/blocks/_rets_openhouses_index.html.erb +0 -79
  68. data/app/views/caboose/blocks/_rets_residential_details.html.erb +0 -243
  69. data/app/views/caboose/blocks/_rets_residential_index.html.erb +0 -65
  70. data/app/views/caboose/blocks/_rets_residential_row.html.erb +0 -59
  71. data/app/views/caboose/blocks/_rets_residential_search_form.html.erb +0 -304
  72. data/app/views/caboose_rets/commercial/admin_edit.html.erb +0 -269
  73. data/app/views/caboose_rets/commercial/admin_index.html.erb +0 -51
  74. data/app/views/caboose_rets/commercial/admin_new.html.erb +0 -57
  75. data/app/views/caboose_rets/commercial/details.html.erb +0 -0
  76. data/app/views/caboose_rets/commercial/index.html.erb +0 -87
  77. data/app/views/caboose_rets/land/admin_edit.html.erb +0 -156
  78. data/app/views/caboose_rets/land/details.html.erb +0 -0
  79. data/app/views/caboose_rets/multi_family/admin_edit.html.erb +0 -211
  80. data/app/views/caboose_rets/multi_family/admin_index.html.erb +0 -46
  81. data/app/views/caboose_rets/residential/admin_index.html.erb +0 -46
  82. data/app/views/caboose_rets/residential/details.html.erb +0 -0
  83. data/app/views/caboose_rets/residential/index.html.erb +0 -0
@@ -1,11 +1,11 @@
1
1
  <%
2
2
  p = @property
3
3
  %>
4
- <h1>Edit Residential Property</h1>
4
+ <h1>Edit Property</h1>
5
5
 
6
6
  <p>
7
- <input type='button' value='< Back' onclick="window.location='/admin/residential';" />
8
- <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
7
+ <input type='button' value='< Back' onclick="window.location='/admin/property';" />
8
+ <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls %>');" />
9
9
  </p>
10
10
  <div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
11
11
 
@@ -109,7 +109,7 @@ p = @property
109
109
  <tr><td>master_bed_lvl </td><td><%= p.master_bed_lvl %></td></tr>
110
110
  <tr><td>media_flag </td><td><%= p.media_flag %></td></tr>
111
111
  <tr><td>middle_school </td><td><%= p.middle_school %></td></tr>
112
- <tr><td>mls_acct </td><td><%= p.mls_acct %></td></tr>
112
+ <tr><td>mls </td><td><%= p.mls %></td></tr>
113
113
  <tr><td>off_mkt_date </td><td><%= p.off_mkt_date %></td></tr>
114
114
  <tr><td>off_mkt_days </td><td><%= p.off_mkt_days %></td></tr>
115
115
  <tr><td>office_notes </td><td><%= p.office_notes %></td></tr>
@@ -228,14 +228,14 @@ p = @property
228
228
  <%= javascript_include_tag "caboose/model/all" %>
229
229
  <script type='text/javascript'>
230
230
 
231
- function refresh_property_from_mls(mls_acct)
231
+ function refresh_property_from_mls(mls)
232
232
  {
233
233
  modal.autosize("<p class='loading'>Refreshing property info and images from MLS...</p>");
234
234
  $.ajax({
235
- url: '/admin/residential/' + mls_acct + '/refresh',
235
+ url: '/admin/property/' + mls + '/refresh',
236
236
  success: function(resp) {
237
237
  if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
238
- if (resp.success) modal.autosize("<p class='note success'>" + resp.success + "</p>");
238
+ if (resp.success) modal.autosize("<p class='note success'>" + resp.success + "</p>");
239
239
  }
240
240
  });
241
241
  }
@@ -1,12 +1,12 @@
1
- <h1>Land Properties</h1>
1
+ <h1>Properties</h1>
2
2
 
3
3
  <style type='text/css'>
4
4
  #search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; }
5
5
  </style>
6
6
 
7
7
  <div id='search_form_wrapper'>
8
- <form action='/admin/land' method='get' id='search_form'>
9
- <input type='text' name='mls_acct' placeholder='MLS #' value="<%= @gen.params['mls_acct'] %>" style='width: 100px;' />
8
+ <form action='/admin/property' method='get' id='search_form'>
9
+ <input type='text' name='mls' placeholder='MLS #' value="<%= @gen.params['mls'] %>" style='width: 100px;' />
10
10
  <input type='submit' value='Search' />
11
11
  </form>
12
12
  </div>
@@ -16,8 +16,8 @@
16
16
  <table class='data' id='properties_table'>
17
17
  <tr>
18
18
  <%= raw @gen.sortable_table_headings({
19
- 'mls_acct' => 'MLS #',
20
- 'street_num, street_name' => 'Address',
19
+ 'mls' => 'MLS #',
20
+ 'street_number, street_name' => 'Address',
21
21
  'la_code' => 'Agent',
22
22
  'lo_code' => 'Office'
23
23
  })
@@ -26,11 +26,11 @@
26
26
  <% @properties.each do |p| %>
27
27
  <% agent = p.agent %>
28
28
  <% office = p.office %>
29
- <tr onclick="window.location='/admin/land/<%= p.mls_acct %>/edit';">
30
- <td><%= raw p.mls_acct %></td>
31
- <td><%= raw "#{p.street_num} #{p.street_name}, #{p.city}" %></td>
29
+ <tr onclick="window.location='/admin/property/<%= p.mls %>/edit';">
30
+ <td><%= raw p.mls %></td>
31
+ <td><%= raw "#{p.street_number} #{p.street_name}, #{p.city}" %></td>
32
32
  <td><%= p.agent ? "#{agent.first_name} #{agent.last_name}" : p.la_code %></td>
33
- <td><%= p.office ? office.lo_name : p.lo_code %></td>
33
+ <td><%= p.office ? office.lo_name : p.lo_code %></td>
34
34
  </tr>
35
35
  <% end %>
36
36
  </table>
@@ -39,8 +39,8 @@
39
39
 
40
40
  <% content_for :caboose_js do %>
41
41
  <script type='text/javascript'>
42
- $(document).ready(function() {
42
+ $(document).ready(function() {
43
43
  var modal = new CabooseModal(800);
44
44
  });
45
45
  </script>
46
- <% end %>
46
+ <% end %>
@@ -0,0 +1,127 @@
1
+ <div class="residential-details-wrapper constrain">
2
+ <div class="main">
3
+ <% if @property.images && @property.images.count > 0 %>
4
+ <div class="gallery-wrapper">
5
+ <section>
6
+ <h2 class="section-title">Photo Gallery</h2>
7
+ <div class="image-holder">
8
+ <img src="<%= @property.images.first.image_url(:large) %>" alt="Featured Image" />
9
+ </div>
10
+ <%= render :partial => "caboose/blocks/coastal/image_gallery", :locals => {:property => @property} %>
11
+ </section>
12
+ <% if !@property.public_remarks.blank? %>
13
+ <section>
14
+ <h2 class="section-title">Property Details</h2>
15
+ <p class="remarks"><%= property.public_remarks %></p>
16
+ </section>
17
+ <% end %>
18
+ <section>
19
+ <h2 class="section-title">Single Family Home</h2>
20
+ <ul>
21
+ <% if !@property.sqft_total.blank? %><li><strong>Total Sq. Ft.</strong>: <span id='square_footage'><%=h @property.sqft_total %></span></li><% end %>
22
+ <% if !@property.price_sqft.blank? %><li><strong>Price/Sq. Ft.</strong>: <span id='square_footage'><%=h number_to_currency @property.price_sqft %></span></li><% end %>
23
+ <% if !@property.beds_total.blank? %><li><strong>Bedrooms</strong>: <%= @property.beds_total %></li><% end %>
24
+ <% if !@property.baths.blank? %><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 %>
25
+ <% if !@property.acreage.blank? %><li><strong>Acreage</strong>: <%= @property.acreage %></li><% end %>
26
+ </ul>
27
+ </section>
28
+ <section>
29
+ <h2 class="section-title">Features</h2>
30
+ <ul>
31
+ <% if !@property.interior_features.blank? %><li><strong>Interior</strong>: <%= @property.interior_features %> </li><% end %>
32
+ <% if !@property.cooling.blank? %><li><strong>Cooling</strong>: <%= @property.cooling %> </li><% end %>
33
+ <% if !@property.heating.blank? %><li><strong>Heating</strong>: <%= @property.heating %> </li><% end %>
34
+ <% if !@property.year_built.blank? %><li><strong>Year Built</strong>: <%= @property.year_built %> </li><% end %>
35
+ </ul>
36
+ <% if @property.virtual_tour1 %><p class="vt"><a class="btn" href='<%= @property.virtual_tour %>' target='_blank' title="Virtual Tour">Virtual Tour</a></p><% end %>
37
+ </section>
38
+ </div>
39
+ <% end %>
40
+ </div>
41
+ <aside class="sidebar">
42
+ <section class="agent">
43
+ <h4 class="section-title">Contact Info</h4>
44
+ <p class="agent-name">Grant Dickey</p>
45
+ <a href="tel:2053918084">(205) 344-0047</a>
46
+ <p style="margin-top:10px;font-size:14px;">Listing courtesy of <%= @property.list_office_name ? @property.list_office_name.titleize : "Unknown" %></p>
47
+
48
+ </section>
49
+ <section>
50
+ <h4 class="section-title">Quick Facts</h4>
51
+ <address>
52
+ <% if !@property.unit_number.nil? && @property.unit_number.strip.length > 0 %>Unit <%= @property.unit_number %>, <% end %>
53
+ <%= @property.street_number %> <%= @property.street_name.titleize %><br />
54
+ <%= @property.city.titleize %>, <%= @property.state_or_province %> <%= @property.postal_code %>
55
+ </address>
56
+ <p class="current-price">
57
+ <%= number_to_currency(@property.current_price, :precision => 0) %>
58
+ <% if @property.foreclosure_yn == 'Y' %>
59
+ <span class='foreclosure'>(Foreclosure)</span>
60
+ <% end %>
61
+ </p>
62
+ <p class="mls-number">MLS #<%= @property.mls_number %></p>
63
+ </section>
64
+ <section>
65
+ <h4 class="section-title">Directions</h4>
66
+ # <% if @property.street_number %>
67
+ <div class="property-map" id="map-<%= @property.id %>" data-address="<%= @property.street_number %> <%= @property.street_name.titleize %>"></div>
68
+ <% end %>
69
+ <p class="directions"><%= @property.directions %></p>
70
+ </section>
71
+ <section>
72
+ <h4 class="section-title">Neighborhood Information</h4>
73
+ <ul>
74
+ <li><strong>Area</strong>: <%= @property.area.titleize %></li>
75
+ <% if @property.subdivision %><li><strong>Subdivision</strong>: <%= @property.subdivision.titleize %></li><% end %>
76
+ <% if @property.elementary_school %><li><strong>Elementary School</strong>: <%= @property.elementary_school.titleize %></li><% end %>
77
+ <% if @property.middle_school %><li><strong>Middle School</strong>: <%= @property.middle_school.titleize %></li><% end %>
78
+ <% if @property.high_school %><li><strong>High School</strong>: <%= @property.high_school.titleize %></li><% end %>
79
+ <li><strong>County</strong>: <%= @property.county_or_parish.titleize %></li>
80
+ </ul>
81
+ </section>
82
+ <% page_ids = Caboose::Page.where(:site_id => @site.id).pluck(:id).to_s.gsub("[","").gsub("]","") %>
83
+ <% cf = Caboose::Block.where(:block_type_id => 401).where("page_id in (#{page_ids})").first %>
84
+ <% if cf %>
85
+ <% bid = cf.id %>
86
+ <section>
87
+ <h4 class="section-title">Information Request</h4>
88
+ <form id="property-contact-form">
89
+ <input type="hidden" name='form_name' value="Property Info Request">
90
+ <input type='hidden' name='mls_number' id='mls_number' value='<%= @property.mls_number %>' />
91
+ <input type="hidden" name="block_id" value="<%= bid %>">
92
+ <input type='text' name='name' id="name" value='' placeholder="Name" maxlength="150" />
93
+ <input type='text' name='email_required' id="email_required" value='' placeholder="Email" maxlength="150" />
94
+ <input type="hidden" name="subject" value="Property Information Request" />
95
+ <textarea name='message_required' id="message_required" placeholder="Message" rows="4"></textarea>
96
+ <p><a href="#" id="submit-property-contact-form" class="btn">Submit</a></p>
97
+ </form>
98
+ <div id="message"></div>
99
+ </section>
100
+ <% end %>
101
+ </aside>
102
+ </div>
103
+
104
+ <script>
105
+ var property_map_id = "map-<%= @property.id %>";
106
+ var photo_gallery_id = "gallery-<%= @property.id %>";
107
+
108
+ function loadScript() {
109
+ var script = document.createElement('script');
110
+ script.type = 'text/javascript';
111
+ script.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyAjSs-Jq6hpuT35RG9wD6LuqaDFzYDCOPk&callback=show_property_map";
112
+ document.body.appendChild(script);
113
+ }
114
+ </script>
115
+
116
+ <script type="text/javascript">
117
+ (function(d, s, id) {
118
+ window.Wishpond = window.Wishpond || {};
119
+ Wishpond.merchantId = '1285931';
120
+ Wishpond.writeKey = 'a69f26d8d7f4';
121
+ var js, wpjs = d.getElementsByTagName(s)[0];
122
+ if (d.getElementById(id)) return;
123
+ js = d.createElement(s); js.id = id;
124
+ js.src = "//cdn.wishpond.net/connect.js";
125
+ wpjs.parentNode.insertBefore(js, wpjs);
126
+ }(document, 'script', 'wishpond-connect'));
127
+ </script>
@@ -1,15 +1,14 @@
1
1
  <div class="l-wrapper">
2
2
  <div class="l-section">
3
- <div class="l-sidebar-border inflate-tenor-baritone">
3
+ <div class="l-sidebar-border inflate-tenor-baritone">
4
4
  <div class="sidebar-body">
5
-
5
+
6
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
-
7
+ <p>A property with MLS #<%= @mls %> doesn't exist.</p>
8
+
9
9
  </div> <!-- .sidebar-body -->
10
10
  </div> <!-- .l-sidebar -->
11
11
  </div> <!-- .body-section -->
12
12
  </div> <!-- .l-wrapper -->
13
13
 
14
14
  <div class="body-sink"></div>
15
-
@@ -1,4 +1,4 @@
1
- <form action='/residential/test' method='post' enctype="multipart/form-data">
1
+ <form action='/property/test' method='post' enctype="multipart/form-data">
2
2
  <input type='file' name='myimage' />
3
3
  <input type='submit' value='Go' />
4
4
  </form>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <form action='/admin/rets/import' method='post' id='import_form' onsubmit="import_property(); return false;">
4
4
  <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
5
- <p><input type='text' name='mls_acct' id='mls_acct' placeholder='MLS #' value="" style='width: 300px;' /></p>
5
+ <p><input type='text' name='mls' id='mls' placeholder='MLS #' value="" style='width: 300px;' /></p>
6
6
  <div id='message'></div>
7
7
  <p><input type='submit' value='Import Property' /></p>
8
8
  </form>
@@ -1,7 +1,22 @@
1
1
  CabooseRets::Engine.routes.draw do
2
-
2
+
3
+ # get "/property" => "property#index"
4
+ # get "/proprery/:id" => "property#details"
5
+ # get "/admin/property" => "property#admin_index"
6
+ # get "/admin/property/refresh" => "property#admin_refresh"
7
+ # get "/property/search-options" => "property#search_options"
8
+ # get "/property/search:search_params" => "property#index", :constraints => {:search_params => /.*/}
9
+ # get "/property/:mls/details" => "property#details"
10
+ # get "/property/:mls" => "property#details"
11
+ # get "/admin/property/:mls/edit" => "property#admin_edit"
12
+ # get "/admin/property/:mls/refresh" => "property#admin_refresh"
13
+ # put "/admin/property/:mls" => "property#admin_update"
14
+ # post "/admin/property/:mls" => "property#admin_update"
15
+
16
+
17
+
3
18
  get "/agents" => "agents#index"
4
- get "/agents/:la_code" => "agents#details"
19
+ get "/agents/:la_code" => "agents#details"
5
20
  get "/agents/:la_code/listings" => "agents#listings"
6
21
  get "/admin/agents" => "agents#admin_index"
7
22
  get "/admin/agents/assistant-to-options" => "agents#admin_assistant_to_options"
@@ -13,82 +28,82 @@ CabooseRets::Engine.routes.draw do
13
28
  get "/admin/agents/:id/refresh" => "agents#admin_refresh"
14
29
  put "/admin/agents/:id" => "agents#admin_update"
15
30
  post "/admin/agents/:id" => "agents#admin_update"
16
-
17
- get "/open-houses" => "open_houses#index"
31
+
32
+ get "/open-houses" => "open_houses#index"
18
33
  get "/open-houses/:id" => "open_houses#details"
19
34
  get "/admin/open-houses" => "open_houses#admin_index"
20
- get "/admin/open-houses/refresh" => "open_houses#admin_refresh"
21
-
35
+ get "/admin/open-houses/refresh" => "open_houses#admin_refresh"
36
+
22
37
  get "/admin/offices/options" => "offices#admin_options"
23
38
  get "/admin/offices" => "offices#admin_index"
24
39
  get "/admin/offices/:id" => "offices#admin_edit"
25
40
  get "/admin/offices/:id/refresh" => "offices#admin_refresh"
26
-
41
+
27
42
  get "/admin/rets/import" => "rets#admin_import_form"
28
- post "/admin/rets/import" => "rets#admin_import"
29
-
30
- get "/commercial/search:search_params" => "commercial#index", :constraints => {:search_params => /.*/}
31
- get "/commercial/:mls_acct/details" => "commercial#details"
32
- get "/commercial/:mls_acct" => "commercial#details"
43
+ post "/admin/rets/import" => "rets#admin_import"
44
+
45
+ get "/commercial/search:search_params" => "commercial#index", :constraints => {:search_params => /.*/}
46
+ get "/commercial/:mls/details" => "commercial#details"
47
+ get "/commercial/:mls" => "commercial#details"
33
48
  get "/commercial" => "commercial#index"
34
49
  get "/admin/commercial/new" => "commercial#admin_new"
35
50
  post "/admin/commercial" => "commercial#admin_add"
36
51
  get "/admin/commercial" => "commercial#admin_index"
37
- get "/admin/commercial/:mls_acct/edit" => "commercial#admin_edit"
38
- get "/admin/commercial/:mls_acct/refresh" => "commercial#admin_refresh"
39
- put "/admin/commercial/:mls_acct" => "commercial#admin_update"
40
- post "/admin/commercial/:mls_acct" => "commercial#admin_update"
41
-
52
+ get "/admin/commercial/:mls/edit" => "commercial#admin_edit"
53
+ get "/admin/commercial/:mls/refresh" => "commercial#admin_refresh"
54
+ put "/admin/commercial/:mls" => "commercial#admin_update"
55
+ post "/admin/commercial/:mls" => "commercial#admin_update"
56
+
42
57
  get "/residential/search-options" => "residential#search_options"
43
- get "/residential/search:search_params" => "residential#index", :constraints => {:search_params => /.*/}
44
- get "/residential/:mls_acct/details" => "residential#details"
45
- get "/residential/:mls_acct" => "residential#details"
58
+ get "/residential/search:search_params" => "residential#index", :constraints => {:search_params => /.*/}
59
+ get "/residential/:mls/details" => "residential#details"
60
+ get "/residential/:mls" => "residential#details"
46
61
  get "/residential" => "residential#index"
47
62
  get "/admin/residential" => "residential#admin_index"
48
- get "/admin/residential/:mls_acct/edit" => "residential#admin_edit"
49
- get "/admin/residential/:mls_acct/refresh" => "residential#admin_refresh"
50
- put "/admin/residential/:mls_acct" => "residential#admin_update"
51
- post "/admin/residential/:mls_acct" => "residential#admin_update"
52
-
53
- get "/land/search:search_params" => "land#index", :constraints => {:search_params => /.*/}
54
- get "/land/:mls_acct/details" => "land#details"
55
- get "/land/:mls_acct" => "land#details"
63
+ get "/admin/residential/:mls/edit" => "residential#admin_edit"
64
+ get "/admin/residential/:mls/refresh" => "residential#admin_refresh"
65
+ put "/admin/residential/:mls" => "residential#admin_update"
66
+ post "/admin/residential/:mls" => "residential#admin_update"
67
+
68
+ get "/land/search:search_params" => "land#index", :constraints => {:search_params => /.*/}
69
+ get "/land/:mls/details" => "land#details"
70
+ get "/land/:mls" => "land#details"
56
71
  get "/land" => "land#index"
57
72
  get "/admin/land" => "land#admin_index"
58
- get "/admin/land/:mls_acct/edit" => "land#admin_edit"
59
- get "/admin/land/:mls_acct/refresh" => "land#admin_refresh"
60
- put "/admin/land/:mls_acct" => "land#admin_update"
61
- post "/admin/land/:mls_acct" => "land#admin_update"
62
-
63
- get "/multi-family/search:search_params" => "multi_family#index", :constraints => {:search_params => /.*/}
64
- get "/multi-family/:mls_acct/details" => "multi_family#details"
65
- get "/multi-family/:mls_acct" => "multi_family#details"
73
+ get "/admin/land/:mls/edit" => "land#admin_edit"
74
+ get "/admin/land/:mls/refresh" => "land#admin_refresh"
75
+ put "/admin/land/:mls" => "land#admin_update"
76
+ post "/admin/land/:mls" => "land#admin_update"
77
+
78
+ get "/multi-family/search:search_params" => "multi_family#index", :constraints => {:search_params => /.*/}
79
+ get "/multi-family/:mls/details" => "multi_family#details"
80
+ get "/multi-family/:mls" => "multi_family#details"
66
81
  get "/multi-family" => "multi_family#index"
67
82
  get "/admin/multi-family" => "multi_family#admin_index"
68
- get "/admin/multi-family/:mls_acct/edit" => "multi_family#admin_edit"
69
- get "/admin/multi-family/:mls_acct/refresh" => "multi_family#admin_refresh"
70
- put "/admin/multi-family/:mls_acct" => "multi_family#admin_update"
71
- post "/admin/multi-family/:mls_acct" => "multi_family#admin_update"
72
-
83
+ get "/admin/multi-family/:mls/edit" => "multi_family#admin_edit"
84
+ get "/admin/multi-family/:mls/refresh" => "multi_family#admin_refresh"
85
+ put "/admin/multi-family/:mls" => "multi_family#admin_update"
86
+ post "/admin/multi-family/:mls" => "multi_family#admin_update"
87
+
73
88
  get "/saved-searches" => "saved_searches#index"
74
89
  post "/saved-searches" => "saved_searches#add"
75
90
  get "/saved-searches/:id" => "saved_searches#redirect"
76
91
  put "/saved-searches/:id" => "saved_searches#update"
77
92
  delete "/saved-searches/:id" => "saved_searches#delete"
78
-
79
- get "/saved-properties/:mls_acct/status" => "saved_properties#status"
80
- get "/saved-properties/:mls_acct/toggle" => "saved_properties#toggle_save"
93
+
94
+ get "/saved-properties/:mls/status" => "saved_properties#status"
95
+ get "/saved-properties/:mls/toggle" => "saved_properties#toggle_save"
81
96
  get "/saved-properties" => "saved_properties#index"
82
- post "/saved-properties" => "saved_properties#add"
83
- delete "/saved-properties/:mls_acct" => "saved_properties#delete"
84
-
85
- get "/admin/properties/:mls_acct/photos" => "rets_media#admin_photos"
86
- get "/admin/properties/:mls_acct/files" => "rets_media#admin_files"
87
- get "/admin/properties/:mls_acct/media" => "rets_media#admin_property_media"
88
- put "/admin/properties/:mls_acct/media/order" => "rets_media#admin_update_order"
89
- post "/admin/properties/:mls_acct/photos" => "rets_media#admin_add_photo"
90
- post "/admin/properties/:mls_acct/files" => "rets_media#admin_add_file"
91
- get "/admin/rets/media/:id" => "rets_media#admin_index"
92
- delete "/admin/rets/media/:id" => "rets_media#admin_delete"
97
+ post "/saved-properties" => "saved_properties#add"
98
+ delete "/saved-properties/:mls" => "saved_properties#delete"
99
+
100
+ get "/admin/properties/:mls/photos" => "rets_media#admin_photos"
101
+ get "/admin/properties/:mls/files" => "rets_media#admin_files"
102
+ get "/admin/properties/:mls/media" => "rets_media#admin_property_media"
103
+ put "/admin/properties/:mls/media/order" => "rets_media#admin_update_order"
104
+ post "/admin/properties/:mls/photos" => "rets_media#admin_add_photo"
105
+ post "/admin/properties/:mls/files" => "rets_media#admin_add_file"
106
+ get "/admin/rets/media/:id" => "rets_media#admin_index"
107
+ delete "/admin/rets/media/:id" => "rets_media#admin_delete"
93
108
 
94
109
  end
@@ -3,7 +3,7 @@ require "caboose_rets/engine"
3
3
  module CabooseRets
4
4
 
5
5
  mattr_accessor :default_property_sort
6
- @@default_property_sort = 'current_price DESC, mls_acct'
6
+ @@default_property_sort = 'current_price DESC, mls'
7
7
 
8
8
  mattr_accessor :use_hosted_images
9
9
  @@use_hosted_images = true
@@ -2,8 +2,8 @@ require 'caboose'
2
2
 
3
3
  module CabooseRets
4
4
 
5
- def CabooseRets.get_property(mls_acct)
6
- return nil if mls_acct.nil?
5
+ def CabooseRets.get_property(mls)
6
+ return nil if mls.nil?
7
7
  models = [
8
8
  CabooseRets::ResidentialProperty,
9
9
  CabooseRets::CommercialProperty,
@@ -11,7 +11,7 @@ module CabooseRets
11
11
  CabooseRets::MultiFamilyProperty
12
12
  ]
13
13
  models.each do |model|
14
- return model.find(mls_acct.to_i) if model.exists?(mls_acct.to_i)
14
+ return model.find(mls.to_i) if model.exists?(mls.to_i)
15
15
  end
16
16
  return nil
17
17
  end