Commit b455c713 by Nilu Committed by Harsh Shah

hiding order by when there are no applicants. removing expand feature which was…

hiding order by when there are no applicants. removing expand feature which was used earlier in HT005. Fix issue of not showing to shortlist option in all applicant grid view.
parent 686e669a
......@@ -335,11 +335,11 @@ public class Job extends BaseJob
return getApplyBy() != null && DateDiff.endOfDay(getApplyBy()).before(DateDiff.getToday());
}
public List<AppProcessOption> getValidProcessOptions(String tabNumber)
public List<AppProcessOption> getValidProcessOptions(boolean isShortlist)
{
List<AppProcessOption> options = new ArrayList<>();
if(tabNumber == null || CollectionUtils.equals(tabNumber, "1"))
if(!isShortlist)
{
options.add(AppProcessOption.TO_SHORTLIST);
}
......
......@@ -3290,7 +3290,7 @@ input.add-note-btn:hover{
width: 19%;
text-align: left;
background: #ffffff none repeat scroll 0 0;
margin: 0 0.4%;
margin: 0.4% 0.4%;
width: 19.05%;
}
.green-back{
......@@ -3939,7 +3939,7 @@ img.alert-icon {float: left;}
.week-states{margin-top: 20px;}
.dash-count {font-size: 48px;}
.welcome-text {font-size: 30px;}
.appl-c-box{margin: 0 0.3%;}
.appl-c-box{margin: 0.3% 0.3%;}
}
@media screen and (max-width: 1380px){
......@@ -3952,7 +3952,7 @@ img.alert-icon {float: left;}
.facebook-icon {width: 12.73%;}
.shape-icon{width: 13.73%; }
.more-icon {width: 13.3%;}
.appl-c-box{margin: 0 0.2%;}
.appl-c-box{margin: 0.2% 0.2%;}
.over-all.f-60 {font-size: 54px;}
.appli-list-drop{width: 145px;}
.appli-view-bar{margin-bottom: 5.5px;}
......
......@@ -10,9 +10,8 @@
String currentPage = (String) getData(request, "currentPage");
AppSortOption appSortOpt = (AppSortOption) getData(request, "sortOption");
String tabNumber = (String) getData(request, "tabNumber");
Boolean isShortList = getData(request, "isShortList")!=null ? (Boolean) getData(request, "isShortList") : Boolean.FALSE;
Boolean expand = getData(request, "expand")!=null ? (Boolean) getData(request, "expand") : Boolean.FALSE;
Boolean isShortList = getData(request, "isShortList")!= null ? (Boolean) getData(request, "isShortList") : Boolean.FALSE;
Boolean showOrderBy = getData(request, "showOrderBy")!= null ? (Boolean) getData(request, "showOrderBy") : Boolean.FALSE;
%>
<oneit:dynIncluded>
......@@ -45,7 +44,7 @@
<div class="appli-shorting-dropdown appli-left">
<span class="appli-order-label">Bulk Update</span>
<oneit:ormEnum obj="<%= job %>" attributeName="AppProcessOption" cssClass="form-control bullk-app-process" id="AppProcessOption"
enums="<%= job.getValidProcessOptions(tabNumber) %>"/>
enums="<%= job.getValidProcessOptions(isShortList) %>"/>
<oneit:button name="bulkupdate" value=" " cssClass="bulk-update" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
......@@ -94,24 +93,29 @@
--%>
<%
}
if(showOrderBy)
{
%>
<div class="appli-shorting-dropdown">
<span class="appli-order-label">order by</span>
<select class="form-control" onChange="location=this.value">
<%
for (AppSortOption sortOption : AppSortOption.getAppSortOptionArray())
{
String optionLink = currentPage + "&JobID=" + job.getID() + "&AppSortOption=" + sortOption.getName();
%>
<option <%= (appSortOpt != null && appSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
<%
}
%>
<div class="appli-shorting-dropdown">
<span class="appli-order-label">order by</span>
<select class="form-control" onChange="location=this.value">
<%
for (AppSortOption sortOption : AppSortOption.getAppSortOptionArray())
{
String optionLink = currentPage + "&JobID=" + job.getID() + "&AppSortOption=" + sortOption.getName()
+ (expand ? "&Expand=Y" : "");
%>
<option <%= (appSortOpt != null && appSortOpt == sortOption ? "selected" : "" )%> value="<%= optionLink %>">
<oneit:toString value="<%= sortOption.getDescription() %>" mode="EscapeHTML"/>
</option>
<%
}
%>
</select>
</div>
</div>
</div>
......
......@@ -69,6 +69,7 @@
tabNumber="1"
sortOption="<%= appSortOpt %>"
currentPage="<%= currentPage %>"
showOrderBy="<%= sortedApplications.size() > 0 %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
<oneit:dynInclude page="/extensions/adminportal/inc/application_list_data.jsp"
......
......@@ -64,6 +64,7 @@
currentPage="<%= currentPage %>"
tabNumber="1"
isShortList="<%= Boolean.TRUE %>"
showOrderBy="<%= sortedApplications.size() > 0 %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
<oneit:dynInclude page="/extensions/adminportal/inc/application_list_data.jsp"
......
......@@ -16,18 +16,6 @@
process.setAttribute("Job", job);
}
Boolean isExpand = (Boolean) process.getAttribute("IsExpand");
if(request.getParameter("Expand") != null)
{
isExpand = CollectionUtils.equals((String) request.getParameter("Expand"), "Y");
}
if(isExpand == null)
{
isExpand = Boolean.FALSE;
}
Debug.assertion(job != null, "Job is null in admin portal view applicants");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
......@@ -56,7 +44,6 @@
List<JobApplication> sortedApplications = applications!=null ? Utils.getApplicationsSorted(applications, appSortOpt) : new ArrayList<JobApplication>();
process.setAttribute("AppSortOption", appSortOpt);
process.setAttribute("IsExpand", isExpand);
%>
<script type="text/javascript">
......@@ -114,7 +101,7 @@
currentPage="<%= currentPage %>"
tabNumber="2"
isShortList="<%= Boolean.TRUE %>"
expand="<%= isExpand %>"
showOrderBy="<%= sortedApplications.size() > 0 %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
......
......@@ -66,6 +66,7 @@
<oneit:dynInclude page="/extensions/adminportal/inc/application_sorting_bar.jsp"
sortOption="<%= appSortOpt %>"
currentPage="<%= currentPage %>"
showOrderBy="<%= sortedApplications.size() > 0 %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
<oneit:dynInclude page="/extensions/adminportal/inc/application_list_data.jsp"
......
......@@ -15,19 +15,7 @@
process.setAttribute("Job", job);
}
Boolean isExpand = (Boolean) process.getAttribute("IsExpand");
if(request.getParameter("Expand") != null)
{
isExpand = CollectionUtils.equals((String) request.getParameter("Expand"), "Y");
}
if(isExpand == null)
{
isExpand = Boolean.FALSE;
}
Debug.assertion(job != null, "Job is null in admin portal view applicants");
String applicationPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
......@@ -59,7 +47,6 @@
List<JobApplication> sortedApplications = applications!=null ? Utils.getApplicationsSorted(applications, appSortOpt) : new ArrayList<JobApplication>();
process.setAttribute("AppSortOption", appSortOpt);
process.setAttribute("IsExpand", isExpand);
%>
<script type="text/javascript">
......@@ -116,7 +103,7 @@
sortOption="<%= appSortOpt %>"
currentPage="<%= currentPage %>"
tabNumber="2"
expand="<%= isExpand %>"
showOrderBy="<%= sortedApplications.size() > 0 %>"
data="<%= CollectionUtils.EMPTY_MAP%>"/>
......@@ -126,17 +113,24 @@
for(JobApplication jobApplication : sortedApplications)
{
String appID = "app-id-" + jobApplication.getID().toString();
%>
<div class="appl-c-box application-row">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
<div class="<%= "cb-title " + (index == 0 ? "green-back" : (index < 3 ? "blue-back" : "dark-back" ))%> ">
<div class="checkbox-list grid-checkbox">
<div class="checkbox-list">
<input type="checkbox" name="IsSelected" value="<%= jobApplication.getObjectID().toString() %>" id="<%= appID %>" class="applicant" >
<label for="<%= appID %>">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
</label>
</div>
</div>
</div>
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
<div class="<%= "cb-title " + (index == 0 ? "green-back" : (index < 3 ? "blue-back" : "dark-back" ))%> ">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
</div>
<div class="overall-suitablity">
<div class="<%= "overall " + (index == 0 ? "f-60" : "")%>">overall rank</div>
<div class="<%= "over-all " + (index == 0 ? "f-60 green" : (index < 3 ? "blue" : "gray"))%> ">
......
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