Skip to content
Snippets Groups Projects
Commit 6d4d4894 authored by Remy POCQUERUSSE's avatar Remy POCQUERUSSE
Browse files

posts display as infinite list

parent 1b987d8f
No related branches found
No related tags found
No related merge requests found
...@@ -28,57 +28,31 @@ ...@@ -28,57 +28,31 @@
<span jhiTranslate="jhipsterBeltApp.post.home.notFound">No posts found</span> <span jhiTranslate="jhipsterBeltApp.post.home.notFound">No posts found</span>
</div> </div>
<div class="table-responsive" id="entities" *ngIf="posts && posts.length > 0"> <div class="table-responsive" *ngIf="posts && posts.length > 0">
<table class="table table-striped" aria-describedby="page-heading"> <div infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<thead> <div *ngFor="let post of posts; trackBy: trackId">
<tr jhiSort [(predicate)]="predicate" [(ascending)]="ascending" (sortChange)="reset()"> <a [routerLink]="['/post', post.id, 'view']">
<th scope="col" jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon icon="sort"></fa-icon></th> <h2>{{ post.title }}</h2>
<th scope="col" jhiSortBy="title"> </a>
<span jhiTranslate="jhipsterBeltApp.post.title">Title</span> <fa-icon icon="sort"></fa-icon> <small>Posted on {{ post.date | formatMediumDatetime }} by {{ post.blog?.name }}</small>
</th> <div [innerHTML]="post.content"></div>
<th scope="col" jhiSortBy="content"> <div class="btn-group mb-2 mt-1">
<span jhiTranslate="jhipsterBeltApp.post.content">Content</span> <fa-icon icon="sort"></fa-icon> <button type="submit" [routerLink]="['/post', post.id, 'edit']" class="btn btn-primary btn-sm">
</th> <fa-icon [icon]="'pencil-alt'"></fa-icon>
<th scope="col" jhiSortBy="date"><span jhiTranslate="jhipsterBeltApp.post.date">Date</span> <fa-icon icon="sort"></fa-icon></th> <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
<th scope="col" jhiSortBy="blog.name"> </button>
<span jhiTranslate="jhipsterBeltApp.post.blog">Blog</span> <fa-icon icon="sort"></fa-icon> <button
</th> type="submit"
<th scope="col"></th> (click)="delete(post)"
</tr> data-cy="entityDeleteButton"
</thead> queryParamsHandling="merge"
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0"> class="btn btn-danger btn-sm"
<tr *ngFor="let post of posts; trackBy: trackId" data-cy="entityTable"> >
<td> <fa-icon [icon]="'times'"></fa-icon>
<a [routerLink]="['/post', post.id, 'view']">{{ post.id }}</a> <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
</td> </button>
<td>{{ post.title }}</td> </div>
<td>{{ post.content }}</td> </div>
<td>{{ post.date | formatMediumDatetime }}</td> </div>
<td>
<div *ngIf="post.blog">
<a [routerLink]="['/blog', post.blog?.id, 'view']">{{ post.blog?.name }}</a>
</div>
</td>
<td class="text-right">
<div class="btn-group">
<button type="submit" [routerLink]="['/post', post.id, 'view']" class="btn btn-info btn-sm" data-cy="entityDetailsButton">
<fa-icon icon="eye"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
</button>
<button type="submit" [routerLink]="['/post', post.id, 'edit']" class="btn btn-primary btn-sm" data-cy="entityEditButton">
<fa-icon icon="pencil-alt"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
</button>
<button type="submit" (click)="delete(post)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
<fa-icon icon="times"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment