left-menu.pug 8.4 KB

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