left-menu.pug 8.8 KB

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