Skip to content

Commit

Permalink
improve user manage page
Browse files Browse the repository at this point in the history
- show aliases for user
- redirect back to edit same user after save
  • Loading branch information
glensc committed Jan 14, 2016
1 parent da490ed commit 5ff030b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Eventum Issue Tracking System
- Add preference support to turn off relative dates (@balsdorf, #125)
- Upload on paste from clipboard (@glensc, #126)
- Fix multiple chosen selections overlapping next line (@slay123, aa5e352)
- Improve user manage page (@glensc)

2015-12-31, Version [3.0.7]
--------------------
Expand Down
4 changes: 4 additions & 0 deletions htdocs/manage/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
1 => array(ev_gettext('Thank you, the user was updated successfully.'), Misc::MSG_INFO),
-1 => array(ev_gettext('An error occurred while trying to update the user information.'), Misc::MSG_ERROR),
));

$usr_id = $_POST['id'];
Auth::redirect("users.php?cat=edit&id={$usr_id}");

} elseif (@$_POST['cat'] == 'change_status') {
User::changeStatus($_POST['items'], $_POST['status']);
}
Expand Down
1 change: 1 addition & 0 deletions lib/eventum/class.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ public static function getDetailsAssoc($usr_ids)
$roles = Project::getAssocList($row['usr_id'], false, true);
$row['projects'] = array_keys($roles);
$row['roles'] = $roles;
$row['aliases'] = self::getAliases($row['usr_id']);
}
$returns[$key] = $res;
}
Expand Down
23 changes: 21 additions & 2 deletions templates/manage/users.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
{t}Manage Users{/t}
</th>
</tr>

<tr>
<th width="120">
{t}Email Address{/t}
Expand All @@ -132,6 +133,24 @@
{include file="error_icon.tpl.html" field="email"}
</td>
</tr>

{if isset($info)}
<tr>
<th width="120">
{t}Email Aliases{/t}
</th>
<td>
{foreach from=$info.aliases item=email}
<i>{$email}</i><br>
{/foreach}

<br>
<a href="email_alias.php?id={$info.usr_id}" class="manage_alias" data-usr-id="{$info.usr_id}">{t}manage aliases{/t}</a>
</td>
</tr>
{/if}


<tr>
<th width="120">
{t}Password{/t}
Expand Down Expand Up @@ -237,7 +256,7 @@
<th>&nbsp;{t}Full Name{/t}</th>
<th>&nbsp;{t}Role{/t}</th>
<th>&nbsp;{t}Email Address{/t}</th>
<th>&nbsp;{t}Email Alias{/t}</th>
<th>&nbsp;{t}Email Aliases{/t}</th>
<th>&nbsp;{t}Status{/t}</th>
<th>&nbsp;{t}Group{/t}</th>
<th>&nbsp;{t}Partner{/t}</th>
Expand All @@ -263,7 +282,7 @@
{/foreach}
</td>
<td width="10%">
&nbsp;<a title="{t}list all email aliases{/t}" href="email_alias.php?id={$list[i].usr_id}" class="manage_alias" data-usr-id="{$list[i].usr_id}">{t}manage aliases{/t}</a>
&nbsp;<a href="email_alias.php?id={$list[i].usr_id}" class="manage_alias" data-usr-id="{$list[i].usr_id}">{t}manage aliases{/t}</a>
</td>
<td width="10%">
&nbsp;{$list[i].usr_status|capitalize}
Expand Down

0 comments on commit 5ff030b

Please sign in to comment.