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:56] smayr [Model] |
systems:yii2:file_upload [2018/03/01 16:22] (current) smayr [View] |
||
---|---|---|---|
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:: | ||
+ | ?> | ||
</ | </ |