notifications.pug 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. span(ng-controller="NotificationsController").userNotifications
  2. ul.list-unstyled.notifications-list(
  3. ng-if="notifications.length > 0",
  4. ng-cloak
  5. )
  6. li.notification_entry(
  7. ng-repeat="notification in notifications",
  8. )
  9. .row(ng-hide="notification.hide")
  10. .col-xs-12
  11. div(ng-switch="notification.templateKey")
  12. .alert.alert-info(ng-switch-when="notification_project_invite", ng-controller="ProjectInviteNotificationController")
  13. div.notification_inner
  14. .notification_body(ng-show="!notification.accepted")
  15. | !{translate("notification_project_invite_message", { userName: "{{ userName }}", projectName: "{{ projectName }}" })}
  16. a.pull-right.btn.btn-sm.btn-info(href, ng-click="accept()", ng-disabled="notification.inflight")
  17. span(ng-show="!notification.inflight") #{translate("join_project")}
  18. span(ng-show="notification.inflight")
  19. i.fa.fa-fw.fa-spinner.fa-spin(aria-hidden="true")
  20. |  
  21. | #{translate("joining")}...
  22. .notification_body(ng-show="notification.accepted")
  23. | !{translate("notification_project_invite_accepted_message", { projectName: "{{ projectName }}" })}
  24. a.pull-right.btn.btn-sm.btn-info(href="/project/{{ notification.messageOpts.projectId }}") #{translate("open_project")}
  25. span().notification_close
  26. button(ng-click="dismiss(notification)").close.pull-right
  27. span(aria-hidden="true") ×
  28. span.sr-only #{translate("close")}
  29. .alert.alert-info(ng-switch-when="notification_ip_matched_affiliation")
  30. div.notification_inner
  31. .notification_body
  32. | It looks like you're at
  33. strong {{ notification.messageOpts.university_name }}! <br/>
  34. | Did you know that {{notification.messageOpts.university_name}} is providing
  35. strong free Overleaf Professional accounts
  36. | to everyone at {{notification.messageOpts.university_name}}? <br/>
  37. | Add an institutional email address to claim your account.
  38. a.pull-right.btn.btn-sm.btn-info(href="/user/settings")
  39. | Add Affiliation
  40. span().notification_close
  41. button(ng-click="dismiss(notification)").close.pull-right
  42. span(aria-hidden="true") &times;
  43. span.sr-only #{translate("close")}
  44. .alert.alert-info(ng-switch-default)
  45. div.notification_inner
  46. span(ng-bind-html="notification.html").notification_body
  47. span().notification_close
  48. button(ng-click="dismiss(notification)").close.pull-right
  49. span(aria-hidden="true") &times;
  50. span.sr-only #{translate("close")}
  51. ul.list-unstyled.notifications-list(
  52. ng-controller="EmailNotificationController",
  53. ng-cloak
  54. )
  55. li.notification_entry(
  56. ng-repeat="userEmail in userEmails",
  57. ng-if="!userEmail.confirmedAt && !userEmail.hide"
  58. )
  59. .row
  60. .col-xs-12
  61. .alert.alert-warning
  62. .notification_inner(
  63. ng-if="!userEmail.confirmationInflight"
  64. )
  65. | #{translate("please_confirm_email", {emailAddress: "{{ userEmail.email }}"})}
  66. |
  67. a(
  68. href
  69. ng-click="resendConfirmationEmail(userEmail)"
  70. ) (#{translate('resend_confirmation_email')})
  71. .notification_inner(
  72. ng-if="userEmail.confirmationInflight"
  73. )
  74. i.fa.fa-spinner.fa-spin(aria-hidden="true")
  75. |
  76. | #{translate('resending_confirmation_email')}&hellip;