left-menu.pug 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. li
  66. a(href="#" ng-click="openProjectLinkedFileModal()")
  67. i.fa.fa-exclamation.fa-fw
  68. | Project-Linked-File Modal
  69. li
  70. a(href="#" ng-click="openLinkedFileModal()")
  71. i.fa.fa-exclamation.fa-fw
  72. | URL-Linked-File Modal
  73. h4(ng-show="!anonymous") #{translate("settings")}
  74. form.settings(ng-controller="SettingsController", ng-show="!anonymous")
  75. .containter-fluid
  76. .form-controls(ng-show="permissions.write")
  77. label(for="compiler") #{translate("compiler")}
  78. select(
  79. name="compiler"
  80. ng-model="project.compiler"
  81. )
  82. option(value='pdflatex') pdfLaTeX
  83. option(value='latex') LaTeX
  84. option(value='xelatex') XeLaTeX
  85. option(value='lualatex') LuaLaTeX
  86. .form-controls(ng-show="permissions.write")
  87. label(for="rootDoc_id") #{translate("main_document")}
  88. select(
  89. name="rootDoc_id",
  90. ng-model="project.rootDoc_id",
  91. ng-options="doc.doc.id as doc.path for doc in docs"
  92. )
  93. .form-controls
  94. label(for="spellCheckLanguage") #{translate("spell_check")}
  95. select(
  96. name="spellCheckLanguage"
  97. ng-model="project.spellCheckLanguage"
  98. )
  99. option(value="") #{translate("off")}
  100. optgroup(label="Language")
  101. for language in languages
  102. option(
  103. value=language.code
  104. )= language.name
  105. .form-controls
  106. label(for="autoComplete") #{translate("auto_complete")}
  107. select(
  108. name="autoComplete"
  109. ng-model="settings.autoComplete"
  110. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  111. )
  112. .form-controls
  113. label(for="autoPairDelimiters") #{translate("auto_close_brackets")}
  114. select(
  115. name="autoPairDelimiters"
  116. ng-model="settings.autoPairDelimiters"
  117. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  118. )
  119. .form-controls.code-check-setting
  120. label(for="syntaxValidation") #{translate("syntax_validation")}
  121. select(
  122. name="syntaxValidation"
  123. ng-model="settings.syntaxValidation"
  124. ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
  125. )
  126. .form-controls
  127. label(for="theme") #{translate("theme")}
  128. select(
  129. name="theme"
  130. ng-model="settings.theme"
  131. )
  132. each theme in themes
  133. option(value=theme) #{theme.replace(/_/g, ' ')}
  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. h4 #{translate("hotkeys")}
  179. ul.list-unstyled.nav
  180. li(ng-controller="HotkeysController")
  181. a(ng-click="openHotkeysModal()")
  182. i.fa.fa-keyboard-o.fa-fw
  183. |    #{translate("show_hotkeys")}
  184. #left-menu-mask(
  185. ng-show="ui.leftMenuShown",
  186. ng-click="ui.leftMenuShown = false"
  187. ng-cloak
  188. )
  189. script(type='text/ng-template', id='cloneProjectModalTemplate')
  190. .modal-header
  191. h3 #{translate("copy_project")}
  192. .modal-body
  193. .alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
  194. .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
  195. form(name="cloneProjectForm", novalidate)
  196. .form-group
  197. label #{translate("new_name")}
  198. input.form-control(
  199. type="text",
  200. placeholder="New Project Name",
  201. required,
  202. ng-model="inputs.projectName",
  203. on-enter="clone()",
  204. focus-on="open"
  205. )
  206. .modal-footer
  207. button.btn.btn-default(
  208. ng-disabled="state.inflight"
  209. ng-click="cancel()"
  210. ) #{translate("cancel")}
  211. button.btn.btn-primary(
  212. ng-disabled="cloneProjectForm.$invalid || state.inflight"
  213. ng-click="clone()"
  214. )
  215. span(ng-hide="state.inflight") #{translate("copy")}
  216. span(ng-show="state.inflight") #{translate("copying")}...
  217. script(type='text/ng-template', id='wordCountModalTemplate')
  218. .modal-header
  219. h3 #{translate("word_count")}
  220. .modal-body
  221. div(ng-if="status.loading")
  222. .loading(ng-show="!status.error && status.loading")
  223. i.fa.fa-refresh.fa-spin.fa-fw
  224. span   #{translate("loading")}...
  225. div.pdf-disabled(
  226. ng-if="!pdf.url"
  227. tooltip=translate('please_compile_pdf_before_word_count')
  228. tooltip-placement="bottom"
  229. )
  230. div(ng-if="!status.loading")
  231. .container-fluid
  232. .row(ng-show='data.messages.length > 0')
  233. .col-xs-12
  234. .alert.alert-danger
  235. p(style="white-space: pre-wrap") {{data.messages}}
  236. .row
  237. .col-xs-4
  238. .pull-right #{translate("total_words")} :
  239. .col-xs-6 {{data.textWords}}
  240. .row
  241. .col-xs-4
  242. .pull-right #{translate("headers")} :
  243. .col-xs-6 {{data.headers}}
  244. .row
  245. .col-xs-4
  246. .pull-right #{translate("math_inline")} :
  247. .col-xs-6 {{data.mathInline}}
  248. .row
  249. .col-xs-4
  250. .pull-right #{translate("math_display")} :
  251. .col-xs-6 {{data.mathDisplay}}
  252. .modal-footer
  253. button.btn.btn-default(
  254. ng-disabled="state.inflight"
  255. ng-click="cancel()"
  256. ) #{translate("done")}