diff --git a/app/ApiModule/DTO/Schedule/BlockDetailDTO.php b/app/ApiModule/DTO/Schedule/BlockDetailDTO.php index 3ef1a8a5d..1f4723881 100644 --- a/app/ApiModule/DTO/Schedule/BlockDetailDTO.php +++ b/app/ApiModule/DTO/Schedule/BlockDetailDTO.php @@ -43,6 +43,12 @@ class BlockDetailDTO extends Nette\Object */ private $aboutLector; + /** + * @JMS\Type("string") + * @var string + */ + private $lectorPhoto; + /** * @JMS\Type("int") * @var int @@ -184,6 +190,22 @@ public function setAboutLector($aboutLector) $this->aboutLector = $aboutLector; } + /** + * @return string + */ + public function getLectorPhoto() + { + return $this->lectorPhoto; + } + + /** + * @param string $lectorPhoto + */ + public function setLectorPhoto($lectorPhoto) + { + $this->lectorPhoto = $lectorPhoto; + } + /** * @return int */ diff --git a/app/ApiModule/services/ScheduleService.php b/app/ApiModule/services/ScheduleService.php index 4622f4594..759df04f4 100644 --- a/app/ApiModule/services/ScheduleService.php +++ b/app/ApiModule/services/ScheduleService.php @@ -380,6 +380,7 @@ private function convertBlockToBlockDetailDTO(Block $block) $blockDetailDTO->setCategory($block->getCategory() ? $block->getCategory()->getName() : ''); $blockDetailDTO->setLector($block->getLector() ? $block->getLector()->getDisplayName() : ''); $blockDetailDTO->setAboutLector($block->getLector() ? $block->getLector()->getAbout() : ''); + $blockDetailDTO->setLectorPhoto($block->getLector() ? $block->getLector()->getPhoto() : NULL); $blockDetailDTO->setDurationHours(floor($block->getDuration() / 60)); $blockDetailDTO->setDurationMinutes($block->getDuration() % 60); $blockDetailDTO->setCapacity($block->getCapacity()); diff --git a/app/WebModule/components/templates/blocks_content.latte b/app/WebModule/components/templates/blocks_content.latte index 4cde16aac..64942289b 100644 --- a/app/WebModule/components/templates/blocks_content.latte +++ b/app/WebModule/components/templates/blocks_content.latte @@ -99,7 +99,13 @@ {if $selectedBlock->getLector() && $selectedBlock->getLector()->getAbout()}
{_web.blocks_content.about_lector}
-

{$selectedBlock->getLector()->getAbout()}

+

+ {if $selectedBlock->getLector()->getPhoto()} + + {/if} + {$selectedBlock->getLector()->getAbout()} +

{/if} {else} diff --git a/app/WebModule/components/templates/programs_content.latte b/app/WebModule/components/templates/programs_content.latte index 4fb0f668f..36ab66506 100644 --- a/app/WebModule/components/templates/programs_content.latte +++ b/app/WebModule/components/templates/programs_content.latte @@ -118,7 +118,12 @@
{_web.programs_content.about_lector}
-

{{ event.block.about_lector }}

+

+ + {{ event.block.about_lector }} +