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

320 lines
9.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
.btn-group(
dropdown,
tooltip-html="'#{translate('recompile_pdf')} <span class=\"keyboard-shortcut\">({{modifierKey}} + Enter)</span>'"
2016-06-15 05:48:40 -04:00
tooltip-class="keyboard-tooltip"
tooltip-popup-delay="500"
tooltip-append-to-body="true"
2016-06-15 05:48:40 -04:00
tooltip-placement="bottom"
)
2016-02-02 09:50:48 -05:00
a.btn.btn-info(
href,
ng-disabled="pdf.compiling",
ng-click="recompile()"
)
i.fa.fa-refresh(
ng-class="{'fa-spin': pdf.compiling }"
)
| &nbsp;&nbsp;
span(ng-show="!pdf.compiling") #{translate("recompile")}
span(ng-show="pdf.compiling") #{translate("compiling")}...
a.btn.btn-info.dropdown-toggle(
href,
ng-disabled="pdf.compiling",
dropdown-toggle
2014-06-29 09:22:08 -04:00
)
2016-02-02 09:50:48 -05:00
span.caret
ul.dropdown-menu.dropdown-menu-right
li.dropdown-header #{translate("compile_mode")}
li
a(href, ng-click="draft = false")
i.fa.fa-fw(ng-class="{'fa-check': !draft}")
| &nbsp;#{translate("normal")}
li
a(href, ng-click="draft = true")
i.fa.fa-fw(ng-class="{'fa-check': draft}")
| &nbsp;#{translate("fast")}&nbsp;
span.subdued [draft]
2016-07-14 09:48:46 -04:00
a.log-stop(
href
ng-click="stop()"
ng-show="pdf.compiling",
tooltip="#{translate('stop_compile')}"
tooltip-placement="bottom"
)
i.fa.fa-stop()
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': shouldShowLogs == true }"
2014-08-20 08:47:45 -04:00
tooltip="#{translate('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(
2016-06-01 11:47:55 -04:00
ng-href="{{pdf.downloadUrl || pdf.url}}"
2014-07-28 12:24:43 -04:00
target="_blank"
ng-if="pdf.url"
2014-08-20 09:31:44 -04:00
tooltip="#{translate('download_pdf')}"
2014-07-28 12:24:43 -04:00
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'"
2014-08-20 08:47:45 -04:00
tooltip="#{translate('full_screen')}"
2014-07-22 08:33:01 -04:00
tooltip-placement="bottom"
tooltip-append-to-body="true"
)
i.full-screen
a(
href,
ng-click="switchToSideBySideLayout()"
ng-show="ui.pdfLayout == 'flat'"
2014-08-20 09:31:44 -04:00
tooltip="#{translate('split_screen')}"
2014-07-22 08:33:01 -04:00
tooltip-placement="bottom"
tooltip-append-to-body="true"
)
i.split-screen
i.split-screen
// end of toolbar
2016-03-22 06:24:58 -04:00
// logs view
.pdf-logs(ng-show="shouldShowLogs")
.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)"
ng-init="feedbackSent = false;"
2014-06-29 09:22:08 -04:00
)
span.line-no
2016-06-24 11:37:35 -04:00
i.fa.fa-link(aria-hidden="true")
| &nbsp;
2014-06-29 09:22:08 -04:00
span(ng-show="entry.file") {{ entry.file }}
span(ng-show="entry.line") , line {{ entry.line }}
p.entry-message(ng-show="entry.message") {{ entry.message }}
2016-06-24 07:12:45 -04:00
.card.card-hint(
ng-if="entry.humanReadableHint"
stop-propagation="click"
)
2016-06-17 09:16:38 -04:00
figure.card-hint-icon-container
i.fa.fa-lightbulb-o(aria-hidden="true")
p.card-hint-text(
ng-show="entry.humanReadableHint",
ng-bind-html="wikiEnabled ? entry.humanReadableHint : stripHTMLFromString(entry.humanReadableHint)")
.card-hint-actions.clearfix
.card-hint-ext-link(ng-if="wikiEnabled")
2016-07-05 11:27:14 -04:00
a(
ng-href="{{ entry.extraInfoURL }}",
ng-click="trackLogHintsLearnMore()"
target="_blank"
)
2016-06-20 06:53:10 -04:00
i.fa.fa-external-link
|&nbsp;#{translate("log_hint_extra_info")}
.card-hint-feedback(
ng-show="!feedbackSent"
ng-class="entry.ruleId"
)
label.card-hint-feedback-label #{translate("log_hint_feedback_label")}
a.card-hint-feedback-positive(
2016-06-30 06:30:30 -04:00
ng-click="trackLogHintsPositiveFeedback(entry.ruleId); feedbackSent = true;"
2016-06-24 10:22:34 -04:00
href
) #{translate("answer_yes")}
2016-06-21 09:20:23 -04:00
span &nbsp;/&nbsp;
a.card-hint-feedback-negative(
2016-06-30 06:30:30 -04:00
ng-click="trackLogHintsNegativeFeedback(entry.ruleId); feedbackSent = true;"
2016-06-24 10:22:34 -04:00
href
) #{translate("answer_no")}
.card-hint-feedback(ng-show="feedbackSent")
label.card-hint-feedback-label #{translate("log_hint_feedback_gratitude")}
2016-06-24 07:07:02 -04:00
p.entry-content(ng-show="entry.content") {{ entry.content.trim() }}
2014-06-29 09:22:08 -04:00
p
2016-06-28 10:51:50 -04:00
.files-dropdown-container
2014-06-30 07:05:43 -04:00
a.btn.btn-default.btn-sm(
href,
2014-08-20 09:40:27 -04:00
tooltip="#{translate('clear_cached_files')}",
2014-06-30 07:05:43 -04:00
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
| &nbsp;
div.files-dropdown(
ng-class="shouldDropUp ? 'dropup' : 'dropdown'"
dropdown
)
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
)
| !{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="{{file.url}}"
2014-06-30 07:05:43 -04:00
target="_blank"
) {{ 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")
2016-03-22 06:24:58 -04:00
// non-log views (pdf and errors)
div(ng-show="!shouldShowLogs", ng-switch on="pdf.view")
.pdf-uncompiled(ng-switch-when="uncompiled" ng-show="!pdf.compiling")
| &nbsp;
i.fa.fa-level-up.fa-flip-horizontal.fa-2x
| &nbsp;&nbsp;#{translate('click_here_to_preview_pdf')}
.pdf-viewer(ng-switch-when="pdf")
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'"
)
2016-06-02 08:09:11 -04:00
.pdf-validation-problems(ng-switch-when="validation-problems")
.alert.alert-danger(ng-show="pdf.validation.duplicatePaths")
strong #{translate("latex_error")}
span #{translate("duplicate_paths_found")}
.alert.alert-danger(ng-show="pdf.validation.sizeCheck")
strong #{translate("project_too_large")}
div #{translate("project_too_large_please_reduce")}
div
li(ng-repeat="entry in pdf.validation.sizeCheck.resources") {{ '/'+entry['path'] }} - {{entry['kbSize']}}kb
.alert.alert-danger(ng-show="pdf.validation.conflictedPaths")
div
strong #{translate("conflicting_paths_found")}
div #{translate("following_paths_conflict")}
div
li(ng-repeat="entry in pdf.validation.conflictedPaths") {{ '/'+entry['path'] }}
.pdf-errors(ng-switch-when="errors")
.alert.alert-danger(ng-show="pdf.error")
strong #{translate("server_error")}
span #{translate("somthing_went_wrong_compiling")}
.alert.alert-danger(ng-show="pdf.renderingError")
strong #{translate("pdf_rendering_error")}
span #{translate("something_went_wrong_rendering_pdf")}
.alert.alert-danger(ng-show="pdf.clsiMaintenance")
strong #{translate("server_error")}
span #{translate("clsi_maintenance")}
.alert.alert-danger(ng-show="pdf.tooRecentlyCompiled")
strong #{translate("server_error")}
span #{translate("too_recently_compiled")}
2016-07-14 09:48:46 -04:00
.alert.alert-danger(ng-show="pdf.compileTerminated")
strong #{translate("terminated")}.
span #{translate("compile_terminated_by_user")}
.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(ng-if="project.owner._id == user.id")
strong #{translate("upgrade_for_faster_compiles")}
p(ng-if="project.owner._id != user.id")
strong #{translate("ask_proj_owner_to_upgrade_for_faster_compiles")}
p #{translate("free_accounts_have_timeout_upgrade_to_increase")}
p Plus:
p
ul.list-unstyled
li
i.fa.fa-check &nbsp;
| #{translate("unlimited_projects")}
li
i.fa.fa-check &nbsp;
| #{translate("collabs_per_proj", {collabcount:'Multiple'})}
li
i.fa.fa-check &nbsp;
| #{translate("full_doc_history")}
li
i.fa.fa-check &nbsp;
| #{translate("sync_to_dropbox")}
li
i.fa.fa-check &nbsp;
| #{translate("sync_to_github")}
li
i.fa.fa-check &nbsp;
|#{translate("compile_larger_projects")}
p(ng-controller="FreeTrialModalController", ng-if="project.owner._id == user.id")
a.btn.btn-success.row-spaced-small(
href
ng-class="buttonClass"
sixpack-convert="track_changes_feature_info"
ng-click="startFreeTrial('compile-timeout')"
) #{translate("start_free_trial")}
.alert.alert-danger(ng-show="pdf.projectTooLarge")
strong #{translate("project_too_large")}
span #{translate("project_too_large_please_reduce")}
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")}...