2014-07-03 16:05:50 +00:00
|
|
|
div.binary-file.full-size(
|
|
|
|
ng-controller="BinaryFileController"
|
|
|
|
ng-show="ui.view == 'file'"
|
|
|
|
ng-if="openFile"
|
|
|
|
)
|
|
|
|
img(
|
2016-05-04 08:32:59 +00:00
|
|
|
ng-show="!failedLoad"
|
2014-07-03 16:05:50 +00:00
|
|
|
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}"
|
|
|
|
ng-if="['png', 'jpg', 'jpeg', 'gif'].indexOf(extension(openFile)) > -1"
|
2016-05-20 13:28:51 +00:00
|
|
|
ng-class="{'img-preview': !imgLoaded}"
|
2016-05-04 08:32:59 +00:00
|
|
|
onerror="sl_binaryFilePreviewError()"
|
|
|
|
onabort="sl_binaryFilePreviewError()"
|
2016-05-20 13:28:51 +00:00
|
|
|
onload="sl_binaryFilePreviewLoaded()"
|
2014-07-03 16:05:50 +00:00
|
|
|
)
|
2016-05-17 16:00:14 +00:00
|
|
|
|
2014-07-03 16:05:50 +00:00
|
|
|
img(
|
2016-05-04 08:32:59 +00:00
|
|
|
ng-show="!failedLoad"
|
2014-07-03 16:05:50 +00:00
|
|
|
ng-src="/project/{{ project_id }}/file/{{ openFile.id }}?format=png"
|
|
|
|
ng-if="['pdf', 'eps'].indexOf(extension(openFile)) > -1"
|
2016-05-20 13:28:51 +00:00
|
|
|
ng-class="{'img-preview': !imgLoaded}"
|
2016-05-04 08:32:59 +00:00
|
|
|
onerror="sl_binaryFilePreviewError()"
|
|
|
|
onabort="sl_binaryFilePreviewError()"
|
2016-05-20 13:28:51 +00:00
|
|
|
onload="sl_binaryFilePreviewLoaded()"
|
2014-07-03 16:05:50 +00:00
|
|
|
)
|
2016-05-17 16:00:14 +00:00
|
|
|
|
2016-05-19 10:11:23 +00:00
|
|
|
div(ng-if="(['bib'].indexOf(extension(openFile)) > -1) && !bibtexPreview.error")
|
2016-05-19 10:25:24 +00:00
|
|
|
|
|
|
|
div.bib-loading(ng-show="bibtexPreview.loading && !bibtexPreview.error")
|
2016-05-17 16:00:14 +00:00
|
|
|
| #{translate('loading')}...
|
2016-05-19 09:02:07 +00:00
|
|
|
|
2016-05-19 10:11:23 +00:00
|
|
|
div.bib-preview(ng-show="bibtexPreview.data && !bibtexPreview.loading && !bibtexPreview.error")
|
2016-05-17 16:00:14 +00:00
|
|
|
div.scroll-container
|
|
|
|
p
|
|
|
|
| {{ bibtexPreview.data }}
|
2016-05-20 08:17:25 +00:00
|
|
|
p(ng-show="bibtexPreview.shouldShowDots")
|
2016-05-17 16:00:14 +00:00
|
|
|
| ...
|
|
|
|
|
2014-07-03 16:05:50 +00:00
|
|
|
p.no-preview(
|
2016-05-19 10:11:23 +00:00
|
|
|
ng-if="failedLoad || bibtexPreview.error || ['bib', 'png', 'jpg', 'jpeg', 'gif', 'pdf', 'eps'].indexOf(extension(openFile)) == -1"
|
2014-07-31 16:07:43 +00:00
|
|
|
) #{translate("no_preview_available")}
|
2016-05-17 16:00:14 +00:00
|
|
|
|
2014-07-03 16:05:50 +00:00
|
|
|
a.btn.btn-info(
|
|
|
|
ng-href="/project/{{ project_id }}/file/{{ openFile.id }}"
|
2014-07-31 16:07:43 +00:00
|
|
|
) #{translate("download")} {{ openFile.name }}
|