<%@ page import="com.atlassian.util.profiling.UtilTimerStack"%>
<%@ taglib uri="webwork" prefix="webwork" %>

<webwork:if test="/issueTabPanels && /issueTabPanels/empty == false" >
<table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
<tr>
	<webwork:iterator value="/issueTabPanels">
        <webwork:if test="/page == 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:url value="issue/string('key')" />?page=<webwork:url value="completeKey" />"><webwork:property value="label" /></a></b>&nbsp;
            </td>
        </webwork:else>
    </webwork:iterator>

	<td>&nbsp;</td>
    <td width="1%" bgcolor="e5e5e5" nowrap>
        &nbsp;
        <webwork:text name="'tab.sort.order'"/>:
        <webwork:if test="/actionOrder == 'asc'">
            <a rel="nofollow" href="<%= request.getContextPath() %>/browse/<webwork:url value="issue/string('key')" />?actionOrder=desc"><img src="<%= request.getContextPath() %>/images/icons/down.gif" height="14" width="11" align="absmiddle" title="<webwork:text name="'navigator.ascending.order'"/>" border="0" /></a>
        </webwork:if>
        <webwork:else>
            <a rel="nofollow" href="<%= request.getContextPath() %>/browse/<webwork:url value="issue/string('key')" />?actionOrder=asc"><img src="<%= request.getContextPath() %>/images/icons/up.gif" class="sortArrow" title="<webwork:text name="'navigator.descending.order'"/>" border="0" /></a>
        </webwork:else>
    </td>
</tr>
</table>

<webwork:property value="actions">
    <div class="issuePanelContainer" id="issue_actions_container">
    <webwork:if test=". != null && ./size > 0">
        <webwork:iterator value=".">
            <% UtilTimerStack.push("Getting action HTML"); %>
            <webwork:property value="./html()" escape="false"/>
            <% UtilTimerStack.pop("Getting action HTML"); %>
        </webwork:iterator>
    </webwork:if>
    <webwork:elseIf test=". == null">
        <table cellpadding="2" cellspacing="0" border="0" width="100%" bgcolor="ffffff">
            <tr><td bgcolor="ffcccc">
                <webwork:text name="'viewissue.tabs.actions.error'"/>
            </td></tr>
        </table>
    </webwork:elseIf>
    </div>
</webwork:property>
<br/>
</webwork:if>
