} ?> </div> <div class="config-fields"> <!-- Image section start --> <h2>Available images for this model</h2> <fieldset> <legend>Images</legend> <div id="model-images"> <div class="main-image"> <label>Main Image</label> <?php if ($media = MediaPeer::getMainImage($model->getId(), 'Model')) { ?> <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 } else { ?> <?php echo input_file_tag('main_image', array());