Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit ec4763c

Browse files
committed
Add universal nav to payment status summary page
1 parent 2670f47 commit ec4763c

File tree

1 file changed

+53
-7
lines changed

1 file changed

+53
-7
lines changed

src/main/com/topcoder/web/tc/view/pacts/client/PaymentStatusSummary.jsp

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
<c:set value="<%=true%>" var="isReskin"/>
1616
<c:set value="<%=request.getAttribute("NUM_PENDING")%>" var="numPending" />
17+
<c:set var="userHandle" value="<%= sessionInfo.getHandle() %>"/>
18+
<c:set var="userId" value="<%= sessionInfo.getUserId() %>"/>
19+
<c:set var="userImagePath" value="<%= sessionInfo.getImagePath() %>"/>
20+
<c:set var="userInitials" value="<%= sessionInfo.getHandle() %>"/>
1721

1822
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1923
<html>
@@ -27,6 +31,54 @@
2731
<jsp:param name="key" value="tc_stats"/>
2832
<jsp:param name="reskin" value="${isReskin ? 'paymentStatusSummary' : ''}"/>
2933
</jsp:include>
34+
<div id="headerNav"></div>
35+
<script>
36+
var serverName = '<%=ApplicationServer.SERVER_NAME%>';
37+
var prodUrl = 'topcoder.com';
38+
var scriptURL = '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js';
39+
40+
if (serverName === prodUrl) {
41+
scriptURL = '//uni-nav.topcoder.com/v1/tc-universal-nav.js';
42+
}
43+
44+
!function(n,t,e,a,c,i,o){n['TcUnivNavConfig']=c,n[c]=n[c]||function(){
45+
(n[c].q=n[c].q??[]).push(arguments)},n[c].l=1*new Date();i=t.createElement(e),
46+
o=t.getElementsByTagName(e)[0];i.async=1;i.type="module";i.src=a;o.parentNode.insertBefore(i,o)
47+
}(window,document,"script",scriptURL,"tcUniNav");
48+
49+
var imagePath = '<%=sessionInfo.getImagePath()%>';
50+
var photoUrl = imagePath;
51+
52+
if(imagePath=='nullnull'){
53+
photoUrl=undefined;
54+
}
55+
56+
var userId = ${userId};
57+
var handle = '${userHandle}';
58+
var initials = handle ? handle.substr(0, 2).toUpperCase() : '';
59+
60+
var user = {
61+
photoUrl,
62+
userId,
63+
initials,
64+
handle
65+
};
66+
67+
tcUniNav('init', 'headerNav', {
68+
type: 'tool',
69+
toolName: 'Topcoder Payments',
70+
user,
71+
toolRoot: '/PactsMemberServlet?module=PaymentHistory&full_list=true',
72+
signOut() {
73+
window.location.replace("http://" + serverName + "/tc?module=Logout");
74+
}
75+
});
76+
77+
tcUniNav('init', 'footerNav', {
78+
type: 'footer',
79+
})
80+
81+
</script>
3082
3183
</head>
3284
<body>
@@ -35,10 +87,6 @@
3587
ResultSetContainer rsc = (ResultSetContainer) request.getAttribute(PaymentStatusSummary.PAYMENT_STATUS_SUMMARY);
3688
%>
3789
38-
<jsp:include page="../../top.jsp" >
39-
<jsp:param name="level1" value=""/>
40-
<jsp:param name="isReskin" value="${isReskin}"/>
41-
</jsp:include>
4290
4391
<c:if test="${isReskin}">
4492
<div class="page">
@@ -244,9 +292,7 @@
244292
</div><!-- // end .page -->
245293
</c:if>
246294
247-
<jsp:include page="/foot.jsp" >
248-
<jsp:param name="isReskin" value="${isReskin}"/>
249-
</jsp:include>
295+
<div id="footerNav"></div>
250296
251297
</body>
252298

0 commit comments

Comments
 (0)