left-menu.pug 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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. if dictionaryEditorEnabled
  109. .form-controls(ng-controller="DictionaryModalController")
  110. label #{translate("dictionary")}
  111. button.btn.btn-default.btn-xs(ng-click="openModal()") #{translate("edit")}
  112. dictionary-modal(
  113. handle-hide="handleHide"
  114. show="show"
  115. )
  116. .form-controls
  117. label(for="autoComplete") #{translate("auto_complete")}
  118. select(
  119. name="autoComplete"
  120. ng-model="settings.autoComplete"
  121. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  122. )
  123. .form-controls
  124. label(for="autoPairDelimiters") #{translate("auto_close_brackets")}
  125. select(
  126. name="autoPairDelimiters"
  127. ng-model="settings.autoPairDelimiters"
  128. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  129. )
  130. .form-controls.code-check-setting
  131. label(for="syntaxValidation") #{translate("syntax_validation")}
  132. select(
  133. name="syntaxValidation"
  134. ng-model="settings.syntaxValidation"
  135. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  136. )
  137. .form-controls
  138. label(for="editorTheme") #{translate("editor_theme")}
  139. select(
  140. name="editorTheme"
  141. ng-model="settings.editorTheme"
  142. )
  143. each editorTheme in editorThemes
  144. option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')}
  145. option(value="—" disabled) —————————————————
  146. each editorTheme in legacyEditorThemes
  147. option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')} (Legacy)
  148. if (settings.overleaf != null && !isIEEE(brandVariation))
  149. .form-controls
  150. label(for="overallTheme") #{translate("overall_theme")}
  151. select(
  152. name="overallTheme"
  153. ng-if="!ui.loadingStyleSheet"
  154. ng-model="settings.overallTheme"
  155. ng-options="overallTheme.val as overallTheme.name for overallTheme in overallThemesList"
  156. )
  157. p.loading.pull-right(
  158. ng-if="ui.loadingStyleSheet"
  159. )
  160. i.fa.fa-fw.fa-spin.fa-refresh
  161. .form-controls(ng-show="!anonymous")
  162. label(for="mode") #{translate("keybindings")}
  163. select(
  164. name="mode"
  165. ng-model="settings.mode"
  166. )
  167. option(value='default') None
  168. option(value='vim') Vim
  169. option(value='emacs') Emacs
  170. .form-controls
  171. label(for="fontSize") #{translate("font_size")}
  172. select(
  173. name="fontSize"
  174. ng-model="fontSizeAsStr"
  175. ng-model-options="{ getterSetter: true }"
  176. )
  177. each size in ['10','11','12','13','14','16','18','20','22','24']
  178. option(value=size) #{size}px
  179. .form-controls
  180. label(for="fontFamily") #{translate("font_family")}
  181. select(
  182. name="fontFamily"
  183. ng-model="settings.fontFamily"
  184. )
  185. option(value='monaco') Monaco / Menlo / Consolas
  186. option(value='lucida') Lucida / Source Code Pro
  187. .form-controls
  188. label(for="lineHeight") #{translate("line_height")}
  189. select(
  190. name="lineHeight"
  191. ng-model="settings.lineHeight"
  192. )
  193. each lineHeight in ['compact', 'normal', 'wide']
  194. option(value=lineHeight) #{translate(lineHeight)}
  195. .form-controls
  196. label(for="pdfViewer") #{translate("pdf_viewer")}
  197. select(
  198. name="pdfViewer"
  199. ng-model="settings.pdfViewer"
  200. )
  201. option(value="pdfjs") #{translate("overleaf")}
  202. option(value="native") #{translate("browser")}
  203. h4 #{translate("help")}
  204. ul.list-unstyled.nav
  205. li(ng-controller="HotkeysModalController")
  206. a(ng-click="openHotkeysModal()")
  207. i.fa.fa-keyboard-o.fa-fw
  208. |    #{translate("show_hotkeys")}
  209. hotkeys-modal(
  210. handle-hide="handleHide"
  211. show="show"
  212. track-changes-visible="trackChangesVisible"
  213. is-mac="isMac"
  214. )
  215. if showSupport
  216. li
  217. a(href='/learn', target="_blank")
  218. i.fa.fa-book.fa-fw
  219. |    #{translate('documentation')}
  220. li
  221. a(ng-controller="ContactModal", ng-click="contactUsModal()")
  222. i.fa.fa-question.fa-fw
  223. |    #{translate("contact_us")}
  224. #left-menu-mask(
  225. ng-show="ui.leftMenuShown",
  226. ng-click="ui.leftMenuShown = false"
  227. ng-cloak
  228. )
  229. script(type='text/ng-template', id='cloneProjectModalTemplate')
  230. .modal-header
  231. h3 #{translate("copy_project")}
  232. .modal-body
  233. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  234. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  235. form(name="cloneProjectForm", novalidate)
  236. .form-group
  237. label #{translate("new_name")}
  238. input.form-control(
  239. type="text",
  240. placeholder="New Project Name",
  241. required,
  242. ng-model="inputs.projectName",
  243. on-enter="clone()",
  244. focus-on="open"
  245. )
  246. .modal-footer
  247. button.btn.btn-default(
  248. ng-disabled="state.inflight"
  249. ng-click="cancel()"
  250. ) #{translate("cancel")}
  251. button.btn.btn-primary(
  252. ng-disabled="cloneProjectForm.$invalid || state.inflight"
  253. ng-click="clone()"
  254. )
  255. span(ng-hide="state.inflight") #{translate("copy")}
  256. span(ng-show="state.inflight") #{translate("copying")}…
  257. script(type='text/ng-template', id='wordCountModalTemplate')
  258. .modal-header
  259. h3 #{translate("word_count")}
  260. .modal-body
  261. div(ng-if="status.loading")
  262. .loading(ng-show="!status.error && status.loading")
  263. i.fa.fa-refresh.fa-spin.fa-fw
  264. span   #{translate("loading")}…
  265. div.pdf-disabled(
  266. ng-if="!pdf.url"
  267. tooltip=translate('please_compile_pdf_before_word_count')
  268. tooltip-placement="bottom"
  269. )
  270. div(ng-if="!status.loading")
  271. .container-fluid
  272. .row(ng-show='data.messages.length > 0')
  273. .col-xs-12
  274. .alert.alert-danger
  275. p(style="white-space: pre-wrap") {{data.messages}}
  276. .row
  277. .col-xs-4
  278. .pull-right #{translate("total_words")} :
  279. .col-xs-6 {{data.textWords}}
  280. .row
  281. .col-xs-4
  282. .pull-right #{translate("headers")} :
  283. .col-xs-6 {{data.headers}}
  284. .row
  285. .col-xs-4
  286. .pull-right #{translate("math_inline")} :
  287. .col-xs-6 {{data.mathInline}}
  288. .row
  289. .col-xs-4
  290. .pull-right #{translate("math_display")} :
  291. .col-xs-6 {{data.mathDisplay}}
  292. .modal-footer
  293. button.btn.btn-default(
  294. ng-disabled="state.inflight"
  295. ng-click="cancel()"
  296. ) #{translate("done")}