Newer
Older
<div class="modal fade" id="myModal">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<ng-template #helpComingSoon> {{ 'exercise.comingSoon' | translate}}</ng-template>
<!-- Modal Header -->
<div class="modal-header">
<img class="card-img-top col-3" src="{{exercise.imageURL}}" alt="exercise image"

Eduard Frankford
committed
(error)="correctImageURL($event)" style="height: auto; float: left;">
<h4 class="modal-title">{{exercise.title}}</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<div class="container-fluid">
<div *ngIf="exercise.description" class="row">
<p style="padding-bottom: 15px; text-align: justify;">{{exercise.description}}</p>
</div>
<div class="row">
<div class="col-6 col-md-4" style="margin-bottom: 15px;">

Eduard Frankford
committed
<p style="text-align: left;"><strong jhiTranslate="exercise.details.details"></strong>
</p>
<hr>
<!-- modal rating-->

Eduard Frankford
committed
<div *ngIf="exercise.rating"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<p class="card-text" jhiTranslate="exercise.details.rating"></p>
</div>
<div class="star-container">

Eduard Frankford
committed
<span class="star" *ngFor="let starNumber of [1,2,3,4,5]" [ngClass]="{'star-marked': exercise.rating >= starNumber,
'star-unmarked': exercise.rating < starNumber}">

Eduard Frankford
committed
</span>
</div>
</div> <!-- modal rating end-->
<div *ngIf="!exercise.userHasLiked"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">
<div>
<button [ngbTooltip]="helpForLike" style="padding: 0%; font-size: 1.2;"
*ngIf="isAuthenticated()" type="button" class="btn"
(click)="likeAction()" [disabled]="!isAuthenticated()">
<fa-icon [icon]="['far', 'heart']"></fa-icon>
</button>
<span [ngbTooltip]="helpForLikeNotLoggedIn">
<button style="padding: 0%; font-size: 1.2;" *ngIf="!isAuthenticated()"
type="button" class="btn" (click)="likeAction()" [disabled]="true">
<fa-icon [icon]="['far', 'heart']"></fa-icon>
</button>
</span>
</div>
</div>
<div class="star-container">
<span>
{{exercise.numberOfLikes}}
</span>
</div>
<ng-template #helpForLike> {{ 'exercise.details.like' | translate}}</ng-template>
<ng-template #helpForLikeNotLoggedIn> {{ 'exercise.details.likeLogin' | translate}}
</ng-template>
</div> <!-- modal views end-->
<div *ngIf="exercise.userHasLiked"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">
<div>
<button [ngbTooltip]="helpForUnLike" style="padding: 0%; font-size: 1.2;"
*ngIf="exercise.userHasLiked" type="button" class="btn"
(click)="unlikeAction()" [disabled]="!isAuthenticated()">
<fa-icon class="rediconcolor" icon='heart'></fa-icon>
</button>
</div>
</div>
<div class="star-container">
<span>
{{exercise.numberOfLikes}}
</span>
</div>
<ng-template #helpForUnLike> {{ 'exercise.details.unlike' | translate}}
</ng-template>

Eduard Frankford
committed
<div *ngIf="exercise.views"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">

Eduard Frankford
committed
<div>
<fa-icon icon="eye"></fa-icon>
</div>
<!-- <div class="onhoverIconDisplay"><p class="card-text" jhiTranslate="exercise.details.views"></p></div> -->
</div>
<div class="star-container">
<span>

Michael Breu
committed
{{exercise.views}}
</span>
</div>
</div> <!-- modal views end-->

Eduard Frankford
committed
<div *ngIf="exercise.downloads >= 0"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">
<fa-icon icon="download"></fa-icon>
</div>
<div class="star-container">
<span>

Michael Breu
committed
{{exercise.downloads}}
</span>
</div>
</div> <!-- modal views end-->

Eduard Frankford
committed
<div *ngIf="exercise.numberOfWatchlistEntries >= 0"
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">
<fa-icon icon="star"></fa-icon>
</div>
<div class="star-container">
<span>
{{exercise.numberOfWatchlistEntries}}
</span>
</div>
</div>
<div style="float: left; width: 100%; padding-top: 15px; margin-bottom: 25px;">
<p class="card-text" jhiTranslate="exercise.details.bookmark"></p>

Eduard Frankford
committed
<div class="form-check" style="float: right; padding-right: 10px;"
placement="right">
<input class="form-check-input" type="checkbox"
[checked]="isOnCurrentWatchlist(exercise)"
(change)="handleForCurrentWatchlist(exercise)" value=""
<label class="form-check-label" for="modal-defaultCheck1"></label>
</div>
</div> <!-- modal bookmark end-->
<div *ngIf="exercise.originalResult.file.parentId"
style="float: left; width: 100%; padding-top: 15px; margin-bottom: 25px;">
<ng-template #helpToParent data-container="body"> {{ 'exercise.help.toParent' |
translate}}</ng-template>
<fa-icon style="padding: 5px 0px 0px 5px;float:left;" [ngbTooltip]="helpToParent"
container="body" [icon]="treeIcon"
(click)="toParent(exercise.originalResult.file.parentId)"></fa-icon>
</div>
<button *ngIf="hasChildren()" type="button"
class="btn btn-outline-secondary"
(click)="searchChildren(exercise.originalResult.exerciseId)" data-dismiss="modal"
style="display: block; margin-bottom: 5px;"
jhiTranslate="exercise.details.allExercises">
</button>
<button type="button" class="btn btn-outline-secondary" style="display: block;"
(click)="openLink(exercise.gitlabURL)"
jhiTranslate="exercise.details.git">
</button>
<button type="button"
class="btn btn-outline-secondary"
style="margin-top: 20px;"
data-toggle="modal"
data-target="#mdModal"
(click)="selectREADME()"
>README
</button>

Eduard Frankford
committed
<jhi-exercise-metadata class="col-12 col-md-8" [exercise]="exercise">
<div class="col-6 col-md-4"></div>
<div class="col-12 col-md-8">

Eduard Frankford
committed
<p style="text-align: left; margin-top: 20px;"><strong
jhiTranslate="exercise.export.export"></strong>

Eduard Frankford
committed
<a *ngFor="let action of exercise.originalResult.supportedActions"
class="btn btn-outline-secondary" role="button" aria-pressed="true"
style="float: left; margin-right: 5px; margin-top: 5px;"

Eduard Frankford
committed
(click)="startAction(action, exercise)">{{action.commandName}}</a>
<div [ngbTooltip]="helpComingSoon" placement="bottom">
<button *ngIf="hasChildren()" type="button"

Eduard Frankford
committed
class="btn btn-outline-secondary"
style="float: left; margin-right: 5px; margin-top: 5px;"
jhiTranslate="exercise.export.latex"
title="{{ 'exercise.comingSoon' | translate}}" disabled>
</button>

Michael Breu
committed
<a class="btn btn-outline-secondary" role="button" aria-pressed="true"

Eduard Frankford
committed
style="float: left; margin-right: 5px; margin-top: 5px;" (click)="download()"

Eduard Frankford
committed
jhiTranslate="exercise.export.download"></a>
</div>
</div>
</div>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal"

Eduard Frankford
committed
jhiTranslate="exercise.close"></button>
</div>
</div>
</div>
</div>

Eduard Frankford
committed
<jhi-markdown-viewer [exercise]="exercise"></jhi-markdown-viewer>