|
562 | 562 |
|
563 | 563 | function initButtons(vm) {
|
564 | 564 | vm.buttons = [];
|
565 |
| - if (vm.challenge.currentPhaseName === 'Appeals' && vm.hasSubmitted) { |
566 |
| - vm.buttons.push(newButton({ |
567 |
| - text: 'View Scorecard', |
568 |
| - href: '//' + vm.reviewAppURL + '/actions/ViewProjectDetails?pid=' + vm.challenge.challengeId, |
569 |
| - })); |
570 |
| - vm.buttons.push(newButton({ |
571 |
| - text: 'Complete Appeals', |
572 |
| - href: '//' + vm.reviewAppURL + '/actions/EarlyAppeals?pid=' + vm.challenge.challengeId, |
573 |
| - classes: 'unregister' |
574 |
| - })); |
575 |
| - } else { |
| 565 | + if (vm.isDesign) { |
576 | 566 | if (vm.challenge.allowToUnregister) {
|
577 | 567 | vm.buttons.push(newButton({
|
578 | 568 | classes: 'challengeRegisterBtn unregister',
|
|
591 | 581 | classes: (vm.challenge.submissionDisabled ? 'disabled ' : 'disabledNOT'),
|
592 | 582 | text: 'Submit Your Entries'
|
593 | 583 | }));
|
| 584 | + vm.buttons.push(newButton({ |
| 585 | + href: '//studio.' + vm.domain + '/?module=ViewSubmission&ct=' + vm.challenge.challengeId, |
| 586 | + text: 'View Your Submission', |
| 587 | + classes: (vm.challenge.submissionDisabled ? 'disabled ' : 'disabledNOT'), |
| 588 | + })) |
| 589 | + } else { |
| 590 | + if (vm.challenge.currentPhaseName === 'Appeals') { |
| 591 | + vm.buttons.push(newButton({ |
| 592 | + text: 'View Scorecard', |
| 593 | + href: '//' + vm.reviewAppURL + '/actions/ViewProjectDetails?pid=' + vm.challenge.challengeId, |
| 594 | + })); |
| 595 | + if (vm.hasSubmitted) { |
| 596 | + vm.buttons.push(newButton({ |
| 597 | + text: 'Complete Appeals', |
| 598 | + href: '//' + vm.reviewAppURL + '/actions/EarlyAppeals?pid=' + vm.challenge.challengeId, |
| 599 | + classes: 'unregister' |
| 600 | + })); |
| 601 | + } |
| 602 | + } else { |
| 603 | + if (vm.challenge.allowToUnregister) { |
| 604 | + vm.buttons.push(newButton({ |
| 605 | + classes: 'challengeRegisterBtn unregister', |
| 606 | + onClick: vm.unregisterFromChallenge, |
| 607 | + text: 'Unregister From This Challenge' |
| 608 | + })); |
| 609 | + } else { |
| 610 | + vm.buttons.push(newButton({ |
| 611 | + classes: 'challengeRegisterBtn ' + (vm.challenge.registrationDisabled ? 'disabled ' : 'disabledNOT'), |
| 612 | + onClick: vm.registerToChallenge, |
| 613 | + text: 'Register For This Challenge' |
| 614 | + })); |
| 615 | + } |
| 616 | + vm.buttons.push(newButton({ |
| 617 | + href: '/challenge-details/' + vm.challenge.challengeId + '/submit/?type=develop', |
| 618 | + classes: (vm.challenge.submissionDisabled ? 'disabled ' : 'disabledNOT'), |
| 619 | + text: 'Submit Your Entries' |
| 620 | + })); |
| 621 | + if (!vm.challenge.peerReviewDisabled) { |
| 622 | + vm.buttons.push(newButton({ |
| 623 | + href: '/challenges/' + vm.challenge.challengeId + '/reviews/', |
| 624 | + classes: (vm.challenge.peerReviewDisabled ? 'disabled ' : 'disabledNOT'), |
| 625 | + text: 'Review This Challenge' |
| 626 | + })); |
| 627 | + } |
| 628 | + } |
594 | 629 | }
|
595 | 630 | }
|
596 | 631 |
|
|
0 commit comments