Commit 18acb2d0 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '215396-add-symlink-label-to-blob-viewer' into 'master'

Add symlink label text to blob viewer

See merge request gitlab-org/gitlab!38220
parents b5320b8d cdf4ad81
...@@ -6,6 +6,8 @@ class Blob < SimpleDelegator ...@@ -6,6 +6,8 @@ class Blob < SimpleDelegator
include BlobLanguageFromGitAttributes include BlobLanguageFromGitAttributes
include BlobActiveModel include BlobActiveModel
MODE_SYMLINK = '120000' # The STRING 120000 is the git-reported octal filemode for a symlink
CACHE_TIME = 60 # Cache raw blobs referred to by a (mutable) ref for 1 minute CACHE_TIME = 60 # Cache raw blobs referred to by a (mutable) ref for 1 minute
CACHE_TIME_IMMUTABLE = 3600 # Cache blobs referred to by an immutable reference for 1 hour CACHE_TIME_IMMUTABLE = 3600 # Cache blobs referred to by an immutable reference for 1 hour
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
= copy_file_path_button(blob.path) = copy_file_path_button(blob.path)
%small.mr-1 %small.mr-1
- if blob.mode == Blob::MODE_SYMLINK
= _('Symbolic link') << ' ·'
= number_to_human_size(blob.raw_size) = number_to_human_size(blob.raw_size)
- if blob.stored_externally? && blob.external_storage == :lfs - if blob.stored_externally? && blob.external_storage == :lfs
......
---
title: Add symlink label text to blob viewer
merge_request: 38220
author:
type: added
...@@ -23629,6 +23629,9 @@ msgstr "" ...@@ -23629,6 +23629,9 @@ msgstr ""
msgid "Switch to the source to copy the file contents" msgid "Switch to the source to copy the file contents"
msgstr "" msgstr ""
msgid "Symbolic link"
msgstr ""
msgid "Sync information" msgid "Sync information"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment