diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -150,10 +150,14 @@ def chop_at_smart(s, sub, inclusive=Fals return chopped -def shorter(text, size=20): +def shorter(text, size=20, prefix=False): postfix = '...' if len(text) > size: - return text[:size - len(postfix)] + postfix + if prefix: + # shorten in front + return postfix + text[-(size - len(postfix)):] + else: + return text[:size - len(postfix)] + postfix return text diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -381,9 +381,14 @@ ## ARTIFACT RENDERERS +<%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)"> + + ${artifact_display_name or 'EMPTY NAME'} + + <%def name="repo_artifact_uid(repo_name, file_uid)"> - ${file_uid} + ${h.shorter(file_uid, size=12, prefix=True)} <%def name="repo_artifact_uid_action(repo_name, file_uid)">