mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
200 lines
5.9 KiB
Text
200 lines
5.9 KiB
Text
div.full-size.pdf(ng-controller="PdfController")
|
|
.toolbar.toolbar-tall
|
|
a.btn.btn-info(
|
|
href,
|
|
ng-disabled="pdf.compiling",
|
|
ng-click="recompile()"
|
|
)
|
|
i.fa.fa-refresh(
|
|
ng-class="{'fa-spin': pdf.compiling }"
|
|
)
|
|
|
|
|
span(ng-show="!pdf.compiling") #{translate("recompile")}
|
|
span(ng-show="pdf.compiling") #{translate("compiling")}...
|
|
a.log-btn(
|
|
href
|
|
ng-click="toggleLogs()"
|
|
ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled }"
|
|
tooltip="#{translate('logs_and_output_files')}"
|
|
tooltip-placement="bottom"
|
|
)
|
|
i.fa.fa-file-text-o
|
|
span.label(
|
|
ng-show="pdf.logEntries.warnings.length + pdf.logEntries.errors.length > 0"
|
|
ng-class="{\
|
|
'label-warning': pdf.logEntries.errors.length == 0,\
|
|
'label-danger': pdf.logEntries.errors.length > 0\
|
|
}"
|
|
) {{ pdf.logEntries.errors.length + pdf.logEntries.warnings.length }}
|
|
|
|
a(
|
|
ng-href="{{pdf.url}}"
|
|
target="_blank"
|
|
ng-if="pdf.url"
|
|
tooltip="#{translate('download_pdf')}"
|
|
tooltip-placement="bottom"
|
|
)
|
|
i.fa.fa-download
|
|
|
|
.toolbar-right
|
|
a(
|
|
href,
|
|
ng-click="switchToFlatLayout()"
|
|
ng-show="ui.pdfLayout == 'sideBySide'"
|
|
tooltip="#{translate('full_screen')}"
|
|
tooltip-placement="bottom"
|
|
tooltip-append-to-body="true"
|
|
)
|
|
i.full-screen
|
|
a(
|
|
href,
|
|
ng-click="switchToSideBySideLayout()"
|
|
ng-show="ui.pdfLayout == 'flat'"
|
|
tooltip="#{translate('split_screen')}"
|
|
tooltip-placement="bottom"
|
|
tooltip-append-to-body="true"
|
|
)
|
|
i.split-screen
|
|
i.split-screen
|
|
|
|
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
|
|
- // user.featureSwitches = {} // override
|
|
- var usePdfNG = user.featureSwitches && user.featureSwitches.pdfng;
|
|
if !usePdfNG
|
|
div(
|
|
pdfjs
|
|
ng-if="settings.pdfViewer == 'pdfjs'"
|
|
pdf-src="pdf.url"
|
|
key="{{ project_id }}"
|
|
resize-on="layout:main:resize,layout:pdf:resize"
|
|
highlights="pdf.highlights"
|
|
position="pdf.position"
|
|
dbl-click-callback="syncToCode"
|
|
)
|
|
else
|
|
div(
|
|
pdfng
|
|
ng-if="settings.pdfViewer == 'pdfjs'"
|
|
pdf-src="pdf.url"
|
|
key="{{ project_id }}"
|
|
resize-on="layout:main:resize,layout:pdf:resize"
|
|
highlights="pdf.highlights"
|
|
position="pdf.position"
|
|
dbl-click-callback="syncToCode"
|
|
)
|
|
|
|
iframe(
|
|
ng-src="{{ pdf.url }}"
|
|
ng-if="settings.pdfViewer == 'native'"
|
|
)
|
|
|
|
.pdf-uncompiled(ng-show="pdf.uncompiled && !pdf.compiling")
|
|
|
|
|
i.fa.fa-level-up.fa-flip-horizontal.fa-2x
|
|
| #{translate('click_here_to_preview_pdf')}
|
|
|
|
.pdf-errors(ng-show="pdf.timedout || pdf.error")
|
|
.alert.alert-danger(ng-show="pdf.error")
|
|
strong #{translate("server_error")}
|
|
span #{translate("somthing_went_wrong_compiling")}
|
|
|
|
|
|
.alert.alert-danger(ng-show="pdf.timedout")
|
|
p
|
|
strong #{translate("timedout")}.
|
|
span #{translate("proj_timed_out_reason")}
|
|
p
|
|
a.text-info(href="https://www.sharelatex.com/learn/Debugging_Compilation_timeout_errors", target="_blank")
|
|
| #{translate("learn_how_to_make_documents_compile_quickly")}
|
|
|
|
.alert.alert-success(ng-show="pdf.timedout && !hasPremiumCompile")
|
|
p
|
|
strong #{translate("upgrade_for_faster_compiles")}
|
|
p #{translate("free_accounts_have_timeout_upgrade_to_increase")}
|
|
p
|
|
a.btn.btn-info(
|
|
href
|
|
ng-click="hello('compile-timeout')"
|
|
) #{translate("start_free_trial")}
|
|
|
|
.pdf-errors(ng-show="pdf.projectTooLarge")
|
|
.alert.alert-danger
|
|
strong #{translate("project_too_large")}
|
|
span #{translate("project_too_large_please_reduce")}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pdf-logs(ng-show="(pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled")
|
|
.alert.alert-success(ng-show="pdf.logEntries.all.length == 0")
|
|
| #{translate("no_errors_good_job")}
|
|
|
|
.alert.alert-danger(ng-show="pdf.failure")
|
|
strong #{translate("compile_error")}.
|
|
span #{translate("generic_failed_compile_message")}.
|
|
|
|
div(ng-repeat="entry in pdf.logEntries.all", ng-controller="PdfLogEntryController")
|
|
.alert(
|
|
ng-class="{\
|
|
'alert-danger': entry.level == 'error',\
|
|
'alert-warning': entry.level == 'warning',\
|
|
'alert-info': entry.level == 'typesetting'\
|
|
}"
|
|
ng-click="openInEditor(entry)"
|
|
)
|
|
span.line-no
|
|
span(ng-show="entry.file") {{ entry.file }}
|
|
span(ng-show="entry.line") , line {{ entry.line }}
|
|
p.entry-message(ng-show="entry.message") {{ entry.message }}
|
|
p.entry-content(ng-show="entry.content") {{ entry.content }}
|
|
|
|
p
|
|
.pull-right
|
|
a.btn.btn-default.btn-sm(
|
|
href,
|
|
tooltip="#{translate('clear_cached_files')}",
|
|
tooltip-placement="top",
|
|
tooltip-append-to-body="true",
|
|
ng-click="openClearCacheModal()"
|
|
)
|
|
i.fa.fa-trash-o
|
|
|
|
|
div.dropdown(style="display: inline-block;")
|
|
a.btn.btn-default.btn-sm(
|
|
href
|
|
dropdown-toggle
|
|
)
|
|
| !{translate("other_logs_and_files")}
|
|
span.caret
|
|
ul.dropdown-menu.dropdown-menu-right
|
|
li(ng-repeat="file in pdf.outputFiles")
|
|
a(
|
|
href="/project/{{project_id}}/output/{{file.path}}"
|
|
target="_blank"
|
|
ng-click="openOutputFile(file)"
|
|
) {{ file.name }}
|
|
a.btn.btn-info.btn-sm(href, ng-click="toggleRawLog()")
|
|
span(ng-show="!pdf.showRawLog") #{translate("view_raw_logs")}
|
|
span(ng-show="pdf.showRawLog") #{translate("hide_raw_logs")}
|
|
|
|
pre(ng-bind="pdf.rawLog", ng-show="pdf.showRawLog")
|
|
|
|
script(type='text/ng-template', id='clearCacheModalTemplate')
|
|
.modal-header
|
|
h3 #{translate("clear_cache")}?
|
|
.modal-body
|
|
p #{translate("clear_cache_explanation")}
|
|
p #{translate("clear_cache_is_safe")}
|
|
.modal-footer
|
|
button.btn.btn-default(
|
|
ng-click="cancel()"
|
|
ng-disabled="state.inflight"
|
|
) #{translate("cancel")}
|
|
button.btn.btn-info(
|
|
ng-click="clear()"
|
|
ng-disabled="state.inflight"
|
|
)
|
|
span(ng-show="!state.inflight") #{translate("clear_cache")}
|
|
span(ng-show="state.inflight") #{translate("clearing")}...
|