This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 7fbf13b2 authored by Eduard Frankford's avatar Eduard Frankford
Browse files

added help window for like button

parents a21aa392 7c31d06f
2 merge requests!55June Release,!54thumbs_up button implementation
......@@ -158,6 +158,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/api/pluginIF/**").permitAll() // plugins calls are always allowed, security by tokens
.antMatchers("/api/applicationInfo/**").permitAll() // everybody may retrieve deployment infos
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/exerciseFile/**").permitAll()
.antMatchers("/api/exercise/**").permitAll()
.antMatchers("/api/refreshToken").permitAll()
.antMatchers("/api/register").denyAll()
......
......@@ -43,12 +43,19 @@
style="float: left; width: 100%; margin-bottom: 5px; padding-top: 15px;">
<div style="float: left;">
<div>
<button style="padding: 0%; font-size: 1.2;" *ngIf="!exercise.userHasLiked"
type="button" class="btn" (click)="likeAction()"
[disabled]="!isAuthenticated()">
<button [ngbTooltip]="helpForLike" style="padding: 0%; font-size: 1.2;"
*ngIf="isAuthenticated()" type="button" class="btn"
(click)="likeAction()" [disabled]="!isAuthenticated()">
<!-- <fa-icon icon="heart"></fa-icon> -->
<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="heart"></fa-icon> -->
<fa-icon [icon]="['far', 'heart']"></fa-icon>
</button>
</span>
</div>
<!-- <div class="onhoverIconDisplay"><p class="card-text" jhiTranslate="exercise.details.views"></p></div> -->
......@@ -58,15 +65,19 @@
{{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 style="padding: 0%; font-size: 1.2;" *ngIf="exercise.userHasLiked"
type="button" class="btn" (click)="unlikeAction()"
[disabled]="!isAuthenticated()">
<button [ngbTooltip]="helpForUnLike" style="padding: 0%; font-size: 1.2;"
*ngIf="exercise.userHasLiked" type="button" class="btn"
(click)="unlikeAction()" [disabled]="!isAuthenticated()">
<!-- <fa-icon icon="heart"></fa-icon> -->
<fa-icon class="rediconcolor" icon='heart'></fa-icon>
</button>
......@@ -78,6 +89,9 @@
{{exercise.numberOfLikes}}
</span>
</div>
<ng-template #helpForUnLike> {{ 'exercise.details.unlike' | translate}}
</ng-template>
</div>
<div *ngIf="exercise.rating"
......@@ -124,17 +138,6 @@
</div>
</div> <!-- modal bookmark end-->
<!-- <button type="button" class="btn btn-outline-secondary"
style="display: block; margin-bottom: 5px;"
jhiTranslate="exercise.details.hitDetails">
</button> -->
<div [ngbTooltip]="helpComingSoon" placement="bottom">
<button *ngIf="exercise.type == exerciseType.COLLECTION" type="button"
class="btn btn-outline-secondary" style="display: block; margin-bottom: 5px;"
jhiTranslate="exercise.details.allExercises" disabled>
>
</button>
</div>
<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' |
......
......@@ -11,10 +11,13 @@
"views": "Anzahl der Aufrufe",
"downloads": "Anzahl der Downloads",
"readmeNotFound": "# Keine README.md Datei (oder Alternative) gefunden!",
"toParent": "zum übergeordneten Objekt"
"toParent": "zum übergeordneten Objekt",
"like": "Wenn Ihnen diese Aufgabe gefällt, dann klicken Sie auf das Herz!",
"unlike": "Wenn Ihnen diese Aufgabe nicht mehr gefällt, dann klicken Sie auf das Herz!",
"likeLogin": "Melden Sie sich an, um dieser Aufgabe ein like zu geben"
},
"help": {
"toParent": "Diese Aufgabe ist Teil einer Sammlung. Klicken Sie hier, um die Sammlung anzusehen."
"toParent": "Diese Aufgabe ist Teil einer Sammlung. Klicken Sie hier, um die Sammlung anzusehen."
},
"metadata": {
"metadata": "Metadaten",
......
......@@ -11,10 +11,12 @@
"views": "Number of views",
"downloads": "Number of downloads",
"readmeNotFound": "# No README.md (or alternatives) found!",
"toParent": "to parent object"
"toParent": "to parent object",
"like": "If you like this exercise, you can click here!",
"unlike": "If you don't like this exercise anymore, you can click here!"
},
"help": {
"toParent": "This exercise is contained in a collection. Click here to see the collection item"
"toParent": "This exercise is contained in a collection. Click here to see the collection item"
},
"metadata": {
"metadata": "Meta data",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment