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