Commit 2f5764b Jan Staněk
authored
File tree 4 files changed +36
-2
lines changed
WebModule/components/templates
4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ class BlockDetailDTO extends Nette\Object
43
43
*/
44
44
private $ aboutLector ;
45
45
46
+ /**
47
+ * @JMS\Type("string")
48
+ * @var string
49
+ */
50
+ private $ lectorPhoto ;
51
+
46
52
/**
47
53
* @JMS\Type("int")
48
54
* @var int
@@ -184,6 +190,22 @@ public function setAboutLector($aboutLector)
184
190
$ this ->aboutLector = $ aboutLector ;
185
191
}
186
192
193
+ /**
194
+ * @return string
195
+ */
196
+ public function getLectorPhoto ()
197
+ {
198
+ return $ this ->lectorPhoto ;
199
+ }
200
+
201
+ /**
202
+ * @param string $lectorPhoto
203
+ */
204
+ public function setLectorPhoto ($ lectorPhoto )
205
+ {
206
+ $ this ->lectorPhoto = $ lectorPhoto ;
207
+ }
208
+
187
209
/**
188
210
* @return int
189
211
*/
Original file line number Diff line number Diff line change @@ -380,6 +380,7 @@ private function convertBlockToBlockDetailDTO(Block $block)
380
380
$ blockDetailDTO ->setCategory ($ block ->getCategory () ? $ block ->getCategory ()->getName () : '' );
381
381
$ blockDetailDTO ->setLector ($ block ->getLector () ? $ block ->getLector ()->getDisplayName () : '' );
382
382
$ blockDetailDTO ->setAboutLector ($ block ->getLector () ? $ block ->getLector ()->getAbout () : '' );
383
+ $ blockDetailDTO ->setLectorPhoto ($ block ->getLector () ? $ block ->getLector ()->getPhoto () : NULL );
383
384
$ blockDetailDTO ->setDurationHours (floor ($ block ->getDuration () / 60 ));
384
385
$ blockDetailDTO ->setDurationMinutes ($ block ->getDuration () % 60 );
385
386
$ blockDetailDTO ->setCapacity ($ block ->getCapacity ());
Original file line number Diff line number Diff line change 99
99
100
100
{ if $selectedBlock -> getLector () && $selectedBlock -> getLector ()-> getAbout ()}
101
101
<h5 >{ _web.blocks_content.about_lector} </h5 >
102
- <p >{ $selectedBlock -> getLector ()-> getAbout ()} </p >
102
+ <p >
103
+ { if $selectedBlock -> getLector ()-> getPhoto ()}
104
+ <img src =" { $basePath } /files/user_photos/{ $selectedBlock -> getLector ()-> getPhoto ()} "
105
+ style =" float : left ; margin : 0 10px 10px 0 ;" />
106
+ { /if }
107
+ { $selectedBlock -> getLector ()-> getAbout ()}
108
+ </p >
103
109
{ /if }
104
110
</div >
105
111
{ else }
Original file line number Diff line number Diff line change 118
118
<div ng-bind-html =" event.block.description" ></div >
119
119
120
120
<h5 ><strong >{ _web.programs_content.about_lector} </strong ></h5 >
121
- <p >{ { event.block .about_lector } }</p >
121
+ <p >
122
+ <img ng-src =" { $basePath } /files/user_photos/{ { event.block .lector_photo } } "
123
+ ng-if =" event.block.lector_photo"
124
+ style =" float : left ; margin : 0 10px 10px 0 ;" />
125
+ { { event.block .about_lector } }
126
+ </p >
122
127
</div >
123
128
124
129
<div class =" modal-footer" >
You can’t perform that action at this time.
0 commit comments