Merge branch 'stable-2.5'

* stable-2.5:
  Create ref for patch set that is created when a change is cherry-picked
  Add missing mail template examples to site init
  Fix: Projects created outside of Gerrit could not be cloned.
  Remove red background for outdated dependency after rebase
  Don't remove dashes from approval category name.
  Add `--is-draft` argument on patchset-created hook
  Add change topic in hook arguments
  Update the Gerrit 2.5 release notes for rc1
This commit is contained in:
Edwin Kempin
2012-10-06 07:39:51 +02:00
4 changed files with 94 additions and 2 deletions

View File

@@ -208,6 +208,7 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
s += " (" + c.getStatus().name() + ")";
}
if (changeRowFormatter != null) {
removeChangeStyle(row, changeRowFormatter);
final String rowStyle = changeRowFormatter.getRowStyle(c);
if (rowStyle != null) {
table.getRowFormatter().addStyleName(row, rowStyle);
@@ -226,6 +227,19 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
setRowItem(row, c);
}
private void removeChangeStyle(int row,
final ChangeRowFormatter changeRowFormatter) {
final ChangeInfo oldChange = getRowItem(row);
if (oldChange == null) {
return;
}
final String oldRowStyle = changeRowFormatter.getRowStyle(oldChange);
if (oldRowStyle != null) {
table.getRowFormatter().removeStyleName(row, oldRowStyle);
}
}
private AccountLink link(final Account.Id id) {
return AccountLink.link(accountCache, id);
}