left-menu.pug 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. aside#left-menu.full-size(
  2. ng-class="{ 'shown': ui.leftMenuShown }"
  3. ng-cloak
  4. )
  5. h4 #{translate("download")}
  6. ul.list-unstyled.nav.nav-downloads.text-center
  7. li
  8. a(
  9. ng-href="/project/{{project_id}}/download/zip"
  10. target="_blank"
  11. )
  12. i.fa.fa-file-archive-o.fa-2x
  13. br
  14. | #{translate("source")}
  15. li
  16. a(
  17. ng-href="{{pdf.downloadUrl || pdf.url}}"
  18. target="_blank"
  19. ng-if="pdf.url"
  20. )
  21. i.fa.fa-file-pdf-o.fa-2x
  22. br
  23. | PDF
  24. div.link-disabled(
  25. ng-if="!pdf.url"
  26. tooltip=translate('please_compile_pdf_before_download')
  27. tooltip-placement="bottom"
  28. )
  29. i.fa.fa-file-pdf-o.fa-2x
  30. br
  31. | PDF
  32. span(ng-show="!anonymous")
  33. h4 #{translate("actions")}
  34. ul.list-unstyled.nav
  35. li(ng-controller="LeftMenuCloneProjectModalController")
  36. a(
  37. href,
  38. ng-click="openCloneProjectModal()"
  39. )
  40. i.fa.fa-fw.fa-copy
  41. |    #{translate("copy_project")}
  42. clone-project-modal(
  43. handle-hide="handleHide"
  44. open-project="openProject"
  45. show="show"
  46. )
  47. != moduleIncludes("editorLeftMenu:actions", locals)
  48. li(ng-controller="WordCountModalController")
  49. a(href, ng-if="pdf.url", ng-click="openWordCountModal()")
  50. i.fa.fa-fw.fa-eye
  51. span    #{translate("word_count")}
  52. a.link-disabled(href, ng-if="!pdf.url", tooltip=translate('please_compile_pdf_before_word_count'))
  53. i.fa.fa-fw.fa-eye
  54. span.link-disabled    #{translate("word_count")}
  55. word-count-modal(
  56. handle-hide="handleHide"
  57. show="show"
  58. )
  59. if (moduleIncludesAvailable("editorLeftMenu:sync"))
  60. div(ng-show="!anonymous")
  61. h4() #{translate("sync")}
  62. != moduleIncludes("editorLeftMenu:sync", locals)
  63. if (moduleIncludesAvailable("editorLeftMenu:editing_services"))
  64. span(ng-show="!anonymous")
  65. h4 #{translate("services")}
  66. != moduleIncludes("editorLeftMenu:editing_services", locals)
  67. h4(ng-show="!anonymous") #{translate("settings")}
  68. form.settings(ng-controller="SettingsController", ng-show="!anonymous")
  69. .containter-fluid
  70. .form-controls(ng-show="permissions.write")
  71. label(for="compiler") #{translate("compiler")}
  72. select(
  73. name="compiler"
  74. ng-model="project.compiler"
  75. )
  76. option(value='pdflatex') pdfLaTeX
  77. option(value='latex') LaTeX
  78. option(value='xelatex') XeLaTeX
  79. option(value='lualatex') LuaLaTeX
  80. if (typeof(allowedImageNames) !== 'undefined' && allowedImageNames.length > 0)
  81. .form-controls(ng-show="permissions.write")
  82. label(for="imageName") #{translate("tex_live_version")}
  83. select(
  84. name="imageName"
  85. ng-model="project.imageName"
  86. )
  87. each image in allowedImageNames
  88. option(value=image.imageName) #{image.imageDesc}
  89. .form-controls(ng-show="permissions.write")
  90. label(for="rootDoc_id") #{translate("main_document")}
  91. select(
  92. name="rootDoc_id",
  93. ng-model="project.rootDoc_id",
  94. ng-options="doc.doc.id as doc.path for doc in getValidMainDocs()"
  95. )
  96. .form-controls
  97. label(for="spellCheckLanguage") #{translate("spell_check")}
  98. select(
  99. name="spellCheckLanguage"
  100. ng-model="project.spellCheckLanguage"
  101. )
  102. option(value="") #{translate("off")}
  103. optgroup(label="Language")
  104. for language in languages
  105. option(
  106. value=language.code
  107. )= language.name
  108. .form-controls(ng-controller="DictionaryModalController")
  109. label #{translate("dictionary")}
  110. button.btn.btn-secondary.btn-xs(ng-click="openModal()") #{translate("edit")}
  111. dictionary-modal(
  112. handle-hide="handleHide"
  113. show="show"
  114. )
  115. .form-controls
  116. label(for="autoComplete") #{translate("auto_complete")}
  117. select(
  118. name="autoComplete"
  119. ng-model="settings.autoComplete"
  120. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  121. )
  122. .form-controls
  123. label(for="autoPairDelimiters") #{translate("auto_close_brackets")}
  124. select(
  125. name="autoPairDelimiters"
  126. ng-model="settings.autoPairDelimiters"
  127. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  128. )
  129. .form-controls.code-check-setting
  130. label(for="syntaxValidation") #{translate("syntax_validation")}
  131. select(
  132. name="syntaxValidation"
  133. ng-model="settings.syntaxValidation"
  134. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  135. )
  136. .form-controls
  137. label(for="editorTheme") #{translate("editor_theme")}
  138. select(
  139. name="editorTheme"
  140. ng-model="settings.editorTheme"
  141. )
  142. each editorTheme in editorThemes
  143. option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')}
  144. option(value="—" disabled) —————————————————
  145. each editorTheme in legacyEditorThemes
  146. option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')} (Legacy)
  147. if (settings.overleaf != null && !isIEEE(brandVariation))
  148. .form-controls
  149. label(for="overallTheme") #{translate("overall_theme")}
  150. select(
  151. name="overallTheme"
  152. ng-if="!ui.loadingStyleSheet"
  153. ng-model="settings.overallTheme"
  154. ng-options="overallTheme.val as overallTheme.name for overallTheme in overallThemesList"
  155. )
  156. p.loading.pull-right(
  157. ng-if="ui.loadingStyleSheet"
  158. )
  159. i.fa.fa-fw.fa-spin.fa-refresh
  160. .form-controls(ng-show="!anonymous")
  161. label(for="mode") #{translate("keybindings")}
  162. select(
  163. name="mode"
  164. ng-model="settings.mode"
  165. )
  166. option(value='default') None
  167. option(value='vim') Vim
  168. option(value='emacs') Emacs
  169. .form-controls
  170. label(for="fontSize") #{translate("font_size")}
  171. select(
  172. name="fontSize"
  173. ng-model="fontSizeAsStr"
  174. ng-model-options="{ getterSetter: true }"
  175. )
  176. each size in ['10','11','12','13','14','16','18','20','22','24']
  177. option(value=size) #{size}px
  178. .form-controls
  179. label(for="fontFamily") #{translate("font_family")}
  180. select(
  181. name="fontFamily"
  182. ng-model="settings.fontFamily"
  183. )
  184. option(value='monaco') Monaco / Menlo / Consolas
  185. option(value='lucida') Lucida / Source Code Pro
  186. .form-controls
  187. label(for="lineHeight") #{translate("line_height")}
  188. select(
  189. name="lineHeight"
  190. ng-model="settings.lineHeight"
  191. )
  192. each lineHeight in ['compact', 'normal', 'wide']
  193. option(value=lineHeight) #{translate(lineHeight)}
  194. .form-controls
  195. label(for="pdfViewer") #{translate("pdf_viewer")}
  196. select(
  197. name="pdfViewer"
  198. ng-model="settings.pdfViewer"
  199. )
  200. option(value="pdfjs") #{translate("overleaf")}
  201. option(value="native") #{translate("browser")}
  202. h4 #{translate("help")}
  203. ul.list-unstyled.nav
  204. li(ng-controller="HotkeysModalController")
  205. a(ng-click="openHotkeysModal()")
  206. i.fa.fa-keyboard-o.fa-fw
  207. |    #{translate("show_hotkeys")}
  208. hotkeys-modal(
  209. handle-hide="handleHide"
  210. show="show"
  211. track-changes-visible="trackChangesVisible"
  212. is-mac="isMac"
  213. new-source-editor="editor.newSourceEditor"
  214. )
  215. if showSupport
  216. li(ng-controller="LeftMenuDocumentationController")
  217. a(
  218. href='/learn', target="_blank"
  219. ng-click="sendLeftMenuDocumentationEvent()"
  220. )
  221. i.fa.fa-book.fa-fw
  222. |    #{translate('documentation')}
  223. li
  224. a(ng-controller="ContactModal", ng-click="contactUsModal()")
  225. i.fa.fa-question.fa-fw
  226. |    #{translate("contact_us")}
  227. #left-menu-mask(
  228. ng-show="ui.leftMenuShown",
  229. ng-click="ui.leftMenuShown = false"
  230. ng-cloak
  231. )
  232. script(type='text/ng-template', id='cloneProjectModalTemplate')
  233. .modal-header
  234. h3 #{translate("copy_project")}
  235. .modal-body
  236. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  237. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  238. form(name="cloneProjectForm", novalidate)
  239. .form-group
  240. label #{translate("new_name")}
  241. input.form-control(
  242. type="text",
  243. placeholder="New Project Name",
  244. required,
  245. ng-model="inputs.projectName",
  246. on-enter="clone()",
  247. focus-on="open"
  248. )
  249. .modal-footer
  250. button.btn.btn-secondary(
  251. ng-disabled="state.inflight"
  252. ng-click="cancel()"
  253. ) #{translate("cancel")}
  254. button.btn.btn-primary(
  255. ng-disabled="cloneProjectForm.$invalid || state.inflight"
  256. ng-click="clone()"
  257. )
  258. span(ng-hide="state.inflight") #{translate("copy")}
  259. span(ng-show="state.inflight") #{translate("copying")}…
  260. script(type='text/ng-template', id='wordCountModalTemplate')
  261. .modal-header
  262. h3 #{translate("word_count")}
  263. .modal-body
  264. div(ng-if="status.loading")
  265. .loading(ng-show="!status.error && status.loading")
  266. i.fa.fa-refresh.fa-spin.fa-fw
  267. span   #{translate("loading")}…
  268. div.pdf-disabled(
  269. ng-if="!pdf.url"
  270. tooltip=translate('please_compile_pdf_before_word_count')
  271. tooltip-placement="bottom"
  272. )
  273. div(ng-if="!status.loading")
  274. .container-fluid
  275. .row(ng-show='data.messages.length > 0')
  276. .col-xs-12
  277. .alert.alert-danger
  278. p(style="white-space: pre-wrap") {{data.messages}}
  279. .row
  280. .col-xs-4
  281. .pull-right #{translate("total_words")} :
  282. .col-xs-6 {{data.textWords}}
  283. .row
  284. .col-xs-4
  285. .pull-right #{translate("headers")} :
  286. .col-xs-6 {{data.headers}}
  287. .row
  288. .col-xs-4
  289. .pull-right #{translate("math_inline")} :
  290. .col-xs-6 {{data.mathInline}}
  291. .row
  292. .col-xs-4
  293. .pull-right #{translate("math_display")} :
  294. .col-xs-6 {{data.mathDisplay}}
  295. .modal-footer
  296. button.btn.btn-secondary(
  297. ng-disabled="state.inflight"
  298. ng-click="cancel()"
  299. ) #{translate("done")}