Permalink
Browse files

fixed a screen for albumImage/edit

  • Loading branch information...
1 parent f961548 commit c9bda5bfd671c1a00f591d6dda4c0823bdcd3a71 @kawahara kawahara committed Sep 4, 2011
@@ -51,7 +51,6 @@ public function executeEdit(sfWebRequest $request)
$this->forward404Unless($this->isAlbumAuthor());
$this->form = new AlbumImageForm($this->albumImage);
- $this->form->setPhoto();
$this->form->setAlbumChoices();
$this->deleteForm = new sfForm();
@@ -1,3 +1,16 @@
+<?php slot('_album_detail_table') ?>
+<table>
+<tr>
+<td colspan="2" class="photo"><?php echo image_tag_sf_image($albumImage->getFile(), array('size' => '600x600')) ?></td>
+</tr>
+<tr>
+<th><?php echo __('Description') ?></th><td><?php echo $albumImage->getDescription() ?></td>
+</tr>
+</table>
+<?php end_slot(); ?>
+
+<?php echo op_include_box('albumImageDetailBox', get_slot('_album_detail_table')) ?>
+
<?php
$options['title'] = __('Edit your uploaded photo');
@@ -9,9 +22,11 @@
?>
<?php
-op_include_form('albumForm', $deleteForm, array(
+op_include_form('albumDeleteForm', new sfForm(), array(
'title' => __('Delete this photo'),
'button' => __('Delete'),
'url' => url_for('album_image_delete', $albumImage),
));
?>
+
+<?php op_include_line('backLink', link_to(__('Back to the album'), 'album_show', $album)) ?>
@@ -70,8 +70,8 @@ public function setPhoto()
'with_delete' => false,
'template' => get_partial('default/formEditImage', array('image' => $this->getObject())),
);
- $this->setWidget('photo', new sfWidgetFormInputFileEditable($options, array('size' => 40)));
-
+ $this->setWidget('photo', new sfWidgetFormInputFileEditable($options, array('size' => 40)));
+
$this->setValidator('photo', new opValidatorImageFile(array('required' => false)));
}
}

0 comments on commit c9bda5b

Please sign in to comment.