post.component.html 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <div>
  2. <h2 id="page-heading">
  3. <span jhiTranslate="zipConnectApp.post.home.title">Posts</span>
  4. <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-post" [routerLink]="['/post/new']">
  5. <fa-icon [icon]="'plus'"></fa-icon>
  6. <span jhiTranslate="zipConnectApp.post.home.createLabel">
  7. Create new Post
  8. </span>
  9. </button>
  10. </h2>
  11. <jhi-alert></jhi-alert>
  12. <br/>
  13. <div class="table-responsive" *ngIf="posts">
  14. <table class="table table-striped">
  15. <thead>
  16. <tr>
  17. <th><span jhiTranslate="global.field.id">ID</span></th>
  18. <th><span jhiTranslate="zipConnectApp.post.postId">Post Id</span></th>
  19. <th><span jhiTranslate="zipConnectApp.post.timestamp">Timestamp</span></th>
  20. <th><span jhiTranslate="zipConnectApp.post.content">Content</span></th>
  21. <th><span jhiTranslate="zipConnectApp.post.likes">Likes</span></th>
  22. <th><span jhiTranslate="zipConnectApp.post.poster">Poster</span></th>
  23. <th><span jhiTranslate="zipConnectApp.post.privacySetting">Privacy Setting</span></th>
  24. <th><span jhiTranslate="zipConnectApp.post.poster">Poster</span></th>
  25. <th></th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <tr *ngFor="let post of posts ;trackBy: trackId">
  30. <td><a [routerLink]="['/post', post.id, 'view' ]">{{post.id}}</a></td>
  31. <td>{{post.postId}}</td>
  32. <td>{{post.timestamp | date:'mediumDate'}}</td>
  33. <td>{{post.content}}</td>
  34. <td>{{post.likes}}</td>
  35. <td>
  36. {{post.poster?.id}}
  37. </td>
  38. <td>
  39. <div *ngIf="post.privacySetting">
  40. <a [routerLink]="['../privacy', post.privacySetting?.id, 'view' ]" >{{post.privacySetting?.id}}</a>
  41. </div>
  42. </td>
  43. <td>
  44. {{post.poster?.id}}
  45. </td>
  46. <td class="text-right">
  47. <div class="btn-group flex-btn-group-container">
  48. <button type="submit"
  49. [routerLink]="['/post', post.id, 'view' ]"
  50. class="btn btn-info btn-sm">
  51. <fa-icon [icon]="'eye'"></fa-icon>
  52. <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
  53. </button>
  54. <button type="submit"
  55. [routerLink]="['/post', post.id, 'edit']"
  56. class="btn btn-primary btn-sm">
  57. <fa-icon [icon]="'pencil-alt'"></fa-icon>
  58. <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
  59. </button>
  60. <button type="submit"
  61. [routerLink]="['/', { outlets: { popup: 'post/'+ post.id + '/delete'} }]"
  62. replaceUrl="true"
  63. queryParamsHandling="merge"
  64. class="btn btn-danger btn-sm">
  65. <fa-icon [icon]="'times'"></fa-icon>
  66. <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
  67. </button>
  68. </div>
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>