<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
    <head>
        <meta charset="utf-8"></meta>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
        <meta name="viewport" content="width=device-width, initial-scale=1"></meta>
        <title>Talentology</title>
        <%@include file="/inc/std_imports.jsp" %>
    </head>
    
    <body>
    <%
        Article home        =   WebUtils.getArticleByShortCut(objTran, WebUtils.ADMIN_HOME);
        String  homeUrl     = 	home.getLink(request);
        String  signoutUrl  = 	"logout.jsp?nextURL=" + homeUrl;
        
        if(clientUser != null)
        {
            StringBuilder   sb  =   new StringBuilder();
            
            if(clientUser.getFirstName()!=null)
            {
                sb.append(clientUser.getFirstName());
                sb.append(" ");
                
                if(clientUser.getLastName()!=null )
                {
                    sb.append(clientUser.getLastName().charAt(0));
                    sb.append(".");
                }
            }
            else
            {
                sb.append(clientUser.getUserName());
            }
    %>
            <header>
                <div class="container-fluid">
                    <div class="row">
                        <div class="site-logo">
                            <a href="#"><img src="images/logo.svg"></a>
                        </div>
                        <div class="search-bar">
                            <div class="inset-shadow"></div>
                            <img src="images/search-icon.svg"/>
                            <input type="text" class="form-control" placeholder="Search for job, candidate or client"/>
                        </div>
                        <div class="fl-right">
                            <div class="notification-bar">
                                <div class="tack-center">
                                    <a href="#" data-toggle="dropdown">
                                        <!--TODO: enable when there are notifications-->
                                        <!--<span class="notification-label"></span>-->
                                        <img src="images/notification-icon.svg">
                                    </a>
                                    <ul class="profile-dropdown dropdown-menu">
                                        <span class="arrow-up"></span>
                                        <li><a href="#">No new notifications</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="user-profile-dropdown">
                                <a href="#" class="user-name" data-toggle="dropdown">
                                    <oneit:toString value="<%= sb.toString() %>" mode="EscapeHTML"/>
                                    <img src="images/arrow.svg"/>
                                </a>
                                <ul class="profile-dropdown dropdown-menu">
                                    <span class="arrow-up"></span>
                                    <%
                                        Article myDetailsArticle =   WebUtils.getArticleByShortCut(objTran, WebUtils.MY_DETAILS);
                                    %>
                                        <li><a href="<%= myDetailsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap())%>">My Details</a></li>
                                        <li><a href="<%= signoutUrl %>">Sign Out</a></li>
                                </ul>
                            </div>
                            <div class="create-job-btn">
                                <%
                                    Article jobsArticle =   WebUtils.getArticleByShortCut(objTran, WebUtils.JOBS);
                                %>
                                <a href="<%= jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.CREATE_JOB).toMap()) %>">Create Job</a>
                            </div>
                        </div>
                    </div>
                </div>
            </header>
    <%
        }
    %>
