Merge "Add UI extension point at bottom of the user preferences screen"
This commit is contained in:
commit
a853df32ac
@ -1019,6 +1019,17 @@ Panel will be shown at the bottom of the screen.
|
||||
The link:rest-api-accounts.html#account-info[AccountInfo] entity for
|
||||
the current user.
|
||||
|
||||
* User Preferences Screen:
|
||||
** `GerritUiExtensionPoint.PREFERENCES_SCREEN_BOTTOM`:
|
||||
+
|
||||
Panel will be shown at the bottom of the screen.
|
||||
|
||||
** The following parameters are provided:
|
||||
*** `GerritUiExtensionPoint.Key.ACCOUNT_INFO`:
|
||||
+
|
||||
The link:rest-api-accounts.html#account-info[AccountInfo] entity for
|
||||
the current user.
|
||||
|
||||
* User Profile Screen:
|
||||
** `GerritUiExtensionPoint.PROFILE_SCREEN_BOTTOM`:
|
||||
+
|
||||
|
@ -24,6 +24,9 @@ public enum GerritUiExtensionPoint {
|
||||
/* MyPasswordScreen */
|
||||
PASSWORD_SCREEN_BOTTOM,
|
||||
|
||||
/* MyPreferencesScreen */
|
||||
PREFERENCES_SCREEN_BOTTOM,
|
||||
|
||||
/* MyProfileScreen */
|
||||
PROFILE_SCREEN_BOTTOM,
|
||||
|
||||
|
@ -18,7 +18,9 @@ import static com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DEFAUL
|
||||
import static com.google.gerrit.reviewdb.client.AccountGeneralPreferences.PAGESIZE_CHOICES;
|
||||
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.GerritUiExtensionPoint;
|
||||
import com.google.gerrit.client.StringListPanel;
|
||||
import com.google.gerrit.client.api.ExtensionPanel;
|
||||
import com.google.gerrit.client.config.ConfigServerApi;
|
||||
import com.google.gerrit.client.extensions.TopMenuItem;
|
||||
import com.google.gerrit.client.rpc.GerritCallback;
|
||||
@ -220,6 +222,11 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
@Override
|
||||
protected void onLoad() {
|
||||
super.onLoad();
|
||||
ExtensionPanel extensionPanel =
|
||||
createExtensionPoint(GerritUiExtensionPoint.PREFERENCES_SCREEN_BOTTOM);
|
||||
extensionPanel.addStyleName(Gerrit.RESOURCES.css().extensionPanel());
|
||||
add(extensionPanel);
|
||||
|
||||
AccountApi.self().view("preferences")
|
||||
.get(new ScreenLoadCallback<Preferences>(this) {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user