caboose-rets 0.0.39 → 0.0.40

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
- ZGQyNGQyMjM0NDUxMzM3MWRlMjQzMjAwNzliYTU2YTNkNjNiZmJhZQ==
4
+ YWFlMzdjNzVlNmVhOWI4MWI4OTc2ZmNhNTAyNmE0ZTdkMmU3MjllYw==
5
5
  data.tar.gz: !binary |-
6
- YzMxMDUwZDkyNWQ5NTdmZTUwOGU1MGY5ZjZkNWRlY2M2ZWFmMzE2OQ==
6
+ NTJkMTUyNTU4MjQxYjUyMGMyMTVmZmVlOGQ2ZGQ2YjhmMGRhYTBjMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NjQwMzRkMWEzMDI4YTg1ZWU0YmQ1MjkzYWMxYTc1NWUzMzYzZDc3ZjU0YmZm
10
- NmIzZTRhNzQ3MTgxMGZlZGUwN2VhZDY4NzFmNDBkODA0ZTYyOWU3YTk3ODQ1
11
- NGNiODBiNTNlNTM0OTc2OTE4YTU3NzIyM2VmZjI0ZDAyNWY5ODc=
9
+ Mzk1ODJkMjljZTQ3MGM1ODJjY2Q1OTY2YjUyNDQ2Zjk1MmYxYTZhNmQzNTc3
10
+ Y2Q0ODE2ZTdmYTA3ZDAzMWU1NmQ0MGJhYWQwZWZjMzcyMTQ0MDFmMDY2ZTBk
11
+ ODA3ODAwYzk5ZjBkZWVkYzBhNDk5YTg2ZjQwOWY5YzUxNzU0MDE=
12
12
  data.tar.gz: !binary |-
13
- MTU5MjZkNmNkN2YzYzlhNjRkMzQ5OGUwNjMzZjhlYjFjMjFhOWU1MTg3N2E3
14
- YjEwNzlhMTY5ZTg4N2MyYzQxOWY4OGUwM2I4NzBkMDk1NTZhYWQyZjlkMzMz
15
- YmM1NDI2M2E2MmM5NjI3MTQ5YjRhN2M3MTQ0ZDg4MmMzMGIyNDg=
13
+ NTdkNTVmYTEzODU5Mzg5MGYzZTU5MGViY2U3MDZmNWE5NGEyODE1NTEzM2Ey
14
+ MDk5YTAyMWJmZGUyOWRhMjc5YjI0YTU2MTY4ODQxN2U0Y2ZmMDE3NzBiNzk0
15
+ NjgyMjJlZmMzNTY0Zjc3ZTE3NDM4MzkxNTYxMmMxNGYzYjBhNzk=
@@ -12,6 +12,19 @@ module CabooseRets
12
12
  def details
13
13
  @open_houses = OpenHouse.find(params[:id])
14
14
  end
15
-
15
+
16
+ # get /admin/open-houses
17
+ def admin_index
18
+ render :layout => 'caboose/admin'
19
+ end
20
+
21
+ # get /admin/open-houses/refresh
22
+ def admin_refresh
23
+ RetsImporter.import_modified_after(DateTime.parse(1.month.ago.strftime('%F %T')), 'OpenHouse' , 'OPH')
24
+ resp = Caboose::StdClass.new
25
+ resp.success = "The open houses have been refreshed successfully."
26
+ render :json => resp
27
+ end
28
+
16
29
  end
17
30
  end
@@ -0,0 +1,24 @@
1
+
2
+ <h1>Open Houses</h1>
3
+ <p><input type='button' value='Refresh Open Houses' onclick='refresh_open_house();' /></p>
4
+ <div id='message'></div>
5
+
6
+ <% content_for :caboose_js do %>
7
+ <%= javascript_include_tag "caboose/model/all" %>
8
+ <script type='text/javascript'>
9
+
10
+ function refresh_open_house()
11
+ {
12
+ $('#message').html("<p class='loading'>Refreshing open houses...</p>");
13
+ $.ajax({
14
+ url: '/admin/open-houses/refresh',
15
+ type: 'get',
16
+ success: function(resp) {
17
+ if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
18
+ if (resp.success) $('#message').html("<p class='note success'>" + resp.success + "</p>");
19
+ }
20
+ });
21
+ }
22
+
23
+ </script>
24
+ <% end %>
@@ -16,8 +16,8 @@ CabooseRets::Engine.routes.draw do
16
16
 
17
17
  get "open-houses" => "open_houses#index"
18
18
  get "open-houses/:id" => "open_houses#details"
19
- get "admin/open-houses/new" => "open_houses#admin_new"
20
- post "admin/open-houses" => "open_houses#admin_add"
19
+ get "admin/open-houses" => "open_houses#admin_index"
20
+ get "admin/open-houses/refresh" => "open_houses#admin_refresh"
21
21
 
22
22
  get "admin/offices/options" => "offices#admin_options"
23
23
  get "admin/offices" => "offices#admin_index"
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.0.39'
2
+ VERSION = '0.0.40'
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.39
4
+ version: 0.0.40
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-05-18 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms
@@ -79,6 +79,7 @@ files:
79
79
  - app/views/caboose_rets/multi_family/admin_index.html.erb
80
80
  - app/views/caboose_rets/offices/admin_edit.html.erb
81
81
  - app/views/caboose_rets/offices/admin_index.html.erb
82
+ - app/views/caboose_rets/open_houses/admin_index.html.erb
82
83
  - app/views/caboose_rets/open_houses/admin_new.html.erb
83
84
  - app/views/caboose_rets/residential/_search_form.html.erb
84
85
  - app/views/caboose_rets/residential/admin_edit.html.erb