Skip to content

Commit 0482997

Browse files
committed
Logic added to hide test plan combo when no test plan exists
1 parent 3330dfc commit 0482997

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

gui/templates/dashio/navBar.tpl

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,27 @@ The _top value of the target attribute specifies that the URL should open in the
7272
</li>
7373

7474
{* the place for test plans will be always displayed*}
75-
<li class="combo">
76-
<form style="display:inline" name="planForm"
77-
target="{$topBrowsingContext}"
78-
action="index.php?action=planChange"
79-
method="post">
80-
{$labels.testplan}
81-
<input type="hidden" name="tproject_id" value="{$gui->tproject_id}">
82-
<select style="font-size: 80%;position:relative; top:-1px;"
83-
name="tplan_id" onchange="this.form.submit();">
84-
{foreach key=idx item=tplan from=$gui->testPlans}
85-
{$planID = $tplan['id']}
86-
{$planName = $tplan['name']}
87-
<option value="{$planID}" title="{$planName|escape}"
88-
{if $planID == $gui->tplan_id} selected="selected" {/if}>
89-
{$planName|escape}</option>
90-
{/foreach}
91-
</select>
92-
</form>
93-
</li>
75+
{if $gui->testPlans != null}
76+
<li class="combo">
77+
<form style="display:inline" name="planForm"
78+
target="{$topBrowsingContext}"
79+
action="index.php?action=planChange"
80+
method="post">
81+
{$labels.testplan}
82+
<input type="hidden" name="tproject_id" value="{$gui->tproject_id}">
83+
<select style="font-size: 80%;position:relative; top:-1px;"
84+
name="tplan_id" onchange="this.form.submit();">
85+
{foreach key=idx item=tplan from=$gui->testPlans}
86+
{$planID = $tplan['id']}
87+
{$planName = $tplan['name']}
88+
<option value="{$planID}" title="{$planName|escape}"
89+
{if $planID == $gui->tplan_id} selected="selected" {/if}>
90+
{$planName|escape}</option>
91+
{/foreach}
92+
</select>
93+
</form>
94+
</li>
95+
{/if}
9496

9597

9698
{/if}

0 commit comments

Comments
 (0)