ChangeScreen2: Add missing action titles
Some of the action buttons on the ChangeScreen2 did not have titles. Add them. Also make the titles consistent in usage of capitalisation. Change-Id: Ibcf90fc45202a5081bfe4b348a05443eb1a6584b
This commit is contained in:
		
				
					committed by
					
						
						Shawn Pearce
					
				
			
			
				
	
			
			
			
						parent
						
							bb669d9ae3
						
					
				
				
					commit
					e0d77c1925
				
			@@ -134,6 +134,7 @@ public class Abandon implements RestModifyView<ChangeResource, Input>,
 | 
				
			|||||||
  public UiAction.Description getDescription(ChangeResource resource) {
 | 
					  public UiAction.Description getDescription(ChangeResource resource) {
 | 
				
			||||||
    return new UiAction.Description()
 | 
					    return new UiAction.Description()
 | 
				
			||||||
      .setLabel("Abandon")
 | 
					      .setLabel("Abandon")
 | 
				
			||||||
 | 
					      .setTitle("Abandon the change")
 | 
				
			||||||
      .setVisible(resource.getChange().getStatus().isOpen()
 | 
					      .setVisible(resource.getChange().getStatus().isOpen()
 | 
				
			||||||
          && resource.getControl().canAbandon());
 | 
					          && resource.getControl().canAbandon());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -83,7 +83,7 @@ public class DeleteDraftChange implements
 | 
				
			|||||||
  public UiAction.Description getDescription(ChangeResource rsrc) {
 | 
					  public UiAction.Description getDescription(ChangeResource rsrc) {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      return new UiAction.Description()
 | 
					      return new UiAction.Description()
 | 
				
			||||||
        .setTitle(String.format("Delete Draft Change %d",
 | 
					        .setTitle(String.format("Delete draft change %d",
 | 
				
			||||||
            rsrc.getChange().getChangeId()))
 | 
					            rsrc.getChange().getChangeId()))
 | 
				
			||||||
        .setVisible(rsrc.getChange().getStatus() == Status.DRAFT
 | 
					        .setVisible(rsrc.getChange().getStatus() == Status.DRAFT
 | 
				
			||||||
            && rsrc.getControl().canDeleteDraft(dbProvider.get()));
 | 
					            && rsrc.getControl().canDeleteDraft(dbProvider.get()));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -91,7 +91,7 @@ public class DeleteDraftPatchSet implements RestModifyView<RevisionResource, Inp
 | 
				
			|||||||
      int psCount = dbProvider.get().patchSets()
 | 
					      int psCount = dbProvider.get().patchSets()
 | 
				
			||||||
          .byChange(rsrc.getChange().getId()).toList().size();
 | 
					          .byChange(rsrc.getChange().getId()).toList().size();
 | 
				
			||||||
      return new UiAction.Description()
 | 
					      return new UiAction.Description()
 | 
				
			||||||
        .setTitle(String.format("Delete Draft Revision %d",
 | 
					        .setTitle(String.format("Delete draft revision %d",
 | 
				
			||||||
            rsrc.getPatchSet().getPatchSetId()))
 | 
					            rsrc.getPatchSet().getPatchSetId()))
 | 
				
			||||||
        .setVisible(rsrc.getPatchSet().isDraft()
 | 
					        .setVisible(rsrc.getPatchSet().isDraft()
 | 
				
			||||||
            && rsrc.getControl().canDeleteDraft(dbProvider.get())
 | 
					            && rsrc.getControl().canDeleteDraft(dbProvider.get())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -122,7 +122,7 @@ public class Publish implements RestModifyView<RevisionResource, Input>,
 | 
				
			|||||||
    PatchSet.Id current = rsrc.getChange().currentPatchSetId();
 | 
					    PatchSet.Id current = rsrc.getChange().currentPatchSetId();
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      return new UiAction.Description()
 | 
					      return new UiAction.Description()
 | 
				
			||||||
        .setTitle(String.format("Publish Revision %d",
 | 
					        .setTitle(String.format("Publish revision %d",
 | 
				
			||||||
            rsrc.getPatchSet().getPatchSetId()))
 | 
					            rsrc.getPatchSet().getPatchSetId()))
 | 
				
			||||||
        .setVisible(rsrc.getPatchSet().isDraft()
 | 
					        .setVisible(rsrc.getPatchSet().isDraft()
 | 
				
			||||||
            && rsrc.getPatchSet().getId().equals(current)
 | 
					            && rsrc.getPatchSet().getId().equals(current)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -133,6 +133,7 @@ public class Restore implements RestModifyView<ChangeResource, Input>,
 | 
				
			|||||||
  public UiAction.Description getDescription(ChangeResource resource) {
 | 
					  public UiAction.Description getDescription(ChangeResource resource) {
 | 
				
			||||||
    return new UiAction.Description()
 | 
					    return new UiAction.Description()
 | 
				
			||||||
      .setLabel("Restore")
 | 
					      .setLabel("Restore")
 | 
				
			||||||
 | 
					      .setTitle("Restore the change")
 | 
				
			||||||
      .setVisible(resource.getChange().getStatus() == Status.ABANDONED
 | 
					      .setVisible(resource.getChange().getStatus() == Status.ABANDONED
 | 
				
			||||||
          && resource.getControl().canRestore());
 | 
					          && resource.getControl().canRestore());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -113,6 +113,7 @@ public class Revert implements RestModifyView<ChangeResource, Input>,
 | 
				
			|||||||
  public UiAction.Description getDescription(ChangeResource resource) {
 | 
					  public UiAction.Description getDescription(ChangeResource resource) {
 | 
				
			||||||
    return new UiAction.Description()
 | 
					    return new UiAction.Description()
 | 
				
			||||||
      .setLabel("Revert")
 | 
					      .setLabel("Revert")
 | 
				
			||||||
 | 
					      .setTitle("Revert the change")
 | 
				
			||||||
      .setVisible(resource.getChange().getStatus() == Status.MERGED
 | 
					      .setVisible(resource.getChange().getStatus() == Status.MERGED
 | 
				
			||||||
          && resource.getControl().getRefControl().canUpload());
 | 
					          && resource.getControl().getRefControl().canUpload());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -147,7 +147,7 @@ public class Submit implements RestModifyView<RevisionResource, Input>,
 | 
				
			|||||||
    PatchSet.Id current = resource.getChange().currentPatchSetId();
 | 
					    PatchSet.Id current = resource.getChange().currentPatchSetId();
 | 
				
			||||||
    return new UiAction.Description()
 | 
					    return new UiAction.Description()
 | 
				
			||||||
      .setTitle(String.format(
 | 
					      .setTitle(String.format(
 | 
				
			||||||
          "Submit Revision %d",
 | 
					          "Submit revision %d",
 | 
				
			||||||
          resource.getPatchSet().getPatchSetId()))
 | 
					          resource.getPatchSet().getPatchSetId()))
 | 
				
			||||||
      .setVisible(resource.getChange().getStatus().isOpen()
 | 
					      .setVisible(resource.getChange().getStatus().isOpen()
 | 
				
			||||||
          && resource.getPatchSet().getId().equals(current)
 | 
					          && resource.getPatchSet().getId().equals(current)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user