overleaf/services/web/app/views/project/editor/left-menu.pug

312 lines
8.8 KiB
Text
Raw Normal View History

2014-06-26 11:39:52 -04:00
aside#left-menu.full-size(
ng-class="{ 'shown': ui.leftMenuShown }"
ng-cloak
)
2014-07-31 12:07:43 -04:00
h4 #{translate("download")}
2014-07-16 12:01:41 -04:00
ul.list-unstyled.nav.nav-downloads.text-center
li
2014-07-02 06:06:20 -04:00
a(
ng-href="/project/{{project_id}}/download/zip"
target="_blank"
)
i.fa.fa-file-archive-o.fa-2x
br
2014-07-31 12:07:43 -04:00
| #{translate("source")}
li
2014-07-02 06:06:20 -04:00
a(
2016-06-01 11:47:55 -04:00
ng-href="{{pdf.downloadUrl || pdf.url}}"
2014-07-02 06:06:20 -04:00
target="_blank"
ng-if="pdf.url"
)
i.fa.fa-file-pdf-o.fa-2x
br
| PDF
2015-09-14 10:28:19 -04:00
div.link-disabled(
2014-07-02 06:06:20 -04:00
ng-if="!pdf.url"
2017-01-31 09:57:22 -05:00
tooltip=translate('please_compile_pdf_before_download')
2014-07-02 06:06:20 -04:00
tooltip-placement="bottom"
)
i.fa.fa-file-pdf-o.fa-2x
br
| PDF
span(ng-show="!anonymous")
2014-08-21 07:45:19 -04:00
h4 #{translate("actions")}
2014-07-17 09:04:21 -04:00
ul.list-unstyled.nav
li(ng-controller="LeftMenuCloneProjectModalController")
2014-07-17 09:04:21 -04:00
a(
href,
ng-click="openCloneProjectModal()"
)
i.fa.fa-fw.fa-copy
2014-10-13 09:45:45 -04:00
|    #{translate("copy_project")}
2015-09-14 10:28:19 -04:00
clone-project-modal(
handle-hide="handleHide"
open-project="openProject"
show="show"
)
!= moduleIncludes("editorLeftMenu:actions", locals)
li(ng-controller="WordCountModalController")
a(href, ng-if="pdf.url", ng-click="openWordCountModal()")
2015-09-14 10:28:19 -04:00
i.fa.fa-fw.fa-eye
span    #{translate("word_count")}
a.link-disabled(href, ng-if="!pdf.url", tooltip=translate('please_compile_pdf_before_word_count'))
2015-09-14 10:28:19 -04:00
i.fa.fa-fw.fa-eye
span.link-disabled    #{translate("word_count")}
word-count-modal(
handle-hide="handleHide"
show="show"
)
if (moduleIncludesAvailable("editorLeftMenu:sync"))
div(ng-show="!anonymous")
h4() #{translate("sync")}
!= moduleIncludes("editorLeftMenu:sync", locals)
if (moduleIncludesAvailable("editorLeftMenu:editing_services"))
span(ng-show="!anonymous")
h4 #{translate("services")}
!= moduleIncludes("editorLeftMenu:editing_services", locals)
2015-08-04 05:45:19 -04:00
2014-07-31 12:07:43 -04:00
h4(ng-show="!anonymous") #{translate("settings")}
form.settings(ng-controller="SettingsController", ng-show="!anonymous")
2014-07-01 10:57:55 -04:00
.containter-fluid
.form-controls(ng-show="permissions.write")
2014-07-31 12:07:43 -04:00
label(for="compiler") #{translate("compiler")}
select(
2014-07-10 09:08:32 -04:00
name="compiler"
ng-model="project.compiler"
)
option(value='pdflatex') pdfLaTeX
option(value='latex') LaTeX
option(value='xelatex') XeLaTeX
option(value='lualatex') LuaLaTeX
if (typeof(allowedImageNames) !== 'undefined' && allowedImageNames.length > 0)
.form-controls(ng-show="permissions.write")
label(for="imageName") #{translate("tex_live_version")}
select(
name="imageName"
ng-model="project.imageName"
)
each image in allowedImageNames
option(value=image.imageName) #{image.imageDesc}
.form-controls(ng-show="permissions.write")
2014-07-31 12:07:43 -04:00
label(for="rootDoc_id") #{translate("main_document")}
2014-07-21 10:09:19 -04:00
select(
name="rootDoc_id",
ng-model="project.rootDoc_id",
ng-options="doc.doc.id as doc.path for doc in getValidMainDocs()"
2014-07-21 10:09:19 -04:00
)
2014-06-26 11:39:52 -04:00
2014-07-01 10:57:55 -04:00
.form-controls
2014-07-31 12:07:43 -04:00
label(for="spellCheckLanguage") #{translate("spell_check")}
select(
2014-07-10 09:08:32 -04:00
name="spellCheckLanguage"
ng-model="project.spellCheckLanguage"
)
2014-07-31 12:07:43 -04:00
option(value="") #{translate("off")}
2014-07-10 09:08:32 -04:00
optgroup(label="Language")
for language in languages
option(
value=language.code
)= language.name
2014-06-26 11:39:52 -04:00
2014-07-01 10:57:55 -04:00
.form-controls
2014-07-31 12:07:43 -04:00
label(for="autoComplete") #{translate("auto_complete")}
select(
2014-07-10 09:08:32 -04:00
name="autoComplete"
ng-model="settings.autoComplete"
ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
)
2014-06-26 11:39:52 -04:00
.form-controls
label(for="autoPairDelimiters") #{translate("auto_close_brackets")}
select(
name="autoPairDelimiters"
ng-model="settings.autoPairDelimiters"
ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
)
.form-controls.code-check-setting
label(for="syntaxValidation") #{translate("syntax_validation")}
select(
name="syntaxValidation"
ng-model="settings.syntaxValidation"
ng-options="o.v as o.n for o in [{ n: 'On', v: true }, { n: 'Off', v: false }]"
)
2016-10-06 06:51:24 -04:00
2014-07-01 10:57:55 -04:00
.form-controls
label(for="editorTheme") #{translate("editor_theme")}
select(
name="editorTheme"
ng-model="settings.editorTheme"
2014-07-10 09:08:32 -04:00
)
each editorTheme in editorThemes
option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')}
if (settings.overleaf != null && !isIEEE(brandVariation))
.form-controls
label(for="overallTheme") #{translate("overall_theme")}
select(
name="overallTheme"
2018-08-28 09:12:00 -04:00
ng-if="!ui.loadingStyleSheet"
ng-model="settings.overallTheme"
2018-08-28 09:12:00 -04:00
ng-options="overallTheme.val as overallTheme.name for overallTheme in overallThemesList"
)
2018-08-28 09:12:00 -04:00
p.loading.pull-right(
ng-if="ui.loadingStyleSheet"
)
i.fa.fa-fw.fa-spin.fa-refresh
2014-06-26 11:39:52 -04:00
.form-controls(ng-show="!anonymous")
2014-07-31 12:07:43 -04:00
label(for="mode") #{translate("keybindings")}
select(
2014-07-10 09:08:32 -04:00
name="mode"
ng-model="settings.mode"
)
option(value='default') None
option(value='vim') Vim
option(value='emacs') Emacs
2014-06-26 11:39:52 -04:00
2014-07-01 10:57:55 -04:00
.form-controls
2014-07-31 12:07:43 -04:00
label(for="fontSize") #{translate("font_size")}
select(
2014-07-10 09:08:32 -04:00
name="fontSize"
ng-model="fontSizeAsStr"
ng-model-options="{ getterSetter: true }"
2014-07-10 09:08:32 -04:00
)
each size in ['10','11','12','13','14','16','18','20','22','24']
2014-07-10 09:08:32 -04:00
option(value=size) #{size}px
2014-07-01 10:57:55 -04:00
.form-controls
label(for="fontFamily") #{translate("font_family")}
select(
name="fontFamily"
ng-model="settings.fontFamily"
)
option(value='monaco') Monaco / Menlo / Consolas
option(value='lucida') Lucida / Source Code Pro
.form-controls
label(for="lineHeight") #{translate("line_height")}
select(
name="lineHeight"
ng-model="settings.lineHeight"
)
each lineHeight in ['compact', 'normal', 'wide']
option(value=lineHeight) #{translate(lineHeight)}
2014-07-01 10:57:55 -04:00
.form-controls
2014-08-19 09:40:02 -04:00
label(for="pdfViewer") #{translate("pdf_viewer")}
select(
2014-07-10 09:08:32 -04:00
name="pdfViewer"
ng-model="settings.pdfViewer"
)
2014-07-31 12:07:43 -04:00
option(value="pdfjs") #{translate("built_in")}
option(value="native") #{translate("native")}
2014-07-15 12:56:09 -04:00
h4 #{translate("help")}
2014-07-22 09:38:32 -04:00
ul.list-unstyled.nav
li(ng-controller="HotkeysModalController")
2014-07-22 09:38:32 -04:00
a(ng-click="openHotkeysModal()")
i.fa.fa-keyboard-o.fa-fw
2014-07-31 12:07:43 -04:00
|    #{translate("show_hotkeys")}
hotkeys-modal(
handle-hide="handleHide"
show="show"
track-changes-visible="trackChangesVisible"
is-mac="isMac"
)
if showSupport
li
a(href='/learn', target="_blank")
i.fa.fa-book.fa-fw
|    #{translate('documentation')}
li
a(ng-controller="ContactModal", ng-click="contactUsModal()")
i.fa.fa-question.fa-fw
|    #{translate("contact_us")}
2014-06-26 11:39:52 -04:00
#left-menu-mask(
ng-show="ui.leftMenuShown",
ng-click="ui.leftMenuShown = false"
ng-cloak
2014-07-17 09:04:21 -04:00
)
script(type='text/ng-template', id='cloneProjectModalTemplate')
.modal-header
h3 #{translate("copy_project")}
.modal-body
.alert.alert-danger(ng-show="state.error.message") {{ state.error.message}}
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
form(name="cloneProjectForm", novalidate)
.form-group
label #{translate("new_name")}
input.form-control(
type="text",
placeholder="New Project Name",
required,
ng-model="inputs.projectName",
on-enter="clone()",
focus-on="open"
)
.modal-footer
button.btn.btn-default(
ng-disabled="state.inflight"
ng-click="cancel()"
) #{translate("cancel")}
button.btn.btn-primary(
ng-disabled="cloneProjectForm.$invalid || state.inflight"
ng-click="clone()"
)
span(ng-hide="state.inflight") #{translate("copy")}
span(ng-show="state.inflight") #{translate("copying")}…
2015-09-14 10:28:19 -04:00
script(type='text/ng-template', id='wordCountModalTemplate')
.modal-header
h3 #{translate("word_count")}
.modal-body
div(ng-if="status.loading")
.loading(ng-show="!status.error && status.loading")
i.fa.fa-refresh.fa-spin.fa-fw
span   #{translate("loading")}…
2015-09-14 10:28:19 -04:00
div.pdf-disabled(
ng-if="!pdf.url"
2017-01-31 09:57:22 -05:00
tooltip=translate('please_compile_pdf_before_word_count')
2015-09-14 10:28:19 -04:00
tooltip-placement="bottom"
)
div(ng-if="!status.loading")
.container-fluid
2016-09-13 10:54:10 -04:00
.row(ng-show='data.messages.length > 0')
.col-xs-12
.alert.alert-danger
p(style="white-space: pre-wrap") {{data.messages}}
2015-09-14 10:28:19 -04:00
.row
.col-xs-4
2015-09-14 10:28:19 -04:00
.pull-right #{translate("total_words")} :
.col-xs-6 {{data.textWords}}
.row
.col-xs-4
2015-09-14 10:28:19 -04:00
.pull-right #{translate("headers")} :
.col-xs-6 {{data.headers}}
.row
.col-xs-4
2015-09-14 10:28:19 -04:00
.pull-right #{translate("math_inline")} :
.col-xs-6 {{data.mathInline}}
.row
.col-xs-4
2015-09-14 10:28:19 -04:00
.pull-right #{translate("math_display")} :
.col-xs-6 {{data.mathDisplay}}
2015-09-14 10:28:19 -04:00
.modal-footer
button.btn.btn-default(
ng-disabled="state.inflight"
ng-click="cancel()"
) #{translate("done")}