left-menu.pug 8.3 KB

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