Hyperlink change owner to open changes by same owner
Some users like to quickly find other changes written by the same user, especially if they aren't immediately listed in the Related Changes panel, such as changes that cross projects. Hyperlink the owner name to all changes by the same user. Change-Id: Iffdc09fddbfcabf3f90a7272b31bfe0044f9d48c
This commit is contained in:
parent
035d20cbf9
commit
cf5c00e99f
@ -137,7 +137,7 @@ public class ChangeScreen2 extends Screen {
|
||||
|
||||
@UiField Element ccText;
|
||||
@UiField Reviewers reviewers;
|
||||
@UiField Element ownerText;
|
||||
@UiField InlineHyperlink ownerLink;
|
||||
@UiField Element statusText;
|
||||
@UiField Image projectQuery;
|
||||
@UiField InlineHyperlink projectLink;
|
||||
@ -825,11 +825,17 @@ public class ChangeScreen2 extends Screen {
|
||||
String name = info.owner().name() != null
|
||||
? info.owner().name()
|
||||
: Gerrit.getConfig().getAnonymousCowardName();
|
||||
String email = info.owner().email() != null
|
||||
|
||||
ownerLink.setText(name);
|
||||
ownerLink.setTitle(info.owner().email() != null
|
||||
? info.owner().email()
|
||||
: name;
|
||||
ownerText.setInnerText(name);
|
||||
ownerText.setTitle(email);
|
||||
: name);
|
||||
ownerLink.setTargetHistoryToken(PageLinks.toAccountQuery(
|
||||
info.owner().name() != null
|
||||
? info.owner().name()
|
||||
: info.owner().email() != null
|
||||
? info.owner().email()
|
||||
: String.valueOf(info.owner()._account_id()), Change.Status.NEW));
|
||||
}
|
||||
|
||||
private void renderSubmitType(String action) {
|
||||
|
@ -368,7 +368,7 @@ limitations under the License.
|
||||
<table id='change_infoTable'>
|
||||
<tr>
|
||||
<th><ui:msg>Owner</ui:msg></th>
|
||||
<td ui:field='ownerText'/>
|
||||
<td><x:InlineHyperlink ui:field='ownerLink'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><ui:msg>Reviewers</ui:msg></th>
|
||||
|
Loading…
Reference in New Issue
Block a user