caboose-rets 0.1.43 → 0.1.44

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
  SHA1:
3
- metadata.gz: 329c7388cf057327133916a222b7654801b2347a
4
- data.tar.gz: 514b240e8bb632b9d45a7ae5d976410b8c3a01e6
3
+ metadata.gz: 31660e3b34c98c740e29a17ca98bb278349073c6
4
+ data.tar.gz: 8fd46d122f9ab44c8d80826d4f6f2473f347663f
5
5
  SHA512:
6
- metadata.gz: 39dd53fc9d8f6b38ddf17c13f7885a72a08c0b8f64174efc1beaef7db2b7c21991b7230dc489d5e58b54890a4fbbad6fc0e8c17620296af99f584846a1dc8840
7
- data.tar.gz: e70d10ecbff8967f57d30ef0a2079866600e5a84caa8f9c84294c8cdb06a5e6ac1e66a8cc7e975cd194f6c52e4778ec153f28d74e2e48d57e46f090aedd1d2b1
6
+ metadata.gz: 6c32fc5fbd1efb58b00c0bbf8ce42a1983f8acb60d19b7ba16d99f7b322acd054225284fc580c611b4d534360f76dc0ee813fcbf169ad5cc5d4b8bcd010ccc77
7
+ data.tar.gz: 533289a8503a957c82f49d842582f6e2bc91c5e35c53cf0b15f3db38a52780f651012854fc5720d24cda6c7e7ac9e0defc923ad6a6c3214a6abd7ab68e29913d
@@ -29,13 +29,13 @@ module CabooseRets
29
29
 
30
30
  # @route GET /admin/agents
31
31
  def admin_index
32
- return unless (user_is_allowed_to 'view', 'agents')
32
+ return unless (user_is_allowed_to 'view', 'rets_agents')
33
33
  render :layout => 'caboose/admin'
34
34
  end
35
35
 
36
36
  # @route GET /admin/agents/json
37
37
  def admin_json
38
- render :json => false and return if !user_is_allowed_to 'view', 'agents'
38
+ render :json => false and return if !user_is_allowed_to 'view', 'rets_agents'
39
39
  where = "(office_mls_id = '#{@site.rets_office_id}')"
40
40
  pager = Caboose::Pager.new(params, {
41
41
  'first_name_like' => '',
@@ -50,20 +50,20 @@ module CabooseRets
50
50
  })
51
51
  render :json => {
52
52
  :pager => pager,
53
- :models => pager.items.as_json(:include => [:meta])# , :collection, :color, :design_look, :gem_stone,
53
+ :models => pager.items.as_json(:include => [:meta])
54
54
  }
55
55
  end
56
56
 
57
57
  # @route GET /admin/agents/:id/json
58
58
  def admin_json_single
59
- render :json => false and return if !user_is_allowed_to 'edit', 'agents'
59
+ render :json => false and return if !user_is_allowed_to 'edit', 'rets_agents'
60
60
  prop = Agent.find(params[:id])
61
61
  render :json => prop
62
62
  end
63
63
 
64
64
  # @route GET /admin/agents/edit-sort
65
65
  def admin_edit_sort
66
- if !user_is_allowed_to 'edit', 'agents'
66
+ if !user_is_allowed_to 'edit', 'rets_agents'
67
67
  Caboose.log("invalid permissions")
68
68
  else
69
69
  @agents = Agent.where(:office_mls_id => @site.rets_office_id).order(:sort_order).all
@@ -74,7 +74,7 @@ module CabooseRets
74
74
  # @route PUT /admin/agents/update-sort
75
75
  def admin_update_sort
76
76
  resp = Caboose::StdClass.new
77
- if !user_is_allowed_to 'edit', 'agents'
77
+ if !user_is_allowed_to 'edit', 'rets_agents'
78
78
  Caboose.log("invalid permissions")
79
79
  else
80
80
  params[:agent].each_with_index do |ag, ind|
@@ -89,7 +89,7 @@ module CabooseRets
89
89
 
90
90
  # @route GET /admin/agents/:id
91
91
  def admin_edit
92
- return unless (user_is_allowed_to 'edit', 'agents')
92
+ return unless (user_is_allowed_to 'edit', 'rets_agents')
93
93
  @agent = Agent.find(params[:id])
94
94
  @agent_meta = @agent.meta ? @agent.meta : AgentMeta.create(:la_code => @agent.matrix_unique_id) if @agent
95
95
  render :layout => 'caboose/admin'
@@ -97,7 +97,7 @@ module CabooseRets
97
97
 
98
98
  # @route PUT /admin/agents/:id
99
99
  def admin_update
100
- return unless (user_is_allowed_to 'edit', 'agents')
100
+ return unless (user_is_allowed_to 'edit', 'rets_agents')
101
101
  resp = Caboose::StdClass.new
102
102
  agent = Agent.find(params[:id])
103
103
  meta = agent.meta ? agent.meta : AgentMeta.create(:la_code => agent.matrix_unique_id)
@@ -106,6 +106,7 @@ module CabooseRets
106
106
  when "bio" then meta.bio = v
107
107
  when "slug" then agent.slug = v
108
108
  when "hide" then meta.hide = v
109
+ when "accepts_listings" then meta.accepts_listings = v
109
110
  end
110
111
  end
111
112
  agent.save
@@ -117,7 +118,7 @@ module CabooseRets
117
118
 
118
119
  # @route POST /admin/agents/:id/image
119
120
  def admin_update_image
120
- render :json => false and return unless user_is_allowed_to 'edit', 'agents'
121
+ render :json => false and return unless user_is_allowed_to 'edit', 'rets_agents'
121
122
  resp = Caboose::StdClass.new({ 'attributes' => {} })
122
123
  agent = Agent.find(params[:id])
123
124
  meta = agent.meta ? agent.meta : AgentMeta.create(:la_code => agent.matrix_unique_id) if agent
@@ -122,37 +122,51 @@ module CabooseRets
122
122
  # Admin actions
123
123
  #=============================================================================
124
124
 
125
+
125
126
  # @route GET /admin/properties
126
127
  def admin_index
127
- return if !user_is_allowed('properties', 'view')
128
+ return unless (user_is_allowed_to 'view', 'rets_properties')
129
+ render :layout => 'caboose/admin'
130
+ end
128
131
 
129
- @gen = Caboose::PageBarGenerator.new(params, {
130
- 'mls_number' => ''
131
- },{
132
- 'model' => 'CabooseRets::Property',
133
- 'sort' => 'mls_number',
134
- 'desc' => false,
135
- 'base_url' => '/admin/properties',
136
- 'use_url_params' => false
132
+ # @route GET /admin/properties/json
133
+ def admin_json
134
+ render :json => false and return if !user_is_allowed_to 'view', 'rets_properties'
135
+ desc = params[:desc].blank? && !params[:sort].blank? ? 'false' : 'true'
136
+ pager = Caboose::Pager.new(params, {
137
+ 'mls_number' => ''
138
+ }, {
139
+ 'model' => 'CabooseRets::Property',
140
+ 'sort' => 'mls_number',
141
+ 'desc' => desc,
142
+ 'base_url' => '/admin/properties',
143
+ 'items_per_page' => 50
137
144
  })
138
- @properties = @gen.items
139
- render :layout => 'caboose/admin'
145
+ render :json => {
146
+ :pager => pager,
147
+ :models => pager.items
148
+ }
140
149
  end
141
150
 
142
- # @route GET /admin/properties/:mls_number/edit
151
+ # @route GET /admin/properties/:id/json
152
+ def admin_json_single
153
+ render :json => false and return if !user_is_allowed_to 'edit', 'rets_properties'
154
+ prop = Property.find(params[:id])
155
+ render :json => prop
156
+ end
157
+
158
+ # @route GET /admin/properties/:id
143
159
  def admin_edit
144
- return if !user_is_allowed('properties', 'edit')
145
- @property = Property.where(:mls => params[:mls_number]).first
160
+ return unless (user_is_allowed_to 'edit', 'rets_properties')
161
+ @property = Property.find(params[:id])
146
162
  render :layout => 'caboose/admin'
147
163
  end
148
164
 
149
- # @route GET /admin/properties/:mls_number/refresh
165
+ # @route GET /admin/properties/:id/refresh
150
166
  def admin_refresh
151
- return if !user_is_allowed('properties', 'edit')
152
-
153
- p = Property.find(params[:mls_number])
154
- p.delay(:priority => 10, :queue => 'rets').refresh_from_mls
155
-
167
+ return unless (user_is_allowed_to 'edit', 'rets_properties')
168
+ p = Property.find(params[:id])
169
+ CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_properties(p.mls_number, true)
156
170
  resp = Caboose::StdClass.new
157
171
  resp.success = "The property's info is being updated from MLS. This may take a few minutes depending on how many images it has."
158
172
  render :json => resp
@@ -4,19 +4,17 @@ module CabooseRets
4
4
 
5
5
  # GET /admin/rets/import
6
6
  def admin_import_form
7
- return if !user_is_allowed('properties', 'edit')
7
+ return if !user_is_allowed('rets_properties', 'edit')
8
8
  render :layout => 'caboose/admin'
9
9
  end
10
10
 
11
11
  # POST /admin/rets/import
12
12
  def admin_import
13
- return if !user_is_allowed('properties', 'edit')
14
-
13
+ return if !user_is_allowed('rets_properties', 'edit')
15
14
  mui = params[:mls]
16
- CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_properties(mui)
17
-
15
+ CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_properties(mui, true)
18
16
  resp = Caboose::StdClass.new
19
- resp.success = "The property is being imported from Matrix. This may take a few minutes depending on how many images it has."
17
+ resp.success = "The property is being imported from MLS. This may take a few minutes depending on how many images it has."
20
18
  render :json => resp
21
19
  end
22
20
 
@@ -17,6 +17,7 @@ class CabooseRets::AgentMeta < ActiveRecord::Base
17
17
  :contact_info ,
18
18
  :assistant_to ,
19
19
  :designation ,
20
- :image_location
20
+ :image_location ,
21
+ :accepts_listings
21
22
 
22
23
  end
@@ -13,7 +13,15 @@ class CabooseRets::Property <ActiveRecord::Base
13
13
  def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
14
14
 
15
15
  def refresh_from_mls
16
- CabooseRets::RetsImporter.import_properties(self.mls_number, false)
16
+ CabooseRets::RetsImporter.import_properties(self.mls_number, true)
17
+ end
18
+
19
+ def agent
20
+ CabooseRets::Agent.where(:mls_id => self.list_agent_mls_id).first
21
+ end
22
+
23
+ def office
24
+ CabooseRets::Office.where(:lo_mls_id => self.list_office_mls_id).first
17
25
  end
18
26
 
19
27
  def parse(data)
@@ -134,20 +134,15 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
134
134
 
135
135
  self.log "d: #{d}"
136
136
 
137
- # statusquery = ""
138
- # case class_type
139
- # when 'Property' then statusquery = "MlsStatus=Active"
140
- # when 'Office' then statusquery = "OfficeStatus=Active"
141
- # when 'Member' then statusquery = "MemberStatus=Active"
142
- # when 'OpenHouse' then statusquery = "OpenHouseKeyNumeric=0+"
143
- # end
137
+ quer = "(#{m.date_modified_field}=#{d}+)"
138
+ quer += "OR(PhotosChangeTimestamp=#{d}+)" if class_type == 'Property'
144
139
 
145
140
  params = {
146
141
  :search_type => m.search_type,
147
142
  :class => class_type,
148
143
  :select => [m.remote_key_field],
149
144
  :querytype => 'DMQL2',
150
- :query => "(#{m.date_modified_field}=#{d}+)", #AND(#{statusquery})",
145
+ :query => quer,
151
146
  :standard_names_only => true,
152
147
  :timeout => -1
153
148
  }
@@ -14,7 +14,7 @@ class CabooseRets::RetsPlugin < Caboose::CaboosePlugin
14
14
  item['children'] << { 'id' => 'agents', 'icon' => 'users', 'href' => '/admin/agents' , 'text' => 'Agents' , 'modal' => false }
15
15
  # item['children'] << { 'id' => 'offices' , 'href' => '/admin/offices' , 'text' => 'Offices' , 'modal' => false }
16
16
  # item['children'] << { 'id' => 'open-houses' , 'href' => '/admin/open-houses' , 'text' => 'Open Houses' , 'modal' => false }
17
- # item['children'] << { 'id' => 'residential' , 'href' => '/admin/residential' , 'text' => 'Residential Property' , 'modal' => false }
17
+ item['children'] << { 'id' => 'properties' , 'icon' => 'rets', 'href' => '/admin/properties' , 'text' => 'Properties' , 'modal' => false }
18
18
  # item['children'] << { 'id' => 'commercial' , 'href' => '/admin/commercial' , 'text' => 'Commercial Property' , 'modal' => false }
19
19
  # item['children'] << { 'id' => 'commercial' , 'href' => '/admin/multi-family' , 'text' => 'Multi-Family Property' , 'modal' => false }
20
20
  # item['children'] << { 'id' => 'land' , 'href' => '/admin/land' , 'text' => 'Land Property' , 'modal' => false }
@@ -45,7 +45,8 @@ class CabooseRets::Schema < Caboose::Utilities::Schema
45
45
  [ :assistant_to , :string ],
46
46
  [ :designation , :string ],
47
47
  [ :image_location , :string ],
48
- [ :image , :attachment ]
48
+ [ :image , :attachment ],
49
+ [ :accepts_listings , :boolean , { :default => true }]
49
50
  ],
50
51
  CabooseRets::Office => [
51
52
  [ :lo_addr1 , :text ],
@@ -35,6 +35,8 @@
35
35
  </p>
36
36
 
37
37
 
38
+ <div id="agent_<%= @agent.id %>_accepts_listings"></div>
39
+ <br />
38
40
  <div id="agent_<%= @agent.id %>_hide"></div>
39
41
  <br />
40
42
  <div id="agent_<%= @agent.id %>_slug"></div>
@@ -47,6 +49,8 @@
47
49
  <div id="agent_<%= @agent.id %>_image"></div>
48
50
 
49
51
  <div id="message"></div>
52
+ <br /><br />
53
+ <a href="/admin/agents" class="caboose-btn">Back to Agents</a>
50
54
 
51
55
  <% content_for :caboose_css do %>
52
56
  <style>
@@ -76,6 +80,7 @@ $(document).ready(function() {
76
80
  update_url: '/admin/agents/<%= @agent.id %>',
77
81
  authenticity_token: '<%= form_authenticity_token %>',
78
82
  attributes: [
83
+ { name: 'accepts_listings', nice_name: 'Accepts Listings', type: 'checkbox', value: <%== Caboose.json(@agent_meta.accepts_listings) %>, width: 500, height: 300 },
79
84
  { name: 'hide', nice_name: 'Hide', type: 'checkbox', value: <%== Caboose.json(@agent_meta.hide) %>, width: 500, height: 300 },
80
85
  { name: 'slug', nice_name: 'Slug', type: 'text', value: <%== Caboose.json(@agent.slug) %>, width: 500 },
81
86
  { name: 'bio', nice_name: 'Bio', type: 'richtext', value: <%== Caboose.json(@agent_meta.bio) %>, width: 500, height: 300 },
@@ -37,7 +37,7 @@ $(document).ready(function() {
37
37
  allow_duplicate: false,
38
38
  allow_advanced_edit: true,
39
39
  allow_bulk_import: false,
40
- no_models_text: "You do not have access to edit any agent profiles.",
40
+ no_models_text: "No matching agents were found.",
41
41
  fields: [
42
42
  { show: true , editable: false, bulk_edit: false, name: 'first_name' , nice_name: 'First Name' , sort: 'first_name' , type: 'text' , value: function(r) { return r.first_name }, width: 200 },
43
43
  { show: true , editable: false, bulk_edit: false, name: 'last_name' , nice_name: 'Last Name' , sort: 'last_name' , type: 'text' , value: function(r) { return r.last_name }, width: 200 },
@@ -4,245 +4,178 @@ p = @property
4
4
  <h1>Edit Property</h1>
5
5
 
6
6
  <p>
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 %>');" />
7
+ <input type='button' class="caboose-btn" value='Back' onclick="window.location='/admin/properties';" />
8
+ <input type='button' class="caboose-btn" value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.id %>');" />
9
9
  </p>
10
10
  <div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
11
11
 
12
12
  <table class='data'>
13
- <tr><td>acreage </td><td><%= p.acreage %></td></tr>
14
- <tr><td>agent_notes </td><td><%= p.agent_notes %></td></tr>
15
- <tr><td>agent_other_contact_desc </td><td><%= p.agent_other_contact_desc %></td></tr>
16
- <tr><td>agent_other_contact_phone </td><td><%= p.agent_other_contact_phone %></td></tr>
17
- <tr><td>annual_taxes </td><td><%= p.annual_taxes %></td></tr>
18
- <tr><td>area </td><td><%= p.area %></td></tr>
19
- <tr><td>avm_automated_sales_disabled </td><td><%= p.avm_automated_sales_disabled %></td></tr>
20
- <tr><td>avm_instant_valuation_disabled</td><td><%= p.avm_instant_valuation_disabled %></td></tr>
21
- <tr><td>basement_yn </td><td><%= p.basement_yn %></td></tr>
22
- <tr><td>baths </td><td><%= p.baths %></td></tr>
23
- <tr><td>baths_full </td><td><%= p.baths_full %></td></tr>
24
- <tr><td>baths_half </td><td><%= p.baths_half %></td></tr>
25
- <tr><td>bedrooms </td><td><%= p.bedrooms %></td></tr>
26
- <tr><td>bom_date </td><td><%= p.bom_date %></td></tr>
27
- <tr><td>book_number </td><td><%= p.book_number %></td></tr>
28
- <tr><td>book_page </td><td><%= p.book_page %></td></tr>
29
- <tr><td>book_type </td><td><%= p.book_type %></td></tr>
30
- <tr><td>buyer_broker </td><td><%= p.buyer_broker %></td></tr>
31
- <tr><td>buyer_broker_type </td><td><%= p.buyer_broker_type %></td></tr>
32
- <tr><td>buyer_name </td><td><%= p.buyer_name %></td></tr>
33
- <tr><td>category </td><td><%= p.category %></td></tr>
34
- <tr><td>city </td><td><%= p.city %></td></tr>
35
- <tr><td>city_code </td><td><%= p.city_code %></td></tr>
36
- <tr><td>co_la_code </td><td><%= p.co_la_code %></td></tr>
37
- <tr><td>co_lo_code </td><td><%= p.co_lo_code %></td></tr>
38
- <tr><td>co_sa_code </td><td><%= p.co_sa_code %></td></tr>
39
- <tr><td>co_so_code </td><td><%= p.co_so_code %></td></tr>
40
- <tr><td>construction_date_comp </td><td><%= p.construction_date_comp %></td></tr>
41
- <tr><td>construction_status </td><td><%= p.construction_status %></td></tr>
42
- <tr><td>contacts </td><td><%= p.contacts %></td></tr>
43
- <tr><td>contr_broker </td><td><%= p.contr_broker %></td></tr>
44
- <tr><td>contr_broker_type </td><td><%= p.contr_broker_type %></td></tr>
45
- <tr><td>converted </td><td><%= p.converted %></td></tr>
46
- <tr><td>county </td><td><%= p.county %></td></tr>
47
- <tr><td>current_price </td><td><%= p.current_price %></td></tr>
48
- <tr><td>currentlease_yn </td><td><%= p.currentlease_yn %></td></tr>
49
- <tr><td>date_created </td><td><%= p.date_created %></td></tr>
50
- <tr><td>date_modified </td><td><%= p.date_modified %></td></tr>
51
- <tr><td>df_yn </td><td><%= p.df_yn %></td></tr>
52
- <tr><td>directions </td><td><%= p.directions %></td></tr>
53
- <tr><td>display_address_yn </td><td><%= p.display_address_yn %></td></tr>
54
- <tr><td>dom </td><td><%= p.dom %></td></tr>
55
- <tr><td>elem_school </td><td><%= p.elem_school %></td></tr>
56
- <tr><td>expire_date </td><td><%= p.expire_date %></td></tr>
57
- <tr><td>flood_plain </td><td><%= p.flood_plain %></td></tr>
58
- <tr><td>foreclosure_yn </td><td><%= p.foreclosure_yn %></td></tr>
59
- <tr><td>ftr_age </td><td><%= p.ftr_age %></td></tr>
60
- <tr><td>ftr_appliances </td><td><%= p.ftr_appliances %></td></tr>
61
- <tr><td>ftr_attic </td><td><%= p.ftr_attic %></td></tr>
62
- <tr><td>ftr_basement </td><td><%= p.ftr_basement %></td></tr>
63
- <tr><td>ftr_citycommunit </td><td><%= p.ftr_citycommunit %></td></tr>
64
- <tr><td>ftr_construction </td><td><%= p.ftr_construction %></td></tr>
65
- <tr><td>ftr_cooling </td><td><%= p.ftr_cooling %></td></tr>
66
- <tr><td>ftr_diningroom </td><td><%= p.ftr_diningroom %></td></tr>
67
- <tr><td>ftr_docs_on_file </td><td><%= p.ftr_docs_on_file %></td></tr>
68
- <tr><td>ftr_drive </td><td><%= p.ftr_drive %></td></tr>
69
- <tr><td>ftr_exterior </td><td><%= p.ftr_exterior %></td></tr>
70
- <tr><td>ftr_fireplace </td><td><%= p.ftr_fireplace %></td></tr>
71
- <tr><td>ftr_garage </td><td><%= p.ftr_garage %></td></tr>
72
- <tr><td>ftr_heating </td><td><%= p.ftr_heating %></td></tr>
73
- <tr><td>ftr_hoaamenities </td><td><%= p.ftr_hoaamenities %></td></tr>
74
- <tr><td>ftr_hoaincludes </td><td><%= p.ftr_hoaincludes %></td></tr>
75
- <tr><td>ftr_interior </td><td><%= p.ftr_interior %></td></tr>
76
- <tr><td>ftr_landscaping </td><td><%= p.ftr_landscaping %></td></tr>
77
- <tr><td>ftr_laundry </td><td><%= p.ftr_laundry %></td></tr>
78
- <tr><td>ftr_lotdesc </td><td><%= p.ftr_lotdesc %></td></tr>
79
- <tr><td>ftr_miscellaneous </td><td><%= p.ftr_miscellaneous %></td></tr>
80
- <tr><td>ftr_pool </td><td><%= p.ftr_pool %></td></tr>
81
- <tr><td>ftr_porchpatio </td><td><%= p.ftr_porchpatio %></td></tr>
82
- <tr><td>ftr_possession </td><td><%= p.ftr_possession %></td></tr>
83
- <tr><td>ftr_roof </td><td><%= p.ftr_roof %></td></tr>
84
- <tr><td>ftr_sewer </td><td><%= p.ftr_sewer %></td></tr>
85
- <tr><td>ftr_showing </td><td><%= p.ftr_showing %></td></tr>
86
- <tr><td>ftr_terms </td><td><%= p.ftr_terms %></td></tr>
87
- <tr><td>ftr_warrantyprogrm </td><td><%= p.ftr_warrantyprogrm %></td></tr>
88
- <tr><td>ftr_waterheater </td><td><%= p.ftr_waterheater %></td></tr>
89
- <tr><td>ftr_watersupply </td><td><%= p.ftr_watersupply %></td></tr>
90
- <tr><td>ftr_window_treat </td><td><%= p.ftr_window_treat %></td></tr>
91
- <tr><td>ftr_windows </td><td><%= p.ftr_windows %></td></tr>
92
- <tr><td>geo_precision </td><td><%= p.geo_precision %></td></tr>
93
- <tr><td>georesult </td><td><%= p.georesult %></td></tr>
94
- <tr><td>high_school </td><td><%= p.high_school %></td></tr>
95
- <tr><td>hoa_fee </td><td><%= p.hoa_fee %></td></tr>
96
- <tr><td>hoa_fee_yn </td><td><%= p.hoa_fee_yn %></td></tr>
97
- <tr><td>hoa_term </td><td><%= p.hoa_term %></td></tr>
98
- <tr><td>homestead_yn </td><td><%= p.homestead_yn %></td></tr>
99
- <tr><td>internet_yn </td><td><%= p.internet_yn %></td></tr>
100
- <tr><td>la_code </td><td><%= p.la_code %></td></tr>
101
- <tr><td>lease_exp_date </td><td><%= p.lease_exp_date %></td></tr>
102
- <tr><td>legals </td><td><%= p.legals %></td></tr>
103
- <tr><td>levels </td><td><%= p.levels %></td></tr>
104
- <tr><td>list_date </td><td><%= p.list_date %></td></tr>
105
- <tr><td>list_price </td><td><%= p.list_price %></td></tr>
106
- <tr><td>listing_type </td><td><%= p.listing_type %></td></tr>
107
- <tr><td>lo_code </td><td><%= p.lo_code %></td></tr>
108
- <tr><td>lot_dimensions </td><td><%= p.lot_dimensions %></td></tr>
109
- <tr><td>master_bed_lvl </td><td><%= p.master_bed_lvl %></td></tr>
110
- <tr><td>media_flag </td><td><%= p.media_flag %></td></tr>
111
- <tr><td>middle_school </td><td><%= p.middle_school %></td></tr>
112
- <tr><td>mls </td><td><%= p.mls %></td></tr>
113
- <tr><td>off_mkt_date </td><td><%= p.off_mkt_date %></td></tr>
114
- <tr><td>off_mkt_days </td><td><%= p.off_mkt_days %></td></tr>
115
- <tr><td>office_notes </td><td><%= p.office_notes %></td></tr>
116
- <tr><td>onsite_days_hours </td><td><%= p.onsite_days_hours %></td></tr>
117
- <tr><td>onsite_yn </td><td><%= p.onsite_yn %></td></tr>
118
- <tr><td>orig_lp </td><td><%= p.orig_lp %></td></tr>
119
- <tr><td>other_fee </td><td><%= p.other_fee %></td></tr>
120
- <tr><td>other_fee_type </td><td><%= p.other_fee_type %></td></tr>
121
- <tr><td>outlier_yn </td><td><%= p.outlier_yn %></td></tr>
122
- <tr><td>owner_name </td><td><%= p.owner_name %></td></tr>
123
- <tr><td>owner_phone </td><td><%= p.owner_phone %></td></tr>
124
- <tr><td>parcel_id </td><td><%= p.parcel_id %></td></tr>
125
- <tr><td>pending_date </td><td><%= p.pending_date %></td></tr>
126
- <tr><td>photo_count </td><td><%= p.photo_count %></td></tr>
127
- <tr><td>photo_date_modified </td><td><%= p.photo_date_modified %></td></tr>
128
- <tr><td>price_change_date </td><td><%= p.price_change_date %></td></tr>
129
- <tr><td>price_sqft </td><td><%= p.price_sqft %></td></tr>
130
- <tr><td>proj_close_date </td><td><%= p.proj_close_date %></td></tr>
131
- <tr><td>prop_id </td><td><%= p.prop_id %></td></tr>
132
- <tr><td>prop_type </td><td><%= p.prop_type %></td></tr>
133
- <tr><td>remarks </td><td><%= p.remarks %></td></tr>
134
- <tr><td>right_red_date </td><td><%= p.right_red_date %></td></tr>
135
- <tr><td>rm_bath1 </td><td><%= p.rm_bath1 %></td></tr>
136
- <tr><td>rm_bath1_desc </td><td><%= p.rm_bath1_desc %></td></tr>
137
- <tr><td>rm_bath2 </td><td><%= p.rm_bath2 %></td></tr>
138
- <tr><td>rm_bath2_desc </td><td><%= p.rm_bath2_desc %></td></tr>
139
- <tr><td>rm_bath3 </td><td><%= p.rm_bath3 %></td></tr>
140
- <tr><td>rm_bath3_desc </td><td><%= p.rm_bath3_desc %></td></tr>
141
- <tr><td>rm_br1 </td><td><%= p.rm_br1 %></td></tr>
142
- <tr><td>rm_br1_desc </td><td><%= p.rm_br1_desc %></td></tr>
143
- <tr><td>rm_br2 </td><td><%= p.rm_br2 %></td></tr>
144
- <tr><td>rm_br2_desc </td><td><%= p.rm_br2_desc %></td></tr>
145
- <tr><td>rm_br3 </td><td><%= p.rm_br3 %></td></tr>
146
- <tr><td>rm_br3_desc </td><td><%= p.rm_br3_desc %></td></tr>
147
- <tr><td>rm_br4 </td><td><%= p.rm_br4 %></td></tr>
148
- <tr><td>rm_br4_desc </td><td><%= p.rm_br4_desc %></td></tr>
149
- <tr><td>rm_br5 </td><td><%= p.rm_br5 %></td></tr>
150
- <tr><td>rm_br5_desc </td><td><%= p.rm_br5_desc %></td></tr>
151
- <tr><td>rm_brkfst </td><td><%= p.rm_brkfst %></td></tr>
152
- <tr><td>rm_brkfst_desc </td><td><%= p.rm_brkfst_desc %></td></tr>
153
- <tr><td>rm_den </td><td><%= p.rm_den %></td></tr>
154
- <tr><td>rm_den_desc </td><td><%= p.rm_den_desc %></td></tr>
155
- <tr><td>rm_dining </td><td><%= p.rm_dining %></td></tr>
156
- <tr><td>rm_dining_desc </td><td><%= p.rm_dining_desc %></td></tr>
157
- <tr><td>rm_family </td><td><%= p.rm_family %></td></tr>
158
- <tr><td>rm_family_desc </td><td><%= p.rm_family_desc %></td></tr>
159
- <tr><td>rm_foyer </td><td><%= p.rm_foyer %></td></tr>
160
- <tr><td>rm_foyer_desc </td><td><%= p.rm_foyer_desc %></td></tr>
161
- <tr><td>rm_great </td><td><%= p.rm_great %></td></tr>
162
- <tr><td>rm_great_desc </td><td><%= p.rm_great_desc %></td></tr>
163
- <tr><td>rm_kitchen </td><td><%= p.rm_kitchen %></td></tr>
164
- <tr><td>rm_kitchen_desc </td><td><%= p.rm_kitchen_desc %></td></tr>
165
- <tr><td>rm_kitchen2 </td><td><%= p.rm_kitchen2 %></td></tr>
166
- <tr><td>rm_kitchen2_desc </td><td><%= p.rm_kitchen2_desc %></td></tr>
167
- <tr><td>rm_laundry </td><td><%= p.rm_laundry %></td></tr>
168
- <tr><td>rm_laundry_desc </td><td><%= p.rm_laundry_desc %></td></tr>
169
- <tr><td>rm_living </td><td><%= p.rm_living %></td></tr>
170
- <tr><td>rm_living_desc </td><td><%= p.rm_living_desc %></td></tr>
171
- <tr><td>rm_lrdr </td><td><%= p.rm_lrdr %></td></tr>
172
- <tr><td>rm_lrdr_desc </td><td><%= p.rm_lrdr_desc %></td></tr>
173
- <tr><td>rm_master </td><td><%= p.rm_master %></td></tr>
174
- <tr><td>rm_master_desc </td><td><%= p.rm_master_desc %></td></tr>
175
- <tr><td>rm_other1 </td><td><%= p.rm_other1 %></td></tr>
176
- <tr><td>rm_other1_desc </td><td><%= p.rm_other1_desc %></td></tr>
177
- <tr><td>rm_other1_name </td><td><%= p.rm_other1_name %></td></tr>
178
- <tr><td>rm_other2 </td><td><%= p.rm_other2 %></td></tr>
179
- <tr><td>rm_other2_desc </td><td><%= p.rm_other2_desc %></td></tr>
180
- <tr><td>rm_other2_name </td><td><%= p.rm_other2_name %></td></tr>
181
- <tr><td>rm_other3 </td><td><%= p.rm_other3 %></td></tr>
182
- <tr><td>rm_other3_desc </td><td><%= p.rm_other3_desc %></td></tr>
183
- <tr><td>rm_other3_name </td><td><%= p.rm_other3_name %></td></tr>
184
- <tr><td>rm_other4 </td><td><%= p.rm_other4 %></td></tr>
185
- <tr><td>rm_other4_desc </td><td><%= p.rm_other4_desc %></td></tr>
186
- <tr><td>rm_other4_name </td><td><%= p.rm_other4_name %></td></tr>
187
- <tr><td>rm_recrm </td><td><%= p.rm_recrm %></td></tr>
188
- <tr><td>rm_recrm_desc </td><td><%= p.rm_recrm_desc %></td></tr>
189
- <tr><td>rm_study </td><td><%= p.rm_study %></td></tr>
190
- <tr><td>rm_study_desc </td><td><%= p.rm_study_desc %></td></tr>
191
- <tr><td>rm_sun </td><td><%= p.rm_sun %></td></tr>
192
- <tr><td>rm_sun_desc </td><td><%= p.rm_sun_desc %></td></tr>
193
- <tr><td>sa_code </td><td><%= p.sa_code %></td></tr>
194
- <tr><td>sale_lease </td><td><%= p.sale_lease %></td></tr>
195
- <tr><td>sale_notes </td><td><%= p.sale_notes %></td></tr>
196
- <tr><td>so_code </td><td><%= p.so_code %></td></tr>
197
- <tr><td>sold_date </td><td><%= p.sold_date %></td></tr>
198
- <tr><td>sold_price </td><td><%= p.sold_price %></td></tr>
199
- <tr><td>sold_terms </td><td><%= p.sold_terms %></td></tr>
200
- <tr><td>sqft_source </td><td><%= p.sqft_source %></td></tr>
201
- <tr><td>state </td><td><%= p.state %></td></tr>
202
- <tr><td>status </td><td><%= p.status %></td></tr>
203
- <tr><td>status_date </td><td><%= p.status_date %></td></tr>
204
- <tr><td>status_flag </td><td><%= p.status_flag %></td></tr>
205
- <tr><td>street_dir </td><td><%= p.street_dir %></td></tr>
206
- <tr><td>street_name </td><td><%= p.street_name %></td></tr>
207
- <tr><td>street_num </td><td><%= p.street_num %></td></tr>
208
- <tr><td>style </td><td><%= p.style %></td></tr>
209
- <tr><td>sub_agent </td><td><%= p.sub_agent %></td></tr>
210
- <tr><td>sub_agent_type </td><td><%= p.sub_agent_type %></td></tr>
211
- <tr><td>subdivision </td><td><%= p.subdivision %></td></tr>
212
- <tr><td>take_photo_yn </td><td><%= p.take_photo_yn %></td></tr>
213
- <tr><td>third_party_comm_yn </td><td><%= p.third_party_comm_yn %></td></tr>
214
- <tr><td>tot_heat_sqft </td><td><%= p.tot_heat_sqft %></td></tr>
215
- <tr><td>unit_num </td><td><%= p.unit_num %></td></tr>
216
- <tr><td>upload_source </td><td><%= p.upload_source %></td></tr>
217
- <tr><td>valuation_yn </td><td><%= p.valuation_yn %></td></tr>
218
- <tr><td>vt_yn </td><td><%= p.vt_yn %></td></tr>
219
- <tr><td>waterfront </td><td><%= p.waterfront %></td></tr>
220
- <tr><td>wf_feet </td><td><%= p.wf_feet %></td></tr>
221
- <tr><td>withdrawn_date </td><td><%= p.withdrawn_date %></td></tr>
222
- <tr><td>year_built </td><td><%= p.year_built %></td></tr>
223
- <tr><td>year_built_source </td><td><%= p.year_built_source %></td></tr>
224
- <tr><td>zip </td><td><%= p.zip %></td></tr>
13
+ <tr><td><%= 'acreage'.titleize %></td><td><%= p.acreage %></td></tr>
14
+ <tr><td><%= 'acreage_source'.titleize %></td><td><%= p.acreage_source %></td></tr>
15
+ <tr><td><%= 'annual_taxes'.titleize %></td><td><%= p.annual_taxes %></td></tr>
16
+ <tr><td><%= 'appliances'.titleize %></td><td><%= p.appliances %></td></tr>
17
+ <tr><td><%= 'area'.titleize %></td><td><%= p.area %></td></tr>
18
+ <tr><td><%= 'available_date'.titleize %></td><td><%= p.available_date %></td></tr>
19
+ <tr><td><%= 'basement'.titleize %></td><td><%= p.basement %></td></tr>
20
+ <tr><td><%= 'baths_full'.titleize %></td><td><%= p.baths_full %></td></tr>
21
+ <tr><td><%= 'baths_half'.titleize %></td><td><%= p.baths_half %></td></tr>
22
+ <tr><td><%= 'baths_total'.titleize %></td><td><%= p.baths_total %></td></tr>
23
+ <tr><td><%= 'beds_total'.titleize %></td><td><%= p.beds_total %></td></tr>
24
+ <tr><td><%= 'book_number'.titleize %></td><td><%= p.book_number %></td></tr>
25
+ <tr><td><%= 'business_included_yn'.titleize %></td><td><%= p.business_included_yn %></td></tr>
26
+ <tr><td><%= 'buyer_name'.titleize %></td><td><%= p.buyer_name %></td></tr>
27
+ <tr><td><%= 'city'.titleize %></td><td><%= p.city %></td></tr>
28
+ <tr><td><%= 'city_community'.titleize %></td><td><%= p.city_community %></td></tr>
29
+ <tr><td><%= 'closing'.titleize %></td><td><%= p.closing %></td></tr>
30
+ <tr><td><%= 'co_list_agent_mui'.titleize %></td><td><%= p.co_list_agent_mui %></td></tr>
31
+ <tr><td><%= 'co_list_agent_direct_work_phone'.titleize %></td><td><%= p.co_list_agent_direct_work_phone %></td></tr>
32
+ <tr><td><%= 'co_list_agent_email'.titleize %></td><td><%= p.co_list_agent_email %></td></tr>
33
+ <tr><td><%= 'co_list_agent_full_name'.titleize %></td><td><%= p.co_list_agent_full_name %></td></tr>
34
+ <tr><td><%= 'co_list_agent_mls_id'.titleize %></td><td><%= p.co_list_agent_mls_id %></td></tr>
35
+ <tr><td><%= 'co_list_office_mui'.titleize %></td><td><%= p.co_list_office_mui %></td></tr>
36
+ <tr><td><%= 'co_list_office_mls_id'.titleize %></td><td><%= p.co_list_office_mls_id %></td></tr>
37
+ <tr><td><%= 'co_list_office_name'.titleize %></td><td><%= p.co_list_office_name %></td></tr>
38
+ <tr><td><%= 'co_list_office_phone'.titleize %></td><td><%= p.co_list_office_phone %></td></tr>
39
+ <tr><td><%= 'construction'.titleize %></td><td><%= p.construction %></td></tr>
40
+ <tr><td><%= 'construction_status'.titleize %></td><td><%= p.construction_status %></td></tr>
41
+ <tr><td><%= 'cooling'.titleize %></td><td><%= p.cooling %></td></tr>
42
+ <tr><td><%= 'county_or_parish'.titleize %></td><td><%= p.county_or_parish %></td></tr>
43
+ <tr><td><%= 'directions'.titleize %></td><td><%= p.directions %></td></tr>
44
+ <tr><td><%= 'display_address_on_internet_yn'.titleize %></td><td><%= p.display_address_on_internet_yn %></td></tr>
45
+ <tr><td><%= 'elementary_school'.titleize %></td><td><%= p.elementary_school %></td></tr>
46
+ <tr><td><%= 'exists_struct'.titleize %></td><td><%= p.exists_struct %></td></tr>
47
+ <tr><td><%= 'expenses_insurance'.titleize %></td><td><%= p.expenses_insurance %></td></tr>
48
+ <tr><td><%= 'expenses_maintenance'.titleize %></td><td><%= p.expenses_maintenance %></td></tr>
49
+ <tr><td><%= 'expenses_management'.titleize %></td><td><%= p.expenses_management %></td></tr>
50
+ <tr><td><%= 'expenses_other'.titleize %></td><td><%= p.expenses_other %></td></tr>
51
+ <tr><td><%= 'expenses_tax'.titleize %></td><td><%= p.expenses_tax %></td></tr>
52
+ <tr><td><%= 'exterior_features'.titleize %></td><td><%= p.exterior_features %></td></tr>
53
+ <tr><td><%= 'fireplace'.titleize %></td><td><%= p.fireplace %></td></tr>
54
+ <tr><td><%= 'flooring'.titleize %></td><td><%= p.flooring %></td></tr>
55
+ <tr><td><%= 'garage'.titleize %></td><td><%= p.garage %></td></tr>
56
+ <tr><td><%= 'heating'.titleize %></td><td><%= p.heating %></td></tr>
57
+ <tr><td><%= 'high_school'.titleize %></td><td><%= p.high_school %></td></tr>
58
+ <tr><td><%= 'hoa_amenities'.titleize %></td><td><%= p.hoa_amenities %></td></tr>
59
+ <tr><td><%= 'hoa_fee'.titleize %></td><td><%= p.hoa_fee %></td></tr>
60
+ <tr><td><%= 'hoa_included_in_rent_yn'.titleize %></td><td><%= p.hoa_included_in_rent_yn %></td></tr>
61
+ <tr><td><%= 'hoa_term'.titleize %></td><td><%= p.hoa_term %></td></tr>
62
+ <tr><td><%= 'hoa_term_mandatory_yn'.titleize %></td><td><%= p.hoa_term_mandatory_yn %></td></tr>
63
+ <tr><td><%= 'income_other'.titleize %></td><td><%= p.income_other %></td></tr>
64
+ <tr><td><%= 'interior_features'.titleize %></td><td><%= p.interior_features %></td></tr>
65
+ <tr><td><%= 'land_features_extras'.titleize %></td><td><%= p.land_features_extras %></td></tr>
66
+ <tr><td><%= 'latitude'.titleize %></td><td><%= p.latitude %></td></tr>
67
+ <tr><td><%= 'laundry'.titleize %></td><td><%= p.laundry %></td></tr>
68
+ <tr><td><%= 'legal_description'.titleize %></td><td><%= p.legal_description %></td></tr>
69
+ <tr><td><%= 'legal_lot'.titleize %></td><td><%= p.legal_lot %></td></tr>
70
+ <tr><td><%= 'legal_section'.titleize %></td><td><%= p.legal_section %></td></tr>
71
+ <tr><td><%= 'levels'.titleize %></td><td><%= p.levels %></td></tr>
72
+ <tr><td><%= 'list_agent_mui'.titleize %></td><td><%= p.list_agent_mui %></td></tr>
73
+ <tr><td><%= 'list_agent_direct_work_phone'.titleize %></td><td><%= p.list_agent_direct_work_phone %></td></tr>
74
+ <tr><td><%= 'list_agent_email'.titleize %></td><td><%= p.list_agent_email %></td></tr>
75
+ <tr><td><%= 'list_agent_full_name'.titleize %></td><td><%= p.list_agent_full_name %></td></tr>
76
+ <tr><td><%= 'list_agent_mls_id'.titleize %></td><td><%= p.list_agent_mls_id %></td></tr>
77
+ <tr><td><%= 'listing_contract_date'.titleize %></td><td><%= p.listing_contract_date %></td></tr>
78
+ <tr><td><%= 'list_office_mui'.titleize %></td><td><%= p.list_office_mui %></td></tr>
79
+ <tr><td><%= 'list_office_mls_id'.titleize %></td><td><%= p.list_office_mls_id %></td></tr>
80
+ <tr><td><%= 'list_office_name'.titleize %></td><td><%= p.list_office_name %></td></tr>
81
+ <tr><td><%= 'list_office_phone'.titleize %></td><td><%= p.list_office_phone %></td></tr>
82
+ <tr><td><%= 'list_price'.titleize %></td><td><%= p.list_price %></td></tr>
83
+ <tr><td><%= 'longitude'.titleize %></td><td><%= p.longitude %></td></tr>
84
+ <tr><td><%= 'lot_description'.titleize %></td><td><%= p.lot_description %></td></tr>
85
+ <tr><td><%= 'lot_dimensions'.titleize %></td><td><%= p.lot_dimensions %></td></tr>
86
+ <tr><td><%= 'lot_dim_source'.titleize %></td><td><%= p.lot_dim_source %></td></tr>
87
+ <tr><td><%= 'matrix_unique_id'.titleize %></td><td><%= p.matrix_unique_id %></td></tr>
88
+ <tr><td><%= 'matrix_modified_dt'.titleize %></td><td><%= p.matrix_modified_dt %></td></tr>
89
+ <tr><td><%= 'max_sqft'.titleize %></td><td><%= p.max_sqft %></td></tr>
90
+ <tr><td><%= 'middle_school'.titleize %></td><td><%= p.middle_school %></td></tr>
91
+ <tr><td><%= 'min_sqft'.titleize %></td><td><%= p.min_sqft %></td></tr>
92
+ <tr><td><%= 'misc_indoor_featuresa'.titleize %></td><td><%= p.misc_indoor_featuresa %></td></tr>
93
+ <tr><td><%= 'mls'.titleize %></td><td><%= p.mls %></td></tr>
94
+ <tr><td><%= 'mls_number'.titleize %></td><td><%= p.mls_number %></td></tr>
95
+ <tr><td><%= 'net_op_inc'.titleize %></td><td><%= p.net_op_inc %></td></tr>
96
+ <tr><td><%= 'original_entry_timestamp'.titleize %></td><td><%= p.original_entry_timestamp %></td></tr>
97
+ <tr><td><%= 'parcel_number'.titleize %></td><td><%= p.parcel_number %></td></tr>
98
+ <tr><td><%= 'pending_date'.titleize %></td><td><%= p.pending_date %></td></tr>
99
+ <tr><td><%= 'pets_allowed_yn'.titleize %></td><td><%= p.pets_allowed_yn %></td></tr>
100
+ <tr><td><%= 'photo_count'.titleize %></td><td><%= p.photo_count %></td></tr>
101
+ <tr><td><%= 'photo_modification_timestamp'.titleize %></td><td><%= p.photo_modification_timestamp %></td></tr>
102
+ <tr><td><%= 'pool'.titleize %></td><td><%= p.pool %></td></tr>
103
+ <tr><td><%= 'porch_patio'.titleize %></td><td><%= p.porch_patio %></td></tr>
104
+ <tr><td><%= 'possession'.titleize %></td><td><%= p.possession %></td></tr>
105
+ <tr><td><%= 'possible_uses'.titleize %></td><td><%= p.possible_uses %></td></tr>
106
+ <tr><td><%= 'postal_code'.titleize %></td><td><%= p.postal_code %></td></tr>
107
+ <tr><td><%= 'postal_code_plus4'.titleize %></td><td><%= p.postal_code_plus4 %></td></tr>
108
+ <tr><td><%= 'property_subtype'.titleize %></td><td><%= p.property_subtype %></td></tr>
109
+ <tr><td><%= 'property_type'.titleize %></td><td><%= p.property_type %></td></tr>
110
+ <tr><td><%= 'property_use'.titleize %></td><td><%= p.property_use %></td></tr>
111
+ <tr><td><%= 'prop_mgmt_comp'.titleize %></td><td><%= p.prop_mgmt_comp %></td></tr>
112
+ <tr><td><%= 'public_remarks'.titleize %></td><td><%= p.public_remarks %></td></tr>
113
+ <tr><td><%= 'rental_rate_type'.titleize %></td><td><%= p.rental_rate_type %></td></tr>
114
+ <tr><td><%= 'rent_incl'.titleize %></td><td><%= p.rent_incl %></td></tr>
115
+ <tr><td><%= 'res_style'.titleize %></td><td><%= p.res_style %></td></tr>
116
+ <tr><td><%= 'road_frontage'.titleize %></td><td><%= p.road_frontage %></td></tr>
117
+ <tr><td><%= 'roof'.titleize %></td><td><%= p.roof %></td></tr>
118
+ <tr><td><%= 'room_count'.titleize %></td><td><%= p.room_count %></td></tr>
119
+ <tr><td><%= 'sewer'.titleize %></td><td><%= p.sewer %></td></tr>
120
+ <tr><td><%= 'sold_terms'.titleize %></td><td><%= p.sold_terms %></td></tr>
121
+ <tr><td><%= 'sqft_source'.titleize %></td><td><%= p.sqft_source %></td></tr>
122
+ <tr><td><%= 'sqft_total'.titleize %></td><td><%= p.sqft_total %></td></tr>
123
+ <tr><td><%= 'state_or_province'.titleize %></td><td><%= p.state_or_province %></td></tr>
124
+ <tr><td><%= 'status'.titleize %></td><td><%= p.status %></td></tr>
125
+ <tr><td><%= 'status_contractual_search_date'.titleize %></td><td><%= p.status_contractual_search_date %></td></tr>
126
+ <tr><td><%= 'street_dir_prefix'.titleize %></td><td><%= p.street_dir_prefix %></td></tr>
127
+ <tr><td><%= 'street_dir_suffix'.titleize %></td><td><%= p.street_dir_suffix %></td></tr>
128
+ <tr><td><%= 'street_name'.titleize %></td><td><%= p.street_name %></td></tr>
129
+ <tr><td><%= 'street_number'.titleize %></td><td><%= p.street_number %></td></tr>
130
+ <tr><td><%= 'street_number_numeric'.titleize %></td><td><%= p.street_number_numeric %></td></tr>
131
+ <tr><td><%= 'street_suffix'.titleize %></td><td><%= p.street_suffix %></td></tr>
132
+ <tr><td><%= 'style'.titleize %></td><td><%= p.style %></td></tr>
133
+ <tr><td><%= 'subdivision'.titleize %></td><td><%= p.subdivision %></td></tr>
134
+ <tr><td><%= 'topography'.titleize %></td><td><%= p.topography %></td></tr>
135
+ <tr><td><%= 'total_num_units'.titleize %></td><td><%= p.total_num_units %></td></tr>
136
+ <tr><td><%= 'total_num_units_occupied'.titleize %></td><td><%= p.total_num_units_occupied %></td></tr>
137
+ <tr><td><%= 'transaction_type'.titleize %></td><td><%= p.transaction_type %></td></tr>
138
+ <tr><td><%= 'unit_count'.titleize %></td><td><%= p.unit_count %></td></tr>
139
+ <tr><td><%= 'unit_number'.titleize %></td><td><%= p.unit_number %></td></tr>
140
+ <tr><td><%= 'utilities'.titleize %></td><td><%= p.utilities %></td></tr>
141
+ <tr><td><%= 'virtual_tour1'.titleize %></td><td><%= p.virtual_tour1 %></td></tr>
142
+ <tr><td><%= 'water'.titleize %></td><td><%= p.water %></td></tr>
143
+ <tr><td><%= 'waterfronts'.titleize %></td><td><%= p.waterfronts %></td></tr>
144
+ <tr><td><%= 'waterfront_yn'.titleize %></td><td><%= p.waterfront_yn %></td></tr>
145
+ <tr><td><%= 'windows'.titleize %></td><td><%= p.windows %></td></tr>
146
+ <tr><td><%= 'year_built'.titleize %></td><td><%= p.year_built %></td></tr>
147
+ <tr><td><%= 'yr_blt_source'.titleize %></td><td><%= p.yr_blt_source %></td></tr>
148
+ <tr><td><%= 'zoning'.titleize %></td><td><%= p.zoning %></td></tr>
225
149
  </table><br />
226
150
 
151
+ <% content_for :caboose_css do %>
152
+ <style>
153
+ table.data {
154
+ width: calc(100% - 30px);
155
+ }
156
+ table.data tr td {
157
+ font-size: 14px !important;
158
+ }
159
+ table.data tr td:first-of-type {
160
+ width: 230px;
161
+ }
162
+ </style>
163
+ <% end %>
164
+
227
165
  <% content_for :caboose_js do %>
228
166
  <%= javascript_include_tag "caboose/model/all" %>
229
167
  <script type='text/javascript'>
230
168
 
231
169
  function refresh_property_from_mls(mls)
232
170
  {
233
- modal.autosize("<p class='loading'>Refreshing property info and images from MLS...</p>");
171
+ $("#message").html("<p class='loading'>Refreshing property info and images from MLS...</p>");
234
172
  $.ajax({
235
- url: '/admin/property/' + mls + '/refresh',
173
+ url: '/admin/properties/' + mls + '/refresh',
236
174
  success: function(resp) {
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>");
175
+ if (resp.error) $("#message").html("<p class='note error'>" + resp.error + "</p>");
176
+ if (resp.success) $("#message").html("<p class='note success'>" + resp.success + "</p>");
239
177
  }
240
178
  });
241
179
  }
242
-
243
- var modal = false;
244
- $(window).load(function() {
245
- modal = new CabooseModal(800);
246
- });
247
180
  </script>
248
181
  <% end %>
@@ -1,46 +1,53 @@
1
+ <%= raw @crumbtrail.print({
2
+ '/admin' => 'Admin',
3
+ '/admin/properties' => 'Properties'
4
+ }) %>
5
+
1
6
  <h1>Properties</h1>
2
7
 
3
- <style type='text/css'>
4
- #search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; }
5
- </style>
8
+ <p><a class="caboose-btn" href='/admin/rets/import'>Import new property from MLS</a></p>
6
9
 
7
- <div id='search_form_wrapper'>
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
- <input type='submit' value='Search' />
11
- </form>
12
- </div>
13
-
14
- <p><a href='/admin/rets/import'>Import new property from MLS</a></p>
15
-
16
- <table class='data' id='properties_table'>
17
- <tr>
18
- <%= raw @gen.sortable_table_headings({
19
- 'mls' => 'MLS #',
20
- 'street_number, street_name' => 'Address',
21
- 'la_code' => 'Agent',
22
- 'lo_code' => 'Office'
23
- })
24
- %>
25
- </tr>
26
- <% @properties.each do |p| %>
27
- <% agent = p.agent %>
28
- <% office = p.office %>
29
- <tr onclick="window.location='/admin/property/<%= p.mls %>/edit';">
30
- <td><%= raw p.mls %></td>
31
- <td><%= raw "#{p.street_number} #{p.street_name}, #{p.city}" %></td>
32
- <td><%= p.agent ? "#{agent.first_name} #{agent.last_name}" : p.la_code %></td>
33
- <td><%= p.office ? office.lo_name : p.lo_code %></td>
34
- </tr>
35
- <% end %>
36
- </table>
10
+ <div id='properties'></div>
37
11
 
38
- <p><%= raw @gen.generate %></p>
12
+ <br /><br />
13
+
14
+ <% content_for :caboose_css do %>
15
+ <style>
16
+ #properties_new { display: none; }
17
+ </style>
18
+ <% end %>
39
19
 
40
20
  <% content_for :caboose_js do %>
21
+ <%= javascript_include_tag 'caboose/model/all' %>
41
22
  <script type='text/javascript'>
23
+
24
+ function get_address(prop) {
25
+ return prop.street_number + " " + prop.street_name + " " + prop.street_suffix;
26
+ }
27
+
42
28
  $(document).ready(function() {
43
- var modal = new CabooseModal(800);
29
+ var that = this;
30
+ var table = new IndexTable({
31
+ form_authenticity_token: '<%= form_authenticity_token %>',
32
+ container: 'properties',
33
+ base_url: '/admin/properties',
34
+ allow_bulk_edit: false,
35
+ allow_bulk_delete: false,
36
+ allow_duplicate: false,
37
+ allow_advanced_edit: true,
38
+ allow_bulk_import: false,
39
+ no_models_text: "No matching properties were found.",
40
+ fields: [
41
+ { show: true , editable: false, bulk_edit: false, name: 'mls_number' , nice_name: 'MLS #' , sort: 'mls_number' , type: 'text' , value: function(r) { return r.mls_number }, width: 200 },
42
+ { show: true , editable: false, bulk_edit: false, name: 'street_name' , nice_name: 'Address' , sort: 'street_name' , type: 'text' , value: function(r) { return get_address(r) }, width: 200 },
43
+ { show: true , editable: false, bulk_edit: false, name: 'city' , nice_name: 'City' , sort: 'city' , type: 'text' , value: function(r) { return r.city }, width: 200 },
44
+ { show: true , editable: false, bulk_edit: false, name: 'state_or_province' , nice_name: 'State' , sort: 'state_or_province' , type: 'text' , value: function(r) { return r.state_or_province }, width: 200 },
45
+ { show: true , editable: false, bulk_edit: false, name: 'postal_code' , nice_name: 'ZIP' , sort: 'postal_code' , type: 'text' , value: function(r) { return r.postal_code }, width: 200 }
46
+ ],
47
+ search_fields: [
48
+ { name: 'mls_number' , nice_name: 'MLS Number' , type: 'text' }
49
+ ]
50
+ });
44
51
  });
45
52
  </script>
46
- <% end %>
53
+ <% end %>
@@ -1,8 +1,8 @@
1
- <h1>Import Property from Matrix</h1>
1
+ <h1>Import Property from MLS</h1>
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' id='mls' placeholder='Matrix Unique ID #' value="" style='width: 300px;' /></p>
5
+ <p><input type='text' name='mls' id='mls' placeholder='MLS Number' value="" style='width: 300px;' /></p>
6
6
  <div id='message'></div>
7
7
  <p><input type='submit' value='Import Property' /></p>
8
8
  </form>
@@ -12,7 +12,7 @@
12
12
 
13
13
  function import_property()
14
14
  {
15
- $('#message').html("<p class='loading'>Importing property from Matrix...</p>");
15
+ $('#message').html("<p class='loading'>Importing property from MLS...</p>");
16
16
  $.ajax({
17
17
  url: '/admin/rets/import',
18
18
  type: 'post',
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.43'
2
+ VERSION = '0.1.44'
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.43
4
+ version: 0.1.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms