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(
|
2016-05-04 04:32:59 -04:00
|
|
|
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"
|
2016-05-04 04:32:59 -04:00
|
|
|
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(
|
2016-05-04 04:32:59 -04:00
|
|
|
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"
|
2016-05-04 04:32:59 -04:00
|
|
|
onerror="sl_binaryFilePreviewError()"
|
|
|
|
onabort="sl_binaryFilePreviewError()"
|
2014-07-03 12:05:50 -04:00
|
|
|
)
|
2016-05-17 12:00:14 -04:00
|
|
|
|
2016-05-18 06:14:24 -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 }}
|