access.pug 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. extends ../../layout
  2. block vars
  3. - metadata = { viewport: true }
  4. block content
  5. script(type="template", id="overleaf-token-access-data")!= StringHelper.stringifyJsonForScript({ postUrl: postUrl, csrfToken: csrfToken})
  6. div(
  7. ng-controller="TokenAccessPageController",
  8. ng-init="post()"
  9. )
  10. .editor.full-size
  11. div
  12. |  
  13. a(href="/project" style="font-size: 2rem; margin-left: 1rem; color: #ddd;")
  14. i.fa.fa-arrow-left
  15. .loading-screen(
  16. ng-show="mode == 'accessAttempt'"
  17. )
  18. .loading-screen-brand-container
  19. .loading-screen-brand()
  20. h3.loading-screen-label.text-center
  21. | #{translate('join_project')}
  22. span(ng-show="accessInFlight == true")
  23. span.loading-screen-ellip .
  24. span.loading-screen-ellip .
  25. span.loading-screen-ellip .
  26. .global-alerts.text-center(ng-cloak)
  27. div(ng-show="accessError", ng-cloak)
  28. br
  29. div(ng-switch="accessError", ng-cloak)
  30. div(ng-switch-when="not_found")
  31. h4(aria-live="assertive")
  32. | Project not found
  33. div(ng-switch-default)
  34. .alert.alert-danger(aria-live="assertive") #{translate('token_access_failure')}
  35. p
  36. a(href="/") #{translate('home')}
  37. .loading-screen(
  38. ng-show="mode == 'v1Import'"
  39. )
  40. .container
  41. .row
  42. .col-sm-8.col-sm-offset-2
  43. h1.text-center Move project to Overleaf v2
  44. img.v2-import__img(
  45. src="/img/v1-import/v2-editor.png"
  46. alt="The new V2 editor."
  47. )
  48. div(ng-if="v1ImportData.status == 'cannotImport'")
  49. h2.text-center
  50. | Cannot Access Overleaf v1 Project
  51. p.text-center.row-spaced-small
  52. | The project you are attempting to access must be imported to Overleaf v2 before it can be accessed. Please contact the project owner or
  53. |
  54. a(href="/contact") contact support
  55. |
  56. | for assistance.
  57. div(ng-if="v1ImportData.status == 'mustLogin'")
  58. p.text-center.row-spaced-small
  59. | This project has not yet been moved into the new version of
  60. | Overleaf. You will need to log in and move it in order to
  61. | continue working on it.
  62. .row-spaced.text-center
  63. a.btn.btn-primary(
  64. href="/login?redir={{ currentPath() }}"
  65. ) Log In To Move Project
  66. div(ng-if="v1ImportData.status == 'canImport'")
  67. div(ng-if="v1ImportData.hasOwner")
  68. p.text-center.row-spaced-small
  69. | #[strong() {{ getProjectName() }}] has not yet been moved into
  70. | the new version of Overleaf. You will need to move it in order
  71. | to continue working on it. It should only take a few seconds.
  72. form(
  73. async-form="v2Import"
  74. name="v2ImportForm"
  75. action="{{ buildFormImportPath(v1ImportData.projectId) }}"
  76. method="POST"
  77. ng-cloak
  78. )
  79. input(name='_csrf', type='hidden', value=csrfToken)
  80. form-messages(for="v2ImportForm")
  81. input.row-spaced.btn.btn-primary.text-center.center-block(
  82. type="submit"
  83. ng-value="v2ImportForm.inflight || v2ImportForm.response.success ? 'Moving to v2...' : 'Move Project and Continue'"
  84. ng-disabled="v2ImportForm.inflight || v2ImportForm.response.success"
  85. )
  86. .row-spaced-small.text-center
  87. a(href="{{ buildZipDownloadPath(v1ImportData.projectId) }}")
  88. | Download project zip file
  89. div(ng-if="!v1ImportData.hasOwner")
  90. p.text-center.row-spaced.small
  91. | #[strong() {{ getProjectName() }}] has not yet been moved into
  92. | the new version of Overleaf. This project was created
  93. | anonymously and therefore cannot be automatically imported.
  94. | Please download a zip file of the project and upload that to
  95. | continue editing it. If you would like to delete this project
  96. | after you have made a copy, please contact support.
  97. .row-spaced.text-center
  98. a.btn.btn-primary(href="{{ buildZipDownloadPath(v1ImportData.projectId) }}")
  99. | Download project zip file
  100. .row-spaced.text-center
  101. div(ng-if="v1ImportData.hasAssignment")
  102. p
  103. | #[span.fa.fa-exclamation-triangle]
  104. | This project is an assignment, and the assignment toolkit is
  105. | no longer supported in Overleaf v2. When you move it to
  106. | Overleaf v2, it will become a normal project.
  107. | #[a(href="https://www.overleaf.com/learn/how-to/Overleaf_v2_FAQ#assignment-tools") Please see our FAQ]
  108. | for more information or contact your instructor if you haven't
  109. | already submitted it.
  110. div(ng-if="!v1ImportData.hasAssignment")
  111. div(ng-switch="v1ImportData.brandInfo")
  112. div(ng-switch-when="'f1000'")
  113. p
  114. | #[span.fa.fa-exclamation-triangle]
  115. | This project is an F1000Research article, and our integration
  116. | with F1000Research has changed in Overleaf v2.
  117. | #[a(href="https://www.overleaf.com/learn/how-to/Overleaf_v2_FAQ#f1000research") Find out more about moving to Overleaf v2]
  118. div(ng-switch-when="'wellcome'")
  119. p
  120. | #[span.fa.fa-exclamation-triangle]
  121. | This project is an Wellcome Open Research article, and our
  122. | integration with Wellcome Open Research has changed in
  123. | Overleaf v2.
  124. | #[a(href="https://www.overleaf.com/learn/how-to/Overleaf_v2_FAQ#f1000research") Find out more about moving to Overleaf v2]
  125. div(ng-switch-default)
  126. a(href="https://www.overleaf.com/learn/how-to/Overleaf_v2_FAQ")
  127. | Find out more about moving to Overleaf v2
  128. block append foot-scripts
  129. script.
  130. $(document).ready(function () {
  131. setTimeout(function() {
  132. $('.loading-screen-brand').css('height', '20%')
  133. }, 500);
  134. });