caboose-rets 0.1.28 → 0.1.29
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 +1 -0
- data/lib/caboose_rets/version.rb +1 -1
- metadata +1 -5
- data/app/views/caboose/blocks/_rets_agent_details.html.erb +0 -88
- data/app/views/caboose/blocks/_rets_agent_listings.html.erb +0 -122
- data/app/views/caboose/blocks/_rets_agents_index.html.erb +0 -51
- data/app/views/caboose/blocks/_rets_savedproperties_index.html.erb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc4120a3dac2c110af9699822e797bb84a7c8b76
|
4
|
+
data.tar.gz: 77a150147f86a51163a4e4a1044023f5dbe4aa8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44190ca24b48f9640c79272ba969973acd39a303dbd340d8aaee36de3e76484a0d8c2c854990f19ee0c4c60528793de5916a1861b0d7398978db6c784a35a982
|
7
|
+
data.tar.gz: 2ca6eb43b5a4e5a3cd5c42d6d72af6699c5c7618f3bb408f91cac8adc2bbefe4c3b5acff872a32ea51e9287ab5146bbfb60b3c55a5fcaf6b5776a492438564e7
|
@@ -10,6 +10,7 @@ module CabooseRets
|
|
10
10
|
# @route GET /agents/:mls_id
|
11
11
|
def details
|
12
12
|
@agent = Agent.where(:mls_id => params[:mls_id]).first
|
13
|
+
@listings = Property.where(:list_agent_mls_id => @agent.mls_id).all
|
13
14
|
end
|
14
15
|
|
15
16
|
#=============================================================================
|
data/lib/caboose_rets/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
@@ -63,10 +63,6 @@ files:
|
|
63
63
|
- app/models/caboose_rets/schema_past.rb
|
64
64
|
- app/models/caboose_rets/search_option.rb
|
65
65
|
- app/views/caboose/blocks/_layout_rets.html.erb
|
66
|
-
- app/views/caboose/blocks/_rets_agent_details.html.erb
|
67
|
-
- app/views/caboose/blocks/_rets_agent_listings.html.erb
|
68
|
-
- app/views/caboose/blocks/_rets_agents_index.html.erb
|
69
|
-
- app/views/caboose/blocks/_rets_savedproperties_index.html.erb
|
70
66
|
- app/views/caboose_rets/agents/admin_edit.html.erb
|
71
67
|
- app/views/caboose_rets/agents/admin_edit_sort.html.erb
|
72
68
|
- app/views/caboose_rets/agents/admin_index.html.erb
|
@@ -1,88 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
if @agent
|
3
|
-
@page.title = "#{@agent.first_name} #{@agent.last_name}"
|
4
|
-
end
|
5
|
-
@agents = CabooseRets::Agent.where("lo_code = ? and hide = false", '46').reorder("last_name, first_name").all
|
6
|
-
%>
|
7
|
-
<style>
|
8
|
-
.assistant_name { font-size: 0.9em; margin-left: 10px; }
|
9
|
-
.sidebar-body p { margin-bottom: 10px !important; }
|
10
|
-
</style>
|
11
|
-
|
12
|
-
<div class="l-wrapper">
|
13
|
-
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
14
|
-
<div class="sidebar-aside">
|
15
|
-
<h3>Meet Our Agents</h3>
|
16
|
-
|
17
|
-
<select class="h-conceal-tenor-baritone h-space-mbm" onchange="location=this.options[this.selectedIndex].value;">
|
18
|
-
<% @agents.each do |a| %>
|
19
|
-
<% next if !a.assistant_to.nil? && a.assistant_to.length > 0 %>
|
20
|
-
<option class="agent_name" value="/agents/<%= a.la_code %>/listings">
|
21
|
-
<%= a.designation if a.designation? %> <%= a.first_name %> <%= a.last_name %>
|
22
|
-
</option>
|
23
|
-
<% end %>
|
24
|
-
</select>
|
25
|
-
|
26
|
-
<ul class="h-reveal-tenor-baritone">
|
27
|
-
<li><a href="/agents/048540000">Richard Ellis, Jr.</a>
|
28
|
-
</li>
|
29
|
-
<% @agents.each do |a| %>
|
30
|
-
<% next if !a.assistant_to.nil? && a.assistant_to.length > 0 %>
|
31
|
-
<% next if a.la_code == '048540000' %>
|
32
|
-
<li class="agent_name"><a class="agent_name" href="/agents/<%= a.la_code %>"><%= a.first_name %> <%= a.last_name %></a>
|
33
|
-
<% if a.assistants %><ul class='assistants'><% a.assistants.each do |a2| %><li><%= a2.first_name %> <%= a2.last_name %></li><% end %></ul><% end %>
|
34
|
-
</li>
|
35
|
-
<% end %>
|
36
|
-
</ul>
|
37
|
-
</div> <!-- .sidebar-aside -->
|
38
|
-
|
39
|
-
<div class="sidebar-body">
|
40
|
-
<% if !@agent.hide && (@agent.lo_code == '46' || @agent.lo_code == 'SPACES') %>
|
41
|
-
<div class="l-media">
|
42
|
-
<figure class="media-aside"><img src="<%= @agent.image_url(:thumb) %>?<%= DateTime.now.strftime('%F') %>" width="150" /></figure>
|
43
|
-
<div class="media-body">
|
44
|
-
<h4 class="agent_name"><%= @agent.first_name %> <%= @agent.last_name %></h4>
|
45
|
-
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
46
|
-
<ul>
|
47
|
-
<% if @agent.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></li><% end %>
|
48
|
-
<% if @agent.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></li><% end %>
|
49
|
-
<% if @agent.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></li><% end %>
|
50
|
-
<% if @agent.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></li><% end %>
|
51
|
-
</ul>
|
52
|
-
<% else %><%= raw @agent.contact_info %><% end %>
|
53
|
-
<p class="h-space-mvs"><a class="m-btn-red" href="/agents/<%= @agent.la_code %>/listings">See My Listings</a></p>
|
54
|
-
</div>
|
55
|
-
</div> <!-- .l-media -->
|
56
|
-
<article class="h-space-mtm"><%= raw @agent.bio %></article>
|
57
|
-
<% if @agent.assistants %>
|
58
|
-
<% @agent.assistants.each do |a| %>
|
59
|
-
<hr style='height: 1px; border: 0; background: #ccc;' />
|
60
|
-
<img src="<%= a.image_url(:thumb) %>?<%= DateTime.now.strftime('%F') %>" width="150" style='float: right; margin-left: 10px;' />
|
61
|
-
<h4 class="agent_name"><%= a.first_name %> <%= a.last_name %></h4>
|
62
|
-
|
63
|
-
<% if a.contact_info.nil? || a.contact_info.strip.length == 0 %>
|
64
|
-
<ul>
|
65
|
-
<% if a.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= a.office_phone %>"><%= a.office_phone %></a></li><% end %>
|
66
|
-
<% if a.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= a.car_phone %>"><%= a.car_phone %></a></li><% end %>
|
67
|
-
<% if a.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= a.home_phone %>"><%= a.home_phone %></a></li><% end %>
|
68
|
-
<% if a.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= a.member_email %>"><%= a.member_email %></a></li><% end %>
|
69
|
-
</ul>
|
70
|
-
<% else %><%= raw a.contact_info %><% end %>
|
71
|
-
<% if a.bio && a.bio.length > 0 %><article class="h-space-mtm"><%= raw a.bio %></article><% end %>
|
72
|
-
<br style="clear: left;" />
|
73
|
-
<% end %>
|
74
|
-
<% end %>
|
75
|
-
<% else %>
|
76
|
-
<p class='note error'>No Advantage Realty agent with that agent code exists.</p>
|
77
|
-
<% end %>
|
78
|
-
</div> <!-- .sidebar-body -->
|
79
|
-
</div>
|
80
|
-
</div> <!-- .l-wrapper -->
|
81
|
-
|
82
|
-
<%= content_for :css do %>
|
83
|
-
<style type='text/css'>
|
84
|
-
|
85
|
-
ul.assistants li { margin-left: 10px; }
|
86
|
-
|
87
|
-
</style>
|
88
|
-
<% end %>
|
@@ -1,122 +0,0 @@
|
|
1
|
-
<style type="text/css">
|
2
|
-
#recaptcha_area, #recaptcha_table {width: auto !important;}
|
3
|
-
#recaptcha_image {width: 175px !important;}
|
4
|
-
#recaptcha_image img{width:100% !important;padding: 0px;}
|
5
|
-
fieldset.captcha{width:157px !important;}
|
6
|
-
#recaptcha_image {width:157px !important;}
|
7
|
-
#recaptcha_container {margin: 0px;padding: 0px;width: 157px !important;}
|
8
|
-
input#recaptcha_response_field{padding:0px;}
|
9
|
-
</style>
|
10
|
-
|
11
|
-
<div class="l-wrapper">
|
12
|
-
<div class="l-sidebar inflate-bass h-space-ptm">
|
13
|
-
<div class="sidebar-aside"><a class="m-btn btn-red" href="/agents">Back to Agents</a></div>
|
14
|
-
<div class="sidebar-body">
|
15
|
-
<% if !@agent.hide && (@agent.lo_code == '46' || @agent.lo_code == 'SPACES') %>
|
16
|
-
<h3><%= @agent.first_name %> <%= @agent.last_name %></h3>
|
17
|
-
<% else %>
|
18
|
-
<p class='note error'>No Advantage Realty agent with that agent code exists.</p>
|
19
|
-
<p> </p>
|
20
|
-
<p> </p>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
</div> <!-- .l-sidebar -->
|
24
|
-
</div> <!-- .l-wrapper -->
|
25
|
-
|
26
|
-
<% if !@agent.hide && (@agent.lo_code == '46' || @agent.lo_code == 'SPACES') %>
|
27
|
-
<div class="l-wrapper">
|
28
|
-
<div class="body-section">
|
29
|
-
<div class="l-sidebar inflate-bass sidebar-border h-space-pbm">
|
30
|
-
<div class="sidebar-aside">
|
31
|
-
<figure class="h-space-mvm"><img src="<%= @agent.image_url(:large) %>?<%= DateTime.now.strftime('%F') %>" width="150" class="h-border" /></figure>
|
32
|
-
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
33
|
-
<% if @agent.office_phone.strip.length > 0 %><p><small><strong>Work Phone: </strong></small> <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></p><% end %>
|
34
|
-
<% if @agent.car_phone.strip.length > 0 %><p><small><strong>Cell Phone: </strong></small> <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></p><% end %>
|
35
|
-
<% if @agent.home_phone.strip.length > 0 %><p><small><strong>Home Phone: </strong> </small><a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></p><% end %>
|
36
|
-
<% if @agent.member_email.strip.length > 0 %><p><small><strong>Email: </strong> </small><a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></p><% end %>
|
37
|
-
<% else %>
|
38
|
-
<%= raw @agent.contact_info %>
|
39
|
-
<% end %>
|
40
|
-
<hr />
|
41
|
-
<h4><i class="m-icon-contact"></i> Contact Agent</h4>
|
42
|
-
<form action="/contact/create" method="post" class="m-form h-space-pbm">
|
43
|
-
<input type='hidden' name='la_code' value="<%= @agent.la_code %>" />
|
44
|
-
<input type='text' placeholder="Full Name" name='contact_name' id="contact_name" maxlength="150" />
|
45
|
-
<input type='text' placeholder="Email" name='contact_address' id="contact_address" maxlength="150" />
|
46
|
-
<textarea name="contact_message" id="contact_message" placeholder="Message" cols="50" rows="4" class="contact_message"></textarea>
|
47
|
-
<%= recaptcha_tags :noscript => false %>
|
48
|
-
<input class="m-btn btn-right btn-red h-space-mts" type="submit" value="submit">
|
49
|
-
</form>
|
50
|
-
</div> <!-- .sidebar-aside -->
|
51
|
-
<div class="sidebar-body">
|
52
|
-
<article><%= raw @agent.bio %></article>
|
53
|
-
<hr />
|
54
|
-
|
55
|
-
<% @property_groups.select{ |pg| !pg[:properties].empty? }.each do |pg| %>
|
56
|
-
<h4><%= pg[:title] %></h4>
|
57
|
-
<ul class="m-list-border">
|
58
|
-
<% pg[:properties].each do |l| %>
|
59
|
-
<li class="l-media inflate-bass center-on-mobile">
|
60
|
-
<figure class="media-aside">
|
61
|
-
<a href="/<%= pg[:url_prefix] %>/<%= l.mls %>/details"><img src='<%= l.images && l.images.count > 0 ? l.images[0].image_url(:thumb) : "" %>'class="h-border" width="150" /></a>
|
62
|
-
</figure>
|
63
|
-
<div class="media-body h-pos">
|
64
|
-
<p class="pos-top-right h-type-highlight"><strong>MLS#<%=l.mls%></strong></p>
|
65
|
-
|
66
|
-
<% if l.street_num != '0' && l.street_name != "" %>
|
67
|
-
|
68
|
-
<h5>
|
69
|
-
<% if l.unit_num != "" %>
|
70
|
-
Unit <%= l.unit_num %>,
|
71
|
-
<% end %>
|
72
|
-
<%=l.street_num%> <%=l.street_name.titleize %>
|
73
|
-
</h5>
|
74
|
-
<% end %>
|
75
|
-
|
76
|
-
<p><small><%=l.city.titleize %>, <%=l.state%> <%=l.zip%></small></p>
|
77
|
-
|
78
|
-
<div class="l-grid grid-row inflate-tenor">
|
79
|
-
<div class="grid-unit-1of4">
|
80
|
-
<% if pg[:type] == 'RES' || pg[:type] == 'COM' %>
|
81
|
-
<a class="m-btn btn-red" href="/<%= pg[:url_prefix] %>/<%= l.mls %>/details">See More</a>
|
82
|
-
<% else %>
|
83
|
-
<p> </p>
|
84
|
-
<% end %>
|
85
|
-
</div>
|
86
|
-
<% if pg[:type] == 'RES' %>
|
87
|
-
<div class="grid-unit-1of4">Beds<br /><%= l.bedrooms %></div>
|
88
|
-
<div class="grid-unit-1of4">Baths<br />
|
89
|
-
<%= l.baths_full %> full <% if l.baths_half != "" && l.baths_half != "0" %> & <%= l.baths_half %> half<% end %>
|
90
|
-
</div>
|
91
|
-
<% end %>
|
92
|
-
<div class="grid-unit-1of4">Price<br />
|
93
|
-
<% if l.current_price.nil? || l.current_price == '0' || l.current_price == 0 %>
|
94
|
-
Available Upon Inquiry<% else %><%= h number_to_currency(l.current_price, :precision => 0) %>
|
95
|
-
<% end %>
|
96
|
-
</div>
|
97
|
-
</div> <!-- .l-grid -->
|
98
|
-
</div> <!-- .media-body -->
|
99
|
-
</li>
|
100
|
-
<% end %>
|
101
|
-
</ul>
|
102
|
-
<% end %>
|
103
|
-
|
104
|
-
</div> <!-- .sidebar-body -->
|
105
|
-
</div> <!-- .l-sidebar -->
|
106
|
-
|
107
|
-
<hr />
|
108
|
-
|
109
|
-
<footer class="section-foot"><%= raw Caboose::Setting.value_for('footer_text') %></footer>
|
110
|
-
</div> <!-- .body-section -->
|
111
|
-
</div> <!-- .l-wrapper -->
|
112
|
-
<% end %>
|
113
|
-
|
114
|
-
<div class="body-sink"></div>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<% unless flash[:notice].blank? %>
|
119
|
-
<script type="text/javascript">
|
120
|
-
alert('<%= flash[:notice] %>');
|
121
|
-
</script>
|
122
|
-
<% end %>
|
@@ -1,51 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
@page.title = "Agents"
|
3
|
-
@agents = CabooseRets::Agent.where("(lo_code = ? or lo_code = ?) and hide = false", '46', 'SPACES').reorder("last_name, first_name").all
|
4
|
-
%>
|
5
|
-
<style>
|
6
|
-
.assistant_name { font-size: 0.9em; margin-left: 10px; }
|
7
|
-
</style>
|
8
|
-
|
9
|
-
<div class="l-wrapper">
|
10
|
-
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
11
|
-
<div class="sidebar-body">
|
12
|
-
<h3>Meet Our Agents</h3>
|
13
|
-
<ul class="agent_thumbs">
|
14
|
-
<% a = CabooseRets::Agent.where(:la_code => '048540000').first %>
|
15
|
-
<% if a %>
|
16
|
-
<li><a href="/agents/<%= a.la_code %>">
|
17
|
-
<img src='<%= a.image_url(:thumb) %>' />
|
18
|
-
<span><%= a.first_name %> <%= a.last_name %><% if a.designation %>, <%= a.designation %><% end %></span>
|
19
|
-
</a></li>
|
20
|
-
<% end %>
|
21
|
-
<% @agents.each do |a| %>
|
22
|
-
<% next if !a.assistant_to.nil? && a.assistant_to.length > 0 %>
|
23
|
-
<% next if a.la_code == '048540000' %>
|
24
|
-
<li><a href="/agents/<%= a.la_code %>">
|
25
|
-
<img src='<%= a.image_url(:thumb) %>' />
|
26
|
-
<span><%= a.first_name %> <%= a.last_name %><% if a.designation %>, <%= a.designation %><% end %></span>
|
27
|
-
</a></li>
|
28
|
-
<% end %>
|
29
|
-
</ul>
|
30
|
-
<br style="clear: left;" />
|
31
|
-
</div> <!-- .sidebar-body -->
|
32
|
-
</div>
|
33
|
-
</div> <!-- .l-wrapper -->
|
34
|
-
|
35
|
-
<%= content_for :css do %>
|
36
|
-
<style type='text/css'>
|
37
|
-
|
38
|
-
ul.agent_thumbs { margin: 0; padding: 0; list-style: none; }
|
39
|
-
ul.agent_thumbs li { margin: 1px; padding: 0px; list-style: none; float: left; }
|
40
|
-
ul.agent_thumbs li a { display: block; margin: 0; padding: 8px; width: 140px; height: 240px; background: #fff; line-height: 1em; text-align: center; border: transparent 1px solid; overflow: hidden; }
|
41
|
-
ul.agent_thumbs li a:hover { background: #efefef; border: #ccc 1px solid; }
|
42
|
-
ul.agent_thumbs li img { display: block; margin: 0 auto 4px auto; border: transparent 1px solid; min-height: 150px; }
|
43
|
-
ul.agent_thumbs li a:hover img { border: #ccc 1px solid; }
|
44
|
-
|
45
|
-
</style>
|
46
|
-
<% end %>
|
47
|
-
<%= content_for :js do %>
|
48
|
-
<script type="text/javascript">
|
49
|
-
|
50
|
-
</script>
|
51
|
-
<% end %>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
|
2
|
-
<div class="l-wrapper">
|
3
|
-
<h3 class="h-type-center h-space-mbs">Saved Properties</h3>
|
4
|
-
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
5
|
-
<div class="sidebar-body l-grid-border">
|
6
|
-
<p></p>
|
7
|
-
<div class="l-grid inflate-baritone-bass listing">
|
8
|
-
<% if @properties.nil? || @properties == [] %>
|
9
|
-
<div class='no-results'>You don't have any saved properties.</div>
|
10
|
-
<% else %>
|
11
|
-
<% @properties.each do |saved_property| %>
|
12
|
-
<% next if saved_property.nil? || saved_property.property.nil? %>
|
13
|
-
<% p = saved_property.property %>
|
14
|
-
<% ptype = p.url.split('/')[1] %>
|
15
|
-
<%= render :partial => "caboose_rets/#{ptype}/table_row", :locals => { :p => p } %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
18
|
-
</div>
|
19
|
-
</div> <!-- .sidebar-body -->
|
20
|
-
</div> <!-- .l-sidebar -->
|
21
|
-
</div> <!-- .l-wrapper -->
|
22
|
-
|
23
|
-
<% content_for :caboose_js do %>
|
24
|
-
<script style="text/javascript">
|
25
|
-
|
26
|
-
</script>
|
27
|
-
<% end %>
|
28
|
-
|