left-menu.pug 9.1 KB

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