diff --git a/app/views/dashboard/_address_search.html.erb b/app/views/dashboard/_address_search.html.erb index 49667bf3..a4f6d40b 100644 --- a/app/views/dashboard/_address_search.html.erb +++ b/app/views/dashboard/_address_search.html.erb @@ -15,9 +15,11 @@ <% reps = (defined?(representatives) ? representatives : @representatives) %> <% did_search = (defined?(searched) ? searched : @searched) %> <% if did_search %> -
| Image | Name | Office | -Contact Details | -Links | +Contact Details | +Links | ||
|---|---|---|---|---|---|---|---|---|
| + | ||||||||
|
<% if rep["image"] %>
-
<% else %>
- <%= initials %> <%= initials %> |
- + |
<%= rep["name"].presence || '-' %>
|
- + |
<% office_text = rep["office"].presence || rep["title"].presence || rep["level"].presence || rep["position"].presence || rep["role"].presence %>
<% if rep["other_names"].present? && rep["other_names"].is_a?(Array) %>
<% names = rep["other_names"].map { |n| n.is_a?(Hash) ? n["name"] : n.to_s }.reject(&:blank?) %>
@@ -45,7 +45,7 @@
<%= office_text %>
<% end %>
|
- + |
<% email = (rep["contact_details"]&.find { |c| c["type"] == 'email' }&.dig("value") rescue nil) || rep["email"] || rep["contact_email"] %>
<% phone = (rep["contact_details"]&.find { |c| c["type"] == 'phone' }&.dig("value") rescue nil) || rep["phone"] || rep["contact_phone"] %>
<% if email.present? || phone.present? %>
@@ -61,7 +61,7 @@
-
<% end %>
|
- + | <% all_links = [] %> <% website = rep["website"] || rep["url"] || rep["official_website"] %> <% if website.present? %> |