left-menu.pug 8.6 KB

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