1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
<tr>
<td><img src="/images/interior_blueCurveTop.gif" width="1006" height="23"/></td>
</tr>
<tr>
<td class="bodyBack" align="center">
<br />
<table width="90%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" style="height: 101px">
<table style="width: 100%" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/images/search.jpg" width="252" height="69" /></td>
<td valign="bottom" align="right">
<%= link_to(image_tag("returnToSearch.gif", :alt => "Return to Search", :size => "154x37", :border => "0"), search_path ) %>
</td>
</tr>
</table>
<br/><br/></td>
</tr>
<tr>
<td align="left" style="height:20em" valign="top">
<table style="width: 100%; height:35px; background-image: url('/images/search_results_blue_header_bar.gif')">
<tr>
<td>
<table style="width: 100%">
<tr>
<td style="width: 681px">Listings in
<span class="locationheader">
<% if @communities.collect(&:city).uniq.size == 1 %>
<%=h @communities.collect(&:city).uniq %>,
<% elsif @communities.collect(&:city).uniq.size == 0 %>
No matching results found
<% else %>
Multiple cities
<% end %>
<% if @communities.collect(&:state).uniq.size == 1 %>
<%=h @communities.collect(&:state).uniq %>
<% elsif @communities.collect(&:city).uniq.size == 0 %>
<% else %>
Multiple states
<% end %>
</span>
</td>
<td>Filter by:
<select name="Select1">
<option></option>
<option selected="selected">-- referrals --</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<table style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="width: 285px">
<img alt="Table Heading Properties" src="/images/th_properties.gif" width="301" height="45" />
</td>
<td valign="top" style="width: 134px">
<img alt="Table Heading Listings Available" src="/images/th_listingsavailable.gif" width="194" height="45" />
</td>
<td valign="top">
<img src="/images/th_spacer.gif" width="220" height="45" />
</td>
<td valign="top">
<img src="/images/th_alertme.gif" width="215" height="45" />
</td>
</tr>
<tr>
<td colspan="4">
<table cellpadding="10" cellspacing="0">
<% if @communities.size == 0 %>
<br />
<tr><td>
<strong>No matching results were found, please modify your search and try again</strong>
</td></tr>
<% else %>
<% @communities.each do |community| %>
<tr class="<%= cycle('on','off') %>">
<td valign="top" style="width: 285px" class="on">
<span class="orangefont"><%=h community.name %></span>
<% if logged_in? %>
<% restrict_to "community_admin" do %>
<%= link_to 'Edit', edit_community_path(community) %>
<% end %>
<% end %>
<br /><%=h community.street %><br />
<%=h community.city %>, <%=h community.state %> <%=h community.zip %><br />
Ph: <%=h community.phone %><br />
Fax: <%=h community.fax %><br />
<br />
<% if community.url %>
<%= link_to "#{community.url}", community.url %>
<% end %>
<br />Property ID: <%=h community.id %>
</td>
<td valign="top" style="width: 134px" class="on"><%= community.referrals.count %> Referrals<br />
<%= community.properties.count %> Sub-Leases</td>
<td valign="top" class="on">
<% if community.referrals.count == 0 && community.properties.count == 0 %>
<%= image_tag("button_showdetails.gif", :alt => "Show Details Button", :width => "168", :height => "30", :border => "0") %>
<% else %>
<%= link_to(image_tag("button_showdetails.gif", :alt => "Show Details Button", :width => "168", :height => "30", :border => "0"), detail_community_path(community.id) ) %>
<% end %>
<br />
<br />
<%= link_to(image_tag("button_addmyreferral.gif", :alt => "Add my referral button", :width => "168", :height => "30", :border => "0"), new_community_referral_path(community.id) ) %>
<br />
<br />
<%= link_to(image_tag("button_addmylease.gif", :alt => "Add my lease button", :width => "168", :height => "30", :border => "0"), new_community_property_path(community.id) ) %>
</td>
<td valign="top" class="on">
<% content_for :style do %>
div.alerts {
margin-left: 1.0em;
line-height: 2.0em;
}
div.alerts div.spinner {
display: inline;
}
<% end %>
<div class="alerts">
<% if logged_in? %>
<% if alert = current_user.community_alert(community, 'Referral') %>
<%= render :partial => 'alerts/partials/alerted', :locals => { :alert => alert, :community => community, :alertable_type => 'Referral' }%>
<% else %>
<%= render :partial => 'alerts/partials/alert_me', :locals => { :community => community, :alertable_type => 'Referral' }%>
<% end %>
<% if alert = current_user.community_alert(community, 'Property') %>
<%= render :partial => 'alerts/partials/alerted', :locals => { :alert => alert, :community => community, :alertable_type => 'Property' }%>
<% else %>
<%= render :partial => 'alerts/partials/alert_me', :locals => { :community => community, :alertable_type => 'Property' }%>
<% end %>
<% else %>
Log in to be alerted when new referrals and sub leases are added to this community.
<% end %>
</div>
</td>
</tr>
<tr>
<td valign="top" colspan="4"><hr /></td>
</tr>
<% end %>
<%= will_paginate @communities %>
<% end %>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="text-align:right">
<p><br />
<%= link_to(image_tag("button_listing.gif", :alt => "Add a new community", :border => "0"), new_community_path ) %>
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<img src="/images/interior_Bottom.gif" width="1006" height="145" alt="Interior Bottom" /></td>
</tr
<tr>
<td> </td>
</tr>
|