diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-04-14 13:44:35 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-04-28 22:28:39 +0300 |
commit | ad99404d2588e182a115d89b0b457d957e8ca7b6 (patch) | |
tree | 527619b709363e1515c41c0d8f861995389a58d4 /app/views/projects/blob | |
parent | 3fd0f5374447f0763c60d5b10b35d4a6f6981497 (diff) |
Properly handle bigger files
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/_text.html.haml | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index d09cd73558c..b1769759dce 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -1,10 +1,19 @@ -- blob.load_all_data!(@repository) -- if markup?(blob.name) - .file-content.wiki - = render_markup(blob.name, blob.data) +- if blob.only_display_raw? + .file-content.code + .nothing-here-block + File too large, you can + = succeed '.' do + = link_to 'view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank' + - else - - unless blob.empty? - = render 'shared/file_highlight', blob: blob + - blob.load_all_data!(@repository) + + - if markup?(blob.name) + .file-content.wiki + = render_markup(blob.name, blob.data) - else - .file-content.code - .nothing-here-block Empty file + - if blob.empty? + .file-content.code + .nothing-here-block Empty file + - else + = render 'shared/file_highlight', blob: blob |