* This Source Code Form is "Incompatible With Secondary Licenses", as
* defined by the Mozilla Public License, v. 2.0. */
-function show_usermenu(id, email, show_edit) {
+function show_usermenu(id, email, show_edit, hide_profile) {
var items = [
- {
- name: "Profile",
- callback: function () {
- var href = `${BUGZILLA.config.basepath}user_profile?user_id=${id}`;
- window.open(href, "_blank");
- }
- },
{
name: "Activity",
callback: function () {
}
}
];
+ if (!hide_profile) {
+ items.push({
+ name: "Profile",
+ callback: function () {
+ var href = `${BUGZILLA.config.basepath}user_profile?user_id=${id}`;
+ window.open(href, "_blank");
+ }
+ });
+ }
if (show_edit) {
items.push({
name: "Edit",
$(function() {
$('.show_usermenu').on("click", function (event) {
var $this = $(this);
- return show_usermenu($this.data('user-id'), $this.data('user-email'), $this.data('show-edit'));
+ return show_usermenu($this.data('user-id'), $this.data('user-email'), $this.data('show-edit'), $this.data('hide-profile'));
});
});
data-user-email="[% u.email FILTER html %]"
data-user-id="[% u.id FILTER html %]"
data-show-edit="[% user.in_group('editusers') || user.in_group('disableusers') || user.bless_groups.size > 0 ? 1 : 0 %]"
+ data-hide-profile="[% hide_profile ? 1: 0 %]"
title="[% u.identity FILTER html %]"
[% ELSE %]
href="[% basepath FILTER none %]user_profile?user_id=[% u.id FILTER none %]"
[% END %]
</td>
- <th>Name</th>
+ <th>User</th>
<td colspan="2">
- [% target.name || target.address.user FILTER html %]
+ [% INCLUDE bug_modal/user.html.tmpl u = target hide_profile = 1 %]
</td>
</tr>
-[% IF user.id %]
- <tr>
- <th>Email</th>
- <td colspan="2">
- <a href="mailto:[% target.login FILTER uri %]">[% target.login FILTER html %]</a>
- [% " (disabled)" UNLESS target.is_enabled %]
- </td>
- </tr>
- <tr>
- <td>
- </td>
- </tr>
-[% END %]
-
[%# user.creation_ts is added by the TagNewUsers extension %]
[% IF target.can('creation_ts') %]
<tr>