summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/avatar_file/show.php20
-rw-r--r--app/Template/board/task_avatar.php1
-rw-r--r--app/Template/comment/show.php2
-rw-r--r--app/Template/event/events.php3
-rw-r--r--app/Template/listing/show.php6
-rw-r--r--app/Template/task/sidebar.php3
-rw-r--r--app/Template/user/profile.php1
-rw-r--r--app/Template/user/sidebar.php3
8 files changed, 36 insertions, 3 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>
diff --git a/app/Template/board/task_avatar.php b/app/Template/board/task_avatar.php
index 5630c190..39f6b54d 100644
--- a/app/Template/board/task_avatar.php
+++ b/app/Template/board/task_avatar.php
@@ -12,6 +12,7 @@
$task['assignee_username'],
$task['assignee_name'],
$task['assignee_email'],
+ $task['assignee_avatar_path'],
'avatar-inline'
) ?>
</span>
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
index ce456c5d..3f45e2e7 100644
--- a/app/Template/comment/show.php
+++ b/app/Template/comment/show.php
@@ -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'])): ?>
diff --git a/app/Template/event/events.php b/app/Template/event/events.php
index ef651321..c58376c4 100644
--- a/app/Template/event/events.php
+++ b/app/Template/event/events.php
@@ -7,7 +7,8 @@
$event['creator_id'],
$event['author_username'],
$event['author_name'],
- $event['email']
+ $event['email'],
+ $event['avatar_path']
) ?>
<div class="activity-content">
diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php
index c7887ebd..98b9528a 100644
--- a/app/Template/listing/show.php
+++ b/app/Template/listing/show.php
@@ -18,7 +18,11 @@
<?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
- <?= $this->render('task/dropdown', array('task' => $task)) ?>
+ <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
+ <?= $this->render('task/dropdown', array('task' => $task)) ?>
+ <?php else: ?>
+ #<?= $task['id'] ?>
+ <?php endif ?>
</td>
<td>
<?= $this->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php
index ee3b1594..773b28dc 100644
--- a/app/Template/task/sidebar.php
+++ b/app/Template/task/sidebar.php
@@ -24,6 +24,8 @@
</li>
<?php endif ?>
</ul>
+
+ <?php if ($this->user->hasProjectAccess('taskmodification', 'edit', $task['project_id'])): ?>
<h2><?= t('Actions') ?></h2>
<ul>
<li>
@@ -90,6 +92,7 @@
</li>
<?php endif ?>
</ul>
+ <?php endif ?>
<?= $this->hook->render('template:task:sidebar', array('task' => $task)) ?>
</div>
diff --git a/app/Template/user/profile.php b/app/Template/user/profile.php
index 80a633e3..9c9d3282 100644
--- a/app/Template/user/profile.php
+++ b/app/Template/user/profile.php
@@ -1,5 +1,6 @@
<section id="main">
<br>
+ <?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path']) ?>
<ul class="listing">
<li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li>
<li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li>
diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php
index 20fd2ad2..5ea2e355 100644
--- a/app/Template/user/sidebar.php
+++ b/app/Template/user/sidebar.php
@@ -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('AvatarFile') ?>>
+ <?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?>
+ </li>
<?php endif ?>
<?php if ($user['is_ldap_user'] == 0): ?>