Fix styles screeenshots

This commit is contained in:
Dmitriy Simushev 2014-09-04 15:11:52 +00:00
parent e5031f9987
commit 83f6c31dd6

View File

@ -110,16 +110,14 @@ class StyleController extends AbstractController
*/ */
protected function buildScreenshotList(StyleInterface $style) protected function buildScreenshotList(StyleInterface $style)
{ {
$base_url = $this->getRouter()->getContext()->getBaseUrl(); $base_path = $style->getFilesPath() . '/screenshots';
$style_config = $style->getConfigurations(); $style_config = $style->getConfigurations();
$screenshots = array(); $screenshots = array();
foreach ($style_config['screenshots'] as $name => $desc) { foreach ($style_config['screenshots'] as $name => $desc) {
$screenshots[] = array( $screenshots[] = array(
'name' => $name, 'name' => $name,
'file' => ($base_url . '/' 'file' => $this->asset($base_path . '/' . $name . '.png'),
. $style->getFilesPath() . '/screenshots/'
. $name . '.png'),
'description' => $desc, 'description' => $desc,
); );
} }