Commit 73f85e39 by chenith Committed by Harsh Shah

Updated HT001 to display customized use rname.

parent b6006b3d
...@@ -16,6 +16,23 @@ ...@@ -16,6 +16,23 @@
if(clientUser != null) 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> <header>
<div class="container-fluid"> <div class="container-fluid">
...@@ -44,7 +61,7 @@ ...@@ -44,7 +61,7 @@
</div> </div>
<div class="user-profile-dropdown"> <div class="user-profile-dropdown">
<a href="#" class="user-name" data-toggle="dropdown"> <a href="#" class="user-name" data-toggle="dropdown">
<oneit:toString value="<%= oneit.security.jsp.SecUserToNameTransform.INSTANCE.transform(clientUser) %>" mode="EscapeHTML"/> <oneit:toString value="<%= sb.toString() %>" mode="EscapeHTML"/>
<img src="images/arrow.svg"/> <img src="images/arrow.svg"/>
</a> </a>
<ul class="profile-dropdown dropdown-menu"> <ul class="profile-dropdown dropdown-menu">
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
//TODO: filter with Client; //TODO: filter with Client;
SecUser secUser = SecUser.getTXUser(transaction);
Job[] jobs = Job.SearchByAll().andJobStatus(new EqualsFilter<>(JobStatus.OPEN)) Job[] jobs = Job.SearchByAll().andJobStatus(new EqualsFilter<>(JobStatus.OPEN))
.andSecUser(new EqualsFilter(SecUser.getTXUser(transaction))) .andSecUser(new EqualsFilter(secUser))
.search(transaction); .search(transaction);
Article jobsArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOBS); Article jobsArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOBS);
...@@ -16,14 +17,13 @@ ...@@ -16,14 +17,13 @@
String shortlistPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.APPLICANTS_SHORTLIST).toMap()); String shortlistPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.APPLICANTS_SHORTLIST).toMap());
String homePage = WebUtils.getSamePageInRenderMode(request, "Page"); String homePage = WebUtils.getSamePageInRenderMode(request, "Page");
String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap()); String jobsPage = jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "Page").toMap());
%> %>
<oneit:form name="editJob" method="post" enctype="multipart/form-data"> <oneit:form name="editJob" method="post" enctype="multipart/form-data">
<div class="dashboard-content-area"> <div class="dashboard-content-area">
<div class="dashboard-first-part"> <div class="dashboard-first-part">
<div class="welcome-box"> <div class="welcome-box">
<div class="dashboard-welcome"> <div class="dashboard-welcome">
<div class="welcome-text"> Welcome <br/> back <oneit:toString value="<%= SecUserToNameTransform.INSTANCE.transform(SecUser.getTXUser(transaction)) + "!" %>" mode="EscapeHTML"/></div> <div class="welcome-text"> Welcome <br/> back <oneit:toString value="<%= secUser.getFirstName()!=null ? secUser.getFirstName() : secUser.getUserName()%>" mode="EscapeHTML"/>!</div>
<a class="d-create-job-btn" href="<%= jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.CREATE_JOB).toMap()) %>">Create a Job</a> <a class="d-create-job-btn" href="<%= jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.CREATE_JOB).toMap()) %>">Create a Job</a>
</div> </div>
<div class="col-sm-3 col-xs-12 d-three-box green-light"> <div class="col-sm-3 col-xs-12 d-three-box green-light">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment