<%@ include file="/common/taglibs.jsp" %>

<s:if test="%{currentUser != null && currentUser.client}">
    <ul>                         
        <li <c:if test="${currentMenu == 'dashboard'}">class="current"</c:if>>
            <a id="actDashboard" href="${ctx}/dashboard"><fmt:message key="menu.dashboard"/></a>
        </li>
        <li <c:if test="${currentMenu == 'issues'}">class="current"</c:if>>
            <a id="actIssues" href="${ctx}/issues/?${issueFilter}"><fmt:message key="menu.issues"/></a>
        </li>
    </ul>

	    <ul style="float:right;clear:right;margin:0 .5em;">
		        <li id="NewIssue" <c:if test="${currentMenu == 'newissue'}">class="current"</c:if>>
		            <a id="acNewIssue" href="${ctx}/issues/new/"><fmt:message key="menu.newissue"/></a>
		        </li>
	    </ul>
</s:if>
<s:else>
    <ul style="float:left;clear:left;">
    	<s:if test="%{currentUser != null || publicMode || request.requestURI.contains('pagenotfound')}">
	        <li <c:if test="${currentMenu == 'dashboard'}">class="current"</c:if>>
	            <a id="actDashboard" href="${ctx}/"><fmt:message key="menu.dashboard"/></a>
	        </li>
	        <li <c:if test="${currentMenu == 'issues'}">class="current"</c:if>>
	            <a id="actIssues" href="${ctx}/issues/?${issueFilter}"><fmt:message key="menu.issues"/></a>
	        </li>
            <s:if test="%{(currentUser == null && publicMode) || (currentUser != null && !currentUser.client)}">
                <li <c:if test="${currentMenu == 'projects'}">class="current"</c:if>>
                    <a id="actProjects" href="${ctx}/projects/"><fmt:message key="menu.projects"/></a>
                </li>
            </s:if>
        </s:if>
        <s:if test="%{currentUser.administrator}">
            <li <c:if test="${currentMenu == 'admin'}">class="current"</c:if>>
                <a id="actAdmin" href="${ctx}/admin/"><fmt:message key="menu.admin"/></a>
            </li>
        </s:if>

    </ul>

    <s:if test="%{currentUser != null || publicMode}">
        <ul style="float:right;clear:right;margin:0 .5em;">
            <s:if test="%{currentUser != null}">
	            <li id="NewIssue" <c:if test="${currentMenu == 'newissue'}">class="current"</c:if>>
	                <a id="actNewIssue" href="${ctx}/issues/new/"><fmt:message key="menu.newissue"/></a>
	            </li>
	        </s:if>
            <li class="searchlol">
	            <form action="${ctx}/issues/" id="iSearchForm" enctype="application/x-www-form-urlencoded">
	                <input type="text" class="tooltip" name="query" id="iSearchQuery" title="<fmt:message key="domtitle.search"/>"/>
	                <input type="submit" id="iSearchAction" value="<fmt:message key="action.search"/>"/>
	            </form>
	        </li>

        </ul>
	</s:if>
 </s:else>



