Skip to content

Commit

Permalink
Aplicar cambio en la lista de detalles
Browse files Browse the repository at this point in the history
  • Loading branch information
Yul1b3th committed May 22, 2024
1 parent d0dc8f7 commit 5cbc760
Showing 1 changed file with 24 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,16 @@
<li [ngbNavItem]="1" (click)="onActiveIdChange(1)">
<a href="#details" ngbNavLink>{{
"modules.challenge.info.detailsTitle" | translate
}}</a>
}}</a>
<ng-template ngbNavContent>
<div class="tab-content">
<!-- show statement / mostrar enunciado -->
<div class="d-block btn-row text-end mb-3">
<span *ngIf="isLogged" class="right-span d-inline-flex">
<input
type="checkbox"
name="checkbox"
[(ngModel)]="showStatement"
/>
<input type="checkbox" name="checkbox" [(ngModel)]="showStatement" />
<label class="ms-1">{{
"modules.challenge.info.showStatement" | translate
}}</label>
}}</label>
</span>
</div>
<!-- description of statement on the left of the box where you put your code for the solution -->
Expand All @@ -29,31 +25,26 @@ <h3 class="mt-0">
</h3>
<p>{{ description | dynamicTranslate }}</p>
<h3>{{ "modules.challenge.info.examples" | translate }}</h3>
<p *ngFor="let example of examples">{{ example.example_text | dynamicTranslate }}</p>
<ul>
<li class="mb-1" *ngFor="let example of examples">{{ example.example_text | dynamicTranslate }}</li>
</ul>
<h3>{{ "modules.challenge.info.notes" | translate }}</h3>
<p>{{ notes | dynamicTranslate }}</p>
</div>
<!-- only if user logeed in -->
<!-- <app-solution *ngIf="isLogged && solutionSent" style="background-color: white;" [isUserSolution]="true" [languageExt]="'java'"></app-solution> -->

<ng-container *ngIf="isLogged">
<app-solution
style="background-color: white"
[isUserSolution]="true"
[languageExt]="'java'"
></app-solution>
<app-solution style="background-color: white" [isUserSolution]="true" [languageExt]="'java'"></app-solution>
</ng-container>
<!-- CAJA DE TEXTO QUE TIENE QUE DESAPARECER -->
</div>
</div>
<!-------if not logged show this------>
@if (!isLogged) {
<div class="w-100 mt-4 d-md-none">
<button
class="w-100 btn btn-primary"
(click)="clickSendButton()"
title="{{ 'modules.challenge.header.toolTip' | translate }}"
>
<button class="w-100 btn btn-primary" (click)="clickSendButton()"
title="{{ 'modules.challenge.header.toolTip' | translate }}">
{{ "modules.challenge.header.button" | translate }}
</button>
</div>
Expand All @@ -64,10 +55,7 @@ <h3>{{ "modules.challenge.info.notes" | translate }}</h3>
<button class="w-100 btn btn-sm btn-outline-primary">
{{ "modules.challenge.header.buttonCancel" | translate }}
</button>
<button
class="w-100 btn btn-sm btn-primary mt-2 mt-md-0"
(click)="openSendSolutionModal()"
>
<button class="w-100 btn btn-sm btn-primary mt-2 mt-md-0" (click)="openSendSolutionModal()">
{{ "modules.challenge.header.buttonAccept" | translate }}
</button>
</div>
Expand All @@ -83,7 +71,7 @@ <h3>{{ "modules.challenge.info.notes" | translate }}</h3>
<li [ngbNavItem]="2" (click)="onActiveIdChange(2)">
<a href="#solutions" ngbNavLink>{{
"modules.challenge.info.solutionsTitle" | translate
}}</a>
}}</a>
<ng-template ngbNavContent>
<!--SOLUTIONS TAB-->
<!--users can only see other solutions if they sent theirs-->
Expand All @@ -102,12 +90,8 @@ <h3>
<!--if users sent thei solution they can now see other solutions-->
<div class="unrestricted" *ngIf="!isUserSolution && isLogged">
<ng-container *ngFor="let solution of solutionsDummy; let i = index">
<app-solution
[number]="i + 1"
[isUserSolution]="false"
class="mb-4"
[languageExt]="'javascript'"
></app-solution>
<app-solution [number]="i + 1" [isUserSolution]="false" class="mb-4"
[languageExt]="'javascript'"></app-solution>
<!-- esta en solution.component.html -->
</ng-container>
</div>
Expand All @@ -116,11 +100,8 @@ <h3>
<!-------if not logged show this------>
@if (!isLogged) {
<div class="w-100 mt-4 d-md-none">
<button
class="w-100 btn btn-primary"
(click)="clickSendButton()"
title="{{ 'modules.challenge.header.toolTip' | translate }}"
>
<button class="w-100 btn btn-primary" (click)="clickSendButton()"
title="{{ 'modules.challenge.header.toolTip' | translate }}">
{{ "modules.challenge.header.button" | translate }}
</button>
</div>
Expand All @@ -131,10 +112,7 @@ <h3>
<button class="w-100 btn btn-sm btn-outline-primary">
{{ "modules.challenge.header.buttonCancel" | translate }}
</button>
<button
class="w-100 btn btn-sm btn-primary mt-2 mt-md-0"
(click)="openSendSolutionModal()"
>
<button class="w-100 btn btn-sm btn-primary mt-2 mt-md-0" (click)="openSendSolutionModal()">
{{ "modules.challenge.header.buttonAccept" | translate }}
</button>
</div>
Expand All @@ -150,17 +128,16 @@ <h3>
<li [ngbNavItem]="3" (click)="onActiveIdChange(3)">
<a href="#resources" ngbNavLink>{{
"modules.challenge.info.resourcesTitle" | translate
}}</a>
}}</a>
<ng-template ngbNavContent>
<!--RESOURCES TAB-->
<div class="tab-content info-card w-100">
<section class="title">
<h3 class="title_text">
{{ "modules.challenge.info.resources" | translate }}
</h3>
<a class="title_link" href="https://dev.itawiki.eurecatacademy.org/"
>{{ "modules.challenge.info.resourcesLink" | translate }} ></a
>
<a class="title_link" href="https://dev.itawiki.eurecatacademy.org/">{{ "modules.challenge.info.resourcesLink"
| translate }} ></a>
</section>
<section class="info-card w-100">
<app-resource-card [inputResources]="resources"> </app-resource-card>
Expand All @@ -171,19 +148,16 @@ <h3 class="title_text">
<li [ngbNavItem]="4" class="related" (click)="onActiveIdChange(4)">
<a href="#related" ngbNavLink>{{
"modules.challenge.info.relatedTitle" | translate
}}</a>
}}</a>
<ng-template ngbNavContent>
<!--RELATED TAB-->
<div class="tab-content">
<h3>{{ "modules.challenge.info.related" | translate }}</h3>
<section class="info-card">
<app-challenge-card
*ngFor="let relatedChallenge of relatedListOfChallenges"
<app-challenge-card *ngFor="let relatedChallenge of relatedListOfChallenges"
[title]="relatedChallenge.challenge_title | dynamicTranslate"
[creation_date]="relatedChallenge.creation_date"
[level]="relatedChallenge.level"
[popularity]="relatedChallenge.popularity"
[languages]="relatedChallenge.languages"
[creation_date]="relatedChallenge.creation_date" [level]="relatedChallenge.level"
[popularity]="relatedChallenge.popularity" [languages]="relatedChallenge.languages"
[id]="relatedChallenge.id_challenge">
</app-challenge-card>
</section>
Expand All @@ -192,4 +166,4 @@ <h3>{{ "modules.challenge.info.related" | translate }}</h3>
</li>
</ul>
<div [ngbNavOutlet]="nav" class="tab-content mt-2"></div>
<!--Nav panes-->
<!--Nav panes-->

0 comments on commit 5cbc760

Please sign in to comment.