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

fixes #918 challene downloads links fixes #460

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@
challengeName = challenge.challengeName;
var reviewScorecardId = challenge.reviewScorecardId;
vm.isDesign = (challengeType === 'design');
vm.allowDownloads = challenge.currentPhaseName === 'Registration' || challenge.currentPhaseName === 'Submission';

vm.allowDownloads = challenge.currentStatus === 'Active' && challenge.currentPhaseRemainingTime > 0;

if ((challenge.currentPhaseName != 'Stalled' && challenge.checkpointSubmissionEndDate && challenge.checkpointSubmissionEndDate != '') || (challenge.checkpoints && challenge.checkpoints.length > 0)) {
ChallengeService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<h3>Downloads:</h3>
<div class="inner">
<ul class="downloadDocumentList">
<li ng-if="CD.challenge.Documents && CD.challenge.Documents.length > 0 && CD.allowDownloads && CD.allowDownloads" ng-repeat="document in CD.challenge.Documents">
<li ng-if="CD.challenge.Documents.length && CD.allowDownloads && CD.isRegistered" ng-repeat="document in CD.challenge.Documents">
<a ng-href="{{document.url}}">{{document.documentName}}</a>
</li>
<li ng-if="CD.challenge.Documents && CD.challenge.Documents.length === 0 && CD.allowDownloads">
<strong>None</strong>
<li ng-if="CD.challenge.Documents.length && CD.allowDownloads && CD.isLoggedIn && !CD.isRegistered">
<strong>Register to Download Files</strong>
</li>
<li ng-if="!CD.allowDownloads">
<strong>Downloads are no longer available for this challenge</strong>
<li ng-if="CD.challenge.Documents.length && CD.allowDownloads && !CD.isLoggedIn">
<strong>Log In and Register to Download Files</strong>
</li>
<li ng-if="!CD.challenge.Documents && CD.allowDownloads && CD.isLoggedIn && !CD.isRegistered">
<strong>Register to Download Files (if available)</strong>
<li ng-if="CD.challenge.Documents.length && !CD.allowDownloads">
<strong>Downloads are not available for this challenge</strong>
</li>
<li ng-if="!CD.challenge.Documents && CD.allowDownloads && !CD.isLoggedIn">
<strong>Log In and Register to Download Files <br>(if available)</strong>
<li ng-if="!CD.challenge.Documents.length">
<strong>None</strong>
</li>
</ul>
</div>