left-menu.pug 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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="theme") #{translate("theme")}
  120. select(
  121. name="theme"
  122. ng-model="settings.theme"
  123. )
  124. each theme in themes
  125. option(value=theme) #{theme.replace(/_/g, ' ')}
  126. .form-controls(ng-show="!anonymous")
  127. label(for="mode") #{translate("keybindings")}
  128. select(
  129. name="mode"
  130. ng-model="settings.mode"
  131. )
  132. option(value='default') None
  133. option(value='vim') Vim
  134. option(value='emacs') Emacs
  135. .form-controls
  136. label(for="fontSize") #{translate("font_size")}
  137. select(
  138. name="fontSize"
  139. ng-model="fontSizeAsStr"
  140. ng-model-options="{ getterSetter: true }"
  141. )
  142. each size in ['10','11','12','13','14','16','20','24']
  143. option(value=size) #{size}px
  144. .form-controls
  145. label(for="fontFamily") #{translate("font_family")}
  146. select(
  147. name="fontFamily"
  148. ng-model="settings.fontFamily"
  149. )
  150. option(value="", disabled) #{translate("default")}
  151. each fontFamily in ['monaco', 'lucida']
  152. option(value=fontFamily) #{capitalize(fontFamily)}
  153. .form-controls
  154. label(for="lineHeight") #{translate("line_height")}
  155. select(
  156. name="lineHeight"
  157. ng-model="settings.lineHeight"
  158. )
  159. option(value="", disabled) #{translate("default")}
  160. each lineHeight in ['compact', 'normal', 'wide']
  161. option(value=lineHeight) #{translate(lineHeight)}
  162. .form-controls
  163. label(for="pdfViewer") #{translate("pdf_viewer")}
  164. select(
  165. name="pdfViewer"
  166. ng-model="settings.pdfViewer"
  167. )
  168. option(value="pdfjs") #{translate("built_in")}
  169. option(value="native") #{translate("native")}
  170. h4 #{translate("hotkeys")}
  171. ul.list-unstyled.nav
  172. li(ng-controller="HotkeysController")
  173. a(ng-click="openHotkeysModal()")
  174. i.fa.fa-keyboard-o.fa-fw
  175. |    #{translate("show_hotkeys")}
  176. #left-menu-mask(
  177. ng-show="ui.leftMenuShown",
  178. ng-click="ui.leftMenuShown = false"
  179. ng-cloak
  180. )
  181. script(type='text/ng-template', id='cloneProjectModalTemplate')
  182. .modal-header
  183. h3 #{translate("copy_project")}
  184. .modal-body
  185. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  186. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  187. form(name="cloneProjectForm", novalidate)
  188. .form-group
  189. label #{translate("new_name")}
  190. input.form-control(
  191. type="text",
  192. placeholder="New Project Name",
  193. required,
  194. ng-model="inputs.projectName",
  195. on-enter="clone()",
  196. focus-on="open"
  197. )
  198. .modal-footer
  199. button.btn.btn-default(
  200. ng-disabled="state.inflight"
  201. ng-click="cancel()"
  202. ) #{translate("cancel")}
  203. button.btn.btn-primary(
  204. ng-disabled="cloneProjectForm.$invalid || state.inflight"
  205. ng-click="clone()"
  206. )
  207. span(ng-hide="state.inflight") #{translate("copy")}
  208. span(ng-show="state.inflight") #{translate("copying")}...
  209. script(type='text/ng-template', id='wordCountModalTemplate')
  210. .modal-header
  211. h3 #{translate("word_count")}
  212. .modal-body
  213. div(ng-if="status.loading")
  214. .loading(ng-show="!status.error && status.loading")
  215. i.fa.fa-refresh.fa-spin.fa-fw
  216. span   #{translate("loading")}...
  217. div.pdf-disabled(
  218. ng-if="!pdf.url"
  219. tooltip=translate('please_compile_pdf_before_word_count')
  220. tooltip-placement="bottom"
  221. )
  222. div(ng-if="!status.loading")
  223. .container-fluid
  224. .row(ng-show='data.messages.length > 0')
  225. .col-xs-12
  226. .alert.alert-danger
  227. p(style="white-space: pre-wrap") {{data.messages}}
  228. .row
  229. .col-xs-4
  230. .pull-right #{translate("total_words")} :
  231. .col-xs-6 {{data.textWords}}
  232. .row
  233. .col-xs-4
  234. .pull-right #{translate("headers")} :
  235. .col-xs-6 {{data.headers}}
  236. .row
  237. .col-xs-4
  238. .pull-right #{translate("math_inline")} :
  239. .col-xs-6 {{data.mathInline}}
  240. .row
  241. .col-xs-4
  242. .pull-right #{translate("math_display")} :
  243. .col-xs-6 {{data.mathDisplay}}
  244. .modal-footer
  245. button.btn.btn-default(
  246. ng-disabled="state.inflight"
  247. ng-click="cancel()"
  248. ) #{translate("done")}