Use css truncation instead of rails
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
18fac5879d
commit
0377069841
|
@ -119,3 +119,12 @@ pre.well-pre {
|
|||
padding: 0;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.str-truncated {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
max-width: 82%;
|
||||
}
|
||||
|
|
|
@ -481,6 +481,10 @@ li.commit {
|
|||
font-family: $monospace_font;
|
||||
}
|
||||
|
||||
.str-truncated {
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
.commit-row-message {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
top:-1px;
|
||||
}
|
||||
}
|
||||
|
||||
.tree_time_ago {
|
||||
min-width: 135px;
|
||||
}
|
||||
}
|
||||
|
||||
.tree_author {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
= link_to project_path(project), class: dom_class(project) do
|
||||
.dash-project-access-icon
|
||||
= visibility_level_icon(project.visibility_level)
|
||||
%span.namespace-name
|
||||
- if project.namespace
|
||||
= project.namespace.human_name
|
||||
\/
|
||||
%span.project-name.filter-title
|
||||
= truncate(project.name, length: 25)
|
||||
%span.str-truncated
|
||||
%span.namespace-name
|
||||
- if project.namespace
|
||||
= project.namespace.human_name
|
||||
\/
|
||||
%span.project-name.filter-title
|
||||
= project.name
|
||||
%span.arrow
|
||||
%i.icon-angle-right
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
= link_to project_path(project), class: dom_class(project) do
|
||||
.dash-project-access-icon
|
||||
= visibility_level_icon(project.visibility_level)
|
||||
%span.project-name
|
||||
= truncate(project.name, length: 25)
|
||||
%span.str-truncated
|
||||
%span.project-name
|
||||
= truncate(project.name, length: 25)
|
||||
%span.arrow
|
||||
%i.icon-angle-right
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
.commit-row-title
|
||||
= link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
|
||||
|
||||
= link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "commit-row-message"
|
||||
%span.str-truncated
|
||||
= link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message"
|
||||
= link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
|
||||
.notes_count
|
||||
- notes = project.notes.for_commit_id(commit.id)
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
.issue-title
|
||||
%span.light= "##{issue.iid}"
|
||||
= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
|
||||
%span.str-truncated
|
||||
= link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title"
|
||||
- if issue.closed?
|
||||
%small.pull-right
|
||||
= "CLOSED"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
%tr{ class: "tree-item #{tree_hex_class(blob_item)}" }
|
||||
%td.tree-item-file-name
|
||||
= tree_icon(type)
|
||||
%span= link_to truncate(blob_item.name, length: 40), project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
|
||||
%span.str-truncated
|
||||
= link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
|
||||
%td.tree_time_ago.cgray
|
||||
%span.log_loading.hide
|
||||
Loading commit data...
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
%span.tree_author= commit_author_link(commit, avatar: true, size: 16)
|
||||
= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link"
|
||||
%span.str-truncated
|
||||
%span.tree_author= commit_author_link(commit, avatar: true, size: 16)
|
||||
= link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "tree-commit-link"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
%tr{ class: "tree-item #{tree_hex_class(tree_item)}" }
|
||||
%td.tree-item-file-name
|
||||
= tree_icon(type)
|
||||
%span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
|
||||
%span.str-truncated
|
||||
= link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
|
||||
%td.tree_time_ago.cgray
|
||||
%span.log_loading.hide
|
||||
Loading commit data...
|
||||
|
|
Loading…
Reference in New Issue