<dt><?php __('Image'); ?></dt>
<dd>
<?php
+ $url = null;
+ if ($user['User']['id'] == $target_user['User']['id']) {
+ $url = array(
+ 'controller' => 'users',
+ 'action' => 'edit_image',
+ );
+ }
+
if (isset($target_user['Attachment'][0])) {
$img_name = isset($target_user['Attachment'][0]['alternative']) ? $target_user['Attachment'][0]['alternative'] : $target_user['Attachment'][0]['basename'];
echo $medium->embed(
$file,
array(
+ 'url' => $url,
+ 'alt' => $target_user['User']['name'],
+ 'id' => 'HomeUserImage',
'restrict' => array('image')
)
);
echo " ";
}
} else {
+ echo $html->link(__('Edit Image', true), $url);
echo " ";
}
?>
<fieldset>
<legend><?php __('Edit Image');?></legend>
<?php
- echo $this->element('attachments', array('plugin' => 'media'));
+ echo $this->element('attachments', array(
+ 'plugin' => 'media',
+ 'previewVersion' => 'm',
+ ));
echo $token->create();
?>