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

134 lines
4.4 KiB
Text
Raw Normal View History

2014-06-28 12:25:06 +00:00
div.full-size(ng-controller="PdfController")
.toolbar.toolbar-tall
2014-06-29 13:22:08 +00:00
a.btn.btn-info(
href,
ng-disabled="pdf.compiling",
ng-click="recompile()"
2014-06-28 12:25:06 +00:00
)
2014-06-29 13:22:08 +00:00
i.fa.fa-refresh(
ng-class="{'fa-spin': pdf.compiling }"
)
|   
span(ng-show="!pdf.compiling") Recompile
span(ng-show="pdf.compiling") Compiling...
a.log-btn(
2014-06-28 12:25:06 +00:00
href
2014-06-29 13:22:08 +00:00
ng-click="toggleLogs()"
ng-class="{ 'active': (pdf.view == 'logs' || pdf.failure) && !pdf.error && !pdf.timeout && !pdf.uncompiled }"
2014-06-28 12:25:06 +00:00
tooltip="Logs"
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-06-28 12:25:06 +00:00
.pdf-viewer(ng-show="pdf.url && pdf.view == 'pdf' && !pdf.failure && !pdf.timeout && !pdf.error")
2014-06-29 13:22:08 +00:00
div(
2014-06-28 12:25:06 +00:00
pdfjs
ng-if="settings.pdfViewer == 'pdfjs'"
2014-06-28 12:25:06 +00:00
pdf-src="pdf.url"
2014-06-28 14:43:44 +00:00
key="project_id"
resize-on="layout:main:resize,layout:pdf:resize"
2014-06-30 17:35:01 +00:00
highlights="pdf.highlights"
position="pdf.position"
dbl-click-callback="syncToCode"
2014-06-29 13:22:08 +00:00
)
iframe(
ng-src="{{ pdf.url }}"
ng-if="settings.pdfViewer == 'native'"
)
2014-06-29 13:22:08 +00:00
.pdf-uncompiled(ng-show="pdf.uncompiled && !pdf.compiling")
|  
i.fa.fa-level-up.fa-flip-horizontal.fa-2x
|   Click here to preview your work as a PDF.
.pdf-errors(ng-show="pdf.timeout || pdf.error")
.alert.alert-danger(ng-show="pdf.error")
strong Server Error.
span Sorry, something went wrong and your project could not be compiled. Please try again in a few moments.
.alert.alert-danger(ng-show="pdf.timeout")
strong Timed out.
span Sorry, your compile was taking too long and timed out.
| This may be due to a large number of high-res images, or lots of complicated diagrams.
| Please try to make your document simpler, or contact support for help.
.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")
| No errors, good job!
.alert.alert-danger(ng-show="pdf.failure")
strong Compile Error.
span Sorry, your LaTeX code couldn't compile for some reason. Please check the errors below for details, or view the raw log.
div(ng-repeat="entry in pdf.logEntries.all", ng-controller="PdfLogEntryController")
2014-06-29 13:22:08 +00: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 13:22:08 +00: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 11:05:43 +00:00
a.btn.btn-default.btn-sm(
href,
tooltip="Clear cached files",
tooltip-placement="top",
2014-06-30 11:36:17 +00:00
tooltip-append-to-body="true",
ng-click="openClearCacheModal()"
2014-06-30 11:05:43 +00:00
)
2014-06-29 13:22:08 +00:00
i.fa.fa-trash-o
2014-06-30 11:05:43 +00:00
|  
2014-07-02 14:56:09 +00:00
div.dropdown(style="display: inline-block;")
2014-06-30 11:05:43 +00:00
a.btn.btn-default.btn-sm(
href
2014-07-02 12:29:56 +00:00
dropdown-toggle
2014-06-30 11:05:43 +00:00
)
| Other logs & 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") View Raw Logs
span(ng-show="pdf.showRawLog") Hide Raw Logs
2014-06-29 13:22:08 +00:00
2014-06-30 11:05:43 +00:00
pre(ng-bind="pdf.rawLog", ng-show="pdf.showRawLog")
2014-06-30 11:36:17 +00:00
script(type='text/ng-template', id='clearCacheModalTemplate')
.modal-header
h3 Clear cache?
.modal-body
p This will clear all hidden LaTeX files (.aux, .bbl, etc) from our compile server.
| You generally don't need to do this unless you're having trouble with references.
p Your project files will not be deleted or changed.
.modal-footer
button.btn.btn-default(
ng-click="cancel()"
ng-disabled="state.inflight"
) Cancel
button.btn.btn-info(
ng-click="clear()"
ng-disabled="state.inflight"
)
span(ng-show="!state.inflight") Clear cache
span(ng-show="state.inflight") Clearing...