Add reviewer/verifier name out beside check/plus/minus
* The purpose of this change is to be able to look at the various change lists and see who reviewed, verified without clicking in. There are various reasons this is nice, you can easily see who's doing reviews, who isn't lately just by looking quickly, as well as if anyone did a review for themselves (we're a small to mid team and people have access and sometimes do this)... this compared to the title label which you need to hover to see. * A user perference has been added to allow the user to toggle this setting on/off, it defaults to off to keep existing layout Change-Id: Iae347521b7645082a1d65759198d0347502ab55d
This commit is contained in:
@@ -166,6 +166,7 @@ public interface GerritCss extends CssResource {
|
||||
String sectionHeader();
|
||||
String sideBySideScreenLinkTable();
|
||||
String sideBySideScreenSideBySideTable();
|
||||
String singleLine();
|
||||
String skipLine();
|
||||
String smallHeading();
|
||||
String sourceFilePath();
|
||||
|
||||
@@ -31,6 +31,7 @@ public interface AccountConstants extends Constants {
|
||||
String useFlashClipboard();
|
||||
String copySelfOnEmails();
|
||||
String displayPatchSetsInReverseOrder();
|
||||
String displayPersonNameInReviewCategory();
|
||||
String buttonSaveChanges();
|
||||
|
||||
String tabAccountSummary();
|
||||
|
||||
@@ -8,6 +8,7 @@ showSiteHeader = Show Site Header
|
||||
useFlashClipboard = Use Flash Clipboard Widget
|
||||
copySelfOnEmails = CC Me On Comments I Write
|
||||
displayPatchSetsInReverseOrder = Display Patch Sets In Reverse Order
|
||||
displayPersonNameInReviewCategory = Display Person Name In Review Category
|
||||
defaultContextFieldLabel = Default Context:
|
||||
maximumPageSizeFieldLabel = Maximum Page Size:
|
||||
dateFormatLabel = Date/Time Format:
|
||||
|
||||
@@ -42,6 +42,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
private CheckBox useFlashClipboard;
|
||||
private CheckBox copySelfOnEmails;
|
||||
private CheckBox displayPatchSetsInReverseOrder;
|
||||
private CheckBox displayPersonNameInReviewCategory;
|
||||
private ListBox maximumPageSize;
|
||||
private ListBox dateFormat;
|
||||
private ListBox timeFormat;
|
||||
@@ -76,6 +77,9 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
displayPatchSetsInReverseOrder = new CheckBox(Util.C.displayPatchSetsInReverseOrder());
|
||||
displayPatchSetsInReverseOrder.addClickHandler(onClickSave);
|
||||
|
||||
displayPersonNameInReviewCategory = new CheckBox(Util.C.displayPersonNameInReviewCategory());
|
||||
displayPersonNameInReviewCategory.addClickHandler(onClickSave);
|
||||
|
||||
maximumPageSize = new ListBox();
|
||||
for (final short v : PAGESIZE_CHOICES) {
|
||||
maximumPageSize.addItem(Util.M.rowsPerPage(v), String.valueOf(v));
|
||||
@@ -117,7 +121,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
dateTimePanel.add(dateFormat);
|
||||
dateTimePanel.add(timeFormat);
|
||||
}
|
||||
final Grid formGrid = new Grid(6, 2);
|
||||
final Grid formGrid = new Grid(7, 2);
|
||||
|
||||
int row = 0;
|
||||
formGrid.setText(row, labelIdx, "");
|
||||
@@ -136,6 +140,10 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
formGrid.setWidget(row, fieldIdx, displayPatchSetsInReverseOrder);
|
||||
row++;
|
||||
|
||||
formGrid.setText(row, labelIdx, "");
|
||||
formGrid.setWidget(row, fieldIdx, displayPersonNameInReviewCategory);
|
||||
row++;
|
||||
|
||||
formGrid.setText(row, labelIdx, Util.C.maximumPageSizeFieldLabel());
|
||||
formGrid.setWidget(row, fieldIdx, maximumPageSize);
|
||||
row++;
|
||||
@@ -172,6 +180,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
useFlashClipboard.setEnabled(on);
|
||||
copySelfOnEmails.setEnabled(on);
|
||||
displayPatchSetsInReverseOrder.setEnabled(on);
|
||||
displayPersonNameInReviewCategory.setEnabled(on);
|
||||
maximumPageSize.setEnabled(on);
|
||||
dateFormat.setEnabled(on);
|
||||
timeFormat.setEnabled(on);
|
||||
@@ -182,6 +191,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
useFlashClipboard.setValue(p.isUseFlashClipboard());
|
||||
copySelfOnEmails.setValue(p.isCopySelfOnEmails());
|
||||
displayPatchSetsInReverseOrder.setValue(p.isDisplayPatchSetsInReverseOrder());
|
||||
displayPersonNameInReviewCategory.setValue(p.isDisplayPersonNameInReviewCategory());
|
||||
setListBox(maximumPageSize, DEFAULT_PAGESIZE, p.getMaximumPageSize());
|
||||
setListBox(dateFormat, AccountGeneralPreferences.DateFormat.STD, //
|
||||
p.getDateFormat());
|
||||
@@ -242,6 +252,7 @@ public class MyPreferencesScreen extends SettingsScreen {
|
||||
p.setUseFlashClipboard(useFlashClipboard.getValue());
|
||||
p.setCopySelfOnEmails(copySelfOnEmails.getValue());
|
||||
p.setDisplayPatchSetsInReverseOrder(displayPatchSetsInReverseOrder.getValue());
|
||||
p.setDisplayPersonNameInReviewCategory(displayPersonNameInReviewCategory.getValue());
|
||||
p.setMaximumPageSize(getListBox(maximumPageSize, DEFAULT_PAGESIZE));
|
||||
p.setDateFormat(getListBox(dateFormat,
|
||||
AccountGeneralPreferences.DateFormat.STD,
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.google.gerrit.common.data.ApprovalType;
|
||||
import com.google.gerrit.common.data.ChangeInfo;
|
||||
import com.google.gerrit.common.data.ToggleStarRequest;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.AccountGeneralPreferences;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategory;
|
||||
import com.google.gerrit.reviewdb.ApprovalCategoryValue;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
@@ -46,7 +47,10 @@ import com.google.gwt.event.dom.client.KeyCodes;
|
||||
import com.google.gwt.event.dom.client.KeyPressEvent;
|
||||
import com.google.gwt.resources.client.ImageResource;
|
||||
import com.google.gwt.user.client.DOM;
|
||||
import com.google.gwt.user.client.ui.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
import com.google.gwt.user.client.ui.InlineLabel;
|
||||
import com.google.gwt.user.client.ui.UIObject;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
|
||||
@@ -309,11 +313,22 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
int col = BASE_COLUMNS;
|
||||
boolean haveReview = false;
|
||||
|
||||
boolean displayPersonNameInReviewCategory = false;
|
||||
|
||||
if (Gerrit.isSignedIn()) {
|
||||
AccountGeneralPreferences prefs = Gerrit.getUserAccount().getGeneralPreferences();
|
||||
|
||||
if (prefs.isDisplayPersonNameInReviewCategory()) {
|
||||
displayPersonNameInReviewCategory = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (final ApprovalType type : approvalTypes) {
|
||||
final PatchSetApproval ca = approvals.get(type.getCategory().getId());
|
||||
|
||||
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().negscore());
|
||||
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().posscore());
|
||||
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().singleLine());
|
||||
|
||||
if (ca == null || ca.getValue() == 0) {
|
||||
table.clearCell(row, col);
|
||||
@@ -321,14 +336,38 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
} else {
|
||||
haveReview = true;
|
||||
|
||||
final ApprovalCategoryValue acv = type.getValue(ca);
|
||||
final AccountInfo ai = aic.get(ca.getAccountId());
|
||||
|
||||
if (type.isMaxNegative(ca)) {
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
FlowPanel fp = new FlowPanel();
|
||||
fp.add(new Image(Gerrit.RESOURCES.redNot()));
|
||||
fp.add(new InlineLabel(FormatUtil.name(ai)));
|
||||
table.setWidget(row, col, fp);
|
||||
} else {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
|
||||
}
|
||||
|
||||
} else if (type.isMaxPositive(ca)) {
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
FlowPanel fp = new FlowPanel();
|
||||
fp.add(new Image(Gerrit.RESOURCES.greenCheck()));
|
||||
fp.add(new InlineLabel(FormatUtil.name(ai)));
|
||||
table.setWidget(row, col, fp);
|
||||
} else {
|
||||
table.setWidget(row, col, new Image(Gerrit.RESOURCES.greenCheck()));
|
||||
}
|
||||
|
||||
} else {
|
||||
String vstr = String.valueOf(ca.getValue());
|
||||
|
||||
if (displayPersonNameInReviewCategory) {
|
||||
vstr = vstr + " " + FormatUtil.name(ai);
|
||||
}
|
||||
|
||||
if (ca.getValue() > 0) {
|
||||
vstr = "+" + vstr;
|
||||
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().posscore());
|
||||
@@ -338,9 +377,6 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
|
||||
table.setText(row, col, vstr);
|
||||
}
|
||||
|
||||
final ApprovalCategoryValue acv = type.getValue(ca);
|
||||
final AccountInfo ai = aic.get(ca.getAccountId());
|
||||
|
||||
// Some web browsers ignore the embedded newline; some like it;
|
||||
// so we include a space before the newline to accommodate both.
|
||||
//
|
||||
|
||||
@@ -507,7 +507,9 @@
|
||||
.changeTable .dataCell.posscore {
|
||||
color: #08a400;
|
||||
}
|
||||
|
||||
.changeTable .dataCell.singleLine {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.changeTable .iconHeader {
|
||||
border-top: 1px solid backgroundColor;
|
||||
border-bottom: 1px solid backgroundColor;
|
||||
|
||||
@@ -117,6 +117,9 @@ public final class AccountGeneralPreferences {
|
||||
@Column(id = 10)
|
||||
protected boolean displayPatchSetsInReverseOrder;
|
||||
|
||||
@Column(id = 11)
|
||||
protected boolean displayPersonNameInReviewCategory;
|
||||
|
||||
public AccountGeneralPreferences() {
|
||||
}
|
||||
|
||||
@@ -190,6 +193,14 @@ public final class AccountGeneralPreferences {
|
||||
this.displayPatchSetsInReverseOrder = displayPatchSetsInReverseOrder;
|
||||
}
|
||||
|
||||
public boolean isDisplayPersonNameInReviewCategory() {
|
||||
return displayPersonNameInReviewCategory;
|
||||
}
|
||||
|
||||
public void setDisplayPersonNameInReviewCategory(final boolean displayPersonNameInReviewCategory) {
|
||||
this.displayPersonNameInReviewCategory = displayPersonNameInReviewCategory;
|
||||
}
|
||||
|
||||
public DateFormat getDateFormat() {
|
||||
if (dateFormat == null) {
|
||||
return DateFormat.STD;
|
||||
@@ -218,6 +229,7 @@ public final class AccountGeneralPreferences {
|
||||
useFlashClipboard = true;
|
||||
copySelfOnEmail = false;
|
||||
displayPatchSetsInReverseOrder = false;
|
||||
displayPersonNameInReviewCategory = false;
|
||||
downloadUrl = null;
|
||||
downloadCommand = null;
|
||||
dateFormat = null;
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
/** A version of the database schema. */
|
||||
public abstract class SchemaVersion {
|
||||
/** The current schema version. */
|
||||
private static final Class<? extends SchemaVersion> C = Schema_49.class;
|
||||
private static final Class<? extends SchemaVersion> C = Schema_50.class;
|
||||
|
||||
public static class Module extends AbstractModule {
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2011 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.server.schema;
|
||||
|
||||
import com.google.gerrit.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.reviewdb.ReviewDb;
|
||||
import com.google.gwtorm.client.OrmException;
|
||||
import com.google.gwtorm.jdbc.JdbcSchema;
|
||||
import com.google.gwtorm.schema.sql.DialectH2;
|
||||
import com.google.gwtorm.schema.sql.DialectMySQL;
|
||||
import com.google.gwtorm.schema.sql.DialectPostgreSQL;
|
||||
import com.google.gwtorm.schema.sql.SqlDialect;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
public class Schema_50 extends SchemaVersion {
|
||||
@Inject
|
||||
Schema_50(Provider<Schema_49> prior) {
|
||||
super(prior);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user