left-menu.pug 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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. option(value='monaco') Monaco / Menlo / Consolas
  166. option(value='lucida') Lucida / Source Code Pro
  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="HotkeysModalController")
  186. a(ng-click="openHotkeysModal()")
  187. i.fa.fa-keyboard-o.fa-fw
  188. |    #{translate("show_hotkeys")}
  189. hotkeys-modal(
  190. handle-hide="handleHide"
  191. show="show"
  192. track-changes-visible="trackChangesVisible"
  193. )
  194. if showSupport
  195. li
  196. a(href='/learn', target="_blank")
  197. i.fa.fa-book.fa-fw
  198. |    #{translate('documentation')}
  199. li
  200. a(ng-controller="ContactModal", ng-click="contactUsModal()")
  201. i.fa.fa-question.fa-fw
  202. |    #{translate("contact_us")}
  203. #left-menu-mask(
  204. ng-show="ui.leftMenuShown",
  205. ng-click="ui.leftMenuShown = false"
  206. ng-cloak
  207. )
  208. script(type='text/ng-template', id='cloneProjectModalTemplate')
  209. .modal-header
  210. h3 #{translate("copy_project")}
  211. .modal-body
  212. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  213. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  214. form(name="cloneProjectForm", novalidate)
  215. .form-group
  216. label #{translate("new_name")}
  217. input.form-control(
  218. type="text",
  219. placeholder="New Project Name",
  220. required,
  221. ng-model="inputs.projectName",
  222. on-enter="clone()",
  223. focus-on="open"
  224. )
  225. .modal-footer
  226. button.btn.btn-default(
  227. ng-disabled="state.inflight"
  228. ng-click="cancel()"
  229. ) #{translate("cancel")}
  230. button.btn.btn-primary(
  231. ng-disabled="cloneProjectForm.$invalid || state.inflight"
  232. ng-click="clone()"
  233. )
  234. span(ng-hide="state.inflight") #{translate("copy")}
  235. span(ng-show="state.inflight") #{translate("copying")}…
  236. script(type='text/ng-template', id='wordCountModalTemplate')
  237. .modal-header
  238. h3 #{translate("word_count")}
  239. .modal-body
  240. div(ng-if="status.loading")
  241. .loading(ng-show="!status.error && status.loading")
  242. i.fa.fa-refresh.fa-spin.fa-fw
  243. span   #{translate("loading")}…
  244. div.pdf-disabled(
  245. ng-if="!pdf.url"
  246. tooltip=translate('please_compile_pdf_before_word_count')
  247. tooltip-placement="bottom"
  248. )
  249. div(ng-if="!status.loading")
  250. .container-fluid
  251. .row(ng-show='data.messages.length > 0')
  252. .col-xs-12
  253. .alert.alert-danger
  254. p(style="white-space: pre-wrap") {{data.messages}}
  255. .row
  256. .col-xs-4
  257. .pull-right #{translate("total_words")} :
  258. .col-xs-6 {{data.textWords}}
  259. .row
  260. .col-xs-4
  261. .pull-right #{translate("headers")} :
  262. .col-xs-6 {{data.headers}}
  263. .row
  264. .col-xs-4
  265. .pull-right #{translate("math_inline")} :
  266. .col-xs-6 {{data.mathInline}}
  267. .row
  268. .col-xs-4
  269. .pull-right #{translate("math_display")} :
  270. .col-xs-6 {{data.mathDisplay}}
  271. .modal-footer
  272. button.btn.btn-default(
  273. ng-disabled="state.inflight"
  274. ng-click="cancel()"
  275. ) #{translate("done")}