Hide nav in workflows if only one tab
Currently, workflows use nav-pills for tabs, and this causes the tabs to look like buttons, which looks confusing in single tab workflows. This patch just changes workflows to hide the nav-pills if there is only one tab. Change-Id: I11d17535180cfa38b32463143f0e40cf7a119d9c Closes-Bug: #1561176
This commit is contained in:
@@ -19,16 +19,18 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% block modal-body %}
|
||||
<ul class="nav nav-pills{% if HORIZON_CONFIG.integration_tests_support %} selenium-nav-region{% endif %}{% if workflow.wizard %} wizard-tabs{% endif %}" role="tablist">
|
||||
{% for step in workflow.steps %}
|
||||
<li class="{% if entry_point == step.slug %}active{% endif %}{% if step.has_errors %} error{% endif %}{% if step.has_required_fields %} required{% endif %}">
|
||||
<a href="#{{ step.get_id }}" data-toggle="tab" data-target="#{{ step.get_id }}">
|
||||
{{ step }}
|
||||
{% if step.has_required_fields %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if workflow.steps|length >= 2 %}
|
||||
<ul class="nav nav-pills{% if HORIZON_CONFIG.integration_tests_support %} selenium-nav-region{% endif %}{% if workflow.wizard %} wizard-tabs{% endif %}" role="tablist">
|
||||
{% for step in workflow.steps %}
|
||||
<li class="{% if entry_point == step.slug %}active{% endif %}{% if step.has_errors %} error{% endif %}{% if step.has_required_fields %} required{% endif %}">
|
||||
<a href="#{{ step.get_id }}" data-toggle="tab" data-target="#{{ step.get_id }}">
|
||||
{{ step }}
|
||||
{% if step.has_required_fields %}{% include "horizon/common/_form_field_required.html" %}{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="tab-content">
|
||||
{% for step in workflow.steps %}
|
||||
<fieldset id="{{ step.get_id }}" class="js-tab-pane{% if entry_point == step.slug %} active{% endif %}">
|
||||
|
||||
Reference in New Issue
Block a user