Draft patchset and change visibility in UI
If a patchset is a draft, adds a (DRAFT) label next to the revision (or gitweb link if it exists). If a change is a draft, adds a (DRAFT) next to the subject and changes the status appropriately. Change-Id: Ib84ccc2aff9feebc203424a620e2c4b7975ac000
This commit is contained in:
@@ -21,6 +21,7 @@ public interface ChangeConstants extends Constants {
|
||||
String statusLongSubmitted();
|
||||
String statusLongMerged();
|
||||
String statusLongAbandoned();
|
||||
String statusLongDraft();
|
||||
|
||||
String changesRecentlyClosed();
|
||||
|
||||
@@ -140,10 +141,12 @@ public interface ChangeConstants extends Constants {
|
||||
String pagedChangeListPrev();
|
||||
String pagedChangeListNext();
|
||||
|
||||
String draftPatchSetLabel();
|
||||
|
||||
String reviewed();
|
||||
String submitFailed();
|
||||
String buttonClose();
|
||||
|
||||
String buttonDiffAllSideBySide();
|
||||
String buttonDiffAllUnified();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ statusLongNew = Review in Progress
|
||||
statusLongSubmitted = Submitted, Merge Pending
|
||||
statusLongMerged = Merged
|
||||
statusLongAbandoned = Abandoned
|
||||
statusLongDraft = Draft
|
||||
|
||||
starredHeading = Starred Changes
|
||||
watchedHeading = Open Changes of Watched Projects
|
||||
@@ -117,6 +118,8 @@ headingPatchComments = Patch Comments:
|
||||
pagedChangeListPrev = ⇦Prev
|
||||
pagedChangeListNext = Next⇨
|
||||
|
||||
draftPatchSetLabel = (DRAFT)
|
||||
|
||||
upToChangeIconLink = ⇧Up to change
|
||||
prevPatchLinkIcon = ⇦
|
||||
nextPatchLinkIcon = ⇨
|
||||
@@ -126,4 +129,4 @@ submitFailed = Submit Failed
|
||||
buttonClose = Close
|
||||
|
||||
buttonDiffAllSideBySide = Diff All Side-by-Side
|
||||
buttonDiffAllUnified = Diff All Unified
|
||||
buttonDiffAllUnified = Diff All Unified
|
||||
|
||||
@@ -117,6 +117,12 @@ class PatchSetComplexDisclosurePanel extends ComplexDisclosurePanel implements O
|
||||
revlink.addStyleName(Gerrit.RESOURCES.css().patchSetLink());
|
||||
getHeader().add(revlink);
|
||||
}
|
||||
|
||||
if (ps.isDraft()) {
|
||||
final InlineLabel draftLabel = new InlineLabel(Util.C.draftPatchSetLabel());
|
||||
draftLabel.addStyleName(Gerrit.RESOURCES.css().patchSetRevision());
|
||||
getHeader().add(draftLabel);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDiffBaseId(PatchSet.Id diffBaseId) {
|
||||
|
||||
@@ -46,6 +46,8 @@ public class Util {
|
||||
return "";
|
||||
}
|
||||
switch (status) {
|
||||
case DRAFT:
|
||||
return C.statusLongDraft();
|
||||
case NEW:
|
||||
return C.statusLongNew();
|
||||
case SUBMITTED:
|
||||
|
||||
Reference in New Issue
Block a user