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