Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:yii2:file_upload [2018/02/28 17:55] smayr [Controller] |
systems:yii2:file_upload [2018/03/01 16:22] (current) smayr [View] |
||
---|---|---|---|
Line 477: | Line 477: | ||
$this-> | $this-> | ||
if(is_object($this-> | if(is_object($this-> | ||
- | $path = Yii:: | + | $path = Yii:: |
$this-> | $this-> | ||
- | $this-> | + | $this-> |
\Yii:: | \Yii:: | ||
-> | -> | ||
Line 508: | Line 508: | ||
=== View === | === View === | ||
<code php> | <code php> | ||
- | <?= $form-> | + | <?= $form-> |
</ | </ | ||
Line 828: | Line 828: | ||
</ | </ | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | Or simply use the Yii modal helper: | ||
+ | <code php> | ||
+ | <?php | ||
+ | $itemImage = (!empty($model-> | ||
+ | Yii:: | ||
+ | '' | ||
+ | ); | ||
+ | |||
+ | // Image Thumbnail | ||
+ | if(!empty($itemImage)) { | ||
+ | echo "< | ||
+ | } else { | ||
+ | echo "< | ||
+ | } | ||
+ | | ||
+ | echo Html:: | ||
+ | [' | ||
+ | [' | ||
+ | ); | ||
+ | |||
+ | // Modal Window | ||
+ | yii\bootstrap\Modal:: | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ], | ||
+ | ]); | ||
+ | |||
+ | if(!empty($itemImage)) { | ||
+ | echo "< | ||
+ | } else { | ||
+ | echo "< | ||
+ | } | ||
+ | echo '< | ||
+ | echo ' | ||
+ | echo '</ | ||
+ | |||
+ | yii\bootstrap\Modal:: | ||
+ | ?> | ||
</ | </ |