Commit 03770698417563abe70fdea223700ca370e9f062
1 parent
18fac587
Exists in
spb-stable
and in
3 other branches
Use css truncation instead of rails
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
10 changed files
with
38 additions
and
14 deletions
Show diff stats
app/assets/stylesheets/generic/common.scss
app/assets/stylesheets/sections/commits.scss
app/assets/stylesheets/sections/tree.scss
app/views/dashboard/_project.html.haml
1 | 1 | = link_to project_path(project), class: dom_class(project) do |
2 | 2 | .dash-project-access-icon |
3 | 3 | = visibility_level_icon(project.visibility_level) |
4 | - %span.namespace-name | |
5 | - - if project.namespace | |
6 | - = project.namespace.human_name | |
7 | - \/ | |
8 | - %span.project-name.filter-title | |
9 | - = truncate(project.name, length: 25) | |
4 | + %span.str-truncated | |
5 | + %span.namespace-name | |
6 | + - if project.namespace | |
7 | + = project.namespace.human_name | |
8 | + \/ | |
9 | + %span.project-name.filter-title | |
10 | + = project.name | |
10 | 11 | %span.arrow |
11 | 12 | %i.icon-angle-right | ... | ... |
app/views/groups/_projects.html.haml
... | ... | @@ -14,7 +14,8 @@ |
14 | 14 | = link_to project_path(project), class: dom_class(project) do |
15 | 15 | .dash-project-access-icon |
16 | 16 | = visibility_level_icon(project.visibility_level) |
17 | - %span.project-name | |
18 | - = truncate(project.name, length: 25) | |
17 | + %span.str-truncated | |
18 | + %span.project-name | |
19 | + = truncate(project.name, length: 25) | |
19 | 20 | %span.arrow |
20 | 21 | %i.icon-angle-right | ... | ... |
app/views/projects/commits/_commit.html.haml
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | .commit-row-title |
3 | 3 | = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id" |
4 | 4 | |
5 | - = link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "commit-row-message" | |
5 | + %span.str-truncated | |
6 | + = link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message" | |
6 | 7 | = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right" |
7 | 8 | .notes_count |
8 | 9 | - notes = project.notes.for_commit_id(commit.id) | ... | ... |
app/views/projects/issues/_issue.html.haml
... | ... | @@ -5,7 +5,8 @@ |
5 | 5 | |
6 | 6 | .issue-title |
7 | 7 | %span.light= "##{issue.iid}" |
8 | - = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" | |
8 | + %span.str-truncated | |
9 | + = link_to_gfm issue.title, project_issue_path(issue.project, issue), class: "row_title" | |
9 | 10 | - if issue.closed? |
10 | 11 | %small.pull-right |
11 | 12 | = "CLOSED" | ... | ... |
app/views/projects/tree/_blob_item.html.haml
1 | 1 | %tr{ class: "tree-item #{tree_hex_class(blob_item)}" } |
2 | 2 | %td.tree-item-file-name |
3 | 3 | = tree_icon(type) |
4 | - %span= link_to truncate(blob_item.name, length: 40), project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)) | |
4 | + %span.str-truncated | |
5 | + = link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)) | |
5 | 6 | %td.tree_time_ago.cgray |
6 | 7 | %span.log_loading.hide |
7 | 8 | Loading commit data... | ... | ... |
app/views/projects/tree/_tree_commit_column.html.haml
1 | -%span.tree_author= commit_author_link(commit, avatar: true, size: 16) | |
2 | -= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link" | |
1 | +%span.str-truncated | |
2 | + %span.tree_author= commit_author_link(commit, avatar: true, size: 16) | |
3 | + = link_to_gfm commit.title, project_commit_path(@project, commit.id), class: "tree-commit-link" | ... | ... |
app/views/projects/tree/_tree_item.html.haml
1 | 1 | %tr{ class: "tree-item #{tree_hex_class(tree_item)}" } |
2 | 2 | %td.tree-item-file-name |
3 | 3 | = tree_icon(type) |
4 | - %span= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) | |
4 | + %span.str-truncated | |
5 | + = link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name)) | |
5 | 6 | %td.tree_time_ago.cgray |
6 | 7 | %span.log_loading.hide |
7 | 8 | Loading commit data... | ... | ... |