Skip to content

Commit

Permalink
Fix footer sorting on table results (SemanticMediaWiki#5617)
Browse files Browse the repository at this point in the history
The `sortbottom` class needs to be on the row, not on a cell.

https://en.wikipedia.org/wiki/Help:Sortable_tables#Summation_footer
  • Loading branch information
Nikerabbit committed Mar 18, 2024
1 parent 2d96e13 commit ea8462c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Query/ResultPrinters/TableResultPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ protected function getResultText( QueryResult $res, $outputMode ) {

$this->htmlTable->cell(
$link->getText( $outputMode, $this->mLinker ),
[ 'class' => 'sortbottom', 'colspan' => $res->getColumnCount() ]
[ 'colspan' => $res->getColumnCount() ]
);

$this->htmlTable->row( [ 'class' => 'smwfooter' ] );
$this->htmlTable->row( [ 'class' => 'smwfooter sortbottom' ] );
}

$tableAttrs = [ 'class' => $class ];
Expand Down

0 comments on commit ea8462c

Please sign in to comment.