diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-01 12:10:53 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-01 12:10:53 +0300 |
commit | 04251829ba135a8bab845e9e49d8475eb0211e86 (patch) | |
tree | cc39e928a905204eaa4032299a51009f94a000b5 /app/helpers/blob_helper.rb | |
parent | dd7449b92454dd614b5a60efd5fe44561174d2fa (diff) | |
parent | 04cf618b6ff943527938f64a451a420b494b5a76 (diff) |
Merge branch 'dm-collapsed-blob' into 'master'
Consistent diff and blob size limit names
See merge request !11776
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r-- | app/helpers/blob_helper.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index 11c972c6563..3efa7c36057 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -240,14 +240,10 @@ module BlobHelper def blob_render_error_reason(viewer) case viewer.render_error + when :collapsed + "it is larger than #{number_to_human_size(viewer.collapse_limit)}" when :too_large - max_size = - if viewer.can_override_max_size? - viewer.overridable_max_size - else - viewer.max_size - end - "it is larger than #{number_to_human_size(max_size)}" + "it is larger than #{number_to_human_size(viewer.size_limit)}" when :server_side_but_stored_externally case viewer.blob.external_storage when :lfs @@ -264,8 +260,8 @@ module BlobHelper error = viewer.render_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 error == :collapsed + options << link_to('load it anyway', url_for(params.merge(viewer: viewer.type, expanded: true, format: nil))) end # If the error is `:server_side_but_stored_externally`, the simple viewer will show the same error, |