<!-- template secondary_header.html -->
<div id="secondaryHeader">
    <div class="content-wrapper">
        {# form is wrapping search buttons and the search bar inputs #}
        <form
            {% if active_tab == "tags" %}
                action="{% url tags %}" 
            {% elif active_tab == "users" %}
                action="" 
            {% else %}
                action="{% url questions %}" id="searchForm"
            {% endif %}
            method="get">
            <div class="sub-parent"> 
            	<div class="sub-secondary" id="sub-sec-1" >
	                {# 
	                    Some or all contents of this div may be dropped
	                    over the search bar via negative margins,
	                    to make sure that the search bar can occupy 100%
	                    of the content width.
	                    Search bar may have padding on the left and right
	                    to accomodate the buttons.
	                #}
	                <a id="homeButton" href="{% url questions %}"></a>
	                {% include "widgets/scope_nav.html" %}            
	                {# 
	                    three buttons below are in the opposite order because
	                    they are floated at the right
	                #}
                </div>
				<div class="sub-secondary" id="sub-sec-tmp" >
                	{% include "widgets/ask_button.html" %}
                </div>
                <div class="sub-secondary" id="sub-sec-2">
                	{% include "widgets/search_bar.html" %} {# include search form widget #} 
                </div>                      
                <div class="sub-secondary" id="sub-sec-3" >     
	                <input type="submit" value="" name="search" class="searchBtn" />
	                <input type="button"
	                    value="X"
	                    name="reset_query"
	                    class="cancelSearchBtn"
	                    {% if not query %}{# query is only defined by questions view (active_tab) #}
	                        style="display: none;"
	                    {% endif %}
	                />	            
                {# clears button floats #}
					
                </div>
                <div class="sub-secondary" id="sub-sec-4" >
                	{% include "widgets/ask_button.html" %}
                </div>    
				
            </div>
            
        </form>
    </div>
</div>