navbar.component.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <nav class="navbar navbar-dark navbar-expand-md jh-navbar">
  2. <div class="jh-logo-container float-left">
  3. <a class="jh-navbar-toggler d-lg-none float-right" href="javascript:void(0);" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" (click)="toggleNavbar()">
  4. <fa-icon icon="bars"></fa-icon>
  5. </a>
  6. <a class="navbar-brand logo float-left" routerLink="/" (click)="collapseNavbar()">
  7. <span class="logo-img"></span>
  8. <span jhiTranslate="global.title" class="navbar-title">ZipConnect</span> <span class="navbar-version">{{version}}</span>
  9. </a>
  10. </div>
  11. <div class="navbar-collapse collapse" id="navbarResponsive" [ngbCollapse]="isNavbarCollapsed" [ngSwitch]="isAuthenticated()">
  12. <ul class="navbar-nav ml-auto">
  13. <li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
  14. <a class="nav-link" routerLink="/" (click)="collapseNavbar()">
  15. <span>
  16. <fa-icon icon="home"></fa-icon>
  17. <span jhiTranslate="global.menu.home">Home</span>
  18. </span>
  19. </a>
  20. </li>
  21. <!-- jhipster-needle-add-element-to-menu - JHipster will add new menu items here -->
  22. <li *ngSwitchCase="true" ngbDropdown class="nav-item dropdown pointer" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
  23. <a class="nav-link dropdown-toggle" ngbDropdownToggle href="javascript:void(0);" id="entity-menu">
  24. <span>
  25. <fa-icon icon="th-list"></fa-icon>
  26. <span jhiTranslate="global.menu.entities.main">
  27. Entities
  28. </span>
  29. </span>
  30. </a>
  31. <ul class="dropdown-menu" ngbDropdownMenu>
  32. <li>
  33. <a class="dropdown-item" routerLink="user-profile" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
  34. <fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
  35. <span jhiTranslate="global.menu.entities.userProfile">User Profile</span>
  36. </a>
  37. </li>
  38. <li>
  39. <a class="dropdown-item" routerLink="cohort" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
  40. <fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
  41. <span jhiTranslate="global.menu.entities.cohort">Cohort</span>
  42. </a>
  43. </li>
  44. <li>
  45. <a class="dropdown-item" routerLink="employer" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
  46. <fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
  47. <span jhiTranslate="global.menu.entities.employer">Employer</span>
  48. </a>
  49. </li>
  50. <li>
  51. <a class="dropdown-item" routerLink="post" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
  52. <fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
  53. <span jhiTranslate="global.menu.entities.post">Post</span>
  54. </a>
  55. </li>
  56. <li>
  57. <a class="dropdown-item" routerLink="privacy" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
  58. <fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
  59. <span jhiTranslate="global.menu.entities.privacy">Privacy</span>
  60. </a>
  61. </li>
  62. <!-- jhipster-needle-add-entity-to-menu - JHipster will add entities to the menu here -->
  63. </ul>
  64. </li>
  65. <li *jhiHasAnyAuthority="'ROLE_ADMIN'" ngbDropdown class="nav-item dropdown pointer" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
  66. <a class="nav-link dropdown-toggle" ngbDropdownToggle href="javascript:void(0);" id="admin-menu">
  67. <span>
  68. <fa-icon icon="user-plus"></fa-icon>
  69. <span jhiTranslate="global.menu.admin.main">Administration</span>
  70. </span>
  71. </a>
  72. <ul class="dropdown-menu" ngbDropdownMenu>
  73. <li>
  74. <a class="dropdown-item" routerLink="admin/user-management" routerLinkActive="active" (click)="collapseNavbar()">
  75. <fa-icon icon="user" fixedWidth="true"></fa-icon>
  76. <span jhiTranslate="global.menu.admin.userManagement">User management</span>
  77. </a>
  78. </li>
  79. <li>
  80. <a class="dropdown-item" routerLink="admin/jhi-metrics" routerLinkActive="active" (click)="collapseNavbar()">
  81. <fa-icon icon="tachometer-alt" fixedWidth="true"></fa-icon>
  82. <span jhiTranslate="global.menu.admin.metrics">Metrics</span>
  83. </a>
  84. </li>
  85. <li>
  86. <a class="dropdown-item" routerLink="admin/jhi-health" routerLinkActive="active" (click)="collapseNavbar()">
  87. <fa-icon icon="heart" fixedWidth="true"></fa-icon>
  88. <span jhiTranslate="global.menu.admin.health">Health</span>
  89. </a>
  90. </li>
  91. <li>
  92. <a class="dropdown-item" routerLink="admin/jhi-configuration" routerLinkActive="active" (click)="collapseNavbar()">
  93. <fa-icon icon="list" fixedWidth="true"></fa-icon>
  94. <span jhiTranslate="global.menu.admin.configuration">Configuration</span>
  95. </a>
  96. </li>
  97. <li>
  98. <a class="dropdown-item" routerLink="admin/audits" routerLinkActive="active" (click)="collapseNavbar()">
  99. <fa-icon icon="bell" fixedWidth="true"></fa-icon>
  100. <span jhiTranslate="global.menu.admin.audits">Audits</span>
  101. </a>
  102. </li>
  103. <li>
  104. <a class="dropdown-item" routerLink="admin/logs" routerLinkActive="active" (click)="collapseNavbar()">
  105. <fa-icon icon="tasks" fixedWidth="true"></fa-icon>
  106. <span jhiTranslate="global.menu.admin.logs">Logs</span>
  107. </a>
  108. </li>
  109. <li *ngIf="swaggerEnabled">
  110. <a class="dropdown-item" routerLink="admin/docs" routerLinkActive="active" (click)="collapseNavbar()">
  111. <fa-icon icon="book" fixedWidth="true"></fa-icon>
  112. <span jhiTranslate="global.menu.admin.apidocs">API</span>
  113. </a>
  114. </li>
  115. <!-- jhipster-needle-add-element-to-admin-menu - JHipster will add entities to the admin menu here -->
  116. <li *ngIf="!inProduction">
  117. <a class="dropdown-item" href='./h2-console' target="_tab" (click)="collapseNavbar()">
  118. <fa-icon icon="hdd" fixedWidth="true"></fa-icon>
  119. <span jhiTranslate="global.menu.admin.database">Database</span>
  120. </a>
  121. </li>
  122. </ul>
  123. </li>
  124. <li ngbDropdown class="nav-item dropdown pointer" *ngIf="languages && languages.length > 1">
  125. <a class="nav-link dropdown-toggle" ngbDropdownToggle href="javascript:void(0);" id="languagesnavBarDropdown">
  126. <span>
  127. <fa-icon icon="flag"></fa-icon>
  128. <span jhiTranslate="global.menu.language">Language</span>
  129. </span>
  130. </a>
  131. <ul class="dropdown-menu" ngbDropdownMenu>
  132. <li *ngFor="let language of languages">
  133. <a class="dropdown-item" [jhiActiveMenu]="language" href="javascript:void(0);" (click)="changeLanguage(language);collapseNavbar();">{{language | findLanguageFromKey}}</a>
  134. </li>
  135. </ul>
  136. </li>
  137. <li ngbDropdown class="nav-item dropdown pointer" placement="bottom-right" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
  138. <a class="nav-link dropdown-toggle" ngbDropdownToggle href="javascript:void(0);" id="account-menu">
  139. <span *ngIf="!getImageUrl()">
  140. <fa-icon icon="user"></fa-icon>
  141. <span jhiTranslate="global.menu.account.main">
  142. Account
  143. </span>
  144. </span>
  145. <span *ngIf="getImageUrl()">
  146. <img [src]="getImageUrl()" class="profile-image img-circle" alt="Avatar">
  147. </span>
  148. </a>
  149. <ul class="dropdown-menu" ngbDropdownMenu>
  150. <li *ngSwitchCase="true">
  151. <a class="dropdown-item" routerLink="settings" routerLinkActive="active" (click)="collapseNavbar()">
  152. <fa-icon icon="wrench" fixedWidth="true"></fa-icon>
  153. <span jhiTranslate="global.menu.account.settings">Settings</span>
  154. </a>
  155. </li>
  156. <li *ngSwitchCase="true">
  157. <a class="dropdown-item" routerLink="password" routerLinkActive="active" (click)="collapseNavbar()">
  158. <fa-icon icon="clock" fixedWidth="true"></fa-icon>
  159. <span jhiTranslate="global.menu.account.password">Password</span>
  160. </a>
  161. </li>
  162. <li *ngSwitchCase="true">
  163. <a class="dropdown-item" (click)="logout()" id="logout">
  164. <fa-icon icon="sign-out-alt" fixedWidth="true"></fa-icon>
  165. <span jhiTranslate="global.menu.account.logout">Sign out</span>
  166. </a>
  167. </li>
  168. <li *ngSwitchCase="false">
  169. <a class="dropdown-item" (click)="login()" id="login">
  170. <fa-icon icon="sign-in-alt" fixedWidth="true"></fa-icon>
  171. <span jhiTranslate="global.menu.account.login">Sign in</span>
  172. </a>
  173. </li>
  174. <li *ngSwitchCase="false">
  175. <a class="dropdown-item" routerLink="register" routerLinkActive="active" (click)="collapseNavbar()">
  176. <fa-icon icon="user-plus" fixedWidth="true"></fa-icon>
  177. <span jhiTranslate="global.menu.account.register">Register</span>
  178. </a>
  179. </li>
  180. </ul>
  181. </li>
  182. </ul>
  183. </div>
  184. </nav>