Commit fe741ba1 by Nilu

If job is for client, then show client logo (if any) | If job is for company,…

If job is for client, then show client logo (if any) | If job is for company, then show company logo (if any)

adjusting logo height

job created user display issue fixed
parent 3cc590a1
......@@ -3,6 +3,7 @@ package performa.orm;
import oneit.logging.LoggingArea;
import oneit.objstore.*;
import oneit.security.SecUser;
import oneit.security.jsp.SecUserToNameTransform;
import oneit.utils.*;
import oneit.utils.parsers.FieldException;
import performa.orm.types.RoleType;
......@@ -44,7 +45,7 @@ public class CompanyUser extends BaseCompanyUser
@Override
public String getToString()
{
return getUser().getName();
return SecUserToNameTransform.INSTANCE.transform(getUser());
}
......
......@@ -456,27 +456,25 @@ public class Job extends BaseJob
}
//to check company logo availability
public Boolean isClientLogoAvailable()
{
if(isClientAvailable() && getClient().getClientLogo()!=null)
public Boolean isClientAvailable()
{
return Boolean.TRUE;
}
return Boolean.FALSE;
return getClient() != null && getCompanyUser() != null
&& getCompanyUser().getCompany().getHasClientSupport()== Boolean.TRUE;
}
public Boolean isClientAvailable()
public BinaryContent getLogo()
{
if( getClient() != null && getCompanyUser() != null
&& getCompanyUser().getCompany().getHasClientSupport()== Boolean.TRUE )
if(isClientAvailable() && getClient().getClientLogo()!= null)
{
return Boolean.TRUE;
return getClient().getClientLogo();
}
else if(getCompanyUser() != null && getCompanyUser().getCompany().getCompanyLogo() != null)
{
return getCompanyUser().getCompany().getCompanyLogo();
}
return Boolean.FALSE;
return null;
}
......
......@@ -37,7 +37,7 @@
sb.append(clientUser.getFirstName());
sb.append(" ");
if(clientUser.getLastName()!=null )
if(clientUser.getLastName()!= null && !clientUser.getLastName().isEmpty())
{
sb.append(clientUser.getLastName().charAt(0));
sb.append(".");
......
......@@ -18,11 +18,13 @@
<div class="officer-name">
<div class="chief-officer">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 27;
int logoHeight = 26;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
......
......@@ -77,12 +77,14 @@
process.setAttribute("JobApplication", jobApplication);
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<div class="welcome-aust-logo">
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
</div>
<%
}
......
......@@ -91,11 +91,13 @@
<div class="main-application-outline">
<div class="selection-aust-logo">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
......
......@@ -29,12 +29,14 @@
<div class="main-position-overview">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<div class="aust-logo">
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
</div>
<%
}
......
......@@ -46,11 +46,13 @@
<div class="main-application-outline">
<div class="selection-aust-logo">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
......
......@@ -95,12 +95,14 @@
<div class="main-verify-identity">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<div class="verify-aust-logo">
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
</div>
<%
}
......
......@@ -18,11 +18,13 @@
<div class="main-application-outline">
<div class="selection-aust-logo">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
......
......@@ -102,12 +102,14 @@
<div class="main-verify-identity">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<div class="verify-aust-logo">
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
</div>
<%
}
......
......@@ -69,11 +69,13 @@
<div class="main-application-outline">
<div class="selection-aust-logo">
<%
if(job.isClientLogoAvailable())
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoWidth = 45;
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(job.getClient().getClientLogo()), "KEEP", new ScaleWithin (logoWidth, 0)) %>" />
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
......
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