caboose-rets 0.0.39 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWFlMzdjNzVlNmVhOWI4MWI4OTc2ZmNhNTAyNmE0ZTdkMmU3MjllYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTJkMTUyNTU4MjQxYjUyMGMyMTVmZmVlOGQ2ZGQ2YjhmMGRhYTBjMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Mzk1ODJkMjljZTQ3MGM1ODJjY2Q1OTY2YjUyNDQ2Zjk1MmYxYTZhNmQzNTc3
|
10
|
+
Y2Q0ODE2ZTdmYTA3ZDAzMWU1NmQ0MGJhYWQwZWZjMzcyMTQ0MDFmMDY2ZTBk
|
11
|
+
ODA3ODAwYzk5ZjBkZWVkYzBhNDk5YTg2ZjQwOWY5YzUxNzU0MDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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 %>
|
data/config/routes.rb
CHANGED
@@ -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
|
20
|
-
|
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"
|
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.0.
|
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-
|
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
|