summaryrefslogtreecommitdiff
path: root/app/Template/avatar_file/show.php
diff options
context:
space:
mode:
authorImbasaur <yarrusg@gmail.com>2016-04-13 17:05:59 +0200
committerImbasaur <yarrusg@gmail.com>2016-04-13 17:05:59 +0200
commit99f275e5bb033cca33eee87b0e914645730f13d1 (patch)
treead845419d56304f2bf014744f0878186f7155a3c /app/Template/avatar_file/show.php
parent13d5bd8e48bd6c0109d1272da58a8879bf9a6737 (diff)
parentcd5bf9d4d214ec9282b706c26bb27cabf150ee63 (diff)
Merge pull request #1 from fguillot/master
Diffstat (limited to 'app/Template/avatar_file/show.php')
-rw-r--r--app/Template/avatar_file/show.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/Template/avatar_file/show.php b/app/Template/avatar_file/show.php
new file mode 100644
index 00000000..266a2ccb
--- /dev/null
+++ b/app/Template/avatar_file/show.php
@@ -0,0 +1,20 @@
+<div class="page-header">
+ <h2><?= t('Avatar') ?></h2>
+</div>
+
+<?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path'], '') ?>
+
+<form method="post" enctype="multipart/form-data" action="<?= $this->url->href('AvatarFile', 'upload', array('user_id' => $user['id'])) ?>">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->label(t('Upload my avatar image'), 'avatar') ?>
+ <?= $this->form->file('avatar') ?>
+
+ <div class="form-actions">
+ <?php if (! empty($user['avatar_path'])): ?>
+ <?= $this->url->link(t('Remove my image'), 'AvatarFile', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?>
+ <?php endif ?>
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ </div>
+</form>