Added avatar image upload
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
$task['assignee_username'],
|
||||
$task['assignee_name'],
|
||||
$task['assignee_email'],
|
||||
$task['assignee_avatar_path'],
|
||||
'avatar-inline'
|
||||
) ?>
|
||||
</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
|
||||
|
||||
<?= $this->avatar->render($comment['user_id'], $comment['username'], $comment['name'], $comment['email']) ?>
|
||||
<?= $this->avatar->render($comment['user_id'], $comment['username'], $comment['name'], $comment['email'], $comment['avatar_path']) ?>
|
||||
|
||||
<div class="comment-title">
|
||||
<?php if (! empty($comment['username'])): ?>
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
$event['creator_id'],
|
||||
$event['author_username'],
|
||||
$event['author_name'],
|
||||
$event['email']
|
||||
$event['email'],
|
||||
$event['avatar_path']
|
||||
) ?>
|
||||
|
||||
<div class="activity-content">
|
||||
|
||||
20
app/Template/user/avatar.php
Normal file
20
app/Template/user/avatar.php
Normal file
@@ -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('user', 'uploadAvatar', 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'), 'User', 'removeAvatar', 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>
|
||||
@@ -37,6 +37,9 @@
|
||||
<li <?= $this->app->checkMenuSelection('user', 'edit') ?>>
|
||||
<?= $this->url->link(t('Edit profile'), 'user', 'edit', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('user', 'avatar') ?>>
|
||||
<?= $this->url->link(t('Avatar'), 'user', 'avatar', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['is_ldap_user'] == 0): ?>
|
||||
|
||||
Reference in New Issue
Block a user