<%@ taglib uri="webwork" prefix="webwork" %>
<webwork:bean id="fieldVisibility" name="'com.atlassian.jira.web.bean.FieldVisibilityBean'" />

<!-- Do not display this table if there are no project tab panels available or if 'components' and 'fix versions' has been hidden -->
<!-- Need to split this test - as otherwise webwork is unable to parse the "if" test -->
<webwork:if test="/projectTabPanels/empty == true">
    <div class="borderedbox">
        <span class="warning"><webwork:text name="'common.words.note'"/></span>:&nbsp;<webwork:text name="'browseproject.project.info.notavailable'"/>
    </div>
</webwork:if>
<webwork:else>
    <table cellpadding=2 cellspacing=0 border=0 width=100% align=center>
    <tr>
        <webwork:if test="/report == 'select'">
            <td width="1%" nowrap align=center>
                &nbsp;<b><webwork:text name="'common.words.select'" />:</b>&nbsp;
            </td>
        </webwork:if>
        <webwork:else>
            <td width="1%" nowrap align=center>
                &nbsp;<b><a href="<%= request.getContextPath() %>/browse/<webwork:property value="/project/string('key')" />?report=select"><font color=black><webwork:text name="'common.words.select'" />:</font></a></b>&nbsp;
            </td>
        </webwork:else>
        <webwork:iterator value="/projectTabPanels">
            <webwork:if test="/report == completeKey">
                <td bgcolor=bbbbbb width="1%" nowrap align=center>
                    &nbsp;<font color=ffffff><b><webwork:property value="label" /></b></font>&nbsp;
                </td>
            </webwork:if>
            <webwork:else>
                <td width="1%" nowrap align=center>
                    &nbsp;<b><a href="<%= request.getContextPath() %>/browse/<webwork:property value="/project/string('key')" />?report=<webwork:url value="completeKey" />"><webwork:property value="label" /></a></b>&nbsp;
                </td>
            </webwork:else>
        </webwork:iterator>

        <webwork:if test="/report == 'coke'">
            <td bgcolor=bbbbbb width="1%" nowrap align=center style="color: white;">
                &nbsp;<b>Coke Machine Integration:</b>&nbsp;
            </td>
        </webwork:if>

        <td>&nbsp;</td>
    </tr>
    </table>

    <table cellpadding=0 cellspacing=1 border=0 width=100% bgcolor=bbbbbb align=center><tr><td>
        <table cellpadding=1 cellspacing=0 border=0 width=100% bgcolor=ffffff><tr><td>
            <webwork:if test="/report == 'select'">
                <table width=100% cellpadding=4 cellspacing=0 border=0 align=center>
                <tr><td valign=top bgcolor=f0f0f0>
                    <h3 class="formtitle"><webwork:text name="'browseproject.project.information'" /></h3>
                </td></tr>
                <tr><td valign=top>

                <webwork:iterator value="/projectTabPanels">
                    <img src="<%= request.getContextPath() %>/images/icons/bullet_creme.gif" height=8 width=8 border=0 align=absmiddle>
                    <b><a href="<%= request.getContextPath() %>/browse/<webwork:property value="/project/string('key')" />?report=<webwork:url value="completeKey" />"><webwork:property value="label" /></a></b>
                    -
                    <webwork:property value="description" /><br>
                </webwork:iterator>

                </td></tr></table>
            </webwork:if>
            <webwork:elseIf test="/report == 'coke'">
                <jsp:include page="/includes/reports/project/mac.jsp" />
            </webwork:elseIf>
            <webwork:else>
                <webwork:property value="/projectTabHtml()" escape="false"/>
            </webwork:else>
        </td></tr></table>
    </td></tr></table>
</webwork:else>