17 lines
767 B
Text
17 lines
767 B
Text
|
- reason = blob_render_error_reason(viewer, error)
|
||
|
|
||
|
- options = []
|
||
|
- if error == :too_large && viewer.can_override_max_size?
|
||
|
- options << link_to('load it anyway', url_for(params.merge(viewer: viewer.type, override_max_size: true, format: nil)))
|
||
|
- if viewer.rich? && viewer.blob.rendered_as_text?(override_max_size: true)
|
||
|
- options << link_to('view the source', '#', class: 'js-blob-viewer-switcher', data: { viewer: 'simple' })
|
||
|
- options << link_to('download it', blob_raw_url, target: '_blank', rel: 'noopener noreferrer')
|
||
|
|
||
|
.file-content.code
|
||
|
.nothing-here-block
|
||
|
The #{viewer.switcher_title} could not be displayed because #{reason}.
|
||
|
|
||
|
You can
|
||
|
= options.to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe
|
||
|
instead.
|