Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/214369
Change subject: Ensure collection items are rendered correctly in rtl languages ...................................................................... Ensure collection items are rendered correctly in rtl languages The template data passed in needs to be passed along Other changes: Change function visibility - public function being called by protected function is strange. Bug: T99362 Change-Id: I30f7ee76902cf16351d35ff1df62206156c12bf3 --- M includes/views/Collection.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/69/214369/1 diff --git a/includes/views/Collection.php b/includes/views/Collection.php index 8cdc131..39896eb 100644 --- a/includes/views/Collection.php +++ b/includes/views/Collection.php @@ -158,14 +158,15 @@ /** * Returns the html for the items of a collection * @param models\Collection + * @param Array data passed to initial template rendering * * @return string HTML */ - public function getCollectionItems( models\Collection $collection ) { + protected function getCollectionItems( models\Collection $collection, $data = array() ) { $html = Html::openElement( 'div', array( 'class' => 'collection-cards' ) ); foreach ( $collection as $item ) { $view = new CollectionItemCard( $item ); - $html .= $view->getHtml(); + $html .= $view->getHtml( $data ); } $html .= Html::closeElement( 'div' ); return $html; @@ -188,7 +189,7 @@ $this->getHeaderHtml( $collection ); if ( $collection->getCount() > 0 ) { - $html .= $this->getCollectionItems( $collection ); + $html .= $this->getCollectionItems( $collection, $data ); $url = $collection->getContinueUrl(); if ( $url ) { $html .= Pagination::more( $url, wfMessage( 'gather-collection-more' )->text() ); -- To view, visit https://gerrit.wikimedia.org/r/214369 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30f7ee76902cf16351d35ff1df62206156c12bf3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits