Add support for diff web links
Plugins can now add web links to the diff screen that will be displayed next to the navigation icons. Change-Id: Ifa01103054c3e81e3121c219ee5b69db2fefb3bf Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.client.diff;
|
||||
import com.google.gerrit.client.Dispatcher;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.GitwebLink;
|
||||
import com.google.gerrit.client.WebLinkInfo;
|
||||
import com.google.gerrit.client.changes.ChangeApi;
|
||||
import com.google.gerrit.client.changes.ChangeInfo;
|
||||
import com.google.gerrit.client.changes.ChangeInfo.RevisionInfo;
|
||||
@@ -211,13 +212,17 @@ class Header extends Composite {
|
||||
project.setInnerText(info.project());
|
||||
}
|
||||
|
||||
void init(PreferencesAction pa, List<InlineHyperlink> links) {
|
||||
void init(PreferencesAction pa, List<InlineHyperlink> links,
|
||||
List<WebLinkInfo> webLinks) {
|
||||
prefsAction = pa;
|
||||
prefsAction.setPartner(preferences);
|
||||
|
||||
for (InlineHyperlink link : links) {
|
||||
linkPanel.add(link);
|
||||
}
|
||||
for (WebLinkInfo webLink : webLinks) {
|
||||
linkPanel.add(webLink.toAnchor());
|
||||
}
|
||||
}
|
||||
|
||||
@UiHandler("reviewed")
|
||||
|
||||
Reference in New Issue
Block a user