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
2013-11-25 17:08:44 +01:00
committed by Edwin Kempin
parent b376b5bfc8
commit aedb0bb6c7
2 changed files with 4 additions and 1 deletions

View File

@@ -143,6 +143,7 @@ public class ChangeScreen2 extends Screen {
@UiField Image projectQuery;
@UiField InlineHyperlink projectLink;
@UiField InlineHyperlink branchLink;
@UiField Element strategy;
@UiField Element submitActionText;
@UiField Element notMergeable;
@UiField Topic topic;
@@ -783,6 +784,8 @@ public class ChangeScreen2 extends Screen {
if (current) {
loadSubmitType(info.status(), canSubmit);
} else {
setVisible(strategy, false);
}
StringBuilder sb = new StringBuilder();

View File

@@ -419,7 +419,7 @@ limitations under the License.
<th><ui:msg>Topic</ui:msg></th>
<td><c:Topic ui:field='topic'/></td>
</tr>
<tr>
<tr ui:field='strategy'>
<th><ui:msg>Strategy</ui:msg></th>
<td>
<span ui:field='submitActionText'/>