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 +4 -4
- data/app/controllers/caboose_rets/agents_controller.rb +10 -9
- data/app/controllers/caboose_rets/properties_controller.rb +34 -20
- data/app/controllers/caboose_rets/rets_controller.rb +4 -6
- data/app/models/caboose_rets/agent_meta.rb +2 -1
- data/app/models/caboose_rets/property.rb +9 -1
- data/app/models/caboose_rets/rets_importer.rb +3 -8
- data/app/models/caboose_rets/rets_plugin.rb +1 -1
- data/app/models/caboose_rets/schema.rb +2 -1
- data/app/views/caboose_rets/agents/admin_edit.html.erb +5 -0
- data/app/views/caboose_rets/agents/admin_index.html.erb +1 -1
- data/app/views/caboose_rets/properties/admin_edit.html.erb +156 -223
- data/app/views/caboose_rets/properties/admin_index.html.erb +43 -36
- data/app/views/caboose_rets/rets/admin_import_form.html.erb +3 -3
- data/lib/caboose_rets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31660e3b34c98c740e29a17ca98bb278349073c6
|
4
|
+
data.tar.gz: 8fd46d122f9ab44c8d80826d4f6f2473f347663f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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', '
|
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', '
|
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])
|
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', '
|
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', '
|
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', '
|
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', '
|
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', '
|
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', '
|
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
|
128
|
+
return unless (user_is_allowed_to 'view', 'rets_properties')
|
129
|
+
render :layout => 'caboose/admin'
|
130
|
+
end
|
128
131
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
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
|
-
|
139
|
-
|
145
|
+
render :json => {
|
146
|
+
:pager => pager,
|
147
|
+
:models => pager.items
|
148
|
+
}
|
140
149
|
end
|
141
150
|
|
142
|
-
# @route GET /admin/properties/:
|
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
|
145
|
-
@property = Property.
|
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/:
|
165
|
+
# @route GET /admin/properties/:id/refresh
|
150
166
|
def admin_refresh
|
151
|
-
return
|
152
|
-
|
153
|
-
|
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('
|
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('
|
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
|
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
|
|
@@ -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,
|
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
|
-
|
138
|
-
|
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 =>
|
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
|
-
|
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: "
|
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='
|
8
|
-
<input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.
|
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
|
14
|
-
<tr><td
|
15
|
-
<tr><td
|
16
|
-
<tr><td
|
17
|
-
<tr><td
|
18
|
-
<tr><td
|
19
|
-
<tr><td
|
20
|
-
<tr><td
|
21
|
-
<tr><td
|
22
|
-
<tr><td
|
23
|
-
<tr><td
|
24
|
-
<tr><td
|
25
|
-
<tr><td
|
26
|
-
<tr><td
|
27
|
-
<tr><td
|
28
|
-
<tr><td
|
29
|
-
<tr><td
|
30
|
-
<tr><td
|
31
|
-
<tr><td
|
32
|
-
<tr><td
|
33
|
-
<tr><td
|
34
|
-
<tr><td
|
35
|
-
<tr><td
|
36
|
-
<tr><td
|
37
|
-
<tr><td
|
38
|
-
<tr><td
|
39
|
-
<tr><td
|
40
|
-
<tr><td
|
41
|
-
<tr><td
|
42
|
-
<tr><td
|
43
|
-
<tr><td
|
44
|
-
<tr><td
|
45
|
-
<tr><td
|
46
|
-
<tr><td
|
47
|
-
<tr><td
|
48
|
-
<tr><td
|
49
|
-
<tr><td
|
50
|
-
<tr><td
|
51
|
-
<tr><td
|
52
|
-
<tr><td
|
53
|
-
<tr><td
|
54
|
-
<tr><td
|
55
|
-
<tr><td
|
56
|
-
<tr><td
|
57
|
-
<tr><td
|
58
|
-
<tr><td
|
59
|
-
<tr><td
|
60
|
-
<tr><td
|
61
|
-
<tr><td
|
62
|
-
<tr><td
|
63
|
-
<tr><td
|
64
|
-
<tr><td
|
65
|
-
<tr><td
|
66
|
-
<tr><td
|
67
|
-
<tr><td
|
68
|
-
<tr><td
|
69
|
-
<tr><td
|
70
|
-
<tr><td
|
71
|
-
<tr><td
|
72
|
-
<tr><td
|
73
|
-
<tr><td
|
74
|
-
<tr><td
|
75
|
-
<tr><td
|
76
|
-
<tr><td
|
77
|
-
<tr><td
|
78
|
-
<tr><td
|
79
|
-
<tr><td
|
80
|
-
<tr><td
|
81
|
-
<tr><td
|
82
|
-
<tr><td
|
83
|
-
<tr><td
|
84
|
-
<tr><td
|
85
|
-
<tr><td
|
86
|
-
<tr><td
|
87
|
-
<tr><td
|
88
|
-
<tr><td
|
89
|
-
<tr><td
|
90
|
-
<tr><td
|
91
|
-
<tr><td
|
92
|
-
<tr><td
|
93
|
-
<tr><td
|
94
|
-
<tr><td
|
95
|
-
<tr><td
|
96
|
-
<tr><td
|
97
|
-
<tr><td
|
98
|
-
<tr><td
|
99
|
-
<tr><td
|
100
|
-
<tr><td
|
101
|
-
<tr><td
|
102
|
-
<tr><td
|
103
|
-
<tr><td
|
104
|
-
<tr><td
|
105
|
-
<tr><td
|
106
|
-
<tr><td
|
107
|
-
<tr><td
|
108
|
-
<tr><td
|
109
|
-
<tr><td
|
110
|
-
<tr><td
|
111
|
-
<tr><td
|
112
|
-
<tr><td
|
113
|
-
<tr><td
|
114
|
-
<tr><td
|
115
|
-
<tr><td
|
116
|
-
<tr><td
|
117
|
-
<tr><td
|
118
|
-
<tr><td
|
119
|
-
<tr><td
|
120
|
-
<tr><td
|
121
|
-
<tr><td
|
122
|
-
<tr><td
|
123
|
-
<tr><td
|
124
|
-
<tr><td
|
125
|
-
<tr><td
|
126
|
-
<tr><td
|
127
|
-
<tr><td
|
128
|
-
<tr><td
|
129
|
-
<tr><td
|
130
|
-
<tr><td
|
131
|
-
<tr><td
|
132
|
-
<tr><td
|
133
|
-
<tr><td
|
134
|
-
<tr><td
|
135
|
-
<tr><td
|
136
|
-
<tr><td
|
137
|
-
<tr><td
|
138
|
-
<tr><td
|
139
|
-
<tr><td
|
140
|
-
<tr><td
|
141
|
-
<tr><td
|
142
|
-
<tr><td
|
143
|
-
<tr><td
|
144
|
-
<tr><td
|
145
|
-
<tr><td
|
146
|
-
<tr><td
|
147
|
-
<tr><td
|
148
|
-
<tr><td
|
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
|
-
|
171
|
+
$("#message").html("<p class='loading'>Refreshing property info and images from MLS...</p>");
|
234
172
|
$.ajax({
|
235
|
-
url: '/admin/
|
173
|
+
url: '/admin/properties/' + mls + '/refresh',
|
236
174
|
success: function(resp) {
|
237
|
-
if (resp.error)
|
238
|
-
if (resp.success)
|
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
|
-
<
|
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='
|
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
|
-
<
|
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
|
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
|
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='
|
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
|
15
|
+
$('#message').html("<p class='loading'>Importing property from MLS...</p>");
|
16
16
|
$.ajax({
|
17
17
|
url: '/admin/rets/import',
|
18
18
|
type: 'post',
|
data/lib/caboose_rets/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caboose-cms
|