Skip to content

Commit 2603c18

Browse files
authored
Merge pull request #239 from topcoder-platform/reskin-or
Reskin OR with new Navigation
2 parents 722776a + 5f46e8d commit 2603c18

File tree

26 files changed

+1465
-1051
lines changed

26 files changed

+1465
-1051
lines changed

src/main/java/com/cronos/onlinereview/actions/projectdetails/BaseProjectDetailsAction.java

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ protected String handleDownloadSubmission(HttpServletRequest request, HttpServle
484484
for (Long id : subIds) {
485485
Submission submission = upMgr.getSubmission(id);
486486
if (submission != null
487-
&& submission.getSubmissionType().getName().equals(Constants.CONTEST_SUBMISSION_TYPE_NAME)
487+
&& (submission.getSubmissionType().getName().equals(Constants.CONTEST_SUBMISSION_TYPE_NAME)
488+
|| submission.getSubmissionType().getName().equals(Constants.CHECKPOINT_SUBMISSION_TYPE_NAME))
488489
&& !submission.getSubmissionStatus().getName()
489490
.equals(Constants.FAILED_SCREENING_SUBMISSION_STATUS_NAME)) {
490491
passedScreening = true;
@@ -499,16 +500,16 @@ protected String handleDownloadSubmission(HttpServletRequest request, HttpServle
499500
}
500501

501502
// Allow only submitter to download the submission if it is MM type of challenge
502-
if (project.getProjectCategory().getId() == 37 || project.getProjectCategory().getProjectType().getId() == 3) {
503-
if (!Boolean.parseBoolean((String) project.getProperty("Viewable Submissions Flag"))) {
504-
long submitter = upload.getOwner();
505-
long loggedInUserId = AuthorizationHelper.getLoggedInUserId(request);
506-
if (submitter != loggedInUserId) {
507-
return ActionsHelper.produceErrorReport(this, request, errorMessageKey, "Error.NoPermission",
508-
Boolean.FALSE);
509-
}
510-
}
511-
}
503+
// if (project.getProjectCategory().getId() == 37 || project.getProjectCategory().getProjectType().getId() == 3) {
504+
// if (!Boolean.parseBoolean((String) project.getProperty("Viewable Submissions Flag"))) {
505+
// long submitter = upload.getOwner();
506+
// long loggedInUserId = AuthorizationHelper.getLoggedInUserId(request);
507+
// if (submitter != loggedInUserId) {
508+
// return ActionsHelper.produceErrorReport(this, request, errorMessageKey, "Error.NoPermission",
509+
// Boolean.FALSE);
510+
// }
511+
// }
512+
// }
512513

513514
// Submitters can download others' contest submissions and checkpoint
514515
// submissions only
@@ -519,15 +520,17 @@ protected String handleDownloadSubmission(HttpServletRequest request, HttpServle
519520
// submitters
520521
// can't download others' submissions at all.
521522
if (submissionType == 1 || submissionType == 3) {
522-
Phase reviewPhase = ActionsHelper.findPhaseByTypeName(phases, Constants.APPEALS_RESPONSE_PHASE_NAME);
523-
if (reviewPhase == null) {
524-
reviewPhase = ActionsHelper.findPhaseByTypeName(phases, Constants.REVIEW_PHASE_NAME);
525-
}
526-
boolean isReviewFinished = (reviewPhase != null) && (reviewPhase.getPhaseStatus().getId() == 3);
523+
Phase reviewPhase = ActionsHelper.findPhaseByTypeName(phases, Constants.APPEALS_RESPONSE_PHASE_NAME);
524+
// APPEALS_RESPONSE_PHASE!=null, must be closed.
525+
boolean isReviewFinished = (reviewPhase != null) ? (reviewPhase.getPhaseStatus().getId() == 3) : true;
526+
// At the same time, different review phases must be closed.
527+
reviewPhase = submissionType == 1 ? ActionsHelper.findPhaseByTypeName(phases, Constants.REVIEW_PHASE_NAME) : ActionsHelper.findPhaseByTypeName(phases, Constants.CHECKPOINT_REVIEW_PHASE_NAME);
528+
isReviewFinished = isReviewFinished && (reviewPhase != null) && (reviewPhase.getPhaseStatus().getId() == 3);
527529
if (isReviewFinished) {
528-
// Check that at least one submission passed review
529-
Submission[] activeSubmissions = ActionsHelper.getProjectSubmissions(project.getId(),
530-
Constants.CONTEST_SUBMISSION_TYPE_NAME, Constants.ACTIVE_SUBMISSION_STATUS_NAME, false);
530+
// Check that at least one submission passed review for two submission types.
531+
Submission[] activeSubmissions = submissionType == 1
532+
? ActionsHelper.getProjectSubmissions(project.getId(), Constants.CONTEST_SUBMISSION_TYPE_NAME, Constants.ACTIVE_SUBMISSION_STATUS_NAME, false)
533+
: ActionsHelper.getProjectSubmissions(project.getId(), Constants.CHECKPOINT_SUBMISSION_TYPE_NAME, Constants.ACTIVE_SUBMISSION_STATUS_NAME, false);
531534
noRights = (activeSubmissions.length == 0);
532535
}
533536
}

src/main/resources/MessageResources.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,10 @@ viewProjectDetails.box.Submission.ReviewScore=Review{0} Score
547547
viewProjectDetails.box.Submission.ReviewResult=Review{0} Result
548548
viewProjectDetails.box.Submission.Download=Download Submission
549549
viewProjectDetails.box.Submission.Previous.UploadID=Previous upload:
550-
viewProjectDetails.box.Submission.icoShowMore.alt=View Previous Submissions
550+
viewProjectDetails.box.Submission.icoShowMore.alt=View Other Submissions
551551
viewProjectDetails.box.Submission.icoShowMore.img=/i/reskin/showMore.svg
552-
viewProjectDetails.box.Submission.icoShowLess.alt=
553-
viewProjectDetails.box.Submission.icoShowLess.img=/i/reskin/showMore.svg
552+
viewProjectDetails.box.Submission.icoShowLess.alt=Hide Other Submissions
553+
viewProjectDetails.box.Submission.icoShowLess.img=/i/reskin/showLess.svg
554554
viewProjectDetails.box.Submission.icoTrash.alt=Remove this Submission
555555
viewProjectDetails.box.Submission.icoTrash.img=/i/or/icon_trash.gif
556556
viewProjectDetails.box.Submission.icoPassed.alt=Passed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dummy file for upload file testing

web/css/reskin-or/reskin.css

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
--turq-180: #0d664e;
3939
--screen-max: 1376px;
4040
--header-height: 60px;
41-
--footer-height: 48px;
41+
--footer-height: 96px;
4242
}
4343

4444
* {
@@ -187,12 +187,13 @@ body {
187187
min-height: 100vh;
188188
}
189189

190+
.content--manageProject,
190191
.content--projectDetails {
191-
padding-bottom: 144px;
192+
padding-bottom: 200px;
192193
}
193194

194-
.content--manageProject {
195-
padding-bottom: 148px;
195+
.content--projectPayment {
196+
padding-bottom: 135px;
196197
}
197198

198199
.content__inner {
@@ -1339,7 +1340,7 @@ table.scorecard td.reviewerResp input {
13391340

13401341
td.phasesTable__empty,
13411342
td.resourcesTable__empty {
1342-
height: 20px;
1343+
height: 30px;
13431344
}
13441345

13451346
.phasesTable__body--center td {
@@ -1359,6 +1360,7 @@ td.resourcesTable__empty {
13591360
background: var(--bronze-1);
13601361
}
13611362

1363+
.phasesTable__placements--other,
13621364
.phasesTable__placements--forth,
13631365
.phasesTable__placements--fifth {
13641366
background: var(--turq-15);
@@ -1663,6 +1665,7 @@ td.resourcesTable__empty {
16631665
border: none;
16641666
resize: none;
16651667
width: 100%;
1668+
height: 100%;
16661669
}
16671670

16681671
.contactManager textarea {
@@ -2316,7 +2319,7 @@ td.resourcesTable__empty {
23162319
box-sizing: border-box;
23172320
border-radius: 50%;
23182321
border: 1.5px solid var(--black-60);
2319-
background-color: transparent;
2322+
background-color: var(--tc-white);
23202323
}
23212324

23222325
.custom-radio .phaseUseDuration,
@@ -2741,4 +2744,33 @@ td.resourcesTable__empty {
27412744
font-style: normal;
27422745
font-weight: 400;
27432746
font-size: 14px;
2747+
}
2748+
2749+
.loadingSelect img {
2750+
width: 35px;
2751+
height: 35px;
2752+
}
2753+
2754+
.ctaOpen {
2755+
bottom: 386px;
2756+
}
2757+
.approvalRadioBtn {
2758+
display: flex;
2759+
align-items: flex-start;
2760+
flex-direction: column;
2761+
gap: 8px;
2762+
}
2763+
2764+
.lateDeliverableValue {
2765+
margin-top: 8px;
2766+
font-weight: 400;
2767+
}
2768+
2769+
.lateDeliverableProjectLink {
2770+
color: var(--link-blue-dark);
2771+
text-decoration: none !important;
2772+
}
2773+
2774+
.lateness {
2775+
width: 110px;
27442776
}

web/i/reskin/showLess.svg

Lines changed: 13 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)