Updated
This commit is contained in:
@@ -45,26 +45,22 @@ function assoc_render_manage_index() {
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search and filter bar — single row
|
// Search and filter bar — single horizontal row, no wrap
|
||||||
$out .= '<div class="assoc-search-bar" role="search">';
|
$out .= '<div class="assoc-search-bar" role="search">';
|
||||||
|
|
||||||
$out .= '<div class="d-flex align-items-center gap-1">';
|
|
||||||
$out .= '<input type="search" id="assoc-search" class="form-control form-control-sm"
|
$out .= '<input type="search" id="assoc-search" class="form-control form-control-sm"
|
||||||
placeholder="Name or slug…" aria-label="Search associations"
|
placeholder="Search name or slug…" aria-label="Search associations">';
|
||||||
style="min-width:14rem;">';
|
|
||||||
$out .= '</div>';
|
|
||||||
|
|
||||||
$out .= '<select id="assoc-filter-county" class="form-select form-select-sm" aria-label="Filter by county" style="max-width:12rem;">';
|
$out .= '<select id="assoc-filter-county" class="form-select form-select-sm" aria-label="Filter by county">';
|
||||||
$out .= '<option value="">All counties</option>';
|
$out .= '<option value="">All counties</option>';
|
||||||
foreach ($counties as $c => $_) { $out .= '<option value="' . assoc_h($c) . '">' . assoc_h($c) . '</option>'; }
|
foreach ($counties as $c => $_) { $out .= '<option value="' . assoc_h($c) . '">' . assoc_h($c) . '</option>'; }
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
|
|
||||||
$out .= '<select id="assoc-filter-type" class="form-select form-select-sm" aria-label="Filter by type" style="max-width:10rem;">';
|
$out .= '<select id="assoc-filter-type" class="form-select form-select-sm" aria-label="Filter by type">';
|
||||||
$out .= '<option value="">All types</option>';
|
$out .= '<option value="">All types</option>';
|
||||||
foreach ($types as $t => $_) { $out .= '<option value="' . assoc_h($t) . '">' . assoc_h($t === 'UNK' ? 'Unknown' : $t) . '</option>'; }
|
foreach ($types as $t => $_) { $out .= '<option value="' . assoc_h($t) . '">' . assoc_h($t === 'UNK' ? 'Unknown' : $t) . '</option>'; }
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
|
|
||||||
$out .= '<select id="assoc-filter-status" class="form-select form-select-sm" aria-label="Filter by standing" style="max-width:9rem;">';
|
$out .= '<select id="assoc-filter-status" class="form-select form-select-sm" aria-label="Filter by standing">';
|
||||||
$out .= '<option value="">All standing</option>';
|
$out .= '<option value="">All standing</option>';
|
||||||
foreach ($statuses as $s => $_) { $out .= '<option value="' . assoc_h($s) . '">' . assoc_h($s === 'UNK' ? 'Unknown' : $s) . '</option>'; }
|
foreach ($statuses as $s => $_) { $out .= '<option value="' . assoc_h($s) . '">' . assoc_h($s === 'UNK' ? 'Unknown' : $s) . '</option>'; }
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
@@ -105,14 +101,6 @@ function assoc_render_manage_index() {
|
|||||||
if ($status === 'Active') $status_class = 'civicinfra-status-active';
|
if ($status === 'Active') $status_class = 'civicinfra-status-active';
|
||||||
if ($status === 'Dissolved') $status_class = 'civicinfra-status-alert';
|
if ($status === 'Dissolved') $status_class = 'civicinfra-status-alert';
|
||||||
|
|
||||||
// Inline status badge — shown only when not Active
|
|
||||||
$badge = '';
|
|
||||||
if ($status && $status !== 'Active') {
|
|
||||||
$badge = ' <span class="civicinfra-status ' . $status_class . '" style="font-size:0.65rem;">'
|
|
||||||
. assoc_h($status === 'UNK' ? 'Standing UNK' : $status)
|
|
||||||
. '</span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$out .= '<tr data-slug="' . assoc_h($slug) . '"'
|
$out .= '<tr data-slug="' . assoc_h($slug) . '"'
|
||||||
. ' data-name="' . assoc_h($entry['assoc_legal_name'] ?? '') . '"'
|
. ' data-name="' . assoc_h($entry['assoc_legal_name'] ?? '') . '"'
|
||||||
. ' data-county="' . assoc_h($county) . '"'
|
. ' data-county="' . assoc_h($county) . '"'
|
||||||
@@ -122,10 +110,9 @@ function assoc_render_manage_index() {
|
|||||||
$out .= '<td><input type="checkbox" name="assoc_select[]" value="' . assoc_h($slug) . '" class="form-check-input"></td>';
|
$out .= '<td><input type="checkbox" name="assoc_select[]" value="' . assoc_h($slug) . '" class="form-check-input"></td>';
|
||||||
|
|
||||||
$out .= '<td><a href="' . z_root() . '/channel/' . assoc_h($slug) . '"
|
$out .= '<td><a href="' . z_root() . '/channel/' . assoc_h($slug) . '"
|
||||||
class="civicinfra-channel-label text-decoration-none"
|
class="text-decoration-none" title="View channel">'
|
||||||
title="View channel">'
|
|
||||||
. '<code class="civicinfra-record-id">' . assoc_h($slug) . '</code>'
|
. '<code class="civicinfra-record-id">' . assoc_h($slug) . '</code>'
|
||||||
. '</a>' . $badge . '</td>';
|
. '</a></td>';
|
||||||
|
|
||||||
$out .= '<td>' . assoc_h($entry['assoc_legal_name'] ?? '—') . '</td>';
|
$out .= '<td>' . assoc_h($entry['assoc_legal_name'] ?? '—') . '</td>';
|
||||||
$out .= '<td class="civicinfra-record-meta">' . assoc_h($entry['assoc_units'] ?? '—') . '</td>';
|
$out .= '<td class="civicinfra-record-meta">' . assoc_h($entry['assoc_units'] ?? '—') . '</td>';
|
||||||
|
|||||||
Reference in New Issue
Block a user