Skip to content

Commit

Permalink
Merge branch '5.0/search-chart-table-wrap' into 5.0-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo committed Sep 5, 2023
2 parents 337f191 + 2501a23 commit 52d3e1a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion share/html/Elements/CollectionAsTable/Header
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ foreach my $col ( @Format ) {
my $span = $col->{'span'};
$item += ($span || 1);

$m->out('<th class="collection-as-table"');
my $class = 'collection-as-table';
$class .= ' allow-sorting' if $AllowSorting;
$class .= ' allow-filtering' if $AllowFiltering;

$m->out(qq{<th class="$class"});
$m->out(' colspan="' . $m->interp->apply_escapes($span => 'h') . '"')
if $span;

Expand Down
2 changes: 1 addition & 1 deletion share/html/Search/Elements/ChartTable
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ my $interp = $m->interp;
my $eh = sub { $interp->apply_escapes( @_, 'h' ) };
my $eu = sub { $interp->apply_escapes( @_, 'u' ) };

$m->out('<table class="table table-bordered collection-as-table chart">'. "\n");
$m->out('<table class="table table-bordered table-responsive collection-as-table chart">'. "\n");
foreach my $section (qw(thead tbody tfoot)) {
next unless $Table{ $section } && @{ $Table{ $section } };

Expand Down
4 changes: 2 additions & 2 deletions share/static/css/elevator-light/collection.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ th.collection-as-table svg.fa-sort {
}

/* To not wrap icons in header */
th.collection-as-table {
th.collection-as-table.allow-sorting {
white-space: nowrap;
}

th.collection-as-table span.title {
th.collection-as-table.allow-sorting span.title {
white-space: normal;
}

Expand Down

0 comments on commit 52d3e1a

Please sign in to comment.