VE-1960: Template for mobile image collections

This commit is contained in:
Paul Oslund 2015-10-20 23:09:23 +00:00
parent c9da5425a7
commit d097426242
3 changed files with 4 additions and 3 deletions

View file

@ -84,7 +84,6 @@ class NodeImage extends Node {
} }
private function getTabberItems( $value ) { private function getTabberItems( $value ) {
global $wgArticleAsJson;
$tabberItems = array(); $tabberItems = array();
$tabberMarkers = $this->getMarkers( $value, 'TABBER' ); $tabberMarkers = $this->getMarkers( $value, 'TABBER' );
for ( $i = 0; $i < count ( $tabberMarkers ); $i++ ) { for ( $i = 0; $i < count ( $tabberMarkers ); $i++ ) {
@ -103,6 +102,7 @@ class NodeImage extends Node {
} }
private function getTabberData( $html ) { private function getTabberData( $html ) {
global $wgArticleAsJson;
$data = array(); $data = array();
$doc = new \DOMDocument(); $doc = new \DOMDocument();
$doc->loadHTML( $html ); $doc->loadHTML( $html );

View file

@ -19,7 +19,7 @@ class PortableInfoboxRenderService extends WikiaService {
'navigation' => 'PortableInfoboxItemNavigation.mustache', 'navigation' => 'PortableInfoboxItemNavigation.mustache',
'hero-mobile' => 'PortableInfoboxItemHeroMobile.mustache', 'hero-mobile' => 'PortableInfoboxItemHeroMobile.mustache',
'image-collection' => 'PortableInfoboxItemImageCollection.mustache', 'image-collection' => 'PortableInfoboxItemImageCollection.mustache',
'image-collection-mobile' => 'PortableInfoboxItemImageCollection.mustache' // TODO: Create separated template for mobile 'image-collection-mobile' => 'PortableInfoboxItemImageCollectionMobile.mustache'
]; ];
private $templateEngine; private $templateEngine;

View file

@ -0,0 +1 @@
<div class="pi-image-collection" data-refs="{{#images}}{{ref}},{{/images}}"></div>