caboose-rets 0.1.165 → 0.1.170

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 575ad2e3864bf9aeee0b474f229122782d39b3e429d5ead96766f51ec6de5ca0
4
- data.tar.gz: 173608e4becd1718b1222743b1d33a3b8186e707a01a00b6a3d8bcb01fa54bc6
3
+ metadata.gz: 613aa2563eab7cf1e488088657635585fc93c58f4dac400bd71b1afaa4d0bf62
4
+ data.tar.gz: c40bc36c632506231f2d13119a69b1008044ac213141cc9a552087e321e2b8b3
5
5
  SHA512:
6
- metadata.gz: f5b7dd109072d5d01b4356afa60864150b8dedbe70055fd670d7ed7b8a4bc4b8c4a12223b4706fc6ccb537790b7c117ad3a55ee030e0bc6dac0875d2d09de625
7
- data.tar.gz: b7456f435f69fb61885f9faefd498e2b3652dfd95f0611a77ee6e18eb780358c4149938c0d3fcce0d9d4f16d42408533124455406624231855b55cfb3c66da3e
6
+ metadata.gz: e522910205a4d3c206888b3972501ea4ad7a78ea8f3103418cda5aa7e7e8247e7f6287a0773bf199b01ad5c8b037fd17e79127ec0d7526425eb239ea6b2388ed
7
+ data.tar.gz: c92917dc214b87feb180442f3225f06e5d39ee598851484471b19016eabdb706c2dbc2a40154af5ec05e280252139d80744a13cf2995bd32c9bc4a61351a8a23
@@ -1,4 +1,3 @@
1
-
2
1
  module CabooseRets
3
2
  class PropertiesController < ApplicationController
4
3
 
@@ -22,7 +21,11 @@ module CabooseRets
22
21
  params[:street_name_like][0] = '' if params[:street_name_like][0].to_i == 0
23
22
  end
24
23
  end
25
- where = @site && @site.id == 558 ? "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')" : "(id is not null)"
24
+ where = "(id is not null)"
25
+ if (@site && @site.id == 558) || request.original_fullpath =~ /^\/tuscaloosa-condos-for-sale(.*?)$/
26
+ where = "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')"
27
+ end
28
+ # where = @site && @site.id == 558 ? "(style ILIKE '%condo%' OR res_style ILIKE '%condo%' OR property_subtype ILIKE '%condo%' OR property_subtype ILIKE '%townhouse%')" : "(id is not null)"
26
29
  sortby = @site && @site.id == 558 ? "original_entry_timestamp" : CabooseRets::default_property_sort
27
30
  @saved_properties = CabooseRets::SavedProperty.where(:user_id => logged_in_user.id).pluck(:mls_number)
28
31
  @pager = Caboose::PageBarGenerator.new(params, {
@@ -78,14 +81,14 @@ module CabooseRets
78
81
  })
79
82
 
80
83
  @properties = @pager.items
81
- if params[:waterfronts].present? then @properties.reject!{|p| p.waterfronts.blank?} end
84
+ if params[:waterfronts].present? then @properties = @properties.reject{|p| p.waterfronts.blank?} end
82
85
  # if params[:ftr_lotdesc] == 'golf' then @properties.reject!{|p| p.ftr_lotdesc != 'golf'} end
83
- if params[:foreclosure_yn] then @properties.reject!{|p| p.foreclosure_yn != "Y"} end
86
+ if params[:foreclosure_yn] then @properties = @properties.reject{|p| p.foreclosure_yn != "Y"} end
84
87
 
85
- @saved_search = nil
86
- if CabooseRets::SavedSearch.exists?(:uri => request.fullpath)
87
- @saved_search = CabooseRets::SavedSearch.where(:uri => request.fullpath).first
88
- end
88
+ # @saved_search = nil
89
+ # if CabooseRets::SavedSearch.exists?(:uri => request.fullpath)
90
+ # @saved_search = CabooseRets::SavedSearch.where(:uri => request.fullpath).first
91
+ # end
89
92
 
90
93
  @block_options = {
91
94
  :properties => @properties,
@@ -17,7 +17,7 @@ module CabooseRets
17
17
 
18
18
  # GET /admin/mls/user-report
19
19
  def user_report
20
- @users = Caboose::User.where(:site_id => @site.id).order('id desc').limit(500)
20
+ @users = Caboose::User.where(:site_id => @site.id).where("rets_agent_mls_id is not null").order('id desc').limit(500)
21
21
  render :layout => 'caboose/admin'
22
22
  end
23
23
 
@@ -161,7 +161,7 @@ class CabooseRets::Property <ActiveRecord::Base
161
161
  self.matrix_unique_id = data['ListingKey']
162
162
  self.matrix_modified_dt = data['ModificationTimestamp']
163
163
  self.max_sqft = data['LivingArea']
164
- self.middle_school = data['MiddleSchool']
164
+ self.middle_school = data['MiddleOrJuniorSchool']
165
165
  # self.mineral_rights = data['MineralRights']
166
166
  self.min_sqft = data['LivingArea']
167
167
  self.misc_indoor_featuresa = data['BuildingFeatures']
@@ -1,5 +1,4 @@
1
1
  domain = Caboose::Domain.where(:site_id => @site.id, :primary => true).first.domain
2
- hp = Caboose::Page.where(:site_id => @site.id, :title => "Home").first
3
2
  xml.instruct! :xml, :version => "1.0"
4
3
  xml.listings do
5
4
  xml.title @site.id == 558 ? "The Gray Group" : @site.description
@@ -39,7 +38,8 @@ xml.instruct! :xml, :version => "1.0"
39
38
  elsif !property.alternate_link.blank? && @use_alternate_link == true
40
39
  xml.url(property.alternate_link)
41
40
  else
42
- xml.url("https://" + domain + "/properties/#{property.mls_number}/details")
41
+ url = "https://" + domain + "/properties/#{property.mls_number}/details?utm_source=Nine&utm_medium=Facebook&utm_campaign=Retargeting"
42
+ xml.url( url )
43
43
  end
44
44
  xml.year_built(property.year_built)
45
45
  if !property.property_type.blank?
@@ -20,6 +20,4 @@
20
20
  margin-bottom: 10px;
21
21
  }
22
22
  </style>
23
- <% end %>
24
-
25
-
23
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.165'
2
+ VERSION = '0.1.170'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.165
4
+ version: 0.1.170
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-24 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms