ChangeScreen2: Hide strategy row if no strategy is displayed
The submit strategy is only shown for the current patch set of open changes. In all other cases we do not display any submit strategy and the strategy row can be hidden. Change-Id: I96d6b0738e177ee7c6cf6aaea3460a2ceb0baa2a Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
		 Edwin Kempin
					Edwin Kempin
				
			
				
					committed by
					
						 Edwin Kempin
						Edwin Kempin
					
				
			
			
				
	
			
			
			 Edwin Kempin
						Edwin Kempin
					
				
			
						parent
						
							b376b5bfc8
						
					
				
				
					commit
					aedb0bb6c7
				
			| @@ -143,6 +143,7 @@ public class ChangeScreen2 extends Screen { | |||||||
|   @UiField Image projectQuery; |   @UiField Image projectQuery; | ||||||
|   @UiField InlineHyperlink projectLink; |   @UiField InlineHyperlink projectLink; | ||||||
|   @UiField InlineHyperlink branchLink; |   @UiField InlineHyperlink branchLink; | ||||||
|  |   @UiField Element strategy; | ||||||
|   @UiField Element submitActionText; |   @UiField Element submitActionText; | ||||||
|   @UiField Element notMergeable; |   @UiField Element notMergeable; | ||||||
|   @UiField Topic topic; |   @UiField Topic topic; | ||||||
| @@ -783,6 +784,8 @@ public class ChangeScreen2 extends Screen { | |||||||
|  |  | ||||||
|     if (current) { |     if (current) { | ||||||
|       loadSubmitType(info.status(), canSubmit); |       loadSubmitType(info.status(), canSubmit); | ||||||
|  |     } else { | ||||||
|  |       setVisible(strategy, false); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     StringBuilder sb = new StringBuilder(); |     StringBuilder sb = new StringBuilder(); | ||||||
|   | |||||||
| @@ -419,7 +419,7 @@ limitations under the License. | |||||||
|               <th><ui:msg>Topic</ui:msg></th> |               <th><ui:msg>Topic</ui:msg></th> | ||||||
|               <td><c:Topic ui:field='topic'/></td> |               <td><c:Topic ui:field='topic'/></td> | ||||||
|             </tr> |             </tr> | ||||||
|             <tr> |             <tr ui:field='strategy'> | ||||||
|               <th><ui:msg>Strategy</ui:msg></th> |               <th><ui:msg>Strategy</ui:msg></th> | ||||||
|               <td> |               <td> | ||||||
|                 <span ui:field='submitActionText'/> |                 <span ui:field='submitActionText'/> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user