caboose-rets 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGI3MmM1MmE3NzJjMzkxNzhiNmQwMDIyYTA0ZmE2MTk5ZTk5MjE4ZA==
4
+ MWEyN2JiOThmNWNkYWE2NTMxOTExOTgzNmZlM2ZlMDA0MjQxYWU1Mw==
5
5
  data.tar.gz: !binary |-
6
- NTZmNDhmMjUwNDQ3OGM2MTk1MmNiMzViYzlkZWQ1M2Y4YTcxNDllZA==
6
+ OGY1MzAzZWRiMjAwZjU5ZGIwNGNlMzA2ODFmNjdjN2QyMjE2MGJkMg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZWZlNTkxNmMxNzQyZjkwYzk5MDc1NGMzYTAwMzdlZGZkOGVjYTQwYmU2ZGI3
10
- NGRiMmMzMWNiNjVmMjdhNTMzMjJmMGY1MTE5ZDI4MTcxOTJhYWRkZGU5YmI5
11
- MzQ0NjEzMDEyOTQ2YmZhNWQ5OWQzMTBmY2Q3OTY5NjQ3MTdiMmM=
9
+ MzViZjUwNGY5ZjAzMzMyNjNhN2U2YzY1NmIzMmEzODY0MjAyMGFkYmRiMDRl
10
+ ZTZkM2RiZjkzZTE0ZmU0MjcxMWNjODVkNmQzMWU0YzVlY2Y4NDc3NjE4ODY0
11
+ OWJlZWY4Y2NmNDMxMDAzY2RmMzM5MmE2YWZiODFlODA0ZmJiNDA=
12
12
  data.tar.gz: !binary |-
13
- ZjQ0ODQ1MDY1MDU3MmM1YWYwZjFiYjRkMjg5ZTk3NTExODRjYWZlMDYyY2Iw
14
- Y2JmZTI3ZmU1M2NkMDBhYzZlNDQxNTUwYmNiYWVlNDFkYTk0OTRmMDAxMWM5
15
- MTkzZTQ1NjViOTJjYjgzNjE4ODNkMjE4MGRkYjczNzAwYmI1MGQ=
13
+ ZDlmZTQ0MWI3NjY0ZmY1NzJiNTRmYzUwMGZjODE2YzI2MmY4NDM3NWU5ODMy
14
+ YTRhNTQ4ZWU3ODU1YWQ0ZTg1MDE5M2JhMGQ0ZDI0OTQ3MGRkYjMwZDhlODY4
15
+ NDgyOWZlYTQ3ZTg3NTc2NGU3ODZhNzE4Y2JkYTg3NWVjODI5NTQ=
@@ -1,20 +1,27 @@
1
1
 
2
- var MediaController = function(mls_acct) { this.init(mls_acct); };
2
+ var MediaController = function(options) { this.init(options) };
3
3
 
4
4
  MediaController.prototype = {
5
-
5
+
6
+ cdn_domain: false,
7
+ s3_domain: false,
6
8
  mls_acct: false,
7
9
 
8
10
  s3_url: function(url)
9
11
  {
10
- return url.replace("d19w6hbyh7z79c.cloudfront.net/", "s3.amazonaws.com/advantagerealtygroup/");
12
+ if (!this.cnd_domain || !this.s3_domain)
13
+ return url;
14
+ return url.replace(this.cdn_domain, s3_domain);
11
15
  },
12
16
 
13
- init: function(mls_acct)
17
+ init: function(options)
14
18
  {
15
- this.mls_acct = mls_acct;
19
+ for (var thing in options)
20
+ this[thing] = options[thing];
21
+
16
22
  var that = this;
17
23
  this.image_add_form();
24
+ this.file_add_form();
18
25
  this.render_images(function() { that.sortable_images(); });
19
26
  this.render_files(function() { that.sortable_files(); });
20
27
  },
@@ -27,7 +34,7 @@ MediaController.prototype = {
27
34
  handle: '.sort_handle',
28
35
  update: function(e, ui) {
29
36
  $.ajax({
30
- url: '/admin/media/' + that.mls_acct + '/order',
37
+ url: '/admin/properties/' + that.mls_acct + '/media/order',
31
38
  type: 'put',
32
39
  data: $('#images').sortable('serialize', { key: 'sort[]' }),
33
40
  success: function(resp) {}
@@ -43,7 +50,7 @@ MediaController.prototype = {
43
50
  handle: '.sort_handle',
44
51
  update: function(e, ui) {
45
52
  $.ajax({
46
- url: '/admin/media/' + that.mls_acct + '/order',
53
+ url: '/admin/properties/' + that.mls_acct + '/media/order',
47
54
  type: 'put',
48
55
  data: $('#files').sortable('serialize', { key: 'sort[]' }),
49
56
  success: function(resp) {}
@@ -66,6 +73,7 @@ MediaController.prototype = {
66
73
  $('#image_' + media_id).empty().append(p);
67
74
  return;
68
75
  }
76
+ $('#image_' + media_id).empty().append($('<p/>').addClass('loading').html('Deleting image...'));
69
77
  $.ajax({
70
78
  url: '/admin/media/' + media_id,
71
79
  type: 'delete',
@@ -85,8 +93,8 @@ MediaController.prototype = {
85
93
  .append("Are you sure you want to delete the file? ")
86
94
  .append($('<input/>').attr('type', 'button').val('Yes').click(function() { that.delete_file(media_id, true); })).append(" ")
87
95
  .append($('<input/>').attr('type', 'button').val('No').click(function() { that.render_file(media_id); }));
88
- $('#image_' + media_id).attr('onclick','').unbind('click');
89
- $('#image_' + media_id).empty().append(p);
96
+ $('#file_' + media_id).attr('onclick','').unbind('click');
97
+ $('#file_' + media_id).empty().append(p);
90
98
  return;
91
99
  }
92
100
  $.ajax({
@@ -104,16 +112,17 @@ MediaController.prototype = {
104
112
 
105
113
  render_images: function(after)
106
114
  {
107
- $('#images').empty();
115
+ $('#images').empty().append($('<p/>').addClass('loading').html('Getting images...'));
108
116
  var that = this;
109
117
  $.ajax({
110
- url: '/admin/media/' + this.mls_acct + '/photos',
118
+ url: '/admin/properties/' + this.mls_acct + '/photos',
111
119
  success: function(media) {
112
- $(media).each(function(i,m) {
120
+ $('#images').empty();
121
+ $(media).each(function(i,m) {
113
122
  $('#images')
114
123
  .append($('<li/>')
115
124
  .attr('id', 'image_container_' + m.id)
116
- .append($('<a/>').attr('id', 'image_' + m.id + '_sort_handle' ).addClass('sort_handle' ).append($('<span/>').addClass('ui-icon ui-icon-arrow-2-n-s')))
125
+ .append($('<a/>').attr('id', 'image_' + m.id + '_sort_handle' ).addClass('sort_handle' ).append($('<span/>').addClass('ui-icon ui-icon-arrow-4')))
117
126
  .append($('<a/>').attr('id', 'image_' + m.id + '_delete_handle').addClass('delete_handle').append($('<span/>').addClass('ui-icon ui-icon-close')).click(function(e) { e.preventDefault(); that.delete_image(m.id); }))
118
127
  .append($('<div/>').attr('id', 'image_' + m.id).append($('<img/>').attr('src', that.s3_url(m.image.tiny_url) + '?' + Math.random()).attr('title', m.id + ' ' + m.image.file_name)))
119
128
  );
@@ -137,18 +146,21 @@ MediaController.prototype = {
137
146
 
138
147
  render_files: function(after)
139
148
  {
140
- $('#files').empty();
149
+ $('#files').empty().append($('<p/>').addClass('loading').html('Getting files...'));
141
150
  var that = this;
142
151
  $.ajax({
143
- url: '/admin/media/' + this.mls_acct + '/files',
152
+ url: '/admin/properties/' + this.mls_acct + '/files',
144
153
  success: function(media) {
154
+ $('#files').empty();
155
+ if (!media || media.length == 0)
156
+ $('#files').append($('<p/>').html('There are no files right now.'));
145
157
  $(media).each(function(i,m) {
146
158
  $('#files')
147
159
  .append($('<li/>')
148
160
  .attr('id', 'file_container_' + m.id)
149
161
  .append($('<a/>').attr('id', 'file_' + m.id + '_sort_handle' ).addClass('sort_handle' ).append($('<span/>').addClass('ui-icon ui-icon-arrow-2-n-s')))
150
162
  .append($('<a/>').attr('id', 'file_' + m.id + '_delete_handle').addClass('delete_handle').append($('<span/>').addClass('ui-icon ui-icon-close')).click(function(e) { e.preventDefault(); that.delete_file(m.id); }))
151
- .append($('<a/>').attr('id', 'file_' + m.id).attr('href', m.file.url).html(m.file.file_name))
163
+ .append($('<div/>').attr('id', 'file_' + m.id).append($('<a/>').attr('href', m.file.url).html(m.file.file_name)))
152
164
  );
153
165
  });
154
166
  if (after) after();
@@ -162,7 +174,7 @@ MediaController.prototype = {
162
174
  $.ajax({
163
175
  url: '/admin/media/' + media_id,
164
176
  success: function(m) {
165
- $('#file_' + m.id).attr('href', m.file.url).html(m.file.file_name);
177
+ $('#file_' + m.id).empty().append($('<a/>').attr('href', m.file.url).html(m.file.file_name));
166
178
  if (after) after();
167
179
  }
168
180
  });
@@ -173,25 +185,63 @@ MediaController.prototype = {
173
185
  var that = this;
174
186
  var form = $('<form/>')
175
187
  .attr('id', 'new_image_form')
176
- .attr('action', '/admin/media/' + this.mls_acct +'/photos')
188
+ .attr('action', '/admin/properties/' + this.mls_acct +'/photos')
177
189
  .attr('method', 'post')
178
190
  .attr('target', 'image_upload_iframe')
179
- .attr('enctype', 'multipart/form-data')
180
- .append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(this.auth_token))
181
- .append($('<input/>').attr('type', 'file').attr('name', 'image').change(function() {
182
- $('#new_image_form').submit();
183
- $('#new_image_form').hide();
184
- $('#new_image').append($('<p/>').addClass('loading').html("Adding image..."));
185
- }));
191
+ .attr('enctype', 'multipart/form-data')
192
+ .append($('<p/>')
193
+ .append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(this.auth_token))
194
+ .append($('<input/>').attr('type', 'button').val('Upload New Image').click(function() { $('#image').click(); }))
195
+ .append($('<input/>').attr('type', 'file').attr('id', 'image').attr('name', 'image')
196
+ .css({ visibility: 'hidden', width: 0, height: 0 })
197
+ .change(function() {
198
+ $('#new_image_form').submit();
199
+ $('#new_image_form').hide();
200
+ $('#new_image').append($('<p/>').addClass('loading').html("Adding image..."));
201
+ })
202
+ )
203
+ );
186
204
  $('#new_image').empty()
187
- .append(form)
188
- .append($('<iframe/>').attr('name', 'image_upload_iframe').css('display', 'none'));
205
+ .append(form)
206
+ .append($('<iframe/>').attr('name', 'image_upload_iframe').css({ visibility: 'hidden', width: 0, height: 0 }));
189
207
  },
190
208
 
191
209
  after_image_upload: function()
192
210
  {
193
211
  this.image_add_form();
194
212
  this.render_images();
195
- },
213
+ },
214
+
215
+ file_add_form: function()
216
+ {
217
+ var that = this;
218
+ var form = $('<form/>')
219
+ .attr('id', 'new_file_form')
220
+ .attr('action', '/admin/properties/' + this.mls_acct +'/files')
221
+ .attr('method', 'post')
222
+ .attr('target', 'file_upload_iframe')
223
+ .attr('enctype', 'multipart/form-data')
224
+ .append($('<p/>')
225
+ .append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(this.auth_token))
226
+ .append($('<input/>').attr('type', 'button').val('Upload New File').click(function() { $('#file').click(); }))
227
+ .append($('<input/>').attr('type', 'file').attr('id', 'file').attr('name', 'file')
228
+ .css({ visibility: 'hidden', width: 0, height: 0 })
229
+ .change(function() {
230
+ $('#new_file_form').submit();
231
+ $('#new_file_form').hide();
232
+ $('#new_file').append($('<p/>').addClass('loading').html("Adding file..."));
233
+ })
234
+ )
235
+ );
236
+ $('#new_file').empty()
237
+ .append(form)
238
+ .append($('<iframe/>').attr('name', 'file_upload_iframe').css({ visibility: 'hidden', width: 0, height: 0 }));
239
+ },
240
+
241
+ after_file_upload: function()
242
+ {
243
+ this.file_add_form();
244
+ this.render_files();
245
+ }
196
246
 
197
247
  };
@@ -19,10 +19,11 @@ module CabooseRets
19
19
  'address' => '',
20
20
  'status' => 'Active'
21
21
  },{
22
- 'model' => 'CabooseRets::CommercialProperty',
23
- 'sort' => 'mls_acct',
22
+ 'model' => 'CabooseRets::CommercialProperty',
23
+ 'sort' => 'current_price DESC, mls_acct',
24
24
  'desc' => false,
25
- 'base_url' => '/commercial',
25
+ 'skip' => ['status'],
26
+ 'base_url' => '/commercial/search',
26
27
  'items_per_page' => 10
27
28
  })
28
29
  @properties = @gen.items
@@ -59,9 +59,10 @@ module CabooseRets
59
59
  'zip' => ''
60
60
  },{
61
61
  'model' => 'CabooseRets::LandProperty',
62
- 'sort' => 'mls_acct',
62
+ 'sort' => 'current_price DESC, mls_acct',
63
63
  'desc' => false,
64
- 'base_url' => '/land',
64
+ 'skip' => ['status'],
65
+ 'base_url' => '/land/search',
65
66
  'items_per_page' => 10
66
67
  })
67
68
 
@@ -2,98 +2,37 @@
2
2
  module CabooseRets
3
3
  class MediaController < ApplicationController
4
4
 
5
- # GET /admin/media/:mls_acct
5
+ # GET /admin/media/:id
6
6
  def admin_index
7
+ return if !user_is_allowed('media', 'view')
8
+ m = Media.find(params[:id])
9
+ render :json => media_hash(m)
10
+ end
11
+
12
+ # GET /admin/properties/:mls_acct/media
13
+ def admin_property_media
7
14
  return if !user_is_allowed('media', 'view')
8
15
  @property = CabooseRets.get_property(params[:mls_acct])
9
16
  render :layout => 'caboose/admin'
10
17
  end
11
18
 
12
- # GET /admin/media/:mls_acct/photos
19
+ # GET /admin/properties/:mls_acct/photos
13
20
  def admin_photos
14
21
  return if !user_is_allowed('media', 'view')
15
22
  media = Media.where(:mls_acct => params[:mls_acct], :media_type => 'Photo').reorder(:media_order).all
16
- media2 = media.collect do |m|
17
- {
18
- :id => m.id,
19
- :date_modified => m.date_modified,
20
- :file_name => m.file_name,
21
- :media_id => m.media_id,
22
- :media_order => m.media_order,
23
- :media_remarks => m.media_remarks,
24
- :media_type => m.media_type,
25
- :mls_acct => m.mls_acct,
26
- :url => m.url,
27
- :image => {
28
- :file_name => m.image_file_name,
29
- :content_type => m.image_content_type,
30
- :file_size => m.image_file_size,
31
- :update_at => m.image_updated_at,
32
- :tiny_url => m.image.url(:tiny),
33
- :thumb_url => m.image.url(:thumb),
34
- :large_url => m.image.url(:large)
35
- },
36
- :file => {
37
- :file_name => m.file_file_name,
38
- :content_type => m.file_content_type,
39
- :file_size => m.file_file_size,
40
- :update_at => m.file_updated_at,
41
- :url => m.file.url
42
- }
43
- }
44
- end
23
+ media2 = media.collect { |m| media_hash(m) }
45
24
  render :json => media2
46
25
  end
47
26
 
48
- # GET /admin/media/:mls_acct/files
27
+ # GET /admin/properties/:mls_acct/files
49
28
  def admin_files
50
29
  return if !user_is_allowed('media', 'view')
51
30
  media = Media.where(:mls_acct => params[:mls_acct], :media_type => 'File').reorder(:media_order).all
52
- media2 = media.collect do |m|
53
- {
54
- :id => m.id,
55
- :date_modified => m.date_modified,
56
- :file_name => m.file_name,
57
- :media_id => m.media_id,
58
- :media_order => m.media_order,
59
- :media_remarks => m.media_remarks,
60
- :media_type => m.media_type,
61
- :mls_acct => m.mls_acct,
62
- :url => m.url,
63
- :image => {
64
- :file_name => m.image_file_name,
65
- :content_type => m.image_content_type,
66
- :file_size => m.image_file_size,
67
- :update_at => m.image_updated_at,
68
- :tiny_url => m.image.url(:tiny),
69
- :thumb_url => m.image.url(:thumb),
70
- :large_url => m.image.url(:large)
71
- },
72
- :file => {
73
- :file_name => m.file_file_name,
74
- :content_type => m.file_content_type,
75
- :file_size => m.file_file_size,
76
- :update_at => m.file_updated_at,
77
- :url => m.file.url
78
- }
79
- }
80
- end
31
+ media2 = media.collect { |m| media_hash(m) }
81
32
  render :json => media2
82
33
  end
83
-
84
- # GET /admin/media/:mls_acct/photos/new
85
- def admin_new_photo
86
- return if !user_is_allowed('media', 'edit')
87
- render :layout => 'caboose/admin'
88
- end
89
-
90
- # GET /admin/media/:mls_acct/files/new
91
- def admin_new_file
92
- return if !user_is_allowed('media', 'edit')
93
- render :layout => 'caboose/admin'
94
- end
95
-
96
- # POST /admin/media/:mls_acct/photos
34
+
35
+ # POST /admin/properties/:mls_acct/photos
97
36
  def admin_add_photo
98
37
  return if !user_is_allowed('media', 'edit')
99
38
 
@@ -112,22 +51,25 @@ module CabooseRets
112
51
  render :text => "<script type='text/javascript'>parent.controller.after_image_upload();</script>"
113
52
  end
114
53
 
115
- # POST /admin/media/:msl_acct/files
54
+ # POST /admin/properties/:msl_acct/files
116
55
  def admin_add_file
117
- return if !user_is_allowed('media', 'edit')
56
+ return if !user_is_allowed('media', 'edit')
57
+
58
+ x = Media.maximum(:media_order, :conditions => {:mls_acct => params[:mls_acct]})
59
+ x = 0 if x.nil?
118
60
 
119
61
  m = Media.new
120
62
  m.id = Media.maximum(:id) + 1
121
63
  m.mls_acct = params[:mls_acct]
122
64
  m.date_modified = DateTime.now
123
- m.media_order = Media.maximum(:media_order, :conditions => [:mls_acct => params[:mls_acct]]) + 1
65
+ m.media_order = x + 1
124
66
  m.media_type = 'File'
125
67
  m.file = params[:file]
126
68
  m.save
127
69
 
128
70
  render :text => "<script type='text/javascript'>parent.controller.after_file_upload();</script>"
129
71
  end
130
-
72
+
131
73
  # DELETE /admin/media/:id
132
74
  def admin_delete
133
75
  return if !user_is_allowed('media', 'delete')
@@ -135,12 +77,44 @@ module CabooseRets
135
77
  render :json => true
136
78
  end
137
79
 
138
- # PUT /admin/media/:mls_acct/order
80
+ # PUT /admin/properties/:mls_acct/media/order
139
81
  def admin_update_order
140
82
  return if !user_is_allowed('media', 'delete')
141
83
  Media.reorder(params[:sort], "advantagerealtygroup")
142
84
  render :json => true
143
85
  end
86
+
87
+ private
88
+
89
+ def media_hash(m)
90
+ {
91
+ :id => m.id,
92
+ :date_modified => m.date_modified,
93
+ :file_name => m.file_name,
94
+ :media_id => m.media_id,
95
+ :media_order => m.media_order,
96
+ :media_remarks => m.media_remarks,
97
+ :media_type => m.media_type,
98
+ :mls_acct => m.mls_acct,
99
+ :url => m.url,
100
+ :image => {
101
+ :file_name => m.image_file_name,
102
+ :content_type => m.image_content_type,
103
+ :file_size => m.image_file_size,
104
+ :update_at => m.image_updated_at,
105
+ :tiny_url => m.image.url(:tiny),
106
+ :thumb_url => m.image.url(:thumb),
107
+ :large_url => m.image.url(:large)
108
+ },
109
+ :file => {
110
+ :file_name => m.file_file_name,
111
+ :content_type => m.file_content_type,
112
+ :file_size => m.file_file_size,
113
+ :update_at => m.file_updated_at,
114
+ :url => m.file.url
115
+ }
116
+ }
117
+ end
144
118
 
145
119
  end
146
120
  end
@@ -41,10 +41,11 @@ module CabooseRets
41
41
  'date_modified_lte' => '',
42
42
  'status' => 'Active'
43
43
  },{
44
- 'model' => 'CabooseRets::MultiFamilyProperty',
45
- 'sort' => 'current_price ASC, mls_acct',
44
+ 'model' => 'CabooseRets::MultiFamilyProperty',
45
+ 'sort' => 'current_price DESC, mls_acct',
46
46
  'desc' => false,
47
- 'base_url' => '/multi-family',
47
+ 'skip' => ['status'],
48
+ 'base_url' => '/multi-family/search',
48
49
  'items_per_page' => 10
49
50
  })
50
51
  @properties = @gen.items
@@ -42,9 +42,10 @@ module CabooseRets
42
42
  'status' => 'Active'
43
43
  },{
44
44
  'model' => 'CabooseRets::ResidentialProperty',
45
- 'sort' => 'current_price ASC, mls_acct',
45
+ 'sort' => 'current_price DESC, mls_acct',
46
46
  'desc' => false,
47
- 'base_url' => '/residential',
47
+ 'skip' => ['status'],
48
+ 'base_url' => '/residential/search',
48
49
  'items_per_page' => 10
49
50
  })
50
51
 
@@ -45,7 +45,7 @@ class CabooseRets::Media < ActiveRecord::Base
45
45
  media_ids.each do |id|
46
46
  m = CabooseRets::Media.find(id)
47
47
  (m.image.styles.keys+[:original]).each { |style| b.objects[m.image.path(style)].rename_to "#{m.image.path(style)}.temp" } if m.image
48
- #(m.file.styles.keys+[:original]).each { |style| b.objects[m.file.path(style) ].rename_to "#{m.file.path(style)}.temp" } if m.file
48
+ (m.file.styles.keys+[:original]).each { |style| b.objects[m.file.path(style) ].rename_to "#{m.file.path(style)}.temp" } if m.file
49
49
  end
50
50
 
51
51
  # Rename the assets to their new names
@@ -53,10 +53,10 @@ class CabooseRets::Media < ActiveRecord::Base
53
53
  media_ids.each do |id|
54
54
  m = CabooseRets::Media.find(id)
55
55
  orig_image_name = m.image ? "#{m.image.path}.temp" : nil
56
- #orig_file_name = m.file ? "#{m.image.path}.temp" : nil
56
+ orig_file_name = m.file ? "#{m.image.path}.temp" : nil
57
57
  m.media_order = i
58
58
  (m.image.styles.keys+[:original]).each { |style| b.objects[orig_image_name.gsub("original", style.to_s)].rename_to m.image.path(style) } if m.image
59
- #(m.file.styles.keys+[:original]).each { |style| b.objects[orig_file_name.gsub( "original", style.to_s)].rename_to m.file.path(style) } if m.file
59
+ (m.file.styles.keys+[:original]).each { |style| b.objects[orig_file_name.gsub( "original", style.to_s)].rename_to m.file.path(style) } if m.file
60
60
  m.save
61
61
  i = i + 1
62
62
  end
@@ -14,7 +14,14 @@
14
14
  <style type="text/css">
15
15
 
16
16
  #images { width: 100%; list-style: none; margin: 0; padding: 0; }
17
- #images li { background: #fff; position: relative; margin: 3px; padding: 4px; border: 1px solid gray; list-style: none; float: left; }
17
+ #images li { background: #fff; position: relative; margin: 3px; padding: 4px; border: 1px solid gray; list-style: none; float: left; min-height: 140px; min-width: 100px; }
18
+ #images li .sort_handle { float: left; }
19
+ #images li .delete_handle { float: right; }
20
+
21
+ #files { width: 100%; list-style: none; margin: 0; padding: 0; }
22
+ #files li { background: #fff; position: relative; margin: 3px; padding: 4px; border: 1px solid gray; list-style: none; min-height: 20px; }
23
+ #files li .sort_handle { float: left; margin-right: 4px; }
24
+ #files li .delete_handle { float: right; }
18
25
 
19
26
  </style>
20
27
  <% end %>
@@ -24,7 +31,12 @@
24
31
 
25
32
  var controller = false;
26
33
  $(document).ready(function() {
27
- controller = new MediaController(<%= @property.mls_acct %>);
34
+ controller = new MediaController({
35
+ mls_acct: <%= @property.mls_acct %>,
36
+ auth_token: "<%= raw form_authenticity_token %>",
37
+ cdn_domain: "d19w6hbyh7z79c.cloudfront.net",
38
+ s3_domain: "s3.amazonaws.com/advantagerealtygroup"
39
+ });
28
40
  });
29
41
 
30
42
  </script>
data/config/routes.rb CHANGED
@@ -24,9 +24,10 @@ CabooseRets::Engine.routes.draw do
24
24
  get "admin/offices/:id" => "offices#admin_edit"
25
25
  get "admin/offices/:id/refresh" => "offices#admin_refresh"
26
26
 
27
- get "commercial" => "commercial#index"
27
+ get "commercial/search:search_params" => "commercial#index", :constraints => {:search_params => /.*/}
28
28
  get "commercial/:mls_acct/details" => "commercial#details"
29
29
  get "commercial/:mls_acct" => "commercial#details"
30
+ get "commercial" => "commercial#index"
30
31
  get "admin/commercial/new" => "commercial#admin_new"
31
32
  post "admin/commercial" => "commercial#admin_add"
32
33
  get "admin/commercial" => "commercial#admin_index"
@@ -35,27 +36,30 @@ CabooseRets::Engine.routes.draw do
35
36
  put "admin/commercial/:mls_acct" => "commercial#admin_update"
36
37
  post "admin/commercial/:mls_acct" => "commercial#admin_update"
37
38
 
38
- get "residential" => "residential#index"
39
+ get "residential/search:search_params" => "residential#index", :constraints => {:search_params => /.*/}
39
40
  get "residential/:mls_acct/details" => "residential#details"
40
41
  get "residential/:mls_acct" => "residential#details"
42
+ get "residential" => "residential#index"
41
43
  get "admin/residential" => "residential#admin_index"
42
44
  get "admin/residential/:mls_acct/edit" => "residential#admin_edit"
43
45
  get "admin/residential/:mls_acct/refresh" => "residential#admin_refresh"
44
46
  put "admin/residential/:mls_acct" => "residential#admin_update"
45
47
  post "admin/residential/:mls_acct" => "residential#admin_update"
46
48
 
47
- get "land" => "land#index"
49
+ get "land/search:search_params" => "land#index", :constraints => {:search_params => /.*/}
48
50
  get "land/:mls_acct/details" => "land#details"
49
- get "land/:mls_acct" => "land#details"
51
+ get "land/:mls_acct" => "land#details"
52
+ get "land" => "land#index"
50
53
  get "admin/land" => "land#admin_index"
51
54
  get "admin/land/:mls_acct/edit" => "land#admin_edit"
52
55
  get "admin/land/:mls_acct/refresh" => "land#admin_refresh"
53
56
  put "admin/land/:mls_acct" => "land#admin_update"
54
57
  post "admin/land/:mls_acct" => "land#admin_update"
55
58
 
56
- get "multi-family" => "multi_family#index"
59
+ get "multi-family/search:search_params" => "multi_family#index", :constraints => {:search_params => /.*/}
57
60
  get "multi-family/:mls_acct/details" => "multi_family#details"
58
- get "multi-family/:mls_acct" => "multi_family#details"
61
+ get "multi-family/:mls_acct" => "multi_family#details"
62
+ get "multi-family" => "multi_family#index"
59
63
  get "admin/multi-family" => "multi_family#admin_index"
60
64
  get "admin/multi-family/:mls_acct/edit" => "multi_family#admin_edit"
61
65
  get "admin/multi-family/:mls_acct/refresh" => "multi_family#admin_refresh"
@@ -74,15 +78,23 @@ CabooseRets::Engine.routes.draw do
74
78
  post "saved-properties" => "saved_properties#add"
75
79
  delete "saved-properties/:mls_acct" => "saved_properties#delete"
76
80
 
77
- get "admin/media/:mls_acct/photos/new" => "media#admin_new_photo"
78
- get "admin/media/:mls_acct/files/new" => "media#admin_new_file"
79
- get "admin/media/:mls_acct/photos" => "media#admin_photos"
80
- get "admin/media/:mls_acct/files" => "media#admin_files"
81
- get "admin/media/:mls_acct" => "media#admin_index"
82
- put "admin/media/:mls_acct/order" => "media#admin_update_order"
83
- post "admin/media/:mls_acct/photos" => "media#admin_add_photo"
84
- post "admin/media/:mls_acct/files" => "media#admin_add_file"
85
- delete "admin/media/:id" => "media#admin_delete"
86
-
81
+ #get "admin/media/:mls_acct/photos/new" => "media#admin_new_photo"
82
+ #get "admin/media/:mls_acct/files/new" => "media#admin_new_file"
83
+ #get "admin/media/:mls_acct/photos" => "media#admin_photos"
84
+ #get "admin/media/:mls_acct/files" => "media#admin_files"
85
+ #get "admin/media/:mls_acct" => "media#admin_index"
86
+ #put "admin/media/:mls_acct/order" => "media#admin_update_order"
87
+ #post "admin/media/:mls_acct/photos" => "media#admin_add_photo"
88
+ #post "admin/media/:mls_acct/files" => "media#admin_add_file"
89
+ #delete "admin/media/:id" => "media#admin_delete"
90
+
91
+ get "admin/properties/:mls_acct/photos" => "media#admin_photos"
92
+ get "admin/properties/:mls_acct/files" => "media#admin_files"
93
+ get "admin/properties/:mls_acct/media" => "media#admin_property_media"
94
+ put "admin/properties/:mls_acct/media/order" => "media#admin_update_order"
95
+ post "admin/properties/:mls_acct/photos" => "media#admin_add_photo"
96
+ post "admin/properties/:mls_acct/files" => "media#admin_add_file"
97
+ get "admin/media/:id" => "media#admin_index"
98
+ delete "admin/media/:id" => "media#admin_delete"
87
99
 
88
100
  end
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.0.25'
2
+ VERSION = '0.0.26'
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.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms
@@ -74,8 +74,7 @@ files:
74
74
  - app/views/caboose_rets/commercial/index.html.erb
75
75
  - app/views/caboose_rets/land/admin_edit.html.erb
76
76
  - app/views/caboose_rets/land/admin_index.html.erb
77
- - app/views/caboose_rets/media/admin_edit.html.erb
78
- - app/views/caboose_rets/media/admin_index.html.erb
77
+ - app/views/caboose_rets/media/admin_property_media.html.erb
79
78
  - app/views/caboose_rets/multi_family/admin_edit.html.erb
80
79
  - app/views/caboose_rets/multi_family/admin_index.html.erb
81
80
  - app/views/caboose_rets/offices/admin_edit.html.erb
@@ -1,245 +0,0 @@
1
- <%
2
- p = @property
3
- %>
4
- <h1>Edit Residential Property</h1>
5
-
6
- <p>
7
- <input type='button' value='< Back' onclick="window.location='/admin/residential';" />
8
- <input type='button' value='Manually Refresh from MLS' onclick="refresh_property_from_mls('<%= p.mls_acct %>');" />
9
- </p>
10
- <div id='message'><%= raw flash[:message] ? flash[:message] : "" %></div>
11
-
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_acct </td><td><%= p.mls_acct %></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>
225
- </table><br />
226
-
227
- <% content_for :caboose_js do %>
228
- <%= javascript_include_tag "caboose/model/all" %>
229
- <%= javascript_include_tag "caboose_rets/admin_media" %>
230
- <script type='text/javascript'>
231
-
232
- function refresh_property_from_mls(mls_acct)
233
- {
234
- modal.autosize("<p class='loading'>Refreshing property info and images from MLS...</p>");
235
- $.ajax({
236
- url: '/admin/residential/' + mls_acct + '/refresh',
237
- success: function(resp) {
238
- if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
239
- if (resp.success) modal.autosize("<p class='note success'>" + resp.success + "</p>");
240
- }
241
- });
242
- }
243
-
244
- </script>
245
- <% end %>