} else { ?> <?php echo input_file_tag('main_image', array()); ?> <?php } ?> </div> <div class="other-image"> <fieldset> <legend>Other Images</legend> <?php $medias = MediaPeer::getOtherImages($model->getId(), 'Model'); ?> <?php foreach ($medias as $media) { ?> <div class="edit-media-item"> <?php echo image_tag(public_path('uploads/th_' . $media->getId() . '.' . $media->getExt()), array()); ?> <div><?php echo link_to('Delete', 'media/delete?id=' . $media->getId() . '&parent=' . $config->getId(), array('confirm' => 'Are you sure?')); ?> </div> </div> <?php }