From 0ba0cff5e512ed3c411374e1b65a80c4d8a93bfd Mon Sep 17 00:00:00 2001 From: Virginia Dooley <7017118+VirginiaDooley@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:24:47 +0000 Subject: [PATCH 1/2] resize columns and padding for more device flexibility --- .../_representatives_table.html.erb | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/representatives/_representatives_table.html.erb b/app/views/representatives/_representatives_table.html.erb index 4f541a7a..4ec03b4e 100644 --- a/app/views/representatives/_representatives_table.html.erb +++ b/app/views/representatives/_representatives_table.html.erb @@ -1,35 +1,35 @@ <%# app/views/pages/_representatives_table.html.erb %> <% if representatives.present? %>
| 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? %>
From ede5720b38f85ea2aaa3184df9a7501607b2355f Mon Sep 17 00:00:00 2001
From: Virginia Dooley <7017118+VirginiaDooley@users.noreply.github.com>
Date: Thu, 4 Dec 2025 11:25:07 +0000
Subject: [PATCH 2/2] stop search results from spilling outside container'
---
app/views/dashboard/_address_search.html.erb | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
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 %>
-
- <%= render partial: 'representatives_table', locals: { representatives: reps } %>
-
+
+
<% end %>
+ <%= render partial: 'representatives_table', locals: { representatives: reps } %>
+
+ |