caboose-rets 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +4 -0
- data/Rakefile +38 -0
- data/app/controllers/caboose_rets/agents_controller.rb +169 -0
- data/app/controllers/caboose_rets/application_controller.rb +6 -0
- data/app/controllers/caboose_rets/commercial_controller.rb +281 -0
- data/app/controllers/caboose_rets/land_controller.rb +69 -0
- data/app/controllers/caboose_rets/open_houses_controller.rb +60 -0
- data/app/controllers/caboose_rets/residential_controller.rb +108 -0
- data/app/helpers/caboose_rets/application_helper.rb +4 -0
- data/app/models/caboose_rets/agent.rb +65 -0
- data/app/models/caboose_rets/commercial_property.rb +214 -0
- data/app/models/caboose_rets/land_property.rb +143 -0
- data/app/models/caboose_rets/media.rb +23 -0
- data/app/models/caboose_rets/multi_family_property.rb +198 -0
- data/app/models/caboose_rets/office.rb +27 -0
- data/app/models/caboose_rets/open_house.rb +19 -0
- data/app/models/caboose_rets/residential_property.rb +236 -0
- data/app/models/caboose_rets/rets_importer.rb +303 -0
- data/app/models/caboose_rets/rets_plugin.rb +26 -0
- data/app/views/caboose_rets/agents/_admin_top_nav.html.erb +7 -0
- data/app/views/caboose_rets/agents/admin_edit.html.erb +28 -0
- data/app/views/caboose_rets/agents/admin_edit_bio.html.erb +31 -0
- data/app/views/caboose_rets/agents/admin_edit_contact_info.html.erb +31 -0
- data/app/views/caboose_rets/agents/admin_edit_mls_info.html.erb +71 -0
- data/app/views/caboose_rets/agents/admin_index.html.erb +48 -0
- data/app/views/caboose_rets/agents/details.html.erb +140 -0
- data/app/views/caboose_rets/agents/index.html.erb +163 -0
- data/app/views/caboose_rets/agents/listings.html.erb +121 -0
- data/app/views/caboose_rets/commercial/admin_edit.html.erb +452 -0
- data/app/views/caboose_rets/commercial/admin_index.html.erb +46 -0
- data/app/views/caboose_rets/commercial/details.html.erb +134 -0
- data/app/views/caboose_rets/commercial/index.html.erb +87 -0
- data/app/views/caboose_rets/open_houses/admin_new.html.erb +31 -0
- data/app/views/caboose_rets/residential/admin_edit.html.erb +250 -0
- data/app/views/caboose_rets/residential/admin_index.html.erb +44 -0
- data/app/views/caboose_rets/residential/details.html.erb +139 -0
- data/app/views/caboose_rets/residential/index.html.erb +102 -0
- data/app/views/caboose_rets/residential/residential_not_exists.html.erb +15 -0
- data/app/views/caboose_rets/residential/test_form.html.erb +4 -0
- data/config/routes.rb +87 -0
- data/lib/caboose-rets.rb +4 -0
- data/lib/caboose_rets/caboose_rets_helper.rb +2 -0
- data/lib/caboose_rets/engine.rb +7 -0
- data/lib/caboose_rets/version.rb +3 -0
- data/lib/tasks/caboose_rets.rake +855 -0
- data/test/caboose_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +25 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +169 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
<style type='text/css'>
|
3
|
+
#search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; }
|
4
|
+
</style>
|
5
|
+
|
6
|
+
<h1>Residential Agents</h1>
|
7
|
+
|
8
|
+
<div id='search_form_wrapper'>
|
9
|
+
<form action='/admin/agents' method='get' id='search_form'>
|
10
|
+
<input type='text' name='first_name_like' placeholder='First name' value="<%= @gen.params['first_name_like'] %>" style='width: 100px;' />
|
11
|
+
<input type='text' name='last_name_like' placeholder='Last name' value="<%= @gen.params['last_name_like'] %>" style='width: 100px;' />
|
12
|
+
<input type='submit' value='Search' />
|
13
|
+
</form>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<% if @agents.count > 0 %>
|
17
|
+
<table class='data' id='agents_table'>
|
18
|
+
<tr>
|
19
|
+
<%= raw @gen.sortable_table_headings({
|
20
|
+
'la_code' => 'Agent Code',
|
21
|
+
'last_name, first_name' => 'Name',
|
22
|
+
'lo_code' => 'Office',
|
23
|
+
'hide' => 'Hide'
|
24
|
+
})
|
25
|
+
%>
|
26
|
+
</tr>
|
27
|
+
<% @agents.each do |a| %>
|
28
|
+
<% office = a.office %>
|
29
|
+
<tr onclick="window.location='/admin/agents/<%= a.id %>/edit';">
|
30
|
+
<td><%= a.la_code %></td>
|
31
|
+
<td><%= "#{a.first_name} #{a.last_name}" %></td>
|
32
|
+
<td><%= office ? office.name : a.lo_code %></td>
|
33
|
+
<td><%= a.hide ? 'Yes' : 'No' %></td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
36
|
+
</table>
|
37
|
+
<p><%= raw @gen.generate %></p>
|
38
|
+
<% else %>
|
39
|
+
<p>No agents met your search.</p>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% content_for :caboose_js do %>
|
43
|
+
<script type='text/javascript'>
|
44
|
+
$(document).ready(function() {
|
45
|
+
var modal = new CabooseModal(800);
|
46
|
+
});
|
47
|
+
</script>
|
48
|
+
<% end %>
|
@@ -0,0 +1,140 @@
|
|
1
|
+
<style>
|
2
|
+
.assistant_name { font-size: 0.9em; margin-left: 10px; }
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<div class="l-wrapper">
|
6
|
+
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
7
|
+
<div class="sidebar-aside">
|
8
|
+
<h3>Meet Our Agents</h3>
|
9
|
+
|
10
|
+
<select class="h-conceal-tenor-baritone h-space-mbm" onchange="location=this.options[this.selectedIndex].value;">
|
11
|
+
<% @agents.each do |a| %>
|
12
|
+
<% next if !a.assistant_to.nil? && a.assistant_to.length > 0 %>
|
13
|
+
<option class="agent_name" value="/agents/<%= a.la_code %>/listings">
|
14
|
+
<%= a.first_name %> <%= a.last_name %>
|
15
|
+
</option>
|
16
|
+
<% end %>
|
17
|
+
</select>
|
18
|
+
|
19
|
+
<ul class="h-reveal-tenor-baritone">
|
20
|
+
<li><a href="/agents/048540000">Richard Ellis, Jr.</a>
|
21
|
+
<ul>
|
22
|
+
<% @agents.each do |as| %>
|
23
|
+
<% if as.assistant_to == "048540000" %>
|
24
|
+
<li class="assistant_name"><%= as.first_name %> <%= as.last_name %></li>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
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 %>">
|
33
|
+
<%= a.first_name %> <%= a.last_name %>
|
34
|
+
</a>
|
35
|
+
<ul>
|
36
|
+
<% @agents.each do |as| %>
|
37
|
+
<% if as.assistant_to == a.la_code %>
|
38
|
+
<li class="assistant_name"><%= as.first_name %> <%= as.last_name %></li>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
</ul>
|
42
|
+
</li>
|
43
|
+
<% end %>
|
44
|
+
</ul>
|
45
|
+
</div> <!-- .sidebar-aside -->
|
46
|
+
|
47
|
+
<div class="sidebar-body">
|
48
|
+
<% if @agent.la_code == '048540000' %>
|
49
|
+
<div class="h-space-mvm">
|
50
|
+
<% if @prev %><a class="m-btn-red" href="/agents/<%= @prev.la_code %>">Previous Agent</a> <% end %>
|
51
|
+
<% if @next %><a class="m-btn-red" href="/agents/<%= @next.la_code %>">Next Agent</a><% end %>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div class="l-media inflate-baritone">
|
55
|
+
<figure class="media-aside h-type-center">
|
56
|
+
<img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%= @agent.id %>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" /></figure>
|
57
|
+
|
58
|
+
<div class="media-body">
|
59
|
+
<h4 class="agent_name">
|
60
|
+
<%= @agent.first_name %> <%= @agent.last_name %>
|
61
|
+
</h4>
|
62
|
+
|
63
|
+
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
64
|
+
<ul>
|
65
|
+
<% if @agent.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></li><% end %>
|
66
|
+
<% if @agent.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></li><% end %>
|
67
|
+
<% if @agent.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></li><% end %>
|
68
|
+
<% if @agent.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></li><% end %>
|
69
|
+
</ul>
|
70
|
+
<% else %>
|
71
|
+
<%= raw @agent.contact_info %>
|
72
|
+
<% end %>
|
73
|
+
|
74
|
+
<p class="h-space-mvs"><a class="m-btn-red" href="/agents/<%= @agent.la_code %>/listings">See My Listings</a></p>
|
75
|
+
</div> <!-- .media-body -->
|
76
|
+
</div> <!-- .l-media -->
|
77
|
+
|
78
|
+
<article class="h-space-mtm"><%= raw @agent.bio %></article>
|
79
|
+
<% elsif @agent.la_code != "048540000" %>
|
80
|
+
<div class="h-space-mvm">
|
81
|
+
<% if @prev %><a class="m-btn-red" href="/agents/<%= @prev.la_code %>">Previous Agent</a> <% end %>
|
82
|
+
<% if @next %><a class="m-btn-red" href="/agents/<%= @next.la_code %>">Next Agent</a><% end %>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div class="l-media">
|
86
|
+
<figure class="media-aside"><img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%= @agent.id %>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" /></figure>
|
87
|
+
|
88
|
+
<div class="media-body">
|
89
|
+
<h4 class="agent_name">
|
90
|
+
<%= @agent.first_name %> <%= @agent.last_name %>
|
91
|
+
</h4>
|
92
|
+
|
93
|
+
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
94
|
+
<ul>
|
95
|
+
<% if @agent.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></li><% end %>
|
96
|
+
<% if @agent.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></li><% end %>
|
97
|
+
<% if @agent.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></li><% end %>
|
98
|
+
<% if @agent.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></li><% end %>
|
99
|
+
</ul>
|
100
|
+
<% else %>
|
101
|
+
<%= raw @agent.contact_info %>
|
102
|
+
<% end %>
|
103
|
+
|
104
|
+
<p class="h-space-mvs"><a class="m-btn-red" href="/agents/<%= @agent.la_code %>/listings">See <%= @assistants.count > 0 ? 'Our' : 'My' %> Listings</a></p>
|
105
|
+
</div>
|
106
|
+
</div> <!-- .l-media -->
|
107
|
+
|
108
|
+
<article class="h-space-mtm"><%= raw @agent.bio %></article>
|
109
|
+
<% end %>
|
110
|
+
|
111
|
+
<% @assistants.each do |a| %>
|
112
|
+
<div class="l-media inflate-baritone h-space-mtl h-space-ptl" style="border-top: 1px solid #D0D0D0;">
|
113
|
+
<div class="media-aside">
|
114
|
+
<img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%= a.id %>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" />
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="media-body">
|
118
|
+
<h4 class="agent_name">
|
119
|
+
<%= a.first_name %> <%= a.last_name %>
|
120
|
+
</h4>
|
121
|
+
<% if a.contact_info.nil? || a.contact_info.strip.length == 0 %>
|
122
|
+
<ul>
|
123
|
+
<% if a.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= a.office_phone %>"><%= a.office_phone %></a></li><% end %>
|
124
|
+
<% if a.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= a.car_phone %>"><%= a.car_phone %></a></li><% end %>
|
125
|
+
<% if a.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= a.home_phone %>"><%= a.home_phone %></a></li><% end %>
|
126
|
+
<% if a.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= a.member_email %>"><%= a.member_email %></a></li><% end %>
|
127
|
+
</ul>
|
128
|
+
<% else %>
|
129
|
+
<%= raw a.contact_info %>
|
130
|
+
<% end %>
|
131
|
+
<% if !a.bio.nil? && a.bio.strip.length > 0 %>
|
132
|
+
<%= raw a.bio %>
|
133
|
+
<% end %>
|
134
|
+
|
135
|
+
</div> <!-- .media-body -->
|
136
|
+
</div> <!-- .l-media -->
|
137
|
+
<% end %>
|
138
|
+
</div> <!-- .sidebar-body -->
|
139
|
+
</div>
|
140
|
+
</div> <!-- .l-wrapper -->
|
@@ -0,0 +1,163 @@
|
|
1
|
+
<style>
|
2
|
+
.assistant_name { font-size: 0.9em; margin-left: 10px; }
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<div class="l-wrapper">
|
6
|
+
<div class="l-sidebar-border inflate-tenor-baritone h-space-pvm">
|
7
|
+
<div class="sidebar-aside">
|
8
|
+
<h3>Meet Our Agents</h3>
|
9
|
+
|
10
|
+
<select class="h-conceal-tenor-baritone h-space-mbm" onchange="location=this.options[this.selectedIndex].value;">
|
11
|
+
<% @agents.each do |a| %>
|
12
|
+
<% next if !a.assistant_to.nil? && a.assistant_to.length > 0 %>
|
13
|
+
<option class="agent_name" value="/agents/<%= a.la_code %>/listings">
|
14
|
+
<%= a.first_name %> <%= a.last_name %>
|
15
|
+
</option>
|
16
|
+
<% end %>
|
17
|
+
</select>
|
18
|
+
|
19
|
+
<ul class="h-reveal-tenor-baritone">
|
20
|
+
<li><a href="/agents/048540000">Richard Ellis, Jr.</a>
|
21
|
+
<ul>
|
22
|
+
<% @agents.each do |as| %>
|
23
|
+
<% if as.assistant_to == "048540000" %>
|
24
|
+
<li class="assistant_name"><%= as.first_name %> <%= as.last_name %></li>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
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 %>">
|
33
|
+
<%= a.first_name %> <%= a.last_name %>
|
34
|
+
</a>
|
35
|
+
<ul>
|
36
|
+
<% @agents.each do |as| %>
|
37
|
+
<% if as.assistant_to == a.la_code %>
|
38
|
+
<li class="assistant_name"><%= as.first_name %> <%= as.last_name %></li>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
</ul>
|
42
|
+
</li>
|
43
|
+
<% end %>
|
44
|
+
</ul>
|
45
|
+
</div> <!-- .sidebar-aside -->
|
46
|
+
|
47
|
+
|
48
|
+
<div class="sidebar-body">
|
49
|
+
<% if @agent.la_code == '048540000' %>
|
50
|
+
<div class="h-space-mvm">
|
51
|
+
<% if @prev %><a class="m-btn-red" href="/agents/<%= @prev.la_code %>">Previous Agent</a> <% end %>
|
52
|
+
<% if @next %><a class="m-btn-red" href="/agents/<%= @next.la_code %>">Next Agent</a><% end %>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class="l-media inflate-baritone">
|
56
|
+
<div style="width: 500px; height: 300px;">
|
57
|
+
<iframe src="//player.vimeo.com/video/77447854?title=0&byline=0&portrait=0&autoplay=1" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
58
|
+
<!--
|
59
|
+
<video preload autoplay height="281px" width="500px" controls>
|
60
|
+
<source src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/rich.webm" type="video/webm" />
|
61
|
+
<source src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/rich.mp4" type="video/mp4" />
|
62
|
+
Your browser does not support this video.
|
63
|
+
</video>
|
64
|
+
-->
|
65
|
+
</div>
|
66
|
+
<figure class="media-aside h-type-center"><img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%= @agent.id %>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" /></figure>
|
67
|
+
|
68
|
+
<div class="media-body">
|
69
|
+
<h4 class="agent_name">
|
70
|
+
<%= @agent.first_name %> <%= @agent.last_name %>
|
71
|
+
</h4>
|
72
|
+
|
73
|
+
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
74
|
+
<ul>
|
75
|
+
<% if @agent.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></li><% end %>
|
76
|
+
<% if @agent.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></li><% end %>
|
77
|
+
<% if @agent.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></li><% end %>
|
78
|
+
<% if @agent.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></li><% end %>
|
79
|
+
</ul>
|
80
|
+
<% else %>
|
81
|
+
<%= raw @agent.contact_info %>
|
82
|
+
<% end %>
|
83
|
+
|
84
|
+
<p class="h-space-mvs"><a class="m-btn-red" href="/agents/<%= @agent.la_code %>/listings">See My Listings</a></p>
|
85
|
+
</div> <!-- .media-body -->
|
86
|
+
</div> <!-- .l-media -->
|
87
|
+
|
88
|
+
<% if @agent.bio %><article class="h-space-mtm"><%= raw @agent.bio %></article> <% end %>
|
89
|
+
<% elsif @agent.la_code != "048540000" %>
|
90
|
+
<div class="h-space-mvm">
|
91
|
+
<% if @prev %><a class="m-btn-red" href="/agents/<%= @prev.la_code %>">Previous Agent</a> <% end %>
|
92
|
+
<% if @next %><a class="m-btn-red" href="/agents/<%= @next.la_code %>">Next Agent</a><% end %>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div class="l-media">
|
96
|
+
<figure class="media-aside"><img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%=@agent.id%>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" /></figure>
|
97
|
+
|
98
|
+
<div class="media-body">
|
99
|
+
<h4 class="agent_name">
|
100
|
+
<%= @agent.first_name %> <%= @agent.last_name %>
|
101
|
+
</h4>
|
102
|
+
|
103
|
+
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
104
|
+
<ul>
|
105
|
+
<% if @agent.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= @agent.office_phone %>"><%= @agent.office_phone %></a></li><% end %>
|
106
|
+
<% if @agent.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= @agent.car_phone %>"><%= @agent.car_phone %></a></li><% end %>
|
107
|
+
<% if @agent.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= @agent.home_phone %>"><%= @agent.home_phone %></a></li><% end %>
|
108
|
+
<% if @agent.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= @agent.member_email %>"><%= @agent.member_email %></a></li><% end %>
|
109
|
+
</ul>
|
110
|
+
<% else %>
|
111
|
+
<%= raw @agent.contact_info %>
|
112
|
+
<% end %>
|
113
|
+
|
114
|
+
<p class="h-space-mvs"><a class="m-btn-red" href="/agents/<%= @agent.la_code %>/listings">See My Listings</a></p>
|
115
|
+
</div>
|
116
|
+
</div> <!-- .l-media -->
|
117
|
+
|
118
|
+
<article class="h-space-mtm"><%= raw @agent.bio %></article>
|
119
|
+
<% end %>
|
120
|
+
|
121
|
+
<% @assistants.each do |a| %>
|
122
|
+
<div class="l-media inflate-baritone h-space-mtl h-space-ptl" style="border-top: 1px solid #D0D0D0;">
|
123
|
+
<div class="media-aside">
|
124
|
+
<img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%=a.id%>_large.jpg?<%= DateTime.now.strftime('%F') %>" width="150" />
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="media-body">
|
128
|
+
<h4 class="agent_name">
|
129
|
+
<%= a.first_name %> <%= a.last_name %>
|
130
|
+
</h4>
|
131
|
+
|
132
|
+
<% if a.contact_info.nil? || a.contact_info.strip.length == 0 %>
|
133
|
+
<ul>
|
134
|
+
<% if a.office_phone.strip.length > 0 %><li>Work Phone: <a href="tel:<%= a.office_phone %>"><%= a.office_phone %></a></li><% end %>
|
135
|
+
<% if a.car_phone.strip.length > 0 %><li>Cell Phone: <a href="tel:<%= a.car_phone %>"><%= a.car_phone %></a></li><% end %>
|
136
|
+
<% if a.home_phone.strip.length > 0 %><li>Home Phone: <a href="tel:<%= a.home_phone %>"><%= a.home_phone %></a></li><% end %>
|
137
|
+
<% if a.member_email.strip.length > 0 %><li>Email: <a href="mailto:<%= a.member_email %>"><%= a.member_email %></a></li><% end %>
|
138
|
+
</ul>
|
139
|
+
<% else %>
|
140
|
+
<%= raw a.contact_info %>
|
141
|
+
<% end %>
|
142
|
+
<% if !a.bio.nil? && a.bio.strip.length > 0 %>
|
143
|
+
<%= raw a.bio %>
|
144
|
+
<% end %>
|
145
|
+
|
146
|
+
</div> <!-- .media-body -->
|
147
|
+
</div> <!-- .l-media -->
|
148
|
+
<% end %>
|
149
|
+
</div> <!-- .sidebar-body -->
|
150
|
+
</div>
|
151
|
+
</div> <!-- .l-wrapper -->
|
152
|
+
|
153
|
+
<script type="text/javascript">
|
154
|
+
agents = document.getElementsByClassName("agent_name");
|
155
|
+
for(i = 0; i < agents.length; i++){
|
156
|
+
if(agents[i].innerHTML == "Darren Mcausland" || agents[i] == "DARREN MCAUSLAND"){
|
157
|
+
agents[i].innerHTML = "Darren McAusland";
|
158
|
+
}
|
159
|
+
if(agents[i].innerHTML == "Linda Mccrory" || agents[i] == "LINDA MCCRORY"){
|
160
|
+
agents[i].innerHTML = "Linda Mccrory";
|
161
|
+
}
|
162
|
+
}
|
163
|
+
</script>
|
@@ -0,0 +1,121 @@
|
|
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"><h3><%= @agent.first_name %> <%= @agent.last_name %></h3></div>
|
15
|
+
</div> <!-- .l-sidebar -->
|
16
|
+
</div> <!-- .l-wrapper -->
|
17
|
+
|
18
|
+
<div class="l-wrapper">
|
19
|
+
<div class="body-section">
|
20
|
+
<div class="l-sidebar inflate-bass sidebar-border h-space-pbm">
|
21
|
+
<div class="sidebar-aside">
|
22
|
+
<!-- <a class="m-btn btn-red" href="/agents">Back to Agents</a> -->
|
23
|
+
<figure class="h-space-mvm"><img src="https://s3.amazonaws.com/advantagerealtygroup.com/agents/<%=@agent.id%>_thumb.jpg" width="150" class="h-border" /></figure>
|
24
|
+
|
25
|
+
<% if @agent.contact_info.nil? || @agent.contact_info.strip.length == 0 %>
|
26
|
+
<% 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 %>
|
27
|
+
<% 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 %>
|
28
|
+
<% 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 %>
|
29
|
+
<% 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 %>
|
30
|
+
<% else %>
|
31
|
+
<%= raw @agent.contact_info %>
|
32
|
+
<% end %>
|
33
|
+
<hr />
|
34
|
+
|
35
|
+
<h4><i class="m-icon-contact"></i> Contact Agent</h4>
|
36
|
+
<%= form_for @message, :url => "/contact/create", :html => {:class => "m-form h-space-pbm", :'accept-charset' => "utf-8", :method => "POST" } do |f| %>
|
37
|
+
<%= f.hidden_field :la_code, :value => @agent.la_code %>
|
38
|
+
<%= f.text_field :name, :placeholder => "Full Name", :id => "contact_name", :maxlength => "150" %>
|
39
|
+
<%= f.text_field :email, :placeholder => "Email", :id => "contact_addres", :maxlength => "150" %>
|
40
|
+
<%= f.text_area :body, :placeholder => "Message", :cols => "50", :rows => "4", :id => "contact_message", :class => "contact_message" %>
|
41
|
+
<%=
|
42
|
+
recaptcha_tags :noscript => false
|
43
|
+
%>
|
44
|
+
<!-- <input type="hidden" name="mls_number" type="hidden" value="mls_acct"> -->
|
45
|
+
<input class="m-btn btn-right btn-red h-space-mts" type="submit" value="submit">
|
46
|
+
<% end %>
|
47
|
+
</div> <!-- .sidebar-aside -->
|
48
|
+
|
49
|
+
<div class="sidebar-body">
|
50
|
+
<article><%= raw @agent.bio %></article>
|
51
|
+
<hr />
|
52
|
+
|
53
|
+
<% @property_groups.select{ |pg| !pg[:properties].empty? }.each do |pg| %>
|
54
|
+
<h4><%= pg[:title] %></h4>
|
55
|
+
<ul class="m-list-border">
|
56
|
+
<% pg[:properties].each do |l| %>
|
57
|
+
<li class="l-media inflate-bass center-on-mobile">
|
58
|
+
<figure class="media-aside">
|
59
|
+
<a href="/<%= pg[:url_prefix] %>/<%= l.mls_acct %>/details"><img class="h-border" src="https://s3.amazonaws.com/advantagerealtygroup.com/<%= pg[:url_prefix] %>/<%=l.mls_acct%>_1_thumb.jpg" width="150" /></a>
|
60
|
+
</figure>
|
61
|
+
<div class="media-body h-pos">
|
62
|
+
<p class="pos-top-right h-type-highlight"><strong>MLS#<%=l.mls_acct%></strong></p>
|
63
|
+
|
64
|
+
<% if l.street_num != '0' && l.street_name != "" %>
|
65
|
+
|
66
|
+
<h5>
|
67
|
+
<% if l.unit_num != "" %>
|
68
|
+
Unit <%= l.unit_num %>,
|
69
|
+
<% end %>
|
70
|
+
<%=l.street_num%> <%=l.street_name%>
|
71
|
+
</h5>
|
72
|
+
<% end %>
|
73
|
+
|
74
|
+
<p><small><%=l.city%>, <%=l.state%> <%=l.zip%></small></p>
|
75
|
+
|
76
|
+
<div class="l-grid grid-row inflate-tenor">
|
77
|
+
<div class="grid-unit-1of4">
|
78
|
+
<% if pg[:type] == 'RES' || pg[:type] == 'COM' %>
|
79
|
+
<a class="m-btn btn-red" href="/<%= pg[:url_prefix] %>/<%= l.mls_acct %>/details">See More</a>
|
80
|
+
<% else %>
|
81
|
+
<p> </p>
|
82
|
+
<% end %>
|
83
|
+
</div>
|
84
|
+
<% if pg[:type] == 'RES' %>
|
85
|
+
<div class="grid-unit-1of4">Beds<br /><%= l.bedrooms %></div>
|
86
|
+
<div class="grid-unit-1of4">Full Baths<br /><%= l.baths_full %></div>
|
87
|
+
<% end %>
|
88
|
+
<div class="grid-unit-1of4">Price<br />
|
89
|
+
<% if l.current_price.nil? || l.current_price == '0' || l.current_price == 0 %>
|
90
|
+
Available Upon Inquiry<% else %><%= h number_to_currency l.current_price %>
|
91
|
+
<% end %>
|
92
|
+
</div>
|
93
|
+
</div> <!-- .l-grid -->
|
94
|
+
</div> <!-- .media-body -->
|
95
|
+
</li>
|
96
|
+
<% end %>
|
97
|
+
</ul>
|
98
|
+
<% end %>
|
99
|
+
|
100
|
+
</div> <!-- .sidebar-body -->
|
101
|
+
</div> <!-- .l-sidebar -->
|
102
|
+
|
103
|
+
<hr />
|
104
|
+
|
105
|
+
<footer class="h-type-center h-space-pam">
|
106
|
+
<h3>The Advantage Realty Group, Inc.</h3>
|
107
|
+
<p>The perfect home awaits.</p>
|
108
|
+
<p>Let us help you.</p>
|
109
|
+
</footer>
|
110
|
+
</div> <!-- .body-section -->
|
111
|
+
</div> <!-- .l-wrapper -->
|
112
|
+
|
113
|
+
<div class="body-sink"></div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<% unless flash[:notice].blank? %>
|
118
|
+
<script type="text/javascript">
|
119
|
+
alert('<%= flash[:notice] %>');
|
120
|
+
</script>
|
121
|
+
<% end %>
|