overleaf/services/web/app/views/project/editor/binary-file.jade

39 lines
1.2 KiB
Text
Raw Normal View History

2014-07-03 12:05:50 -04:00
div.binary-file.full-size(
ng-controller="BinaryFileController"
ng-show="ui.view == 'file'"
ng-if="openFile"
)
img(
ng-show="!failedLoad"
2014-07-03 12:05:50 -04:00
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}"
ng-if="['png', 'jpg', 'jpeg', 'gif'].indexOf(extension(openFile)) > -1"
onerror="sl_binaryFilePreviewError()"
onabort="sl_binaryFilePreviewError()"
2014-07-03 12:05:50 -04:00
)
2016-05-17 12:00:14 -04:00
2014-07-03 12:05:50 -04:00
img(
ng-show="!failedLoad"
2014-07-03 12:05:50 -04:00
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}?format=png"
ng-if="['pdf', 'eps'].indexOf(extension(openFile)) > -1"
onerror="sl_binaryFilePreviewError()"
onabort="sl_binaryFilePreviewError()"
2014-07-03 12:05:50 -04:00
)
2016-05-17 12:00:14 -04:00
div(ng-if="(['bib'].indexOf(extension(openFile)) > -1) && !bibtex.error", ng-init="loadBibtexFilePreview()")
2016-05-17 12:00:14 -04:00
div(ng-if="bibtex.loading")
| #{translate('loading')}...
div.bib-preview(ng-if="!bibtex.loading && !bibtex.error")
div.scroll-container
p
| {{ bibtexPreview.data }}
p
| ...
2014-07-03 12:05:50 -04:00
p.no-preview(
2016-05-17 12:00:14 -04:00
ng-if="failedLoad || bibtex.error || ['bib', 'png', 'jpg', 'jpeg', 'gif', 'pdf', 'eps'].indexOf(extension(openFile)) == -1"
2014-07-31 12:07:43 -04:00
) #{translate("no_preview_available")}
2016-05-17 12:00:14 -04:00
2014-07-03 12:05:50 -04:00
a.btn.btn-info(
ng-href="/project/{{ project_id }}/file/{{ openFile.id }}"
2014-07-31 12:07:43 -04:00
) #{translate("download")} {{ openFile.name }}