Commit 465f4c30 authored by Jacob Schatz's avatar Jacob Schatz Committed by Robert Speicher

Merge branch 'tree-file-title' into 'master'

Added title attribute to entries in tree view

## What does this MR do?

Adds a title attribute to entries in the tree view. Moe useful when files have long names.

## What are the relevant issue numbers?

Closes #18353 


See merge request !4709
parent e4366b8a
%tr{ class: "tree-item #{tree_hex_class(blob_item)}" } %tr{ class: "tree-item #{tree_hex_class(blob_item)}" }
%td.tree-item-file-name %td.tree-item-file-name
= tree_icon(type, blob_item.mode, blob_item.name) = tree_icon(type, blob_item.mode, blob_item.name)
%span.str-truncated - file_name = blob_item.name
= link_to blob_item.name, namespace_project_blob_path(@project.namespace, @project, tree_join(@id || @commit.id, blob_item.name)) = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@id || @commit.id, blob_item.name)), title: file_name do
%span.str-truncated= file_name
%td.tree_time_ago.cgray %td.tree_time_ago.cgray
= render 'projects/tree/spinner' = render 'projects/tree/spinner'
%td.hidden-xs.tree_commit %td.hidden-xs.tree_commit
%tr{ class: "tree-item #{tree_hex_class(tree_item)}" } %tr{ class: "tree-item #{tree_hex_class(tree_item)}" }
%td.tree-item-file-name %td.tree-item-file-name
= tree_icon(type, tree_item.mode, tree_item.name) = tree_icon(type, tree_item.mode, tree_item.name)
%span.str-truncated
- path = flatten_tree(tree_item) - path = flatten_tree(tree_item)
= link_to path, namespace_project_tree_path(@project.namespace, @project, tree_join(@id || @commit.id, path)) = link_to namespace_project_tree_path(@project.namespace, @project, tree_join(@id || @commit.id, path)), title: path do
%span.str-truncated= path
%td.tree_time_ago.cgray %td.tree_time_ago.cgray
= render 'projects/tree/spinner' = render 'projects/tree/spinner'
%td.hidden-xs.tree_commit %td.hidden-xs.tree_commit
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