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 }}"
|
2018-02-20 05:37:55 -05:00
|
|
|
ng-if="isImageFile()"
|
2016-05-20 09:28:51 -04:00
|
|
|
ng-class="{'img-preview': !imgLoaded}"
|
2016-05-04 04:32:59 -04:00
|
|
|
onerror="sl_binaryFilePreviewError()"
|
|
|
|
onabort="sl_binaryFilePreviewError()"
|
2016-05-20 09:28:51 -04:00
|
|
|
onload="sl_binaryFilePreviewLoaded()"
|
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"
|
2018-02-20 05:37:55 -05:00
|
|
|
ng-if="isPreviewableFile()"
|
2016-05-20 09:28:51 -04:00
|
|
|
ng-class="{'img-preview': !imgLoaded}"
|
2016-05-04 04:32:59 -04:00
|
|
|
onerror="sl_binaryFilePreviewError()"
|
|
|
|
onabort="sl_binaryFilePreviewError()"
|
2016-05-20 09:28:51 -04:00
|
|
|
onload="sl_binaryFilePreviewLoaded()"
|
2014-07-03 12:05:50 -04:00
|
|
|
)
|
2016-05-17 12:00:14 -04:00
|
|
|
|
2018-02-20 05:37:55 -05:00
|
|
|
div(ng-if="isTextFile() && !textPreview.error")
|
|
|
|
div.text-loading(ng-show="textPreview.loading && !textPreview.error")
|
2016-05-17 12:00:14 -04:00
|
|
|
| #{translate('loading')}...
|
2018-02-20 05:37:55 -05:00
|
|
|
div.text-preview(ng-show="textPreview.data && !textPreview.loading && !textPreview.error")
|
2016-05-17 12:00:14 -04:00
|
|
|
div.scroll-container
|
|
|
|
p
|
2018-02-20 05:37:55 -05:00
|
|
|
| {{ textPreview.data }}
|
|
|
|
p(ng-show="textPreview.shouldShowDots")
|
2016-05-17 12:00:14 -04:00
|
|
|
| ...
|
|
|
|
|
2014-07-03 12:05:50 -04:00
|
|
|
p.no-preview(
|
2018-02-20 05:37:55 -05:00
|
|
|
ng-if="failedLoad || textPreview.error || isUnpreviewableFile()"
|
2014-07-31 12:07:43 -04:00
|
|
|
) #{translate("no_preview_available")}
|
2016-05-17 12:00:14 -04:00
|
|
|
|
2018-02-20 05:37:55 -05:00
|
|
|
div.binary-file-footer
|
|
|
|
div(ng-show="openFile.linkedFileData.provider == 'url'")
|
|
|
|
p
|
|
|
|
i.fa.fa-fw.fa-external-link-square.fa-rotate-180.linked-file-icon
|
|
|
|
| Imported from
|
|
|
|
|
|
|
|
|
a(ng-href='{{openFile.linkedFileData.url}}') {{ displayUrl(openFile.linkedFileData.url) }}
|
|
|
|
|
|
|
|
|
| at {{ openFile.created | formatDate:'h:mm a' }} {{ openFile.created | relativeDate }}
|
|
|
|
|
|
|
|
span(ng-show="openFile.linkedFileData.provider == 'url'")
|
|
|
|
a.btn.btn-success(
|
|
|
|
href
|
|
|
|
)
|
|
|
|
i.fa.fa-fw.fa-refresh
|
|
|
|
|
|
|
|
|
| Refresh
|
|
|
|
|
|
|
|
|
a.btn.btn-info(
|
|
|
|
ng-href="/project/{{ project_id }}/file/{{ openFile.id }}"
|
|
|
|
)
|
|
|
|
i.fa.fa-fw.fa-download
|
|
|
|
|
|
|
|
|
| #{translate("download")}
|