overleaf/services/web/app/views/project/editor/pdf.jade

165 lines
4.9 KiB
Text
Raw Normal View History

2014-07-22 08:33:01 -04:00
div.full-size.pdf(ng-controller="PdfController")
2014-06-28 08:25:06 -04:00
.toolbar.toolbar-tall
2014-06-29 09:22:08 -04:00
a.btn.btn-info(
href,
ng-disabled="pdf.compiling",
ng-click="recompile()"
2014-06-28 08:25:06 -04:00
)
2014-06-29 09:22:08 -04:00
i.fa.fa-refresh(
ng-class="{'fa-spin': pdf.compiling }"
)
|   
2014-07-31 12:07:43 -04:00
span(ng-show="!pdf.compiling") #{translate("recompile")}
span(ng-show="pdf.compiling") #{translate("compiling")}...
2014-06-29 09:22:08 -04:00
a.log-btn(
2014-06-28 08:25:06 -04:00
href
2014-06-29 09:22:08 -04:00
ng-click="toggleLogs()"
ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled }"
2014-07-22 09:38:32 -04:00
tooltip="Logs and output files"
2014-06-28 08:25:06 -04:00
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 }}
2014-07-22 08:33:01 -04:00
2014-07-28 12:24:43 -04:00
a(
ng-href="{{pdf.url}}"
target="_blank"
ng-if="pdf.url"
tooltip="Download PDF"
tooltip-placement="bottom"
)
i.fa.fa-download
2014-07-22 08:33:01 -04:00
.toolbar-right
a(
href,
ng-click="switchToFlatLayout()"
ng-show="ui.pdfLayout == 'sideBySide'"
tooltip="Full screen"
tooltip-placement="bottom"
tooltip-append-to-body="true"
)
i.full-screen
a(
href,
ng-click="switchToSideBySideLayout()"
ng-show="ui.pdfLayout == 'flat'"
tooltip="Split screen"
tooltip-placement="bottom"
tooltip-append-to-body="true"
)
i.split-screen
i.split-screen
2014-06-28 08:25:06 -04:00
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
2014-06-29 09:22:08 -04:00
div(
2014-06-28 08:25:06 -04:00
pdfjs
ng-if="settings.pdfViewer == 'pdfjs'"
2014-06-28 08:25:06 -04:00
pdf-src="pdf.url"
2014-07-16 11:58:12 -04:00
key="{{ project_id }}"
2014-06-28 10:43:44 -04:00
resize-on="layout:main:resize,layout:pdf:resize"
2014-06-30 13:35:01 -04:00
highlights="pdf.highlights"
position="pdf.position"
dbl-click-callback="syncToCode"
2014-06-29 09:22:08 -04:00
)
iframe(
ng-src="{{ pdf.url }}"
ng-if="settings.pdfViewer == 'native'"
)
2014-06-29 09:22:08 -04:00
.pdf-uncompiled(ng-show="pdf.uncompiled && !pdf.compiling")
|  
i.fa.fa-level-up.fa-flip-horizontal.fa-2x
2014-07-31 12:07:43 -04:00
|   #{translate("click_here_to_preview_pdf")}
2014-07-28 05:22:27 -04:00
.pdf-errors(ng-show="pdf.timedout || pdf.error")
.alert.alert-danger(ng-show="pdf.error")
2014-07-31 12:07:43 -04:00
strong #{translate("server_error")}
span #{translate("somthing_went_wrong_compiling")}
2014-07-28 05:22:27 -04:00
.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("please_see_help_for_more_info")}
.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")
2014-07-31 12:07:43 -04:00
| #{translate("no_errors_good_job")}
.alert.alert-danger(ng-show="pdf.failure")
2014-07-31 12:07:43 -04:00
strong #{translate("compile_error")}.
span #{translate("generic_failed_compile_message")}.
div(ng-repeat="entry in pdf.logEntries.all", ng-controller="PdfLogEntryController")
2014-06-29 09:22:08 -04:00
.alert(
ng-class="{\
'alert-danger': entry.level == 'error',\
'alert-warning': entry.level == 'warning',\
'alert-info': entry.level == 'typesetting'\
}"
ng-click="openInEditor(entry)"
2014-06-29 09:22:08 -04:00
)
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
2014-06-30 07:05:43 -04:00
a.btn.btn-default.btn-sm(
href,
tooltip="Clear cached files",
tooltip-placement="top",
2014-06-30 07:36:17 -04:00
tooltip-append-to-body="true",
ng-click="openClearCacheModal()"
2014-06-30 07:05:43 -04:00
)
2014-06-29 09:22:08 -04:00
i.fa.fa-trash-o
2014-06-30 07:05:43 -04:00
|  
2014-07-02 10:56:09 -04:00
div.dropdown(style="display: inline-block;")
2014-06-30 07:05:43 -04:00
a.btn.btn-default.btn-sm(
href
2014-07-02 08:29:56 -04:00
dropdown-toggle
2014-06-30 07:05:43 -04:00
)
2014-08-07 11:11:43 -04:00
| !{translate("other_logs_and_files")}
2014-06-30 07:05:43 -04:00
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()")
2014-07-31 12:07:43 -04:00
span(ng-show="!pdf.showRawLog") #{translate("view_raw_logs")}
span(ng-show="pdf.showRawLog") #{translate("hide_raw_logs")}
2014-06-29 09:22:08 -04:00
2014-06-30 07:05:43 -04:00
pre(ng-bind="pdf.rawLog", ng-show="pdf.showRawLog")
2014-06-30 07:36:17 -04:00
script(type='text/ng-template', id='clearCacheModalTemplate')
.modal-header
2014-07-31 12:07:43 -04:00
h3 #{translate("clear_cache")}?
2014-06-30 07:36:17 -04:00
.modal-body
2014-07-31 12:07:43 -04:00
p #{translate("clear_cache_explanation")}
p #{translate("clear_cache_is_safe")}
2014-06-30 07:36:17 -04:00
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
ng-disabled="state.inflight"
2014-07-31 12:07:43 -04:00
) #{translate("cancel")}
2014-06-30 07:36:17 -04:00
button.btn.btn-info(
ng-click="clear()"
ng-disabled="state.inflight"
)
2014-07-31 12:07:43 -04:00
span(ng-show="!state.inflight") #{translate("clear_cache")}
span(ng-show="state.inflight") #{translate("clearing")}...